mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Coding Standards: Use strict comparison in some wp-admin files.
Props pikamander2, mukesh27, SergeyBiryukov. Fixes #49239. git-svn-id: https://develop.svn.wordpress.org/trunk@47785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user