Skip to content

Instantly share code, notes, and snippets.

@vbk
Created July 27, 2011 16:03
Show Gist options
  • Save vbk/1109689 to your computer and use it in GitHub Desktop.
Save vbk/1109689 to your computer and use it in GitHub Desktop.
Code used in functions.php
/*Functions.php*/
/** Orange color scheme **/
add_filter( 'twentyeleven_color_schemes', 'twentyeleven_color_schemes_orange' );
add_action( 'twentyeleven_enqueue_color_scheme', 'twentyeleven_enqueue_color_scheme_orange' );
function twentyeleven_color_schemes_orange( $color_schemes ) {
$color_schemes['orange'] = array(
'value' => 'orange',
'label' => __( 'Orange', 'twentyeleven' ),
'thumbnail' => get_stylesheet_directory_uri() . '/orange.png',
'default_link_color' => '#FFA500',
);
return $color_schemes;
}
function twentyeleven_enqueue_color_scheme_orange( $color_scheme ) {
if ( 'orange' == $color_scheme )
wp_enqueue_style( 'orange', get_stylesheet_directory_uri() . '/orange.css', array(), null );
}
/** Orange color scheme **/
add_filter( 'twentyeleven_color_schemes', 'twentyeleven_color_schemes_green' );
add_action( 'twentyeleven_enqueue_color_scheme', 'twentyeleven_enqueue_color_scheme_green' );
function twentyeleven_color_schemes_green( $color_schemes ) {
$color_schemes['green'] = array(
'value' => 'green',
'label' => __( 'green', 'twentyeleven' ),
'thumbnail' => get_stylesheet_directory_uri() . '/green.png',
'default_link_color' => '#DEFF17',
);
return $color_schemes;
}
function twentyeleven_enqueue_color_scheme_green( $color_scheme ) {
if ( 'orange' == $color_scheme )
wp_enqueue_style( 'green', get_stylesheet_directory_uri() . '/green.css', array(), null );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment