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
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