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 |
|---|---|
| 343 | |
| 344 | // Link color must be 3 or 6 hexadecimal characters |
| 345 | if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) |
| 346 | $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); |
| 347 | |
| 348 | // Theme layout must be in our array of theme layout options |
| 349 | if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) |
| 350 | $output['theme_layout'] = $input['theme_layout']; |
| 351 | |
| 352 | return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults ); |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Enqueue the styles for the current color scheme. |
| 357 | * |
| 358 | * @since Twenty Eleven 1.0 |
| 359 | */ |
| 360 | function twentyeleven_enqueue_color_scheme() { |
| 361 | $options = twentyeleven_get_theme_options(); |