Make WordPress Core

Changeset 60613

Timestamp:
08/06/2025 10:35:39 PM (3 months ago)
Author:
audrasjb
Message:

Administration: Avoid rendering empty bottom tablenav container when pagination is hidden.

This changeset removes the bottom tablenav container on taxonomy term list screens when it contains a hidden .tablenav-pages.no-pages element, to prevent unnecessary vertical spacing when no tags exist.

Props sainathpoojary, dilipbheda, audrasjb, abcd95, dhruvang21, SirLouen.
Fixes #63369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r60292 r60613  
    10221022     */
    10231023    protected function pagination( $which ) {
    1024         if ( empty( $this->_pagination_args ) ) {
     1024        if ( empty( $this->_pagination_args['total_items'] ) ) {
    10251025            return;
    10261026        }
     
    16691669     */
    16701670    protected function display_tablenav( $which ) {
     1671        if ( 'bottom' === $which && ! $this->has_items() ) {
     1672            return;
     1673        }
    16711674        if ( 'top' === $which ) {
    16721675            wp_nonce_field( 'bulk-' . $this->_args['plural'] );
Note: See TracChangeset for help on using the changeset viewer.