Changeset 47219 for trunk/src/wp-admin/includes/image-edit.php
- Timestamp:
- 02/09/2020 04:52:28 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/image-edit.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r47084 r47219 34 34 $can_restore = false; 35 35 if ( ! empty( $backup_sizes ) && isset( $backup_sizes['full-orig'], $meta['file'] ) ) { 36 $can_restore = $backup_sizes['full-orig']['file'] != wp_basename( $meta['file'] );36 $can_restore = wp_basename( $meta['file'] ) !== $backup_sizes['full-orig']['file']; 37 37 } 38 38 … … 577 577 switch ( $operation->type ) { 578 578 case 'rotate': 579 if ( $operation->angle != 0) {579 if ( 0 != $operation->angle ) { 580 580 if ( $image instanceof WP_Image_Editor ) { 581 581 $image->rotate( $operation->angle ); … … 586 586 break; 587 587 case 'flip': 588 if ( $operation->axis != 0) {588 if ( 0 != $operation->axis ) { 589 589 if ( $image instanceof WP_Image_Editor ) { 590 590 $image->flip( ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 ); … … 955 955 update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes ); 956 956 957 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full') {957 if ( 'thumbnail' === $target || 'all' === $target || 'full' === $target ) { 958 958 // Check if it's an image edit from attachment edit screen. 959 959 if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) {
Note: See TracChangeset
for help on using the changeset viewer.