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