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 |
---|---|
363 | * @since Twenty Eleven 1.0 |
364 | */ |
365 | function twentyeleven_enqueue_color_scheme() { |
366 | $options = twentyeleven_get_theme_options(); |
367 | $color_scheme = $options['color_scheme']; |
368 |
|
369 | if ( 'dark' == $color_scheme ) |
370 | wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); |
371 |
|
372 | do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme ); |
373 | } |
374 | add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' ); |
375 |
|
376 | /** |
377 | * Add a style block to the theme for the current link color. |
378 | * |
379 | * This function is attached to the wp_head action hook. |
380 | * |
381 | * @since Twenty Eleven 1.0 |