Make WordPress Core

Changeset 51880


Ignore:
Timestamp:
10/01/2021 06:38:52 PM (3 years ago)
Author:
hellofromTonya
Message:

Administration: Enable first and last page buttons in WP_List_Table::pagination().

Previously the first and last page pagination buttons were disabled when on their next or previous page respectively. This commit removes that unnecessary logic to keep these buttons enabled and avoid confusion in the user's navigation workflow.

New behavior:

  • When on page 2, the go to first page « button is enabled
  • When on the page before the last page, the go to last page » button is enabled

Follow-up to [32948], [47219].

Props wp_kc, ronakganatra, knutsp, sabernhardt, Hareesh Pillai, audrasjb, hellofromTonya.
Fixes #42763.

File:
1 edited

Legend:

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

    r51850 r51880  
    911911            $disable_prev  = true;
    912912        }
    913         if ( 2 == $current ) {
    914             $disable_first = true;
    915         }
    916913        if ( $total_pages == $current ) {
    917914            $disable_last = true;
    918915            $disable_next = true;
    919         }
    920         if ( $total_pages - 1 == $current ) {
    921             $disable_last = true;
    922916        }
    923917
Note: See TracChangeset for help on using the changeset viewer.