--- a/wp/wp-admin/includes/class-wp-list-table.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/class-wp-list-table.php Tue Sep 27 16:37:53 2022 +0200
@@ -207,12 +207,14 @@
* @since 4.0.0
*
* @param string $name Property to check if set.
- * @return bool Whether the property is set.
+ * @return bool Whether the property is a back-compat property and it is set.
*/
public function __isset( $name ) {
if ( in_array( $name, $this->compat_fields, true ) ) {
return isset( $this->$name );
}
+
+ return false;
}
/**
@@ -313,6 +315,8 @@
if ( isset( $this->_pagination_args[ $key ] ) ) {
return $this->_pagination_args[ $key ];
}
+
+ return 0;
}
/**
@@ -819,14 +823,14 @@
*
* @since 3.1.0
*
- * @param string $option
- * @param int $default
+ * @param string $option User option name.
+ * @param int $default_value Optional. The number of items to display. Default 20.
* @return int
*/
- protected function get_items_per_page( $option, $default = 20 ) {
+ protected function get_items_per_page( $option, $default_value = 20 ) {
$per_page = (int) get_user_option( $option );
if ( empty( $per_page ) || $per_page < 1 ) {
- $per_page = $default;
+ $per_page = $default_value;
}
/**
@@ -906,16 +910,10 @@
$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>';