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

Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.
Built from https://develop.svn.wordpress.org/trunk@47785


git-svn-id: http://core.svn.wordpress.org/trunk@47561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov committed 2020-05-12 18:32:08 +00:00
1 parent 2eef7ee2ac
commit aa69c25d5f
25 files changed
+152 -106

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@ switch ( $action ) {
$location = 'media.php';
$referer = wp_get_original_referer();
if ( $referer ) {
if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) == $attachment_id ) ) {
if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) === $attachment_id ) ) {
$location = $referer;
}
}
@@ -69,7 +69,7 @@ switch ( $action ) {
if ( 'attachment' !== $att->post_type ) {
wp_die( __( 'You attempted to edit an item that isn’t an attachment. Please go back and try again.' ) );
}
if ( 'trash' == $att->post_status ) {
if ( 'trash' === $att->post_status ) {
wp_die( __( 'You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.' ) );
}