Changeset 47808 for trunk/src/wp-admin/includes/image-edit.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r47397 r47808 777 777 $fheight = ! empty( $_REQUEST['fheight'] ) ? intval( $_REQUEST['fheight'] ) : 0; 778 778 $target = ! empty( $_REQUEST['target'] ) ? preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['target'] ) : ''; 779 $scale = ! empty( $_REQUEST['do'] ) && 'scale' == $_REQUEST['do'];779 $scale = ! empty( $_REQUEST['do'] ) && 'scale' === $_REQUEST['do']; 780 780 781 781 if ( $scale && $fwidth > 0 && $fheight > 0 ) { … … 831 831 isset( $backup_sizes['full-orig'] ) && $backup_sizes['full-orig']['file'] != $basename ) { 832 832 833 if ( 'thumbnail' == $target ) {833 if ( 'thumbnail' === $target ) { 834 834 $new_path = "{$dirname}/{$filename}-temp.{$ext}"; 835 835 } else { … … 881 881 $meta['height'] = $size['height']; 882 882 883 if ( $success && ( 'nothumb' == $target || 'all'== $target ) ) {883 if ( $success && ( 'nothumb' === $target || 'all' === $target ) ) { 884 884 $sizes = get_intermediate_image_sizes(); 885 if ( 'nothumb' == $target ) {885 if ( 'nothumb' === $target ) { 886 886 $sizes = array_diff( $sizes, array( 'thumbnail' ) ); 887 887 } … … 890 890 $return->fw = $meta['width']; 891 891 $return->fh = $meta['height']; 892 } elseif ( 'thumbnail' == $target ) {892 } elseif ( 'thumbnail' === $target ) { 893 893 $sizes = array( 'thumbnail' ); 894 894 $success = true; … … 959 959 if ( 'thumbnail' === $target || 'all' === $target || 'full' === $target ) { 960 960 // Check if it's an image edit from attachment edit screen. 961 if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) {961 if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' === $_REQUEST['context'] ) { 962 962 $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true ); 963 963 $return->thumbnail = $thumb_url[0];
Note: See TracChangeset
for help on using the changeset viewer.