diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/includes/class-wp-list-table.php --- a/wp/wp-admin/includes/class-wp-list-table.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/includes/class-wp-list-table.php Tue Dec 15 13:49:49 2020 +0100 @@ -166,8 +166,8 @@ if ( empty( $this->modes ) ) { $this->modes = array( - 'list' => __( 'List View' ), - 'excerpt' => __( 'Excerpt View' ), + 'list' => __( 'Compact view' ), + 'excerpt' => __( 'Extended view' ), ); } } @@ -181,7 +181,7 @@ * @return mixed Property. */ public function __get( $name ) { - if ( in_array( $name, $this->compat_fields ) ) { + if ( in_array( $name, $this->compat_fields, true ) ) { return $this->$name; } } @@ -196,7 +196,7 @@ * @return mixed Newly-set property. */ public function __set( $name, $value ) { - if ( in_array( $name, $this->compat_fields ) ) { + if ( in_array( $name, $this->compat_fields, true ) ) { return $this->$name = $value; } } @@ -210,7 +210,7 @@ * @return bool Whether the property is set. */ public function __isset( $name ) { - if ( in_array( $name, $this->compat_fields ) ) { + if ( in_array( $name, $this->compat_fields, true ) ) { return isset( $this->$name ); } } @@ -223,7 +223,7 @@ * @param string $name Property to unset. */ public function __unset( $name ) { - if ( in_array( $name, $this->compat_fields ) ) { + if ( in_array( $name, $this->compat_fields, true ) ) { unset( $this->$name ); } } @@ -233,13 +233,13 @@ * * @since 4.0.0 * - * @param string $name Method to call. - * @param array $arguments Arguments to pass when calling. + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. * @return mixed|bool Return value of the callback, false otherwise. */ public function __call( $name, $arguments ) { - if ( in_array( $name, $this->compat_methods ) ) { - return call_user_func_array( array( $this, $name ), $arguments ); + if ( in_array( $name, $this->compat_methods, true ) ) { + return $this->$name( ...$arguments ); } return false; } @@ -251,7 +251,7 @@ * @abstract */ public function ajax_user_can() { - die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' ); + die( 'function WP_List_Table::ajax_user_can() must be overridden in a subclass.' ); } /** @@ -263,7 +263,7 @@ * @abstract */ public function prepare_items() { - die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' ); + die( 'function WP_List_Table::prepare_items() must be overridden in a subclass.' ); } /** @@ -372,8 +372,10 @@ } /** - * Get an associative array ( id => link ) with the list - * of views available on this table. + * Gets the list of views available on this table. + * + * The format is an associative array: + * - `'id' => 'link'` * * @since 3.1.0 * @@ -384,7 +386,7 @@ } /** - * Display the list of views available on this table. + * Displays the list of views available on this table. * * @since 3.1.0 */ @@ -396,7 +398,7 @@ * The dynamic portion of the hook name, `$this->screen->id`, refers * to the ID of the current screen, usually a string. * - * @since 3.5.0 + * @since 3.1.0 * * @param string[] $views An array of available list table views. */ @@ -417,8 +419,10 @@ } /** - * Get an associative array ( option_name => option_title ) with the list - * of bulk actions available on this table. + * Gets the list of bulk actions available on this table. + * + * The format is an associative array: + * - `'option_name' => 'option_title'` * * @since 3.1.0 * @@ -429,7 +433,7 @@ } /** - * Display the bulk actions dropdown. + * Displays the bulk actions dropdown. * * @since 3.1.0 * @@ -439,20 +443,20 @@ protected function bulk_actions( $which = '' ) { if ( is_null( $this->_actions ) ) { $this->_actions = $this->get_bulk_actions(); + /** - * Filters the list table Bulk Actions drop-down. + * Filters the list table bulk actions drop-down. * * The dynamic portion of the hook name, `$this->screen->id`, refers * to the ID of the current screen, usually a string. * - * This filter can currently only be used to remove bulk actions. - * - * @since 3.5.0 + * @since 3.1.0 * * @param string[] $actions An array of the available bulk actions. */ - $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); - $two = ''; + $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + + $two = ''; } else { $two = '2'; } @@ -463,7 +467,7 @@ echo ''; echo '