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

Merges [36154] to the 4.4 branch.
Props Compute, jorbin, voldemortensen.
Fixes #35057.

Built from https://develop.svn.wordpress.org/branches/4.4@36155


git-svn-id: http://core.svn.wordpress.org/branches/4.4@36121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-01-02 04:45:22 +00:00
parent dd821410c9
commit ced6b063a3
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.4.1-alpha-36153';
$wp_version = '4.4.1-alpha-36155';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.