cmb2_override_option_get_<key>

The Maps Builder cmb2 override option get key hook.

Description

apply_filters( 'cmb2_override_option_get_<key>', (string) $cmb2_no_override_option_get, (unknown) $default, (unknown) $instance ); 

Parameters (3)

0. $cmb2_no_override_option_get (string) => 'cmb2_no_override_option_get'
The cmb2 no override option get.
1. $default (unknown)
The default.
2. $instance (unknown)
The instance.

Usage

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

Defined (2)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/CMB2_Options.php  
  1. $test_get = apply_filters( "cmb2_override_option_get_{$this->key}", 'cmb2_no_override_option_get', $default, $this ); 
/includes/libraries/metabox/includes/CMB2_Options.php  
  1. $test_get = apply_filters( "cmb2_override_option_get_{$this->key}", 'cmb2_no_override_option_get', $default, $this );