List Tables: When a user has hidden all columns, do not override that with the `default_hidden_columns` filter.

Props Compute, jorbin, voldemortensen.
Fixes #35057

Built from https://develop.svn.wordpress.org/trunk@36154


git-svn-id: http://core.svn.wordpress.org/trunk@36120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-01-02 04:44:27 +00:00
parent 267c524a07
commit f802d26f10
2 changed files with 7 additions and 3 deletions

View File

@ -57,7 +57,9 @@ function get_hidden_columns( $screen ) {
$hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' );
if ( ! $hidden ) {
$use_defaults = ! is_array( $hidden );
if ( $use_defaults ) {
$hidden = array();
/**
@ -75,11 +77,13 @@ function get_hidden_columns( $screen ) {
* Filter the list of hidden columns.
*
* @since 4.4.0
* @since 4.4.1 Added the `use_defaults` parameter.
*
* @param array $hidden An array of hidden columns.
* @param WP_Screen $screen WP_Screen object of the current screen.
* @param bool $use_defaults Whether to show the default columns.
*/
return apply_filters( 'hidden_columns', $hidden, $screen );
return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36143';
$wp_version = '4.5-alpha-36154';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.