Changeset 19223 for trunk/wp-admin/includes/file.php
- Timestamp:
- 11/08/2011 10:23:40 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/file.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r19054 r19223 330 330 return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); 331 331 332 // If a resize was requested, perform the resize.333 $image_resize = isset( $_POST['image_resize'] ) && 'true' == $_POST['image_resize'];334 $do_resize = apply_filters( 'wp_upload_resize', $image_resize );335 $size = @getimagesize( $tmp_file );336 if ( $do_resize && $size ) {337 $old_temp = $tmp_file;338 $tmp_file = image_resize( $tmp_file, (int) get_option('large_size_w'), (int) get_option('large_size_h'), 0, 'resized');339 if ( ! is_wp_error($tmp_file) ) {340 unlink($old_temp);341 } else {342 $tmp_file = $old_temp;343 }344 }345 346 332 // Copy the temporary file into its destination 347 333 $new_file = $uploads['path'] . "/$filename";
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)