mirror of
git://develop.git.wordpress.org/
synced 2025-04-27 07:32:32 +02:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51880 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4226e71828
commit
1f0aed81a6
@ -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[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user