cmb2_taxonomy_radio_<field_id>_default_value

Default (option-none) taxonomy-radio value.

Description

apply_filters( 'cmb2_taxonomy_radio_<field_id>_default_value', (string) $option_none_value ); 

The dynamic portion(s) of the hook name refer to the field id attribute.

Parameters (1)

0. $option_none_value (string)
Default (option-none) taxonomy-radio value.

Usage

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

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/libraries/metabox/includes/types/CMB2_Type_Taxonomy_Radio.php  
  1. $option_none_value = apply_filters( "cmb2_taxonomy_radio_{$field_id}_default_value", $option_none_value );