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 |
|---|---|
| 307 | |
| 308 | // Link color must be 3 or 6 hexadecimal characters |
| 309 | if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) |
| 310 | $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); |
| 311 | |
| 312 | // Theme layout must be in our array of theme layout options |
| 313 | if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) |
| 314 | $output['theme_layout'] = $input['theme_layout']; |
| 315 | |
| 316 | return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults ); |
| 317 | } |
| 318 | |
| 319 | /** |
| 320 | * Enqueue the styles for the current color scheme. |
| 321 | * |
| 322 | * @since Twenty Eleven 1.0 |
| 323 | */ |
| 324 | function twentyeleven_enqueue_color_scheme() { |
| 325 | $options = twentyeleven_get_theme_options(); |