From 785cb6cc7d4d17ef0aa16b187dcfb6a8dc513e1b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 1 Dec 2020 16:33:05 +0000 Subject: [PATCH] Media: Revert [49567]. This addresses a regression with the pagination section in Media Library no longer taking additional query filtering into account. Props iCaleb, trepmal, peterwilsoncc. See #39968. Built from https://develop.svn.wordpress.org/trunk@49720 git-svn-id: http://core.svn.wordpress.org/trunk@49443 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-media-list-table.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index b85662611b..031f306987 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -100,7 +100,8 @@ class WP_Media_List_Table extends WP_List_Table { $this->set_pagination_args( array( - 'total_items' => array_sum( (array) wp_count_attachments() ), + 'total_items' => $wp_query->found_posts, + 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page'], ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index cf50952617..2718228cba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49718'; +$wp_version = '5.7-alpha-49720'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.