hidden_meta_boxes

Filters the list of hidden meta boxes.

Description

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

Parameters (3)

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

Usage

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

Defined (1)

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

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