diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index 9e0f38448a..5e59868c77 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -144,12 +144,12 @@ function wp_image_editor($post_id, $msg = false) { - +
, this)" class="imgedit-crop disabled" title="">
get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) { ?>
, this)" title="">
@@ -160,15 +160,15 @@ function wp_image_editor($post_id, $msg = false) {
- +
, this)" class="imgedit-flipv" title="">
, this)" class="imgedit-fliph" title="">
- +
, this)" class="imgedit-undo disabled" title="">
, this)" class="imgedit-redo disabled" title="">

- + @@ -176,17 +176,17 @@ function wp_image_editor($post_id, $msg = false) { - +
- +
)" disabled="disabled" class="button button-primary imgedit-submit-btn" value="" />
- +
@@ -804,10 +804,11 @@ function wp_save_image( $post_id ) { $return->thumbnail = $thumb_url[0]; } else { $file_url = wp_get_attachment_url($post_id); - if ( $thumb = $meta['sizes']['thumbnail'] ) + if ( ! empty( $meta['sizes']['thumbnail'] ) && $thumb = $meta['sizes']['thumbnail'] ) { $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); - else + } else { $return->thumbnail = "$file_url?w=128&h=128"; + } } } } else {