Ticket #18206: 18206.fix.resize.patch
File 18206.fix.resize.patch, 1.4 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/file.php
330 330 return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); 331 331 332 332 // If a resize was requested, perform the resize. 333 $do_resize = apply_filters( 'wp_upload_resize', isset( $_REQUEST['image_resize'] ) ); 333 $image_resize = isset( $_REQUEST['image_resize'] ) && 'true' == $_POST['image_resize'] ? true : false; 334 $do_resize = apply_filters( 'wp_upload_resize', $image_resize ); 334 335 $size = @getimagesize( $tmp_file ); 335 336 if ( $do_resize && $size ) { 336 337 $old_temp = $tmp_file; -
wp-admin/includes/media.php
2283 2283 */ 2284 2284 function media_upload_max_image_resize() { 2285 2285 ?> 2286 <input name="image_resize" type="checkbox" id="image_resize" value="1" /> 2287 <label for="image_resize"><?php printf( __( 'Scale images to max width %1$dpx or max height %2$dpx'), get_option('large_size_w'), get_option('large_size_h') ); ?></label> 2286 <label for="image_resize"> 2287 <input name="image_resize" type="checkbox" id="image_resize" value="true" /> 2288 <?php printf( __( 'Scale images to max width %1$dpx or max height %2$dpx' ), get_option( 'large_size_w' ), get_option( 'large_size_h' ) ); ?> 2289 </label> 2288 2290 <?php 2289 2291 } 2290 2292