cmb2_override_option_save_<key>

The CMB2 cmb2 override option save key hook.

Description

apply_filters( 'cmb2_override_option_save_<key>', (string) $cmb2_no_override_option_save, (unknown) $this_options, (unknown) $instance ); 

Parameters (3)

0. $cmb2_no_override_option_save (string) => 'cmb2_no_override_option_save'
The cmb2 no override option save.
1. $this_options (unknown)
The this options.
2. $instance (unknown)
The instance.

Usage

To run the hook, copy the example below.
  1. $cmb2_no_override_option_save = apply_filters( 'cmb2_override_option_save_{$key}', $cmb2_no_override_option_save, $this_options, $instance ); 
  2.  
  3. if ( !empty( $cmb2_no_override_option_save ) ) { 
  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_save_<key> callback 
  2. function filter_cmb2_override_option_save_key( $cmb2_no_override_option_save, $this_options, $instance ) { 
  3. // make filter magic happen here... 
  4. return $cmb2_no_override_option_save
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "cmb2_override_option_save_{$key}", 'filter_cmb2_override_option_save_key', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "cmb2_override_option_save_{$key}", 'filter_cmb2_override_option_save_key', 10, 3 ); 

Defined (1)

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

/includes/CMB2_Options.php  
  1. $test_save = apply_filters( "cmb2_override_option_save_{$this->key}", 'cmb2_no_override_option_save', $this->options, $this );