WordPress.org

Make WordPress Core

Changeset 36154


Ignore:
Timestamp:
01/02/2016 04:43:07 AM (5 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/screen.php

    r34169 r36154  
    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.