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. Built from https://develop.svn.wordpress.org/trunk@51880 git-svn-id: http://core.svn.wordpress.org/trunk@51473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3fd3bc0cde
commit
b3c6ad3a6b
|
@ -910,16 +910,10 @@ class WP_List_Table {
|
||||||
$disable_first = true;
|
$disable_first = true;
|
||||||
$disable_prev = true;
|
$disable_prev = true;
|
||||||
}
|
}
|
||||||
if ( 2 == $current ) {
|
|
||||||
$disable_first = true;
|
|
||||||
}
|
|
||||||
if ( $total_pages == $current ) {
|
if ( $total_pages == $current ) {
|
||||||
$disable_last = true;
|
$disable_last = true;
|
||||||
$disable_next = true;
|
$disable_next = true;
|
||||||
}
|
}
|
||||||
if ( $total_pages - 1 == $current ) {
|
|
||||||
$disable_last = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $disable_first ) {
|
if ( $disable_first ) {
|
||||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span>';
|
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span>';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue