Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentyeleven_theme_options_validate

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