cmb2_show_on_term_add_form_<cmb_cmb_id>

The Maps Builder cmb2 show on term add form cmb id hook.

Description

apply_filters( 'cmb2_show_on_term_add_form_<cmb_cmb_id>', (unknown) $show_on_add, (unknown) $this_cmb ); 

Parameters (2)

0. $show_on_add (unknown)
The show on add.
1. $this_cmb (unknown)
The this cmb.

Usage

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

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/CMB2_hookup.php  
  1. $show_on_add = apply_filters( "cmb2_show_on_term_add_form_{$this->cmb->cmb_id}", $show_on_add, $this->cmb );