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:
@@ -42,7 +42,7 @@ if ( ! current_user_can( 'upload_files' ) ) {
|
||||
if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
|
||||
$id = intval( $_REQUEST['attachment_id'] );
|
||||
$post = get_post( $id );
|
||||
if ( 'attachment' != $post->post_type ) {
|
||||
if ( 'attachment' !== $post->post_type ) {
|
||||
wp_die( __( 'Invalid post type.' ) );
|
||||
}
|
||||
if ( ! current_user_can( 'edit_post', $id ) ) {
|
||||
|
||||
Reference in New Issue
Block a user