Changeset 47550 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r47245 r47550 977 977 check_ajax_referer( "approve-comment_$id" ); 978 978 979 if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) {979 if ( in_array( $current, array( 'unapproved', 'spam' ), true ) ) { 980 980 $result = wp_set_comment_status( $comment, 'approve', true ); 981 981 } else { … … 1272 1272 if ( empty( $post->post_status ) ) { 1273 1273 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 ) ) { 1275 1275 wp_die( __( 'Error: You are replying to a comment on a draft post.' ) ); 1276 1276 } … … 2058 2058 2059 2059 // 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 ) ) { 2061 2061 $post['post_status'] = 'publish'; 2062 2062 $data['post_name'] = wp_unique_post_slug( $data['post_name'], $post['ID'], $post['post_status'], $post['post_type'], $post['post_parent'] ); … … 2526 2526 2527 2527 // 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 ) ) { 2529 2529 $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'] ); 2530 2530 … … 2853 2853 $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) ); 2854 2854 2855 if ( in_array( $pointer, $dismissed ) ) {2855 if ( in_array( $pointer, $dismissed, true ) ) { 2856 2856 wp_die( 0 ); 2857 2857 }
Note: See TracChangeset
for help on using the changeset viewer.