public
Created — forked from vbk/TE-modification

Code used in functions.php

  • Download Gist
functions.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<?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 );
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.