Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:51:22 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions in some wp-admin files.

Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan.
Fixes #44365, #48455.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/media.php

    r47198 r47218  
    7070            wp_die( __( 'You attempted to edit an item that isn’t an attachment. Please go back and try again.' ) );
    7171        }
    72         if ( $att->post_status == 'trash' ) {
     72        if ( 'trash' == $att->post_status ) {
    7373            wp_die( __( 'You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.' ) );
    7474        }
Note: See TracChangeset for help on using the changeset viewer.