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 |
---|---|
322 | * @since Twenty Eleven 1.0 |
323 | */ |
324 | function twentyeleven_enqueue_color_scheme() { |
325 | $options = twentyeleven_get_theme_options(); |
326 | $color_scheme = $options['color_scheme']; |
327 |
|
328 | if ( 'dark' == $color_scheme ) |
329 | wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); |
330 |
|
331 | do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme ); |
332 | } |
333 | add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' ); |
334 |
|
335 | /** |
336 | * Add a style block to the theme for the current link color. |
337 | * |
338 | * This function is attached to the wp_head action hook. |
339 | * |
340 | * @since Twenty Eleven 1.0 |