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
307
308      // Link color must be 3 or 6 hexadecimal characters
309      if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
310           $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
311
312      // Theme layout must be in our array of theme layout options
313      if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) )
314           $output['theme_layout'] = $input['theme_layout'];
315
316      return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );
317 }
318
319 /**
320  * Enqueue the styles for the current color scheme.
321  *
322  * @since Twenty Eleven 1.0
323  */
324 function twentyeleven_enqueue_color_scheme() {
325      $options = twentyeleven_get_theme_options();