cmb_show_on

Add metaboxes (to 'post' object type).

Description

apply_filters( 'cmb_show_on', (bool) $true, (unknown) $this_meta_box ); 

Parameters (2)

0. $true (bool) => true
The true.
1. $this_meta_box (unknown)
The this meta box.

Usage

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

Defined (4)

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

/admin/includes/CMBF/init.php  
  1. if ( apply_filters( 'cmb_show_on', true, $this->_meta_box ) ) 
  1. if ( apply_filters( 'cmb_show_on', true, $this->_meta_box ) ) 
  1. if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) ) 
  1. if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) )