From b3c6ad3a6ba4a83e2ed342b5385b7c8faba8c044 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Fri, 1 Oct 2021 18:39:58 +0000 Subject: [PATCH] Administration: Enable first and last page buttons in `WP_List_Table::pagination()`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Built from https://develop.svn.wordpress.org/trunk@51880 git-svn-id: http://core.svn.wordpress.org/trunk@51473 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 6 ------ wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 2cae7f695a..3a658b9ace 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -910,16 +910,10 @@ class WP_List_Table { $disable_first = true; $disable_prev = true; } - if ( 2 == $current ) { - $disable_first = true; - } if ( $total_pages == $current ) { $disable_last = true; $disable_next = true; } - if ( $total_pages - 1 == $current ) { - $disable_last = true; - } if ( $disable_first ) { $page_links[] = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index feaa228c21..38e0c359da 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51879'; +$wp_version = '5.9-alpha-51880'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.