mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Revert [19223] and only stop showing the checkbox, props nacin, see #19174
git-svn-id: https://develop.svn.wordpress.org/trunk@19225 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -329,6 +329,20 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
|
||||
if ( false === @ move_uploaded_file( $file['tmp_name'], $tmp_file ) )
|
||||
return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) );
|
||||
|
||||
// If a resize was requested, perform the resize.
|
||||
$image_resize = isset( $_POST['image_resize'] ) && 'true' == $_POST['image_resize'];
|
||||
$do_resize = apply_filters( 'wp_upload_resize', $image_resize );
|
||||
$size = @getimagesize( $tmp_file );
|
||||
if ( $do_resize && $size ) {
|
||||
$old_temp = $tmp_file;
|
||||
$tmp_file = image_resize( $tmp_file, (int) get_option('large_size_w'), (int) get_option('large_size_h'), 0, 'resized');
|
||||
if ( ! is_wp_error($tmp_file) ) {
|
||||
unlink($old_temp);
|
||||
} else {
|
||||
$tmp_file = $old_temp;
|
||||
}
|
||||
}
|
||||
|
||||
// Copy the temporary file into its destination
|
||||
$new_file = $uploads['path'] . "/$filename";
|
||||
copy( $tmp_file, $new_file );
|
||||
|
||||
Reference in New Issue
Block a user