From b1d93d6d6a35c7d150ba9d09f17959531137daf3 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Nov 2015 23:13:46 +0000 Subject: [PATCH] List Tables: after [34271], account for searches when calculating pagination. Fixes #29870. git-svn-id: https://develop.svn.wordpress.org/trunk@35622 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-posts-list-table.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index cca5a1ea70..091ed7a083 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -175,6 +175,8 @@ class WP_Posts_List_Table extends WP_List_Table { if ( $this->hierarchical_display ) { $total_items = $wp_query->post_count; + } elseif ( isset( $_REQUEST['s'] ) ) { + $total_items = $wp_query->found_posts; } else { $post_counts = (array) wp_count_posts( $post_type, 'readable' );