diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 7fd300ebe8..d52ebc9832 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -151,7 +151,7 @@ class WP_Posts_List_Table extends WP_List_Table { if ( $this->hierarchical_display ) { $total_items = $wp_query->post_count; - } elseif ( isset( $_REQUEST['s'] ) ) { + } elseif ( $wp_query->found_posts || $this->get_pagenum() === 1 ) { $total_items = $wp_query->found_posts; } else { $post_counts = (array) wp_count_posts( $post_type, 'readable' ); @@ -172,8 +172,6 @@ class WP_Posts_List_Table extends WP_List_Table { } } - $total_pages = ceil( $total_items / $per_page ); - if ( ! empty( $_REQUEST['mode'] ) ) { $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list'; set_user_setting ( 'posts_list_mode', $mode ); @@ -185,7 +183,6 @@ class WP_Posts_List_Table extends WP_List_Table { $this->set_pagination_args( array( 'total_items' => $total_items, - 'total_pages' => $total_pages, 'per_page' => $per_page ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 826e63281e..550f1ccd26 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35682'; +$wp_version = '4.4-beta4-35683'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.