WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
74 | case 'option' : |
75 | if ( empty( $this->id_data[ 'keys' ] ) ) |
76 | add_filter( 'pre_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) ); |
77 | else { |
78 | add_filter( 'option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) ); |
79 | add_filter( 'default_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) ); |
80 | } |
81 | break; |
82 | default : |
83 | do_action( 'customize_preview_' . $this->id ); |
84 | } |
85 | } |
86 |
|
87 | /** |
88 | * Callback function to filter the theme mods and options. |
89 | * |
90 | * @since 3.4.0 |
91 | * @uses WP_Customize_Setting::multidimensional_replace() |
92 | * |