Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Code used in functions.php
<?php
/** Both color schemes **/
add_filter( 'twentyeleven_color_schemes', 'twentyeleven_color_schemes_both' );
add_action( 'twentyeleven_enqueue_color_scheme', 'twentyeleven_enqueue_color_scheme_both' );
function twentyeleven_color_schemes_both( $color_schemes ) {
$color_schemes['orange'] = array(
'value' => 'orange',
'label' => __( 'Orange', 'twentyeleven' ),
'thumbnail' => get_stylesheet_directory_uri() . '/orange.png',
'default_link_color' => '#FFA500',
);
$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_both( $color_scheme ) {
if ( 'orange' == $color_scheme )
wp_enqueue_style( 'orange', get_stylesheet_directory_uri() . '/orange.css', array(), null );
elseif ( 'green' == $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
Something went wrong with that request. Please try again.