WordPress.org

Make WordPress Core

Changeset 49721 for branches/5.6


Ignore:
Timestamp:
12/01/2020 04:33:29 PM (12 months ago)
Author:
SergeyBiryukov
Message:

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.
Reviewed by peterwilsoncc, SergeyBiryukov.
Merges [49720] to the 5.6 branch.
See #39968.

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

  • branches/5.6/src/wp-admin/includes/class-wp-media-list-table.php

    r49567 r49721  
    101101        $this->set_pagination_args(
    102102            array(
    103                 'total_items' => array_sum( (array) wp_count_attachments() ),
     103                'total_items' => $wp_query->found_posts,
     104                'total_pages' => $wp_query->max_num_pages,
    104105                'per_page'    => $wp_query->query_vars['posts_per_page'],
    105106            )
Note: See TracChangeset for help on using the changeset viewer.