mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-19 21:15:23 +00:00
Sanitize options for resizing in the uploader, props mhauan, nacin, fixes #19399
git-svn-id: http://svn.automattic.com/wordpress/trunk@19494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5b248a72c8
commit
5ec6bd4833
@ -1350,7 +1350,16 @@ $plupload_init = apply_filters( 'plupload_init', $plupload_init );
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var resize_height = <?php echo get_option('large_size_h', 1024); ?>, resize_width = <?php echo get_option('large_size_w', 1024); ?>,
|
<?php
|
||||||
|
// Verify size is an int. If not return default value.
|
||||||
|
$large_size_h = absint( get_option('large_size_h') );
|
||||||
|
if( !$large_size_h )
|
||||||
|
$large_size_h = 1024;
|
||||||
|
$large_size_w = absint( get_option('large_size_w') );
|
||||||
|
if( !$large_size_w )
|
||||||
|
$large_size_w = 1024;
|
||||||
|
?>
|
||||||
|
var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
|
||||||
wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
|
wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user