Make WordPress Core


Ignore:
Timestamp:
05/12/2020 06:30:03 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in some wp-admin files.

Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.

File:
1 edited

Legend:

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

    r47218 r47785  
    3030            $referer  = wp_get_original_referer();
    3131            if ( $referer ) {
    32                 if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) == $attachment_id ) ) {
     32                if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) === $attachment_id ) ) {
    3333                    $location = $referer;
    3434                }
     
    7070            wp_die( __( 'You attempted to edit an item that isn’t an attachment. Please go back and try again.' ) );
    7171        }
    72         if ( 'trash' == $att->post_status ) {
     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.