- Timestamp:
- 04/05/2020 03:00:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r47472 r47550 162 162 $post_counts = (array) wp_count_posts( $post_type, 'readable' ); 163 163 164 if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'], $avail_post_stati ) ) {164 if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'], $avail_post_stati, true ) ) { 165 165 $total_items = $post_counts[ $_REQUEST['post_status'] ]; 166 166 } elseif ( isset( $_REQUEST['show_sticky'] ) && $_REQUEST['show_sticky'] ) { … … 347 347 $status_name = $status->name; 348 348 349 if ( ! in_array( $status_name, $avail_post_stati ) || empty( $num_posts->$status_name ) ) {349 if ( ! in_array( $status_name, $avail_post_stati, true ) || empty( $num_posts->$status_name ) ) { 350 350 continue; 351 351 } … … 392 392 393 393 // Sticky comes after Publish, or if not listed, after All. 394 $split = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ) );394 $split = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ), true ); 395 395 $status_links = array_merge( array_slice( $status_links, 0, $split ), $sticky_link, array_slice( $status_links, $split ) ); 396 396 } … … 647 647 648 648 $post_status = ! empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all'; 649 if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ) ) ) {649 if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ), true ) ) { 650 650 $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>'; 651 651 } … … 1385 1385 1386 1386 if ( is_post_type_viewable( $post_type_object ) ) { 1387 if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {1387 if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) { 1388 1388 if ( $can_edit_post ) { 1389 1389 $preview_link = get_preview_post_link( $post );
Note: See TracChangeset
for help on using the changeset viewer.