@@ -976,7 +976,7 @@ function wp_ajax_dim_comment() {
976976
977977 check_ajax_referer ( "approve-comment_ $ id " );
978978
979- if ( in_array ( $ current , array ( 'unapproved ' , 'spam ' ) ) ) {
979+ if ( in_array ( $ current , array ( 'unapproved ' , 'spam ' ), true ) ) {
980980 $ result = wp_set_comment_status ( $ comment , 'approve ' , true );
981981 } else {
982982 $ result = wp_set_comment_status ( $ comment , 'hold ' , true );
@@ -1271,7 +1271,7 @@ function wp_ajax_replyto_comment( $action ) {
12711271
12721272 if ( empty ( $ post ->post_status ) ) {
12731273 wp_die ( 1 );
1274- } elseif ( in_array ( $ post ->post_status , array ( 'draft ' , 'pending ' , 'trash ' ) ) ) {
1274+ } elseif ( in_array ( $ post ->post_status , array ( 'draft ' , 'pending ' , 'trash ' ), true ) ) {
12751275 wp_die ( __ ( 'Error: You are replying to a comment on a draft post. ' ) );
12761276 }
12771277
@@ -2057,7 +2057,7 @@ function wp_ajax_inline_save() {
20572057 }
20582058
20592059 // Hack: wp_unique_post_slug() doesn't work for drafts, so we will fake that our post is published.
2060- if ( ! empty ( $ data ['post_name ' ] ) && in_array ( $ post ['post_status ' ], array ( 'draft ' , 'pending ' ) ) ) {
2060+ if ( ! empty ( $ data ['post_name ' ] ) && in_array ( $ post ['post_status ' ], array ( 'draft ' , 'pending ' ), true ) ) {
20612061 $ post ['post_status ' ] = 'publish ' ;
20622062 $ data ['post_name ' ] = wp_unique_post_slug ( $ data ['post_name ' ], $ post ['ID ' ], $ post ['post_status ' ], $ post ['post_type ' ], $ post ['post_parent ' ] );
20632063 }
@@ -2525,7 +2525,7 @@ function wp_ajax_upload_attachment() {
25252525 }
25262526
25272527 // If the context is custom header or background, make sure the uploaded file is an image.
2528- if ( isset ( $ post_data ['context ' ] ) && in_array ( $ post_data ['context ' ], array ( 'custom-header ' , 'custom-background ' ) ) ) {
2528+ if ( isset ( $ post_data ['context ' ] ) && in_array ( $ post_data ['context ' ], array ( 'custom-header ' , 'custom-background ' ), true ) ) {
25292529 $ wp_filetype = wp_check_filetype_and_ext ( $ _FILES ['async-upload ' ]['tmp_name ' ], $ _FILES ['async-upload ' ]['name ' ] );
25302530
25312531 if ( ! wp_match_mime_types ( 'image ' , $ wp_filetype ['type ' ] ) ) {
@@ -2852,7 +2852,7 @@ function wp_ajax_dismiss_wp_pointer() {
28522852
28532853 $ dismissed = array_filter ( explode ( ', ' , (string ) get_user_meta ( get_current_user_id (), 'dismissed_wp_pointers ' , true ) ) );
28542854
2855- if ( in_array ( $ pointer , $ dismissed ) ) {
2855+ if ( in_array ( $ pointer , $ dismissed, true ) ) {
28562856 wp_die ( 0 );
28572857 }
28582858
0 commit comments