default_option_<option_name>

The WordPress Core default option name hook.

Description

add_filter( 'default_option_<option_name>', (string) $filter_default_option, (int) $int, (int) $int ); 

Parameters (3)

0. $filter_default_option (string) => 'filter_default_option'
The filter default option.
1. $int (int) => 10
The int.
2. $int (int) => 3
The int.

Usage

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

Defined (1)

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

/wp-includes/option.php  
  1. add_filter( "default_option_{$option_name}", 'filter_default_option', 10, 3 );