default_hidden_columns

Filters the default list of hidden columns.

Description

apply_filters( 'default_hidden_columns', (array) $hidden, (WP_Screen) $screen ); 

Parameters (2)

0. $hidden (array)
An array of columns hidden by default.
1. $screen (WP_Screen)
WP_Screen object of the current screen.

Usage

To run the hook, copy the example below.
  1. $hidden = apply_filters( 'default_hidden_columns', $hidden, $screen ); 
  2.  
  3. if ( !empty( $hidden ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the default_hidden_columns callback 
  2. function filter_default_hidden_columns( $hidden, $screen ) { 
  3. // make filter magic happen here... 
  4. return $hidden
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'default_hidden_columns', 'filter_default_hidden_columns', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'default_hidden_columns', 'filter_default_hidden_columns', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/screen.php  
  1. $hidden = apply_filters( 'default_hidden_columns', $hidden, $screen );