Make WordPress Core


Ignore:
Timestamp:
01/02/2016 04:44:30 AM (9 years ago)
Author:
dd32
Message:

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.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-admin/includes/screen.php

    r34169 r36155  
    5858    $hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' );
    5959
    60     if ( ! $hidden ) {
     60    $use_defaults = ! is_array( $hidden );
     61
     62    if ( $use_defaults ) {
    6163        $hidden = array();
    6264
     
    7678     *
    7779     * @since 4.4.0
     80     * @since 4.4.1     Added the `use_defaults` parameter.
    7881     *
    7982     * @param array     $hidden An array of hidden columns.
    8083     * @param WP_Screen $screen WP_Screen object of the current screen.
     84     * @param bool      $use_defaults Whether to show the default columns.
    8185     */
    82     return apply_filters( 'hidden_columns', $hidden, $screen );
     86    return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );
    8387}
    8488
Note: See TracChangeset for help on using the changeset viewer.