Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentyeleven_enqueue_color_scheme

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
358  * @since Twenty Eleven 1.0
359  */
360 function twentyeleven_enqueue_color_scheme() {
361      $options = twentyeleven_get_theme_options();
362      $color_scheme = $options['color_scheme'];
363
364      if ( 'dark' == $color_scheme )
365           wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
366
367      do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );
368 }
369 add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' );
370
371 /**
372  * Add a style block to the theme for the current link color.
373  *
374  * This function is attached to the wp_head action hook.
375  *
376  * @since Twenty Eleven 1.0