Make WordPress Core

Opened 4 years ago

#41688 new defect (bug)

Wrong term pagination when altering the term query in custom taxonomy terms list

Reported by: opportus Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: ui, administration, template Cc:


WP outputs the wrong term pagination if we alter the term query in custom taxonomy terms list with for example the list_terms_exclusions filter hook.
In the screenshot below, we should have only 3 items in the pagination, but as you can see we get 21 items instead.


I believe the problem comes from this line:


'total_items' => wp_count_terms( $this->screen->taxonomy, compact( 'search' ) ),

Shouldn't the pagination be defined based on the term query's result instead?

For more details about this issue, see:


Change History (0)

Note: See TracTickets for help on using tickets.