[wp-trac] [WordPress Trac] #42763: class-wp-list-table unnecessarily disables first and last pagination buttons
WordPress Trac
noreply at wordpress.org
Thu Nov 30 22:04:29 UTC 2017
#42763: class-wp-list-table unnecessarily disables first and last pagination
buttons
--------------------------------+-----------------------------
Reporter: wp_kc | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9.1
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
protected function pagination($which) in class-wp-list-table.php
unnecessarily disables the << pagination button if you are on page 2 and
disabled the >> pagination button if you are on the next to last page.
That seems a bit pedantic and completely unnecessary.
If I am on page 2 of a multi-page list, I should be able to click either
<< or < to get back to the first page. If I am on the next to last page,
I should be able to click either > or >> to get to the last page. It does
not make sense to disable buttons that should logically work in these two
conditions.
The following code starting at line 743 of class-wp-list-table.php...
{{{#!php
<?php
if ( $current == 1 ) {
$disable_first = true;
$disable_prev = true;
}
if ( $current == 2 ) {
$disable_first = true;
}
if ( $current == $total_pages ) {
$disable_last = true;
$disable_next = true;
}
if ( $current == $total_pages - 1 ) {
$disable_last = true;
}
}}}
...should be changed too...
{{{#!php
<?php
if ( $current == 1 ) {
$disable_first = true;
$disable_prev = true;
}
if ( $current == $total_pages ) {
$disable_last = true;
$disable_next = true;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42763>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list