hidden_columns

Filters the list of hidden columns.

Description

apply_filters( 'hidden_columns', (array) $hidden, (WP_Screen) $screen, (bool) $use_defaults ); 

Parameters (3)

0. $hidden (array)
An array of hidden columns.
1. $screen (WP_Screen)
WP_Screen object of the current screen.
2. $use_defaults (bool)
Whether to show the default columns.

Usage

To run the hook, copy the example below.
  1. $hidden = apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults ); 
  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 hidden_columns callback 
  2. function filter_hidden_columns( $hidden, $screen, $use_defaults ) { 
  3. // make filter magic happen here... 
  4. return $hidden
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'hidden_columns', 'filter_hidden_columns', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'hidden_columns', 'filter_hidden_columns', 10, 3 ); 

Defined (1)

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

/wp-admin/includes/screen.php  
  1. return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );