Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2014-11-25 15:57:24 -05:00
|
|
|
* Twenty Fifteen Customizer functionality
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Twenty_Fifteen
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-10-15 13:21:19 -04:00
|
|
|
* Add postMessage support for site title and description for the Customizer.
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
2014-10-15 13:21:19 -04:00
|
|
|
* @param WP_Customize_Manager $wp_customize Customizer object.
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
*/
|
|
|
|
function twentyfifteen_customize_register( $wp_customize ) {
|
|
|
|
$color_scheme = twentyfifteen_get_color_scheme();
|
|
|
|
|
2014-11-11 14:36:23 -05:00
|
|
|
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
|
|
|
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2016-03-01 17:18:26 -05:00
|
|
|
if ( isset( $wp_customize->selective_refresh ) ) {
|
2017-11-30 18:11:00 -05:00
|
|
|
$wp_customize->selective_refresh->add_partial(
|
2018-08-16 21:51:36 -04:00
|
|
|
'blogname',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'selector' => '.site-title a',
|
|
|
|
'container_inclusive' => false,
|
|
|
|
'render_callback' => 'twentyfifteen_customize_partial_blogname',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$wp_customize->selective_refresh->add_partial(
|
2018-08-16 21:51:36 -04:00
|
|
|
'blogdescription',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'selector' => '.site-description',
|
|
|
|
'container_inclusive' => false,
|
|
|
|
'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
|
|
|
|
)
|
|
|
|
);
|
2016-03-01 17:18:26 -05:00
|
|
|
}
|
|
|
|
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
// Add color scheme setting and control.
|
2017-11-30 18:11:00 -05:00
|
|
|
$wp_customize->add_setting(
|
2018-08-16 21:51:36 -04:00
|
|
|
'color_scheme',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'default' => 'default',
|
|
|
|
'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
|
|
|
|
'transport' => 'postMessage',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$wp_customize->add_control(
|
2018-08-16 21:51:36 -04:00
|
|
|
'color_scheme',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'label' => __( 'Base Color Scheme', 'twentyfifteen' ),
|
|
|
|
'section' => 'colors',
|
|
|
|
'type' => 'select',
|
|
|
|
'choices' => twentyfifteen_get_color_scheme_choices(),
|
|
|
|
'priority' => 1,
|
|
|
|
)
|
|
|
|
);
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-04 13:42:22 -05:00
|
|
|
// Add custom header and sidebar text color setting and control.
|
2017-11-30 18:11:00 -05:00
|
|
|
$wp_customize->add_setting(
|
2018-08-16 21:51:36 -04:00
|
|
|
'sidebar_textcolor',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'default' => $color_scheme[4],
|
|
|
|
'sanitize_callback' => 'sanitize_hex_color',
|
|
|
|
'transport' => 'postMessage',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$wp_customize->add_control(
|
|
|
|
new WP_Customize_Color_Control(
|
2018-08-16 21:51:36 -04:00
|
|
|
$wp_customize,
|
|
|
|
'sidebar_textcolor',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
|
|
|
|
'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
|
|
|
|
'section' => 'colors',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-04 13:42:22 -05:00
|
|
|
// Remove the core header textcolor control, as it shares the sidebar text color.
|
|
|
|
$wp_customize->remove_control( 'header_textcolor' );
|
|
|
|
|
|
|
|
// Add custom header and sidebar background color setting and control.
|
2017-11-30 18:11:00 -05:00
|
|
|
$wp_customize->add_setting(
|
2018-08-16 21:51:36 -04:00
|
|
|
'header_background_color',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'default' => $color_scheme[1],
|
|
|
|
'sanitize_callback' => 'sanitize_hex_color',
|
|
|
|
'transport' => 'postMessage',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$wp_customize->add_control(
|
|
|
|
new WP_Customize_Color_Control(
|
2018-08-16 21:51:36 -04:00
|
|
|
$wp_customize,
|
|
|
|
'header_background_color',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
|
|
|
|
'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
|
|
|
|
'section' => 'colors',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2014-11-07 12:31:22 -05:00
|
|
|
|
|
|
|
// Add an additional description to the header image section.
|
2014-12-16 08:00:22 -05:00
|
|
|
$wp_customize->get_section( 'header_image' )->description = __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' );
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
add_action( 'customize_register', 'twentyfifteen_customize_register', 11 );
|
|
|
|
|
2016-03-01 17:18:26 -05:00
|
|
|
/**
|
|
|
|
* Render the site title for the selective refresh partial.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.5
|
2020-06-16 17:07:14 -04:00
|
|
|
*
|
2016-03-01 17:18:26 -05:00
|
|
|
* @see twentyfifteen_customize_register()
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function twentyfifteen_customize_partial_blogname() {
|
|
|
|
bloginfo( 'name' );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the site tagline for the selective refresh partial.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.5
|
2020-06-16 17:07:14 -04:00
|
|
|
*
|
2016-03-01 17:18:26 -05:00
|
|
|
* @see twentyfifteen_customize_register()
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function twentyfifteen_customize_partial_blogdescription() {
|
|
|
|
bloginfo( 'description' );
|
|
|
|
}
|
|
|
|
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
/**
|
|
|
|
* Register color schemes for Twenty Fifteen.
|
2014-11-25 15:57:24 -05:00
|
|
|
*
|
|
|
|
* Can be filtered with {@see 'twentyfifteen_color_schemes'}.
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
*
|
|
|
|
* The order of colors in a colors array:
|
|
|
|
* 1. Main Background Color.
|
|
|
|
* 2. Sidebar Background Color.
|
2014-12-06 21:40:21 -05:00
|
|
|
* 3. Box Background Color.
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
* 4. Main Text and Link Color.
|
|
|
|
* 5. Sidebar Text and Link Color.
|
|
|
|
* 6. Meta Box Background Color.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
|
|
|
* @return array An associative array of color scheme options.
|
|
|
|
*/
|
|
|
|
function twentyfifteen_get_color_schemes() {
|
2015-10-02 21:10:26 -04:00
|
|
|
/**
|
2020-08-10 20:34:08 -04:00
|
|
|
* Filters the color schemes registered for use with Twenty Fifteen.
|
2015-10-02 21:10:26 -04:00
|
|
|
*
|
|
|
|
* The default schemes include 'default', 'dark', 'yellow', 'pink', 'purple', and 'blue'.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
|
|
|
* @param array $schemes {
|
|
|
|
* Associative array of color schemes data.
|
|
|
|
*
|
|
|
|
* @type array $slug {
|
|
|
|
* Associative array of information for setting up the color scheme.
|
|
|
|
*
|
|
|
|
* @type string $label Color scheme label.
|
|
|
|
* @type array $colors HEX codes for default colors prepended with a hash symbol ('#').
|
|
|
|
* Colors are defined in the following order: Main background, sidebar
|
|
|
|
* background, box background, main text and link, sidebar text and link,
|
|
|
|
* meta box background.
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
*/
|
2017-11-30 18:11:00 -05:00
|
|
|
return apply_filters(
|
2018-08-16 21:51:36 -04:00
|
|
|
'twentyfifteen_color_schemes',
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'default' => array(
|
|
|
|
'label' => __( 'Default', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#f1f1f1',
|
|
|
|
'#ffffff',
|
|
|
|
'#ffffff',
|
|
|
|
'#333333',
|
|
|
|
'#333333',
|
|
|
|
'#f7f7f7',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
'dark' => array(
|
|
|
|
'label' => __( 'Dark', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#111111',
|
|
|
|
'#202020',
|
|
|
|
'#202020',
|
|
|
|
'#bebebe',
|
|
|
|
'#bebebe',
|
|
|
|
'#1b1b1b',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
'yellow' => array(
|
|
|
|
'label' => __( 'Yellow', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#f4ca16',
|
|
|
|
'#ffdf00',
|
|
|
|
'#ffffff',
|
|
|
|
'#111111',
|
|
|
|
'#111111',
|
|
|
|
'#f1f1f1',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
'pink' => array(
|
|
|
|
'label' => __( 'Pink', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#ffe5d1',
|
|
|
|
'#e53b51',
|
|
|
|
'#ffffff',
|
|
|
|
'#352712',
|
|
|
|
'#ffffff',
|
|
|
|
'#f1f1f1',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
'purple' => array(
|
|
|
|
'label' => __( 'Purple', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#674970',
|
|
|
|
'#2e2256',
|
|
|
|
'#ffffff',
|
|
|
|
'#2e2256',
|
|
|
|
'#ffffff',
|
|
|
|
'#f1f1f1',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
'blue' => array(
|
|
|
|
'label' => __( 'Blue', 'twentyfifteen' ),
|
|
|
|
'colors' => array(
|
|
|
|
'#e9f2f9',
|
|
|
|
'#55c3dc',
|
|
|
|
'#ffffff',
|
|
|
|
'#22313f',
|
|
|
|
'#ffffff',
|
|
|
|
'#f1f1f1',
|
|
|
|
),
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
),
|
2017-11-30 18:11:00 -05:00
|
|
|
)
|
|
|
|
);
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) :
|
2017-11-30 18:11:00 -05:00
|
|
|
/**
|
|
|
|
* Get the current Twenty Fifteen color scheme.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
|
|
|
* @return array An associative array of either the current or default color scheme hex values.
|
|
|
|
*/
|
|
|
|
function twentyfifteen_get_color_scheme() {
|
|
|
|
$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
|
|
|
|
$color_schemes = twentyfifteen_get_color_schemes();
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
|
|
|
|
return $color_schemes[ $color_scheme_option ]['colors'];
|
|
|
|
}
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
return $color_schemes['default']['colors'];
|
|
|
|
}
|
2020-01-28 19:45:18 -05:00
|
|
|
endif; // twentyfifteen_get_color_scheme()
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-12-10 08:21:23 -05:00
|
|
|
if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
|
2017-11-30 18:11:00 -05:00
|
|
|
/**
|
|
|
|
* Returns an array of color scheme choices registered for Twenty Fifteen.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
|
|
|
* @return array Array of color schemes.
|
|
|
|
*/
|
|
|
|
function twentyfifteen_get_color_scheme_choices() {
|
|
|
|
$color_schemes = twentyfifteen_get_color_schemes();
|
|
|
|
$color_scheme_control_options = array();
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
foreach ( $color_schemes as $color_scheme => $value ) {
|
|
|
|
$color_scheme_control_options[ $color_scheme ] = $value['label'];
|
|
|
|
}
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
return $color_scheme_control_options;
|
|
|
|
}
|
2020-01-28 19:45:18 -05:00
|
|
|
endif; // twentyfifteen_get_color_scheme_choices()
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
|
2017-11-30 18:11:00 -05:00
|
|
|
/**
|
|
|
|
* Sanitization callback for color schemes.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*
|
|
|
|
* @param string $value Color scheme name value.
|
|
|
|
* @return string Color scheme name.
|
|
|
|
*/
|
|
|
|
function twentyfifteen_sanitize_color_scheme( $value ) {
|
|
|
|
$color_schemes = twentyfifteen_get_color_scheme_choices();
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
if ( ! array_key_exists( $value, $color_schemes ) ) {
|
|
|
|
$value = 'default';
|
|
|
|
}
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
return $value;
|
|
|
|
}
|
2020-01-28 19:45:18 -05:00
|
|
|
endif; // twentyfifteen_sanitize_color_scheme()
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enqueues front-end CSS for color scheme.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
2014-11-25 15:57:24 -05:00
|
|
|
*
|
|
|
|
* @see wp_add_inline_style()
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
*/
|
|
|
|
function twentyfifteen_color_scheme_css() {
|
|
|
|
$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
|
|
|
|
|
|
|
|
// Don't do anything if the default color scheme is selected.
|
2014-12-16 07:27:26 -05:00
|
|
|
if ( 'default' === $color_scheme_option ) {
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-12-16 07:27:26 -05:00
|
|
|
$color_scheme = twentyfifteen_get_color_scheme();
|
|
|
|
|
|
|
|
// Convert main and sidebar text hex color to rgba.
|
|
|
|
$color_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[3] );
|
|
|
|
$color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] );
|
2017-11-30 18:11:00 -05:00
|
|
|
$colors = array(
|
2014-12-16 07:27:26 -05:00
|
|
|
'background_color' => $color_scheme[0],
|
|
|
|
'header_background_color' => $color_scheme[1],
|
|
|
|
'box_background_color' => $color_scheme[2],
|
|
|
|
'textcolor' => $color_scheme[3],
|
|
|
|
'secondary_textcolor' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.7)', $color_textcolor_rgb ),
|
|
|
|
'border_color' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.1)', $color_textcolor_rgb ),
|
|
|
|
'border_focus_color' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.3)', $color_textcolor_rgb ),
|
|
|
|
'sidebar_textcolor' => $color_scheme[4],
|
|
|
|
'sidebar_border_color' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.1)', $color_sidebar_textcolor_rgb ),
|
|
|
|
'sidebar_border_focus_color' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.3)', $color_sidebar_textcolor_rgb ),
|
|
|
|
'secondary_sidebar_textcolor' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.7)', $color_sidebar_textcolor_rgb ),
|
|
|
|
'meta_box_background_color' => $color_scheme[5],
|
|
|
|
);
|
|
|
|
|
|
|
|
$color_scheme_css = twentyfifteen_get_color_scheme_css( $colors );
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
wp_add_inline_style( 'twentyfifteen-style', $color_scheme_css );
|
|
|
|
}
|
|
|
|
add_action( 'wp_enqueue_scripts', 'twentyfifteen_color_scheme_css' );
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/**
|
|
|
|
* Binds JS listener to make Customizer color_scheme control.
|
2014-11-25 15:57:24 -05:00
|
|
|
*
|
2014-11-07 15:55:23 -05:00
|
|
|
* Passes color scheme data as colorScheme global.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*/
|
|
|
|
function twentyfifteen_customize_control_js() {
|
2014-12-16 07:27:26 -05:00
|
|
|
wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20141216', true );
|
2014-11-07 15:55:23 -05:00
|
|
|
wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() );
|
|
|
|
}
|
|
|
|
add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_control_js' );
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/**
|
2014-11-11 14:36:23 -05:00
|
|
|
* Binds JS handlers to make the Customizer preview reload changes asynchronously.
|
2014-11-07 15:55:23 -05:00
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*/
|
|
|
|
function twentyfifteen_customize_preview_js() {
|
2014-12-16 07:27:26 -05:00
|
|
|
wp_enqueue_script( 'twentyfifteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20141216', true );
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' );
|
|
|
|
|
|
|
|
/**
|
2014-12-16 07:27:26 -05:00
|
|
|
* Returns CSS for the color schemes.
|
2014-11-11 14:36:23 -05:00
|
|
|
*
|
2014-11-07 15:55:23 -05:00
|
|
|
* @since Twenty Fifteen 1.0
|
2014-12-16 07:27:26 -05:00
|
|
|
*
|
|
|
|
* @param array $colors Color scheme colors.
|
|
|
|
* @return string Color scheme CSS.
|
2014-11-07 15:55:23 -05:00
|
|
|
*/
|
2014-12-16 07:27:26 -05:00
|
|
|
function twentyfifteen_get_color_scheme_css( $colors ) {
|
2017-11-30 18:11:00 -05:00
|
|
|
$colors = wp_parse_args(
|
2018-08-16 21:51:36 -04:00
|
|
|
$colors,
|
|
|
|
array(
|
2017-11-30 18:11:00 -05:00
|
|
|
'background_color' => '',
|
|
|
|
'header_background_color' => '',
|
|
|
|
'box_background_color' => '',
|
|
|
|
'textcolor' => '',
|
|
|
|
'secondary_textcolor' => '',
|
|
|
|
'border_color' => '',
|
|
|
|
'border_focus_color' => '',
|
|
|
|
'sidebar_textcolor' => '',
|
|
|
|
'sidebar_border_color' => '',
|
|
|
|
'sidebar_border_focus_color' => '',
|
|
|
|
'secondary_sidebar_textcolor' => '',
|
|
|
|
'meta_box_background_color' => '',
|
|
|
|
)
|
|
|
|
);
|
2014-12-16 07:27:26 -05:00
|
|
|
|
|
|
|
$css = <<<CSS
|
2014-11-07 15:55:23 -05:00
|
|
|
/* Color Scheme */
|
|
|
|
|
|
|
|
/* Background Color */
|
|
|
|
body {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['background_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sidebar Background Color */
|
|
|
|
body:before,
|
|
|
|
.site-header {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['header_background_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Box Background Color */
|
|
|
|
.post-navigation,
|
|
|
|
.pagination,
|
|
|
|
.secondary,
|
|
|
|
.site-footer,
|
|
|
|
.hentry,
|
|
|
|
.page-header,
|
|
|
|
.page-content,
|
2014-12-30 05:30:22 -05:00
|
|
|
.comments-area,
|
|
|
|
.widecolumn {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['box_background_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Box Background Color */
|
|
|
|
button,
|
|
|
|
input[type="button"],
|
|
|
|
input[type="reset"],
|
|
|
|
input[type="submit"],
|
|
|
|
.pagination .prev,
|
|
|
|
.pagination .next,
|
|
|
|
.widget_calendar tbody a,
|
|
|
|
.widget_calendar tbody a:hover,
|
|
|
|
.widget_calendar tbody a:focus,
|
2014-12-03 13:03:23 -05:00
|
|
|
.page-links a,
|
|
|
|
.page-links a:hover,
|
|
|
|
.page-links a:focus,
|
2014-11-07 15:55:23 -05:00
|
|
|
.sticky-post {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['box_background_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main Text Color */
|
|
|
|
button,
|
|
|
|
input[type="button"],
|
|
|
|
input[type="reset"],
|
|
|
|
input[type="submit"],
|
|
|
|
.pagination .prev,
|
|
|
|
.pagination .next,
|
|
|
|
.widget_calendar tbody a,
|
|
|
|
.page-links a,
|
|
|
|
.sticky-post {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main Text Color */
|
|
|
|
body,
|
|
|
|
blockquote cite,
|
|
|
|
blockquote small,
|
|
|
|
a,
|
|
|
|
.dropdown-toggle:after,
|
|
|
|
.image-navigation a:hover,
|
|
|
|
.image-navigation a:focus,
|
|
|
|
.comment-navigation a:hover,
|
|
|
|
.comment-navigation a:focus,
|
|
|
|
.widget-title,
|
|
|
|
.entry-footer a:hover,
|
|
|
|
.entry-footer a:focus,
|
|
|
|
.comment-metadata a:hover,
|
|
|
|
.comment-metadata a:focus,
|
|
|
|
.pingback .edit-link a:hover,
|
|
|
|
.pingback .edit-link a:focus,
|
|
|
|
.comment-list .reply a:hover,
|
|
|
|
.comment-list .reply a:focus,
|
|
|
|
.site-info a:hover,
|
|
|
|
.site-info a:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main Text Color */
|
|
|
|
.entry-content a,
|
|
|
|
.entry-summary a,
|
|
|
|
.page-content a,
|
|
|
|
.comment-content a,
|
|
|
|
.pingback .comment-body > a,
|
|
|
|
.author-description a,
|
|
|
|
.taxonomy-description a,
|
|
|
|
.textwidget a,
|
|
|
|
.entry-footer a:hover,
|
|
|
|
.comment-metadata a:hover,
|
|
|
|
.pingback .edit-link a:hover,
|
|
|
|
.comment-list .reply a:hover,
|
|
|
|
.site-info a:hover {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Secondary Text Color */
|
|
|
|
button:hover,
|
|
|
|
button:focus,
|
|
|
|
input[type="button"]:hover,
|
|
|
|
input[type="button"]:focus,
|
|
|
|
input[type="reset"]:hover,
|
|
|
|
input[type="reset"]:focus,
|
|
|
|
input[type="submit"]:hover,
|
|
|
|
input[type="submit"]:focus,
|
|
|
|
.pagination .prev:hover,
|
|
|
|
.pagination .prev:focus,
|
|
|
|
.pagination .next:hover,
|
|
|
|
.pagination .next:focus,
|
|
|
|
.widget_calendar tbody a:hover,
|
|
|
|
.widget_calendar tbody a:focus,
|
|
|
|
.page-links a:hover,
|
|
|
|
.page-links a:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
background-color: {$colors['secondary_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Secondary Text Color */
|
|
|
|
blockquote,
|
|
|
|
a:hover,
|
|
|
|
a:focus,
|
|
|
|
.main-navigation .menu-item-description,
|
|
|
|
.post-navigation .meta-nav,
|
|
|
|
.post-navigation a:hover .post-title,
|
|
|
|
.post-navigation a:focus .post-title,
|
|
|
|
.image-navigation,
|
|
|
|
.image-navigation a,
|
|
|
|
.comment-navigation,
|
|
|
|
.comment-navigation a,
|
|
|
|
.widget,
|
|
|
|
.author-heading,
|
|
|
|
.entry-footer,
|
|
|
|
.entry-footer a,
|
|
|
|
.taxonomy-description,
|
|
|
|
.page-links > .page-links-title,
|
|
|
|
.entry-caption,
|
|
|
|
.comment-author,
|
|
|
|
.comment-metadata,
|
|
|
|
.comment-metadata a,
|
|
|
|
.pingback .edit-link,
|
|
|
|
.pingback .edit-link a,
|
|
|
|
.post-password-form label,
|
|
|
|
.comment-form label,
|
|
|
|
.comment-notes,
|
|
|
|
.comment-awaiting-moderation,
|
|
|
|
.logged-in-as,
|
|
|
|
.form-allowed-tags,
|
|
|
|
.no-comments,
|
|
|
|
.site-info,
|
|
|
|
.site-info a,
|
|
|
|
.wp-caption-text,
|
|
|
|
.gallery-caption,
|
2014-12-30 05:30:22 -05:00
|
|
|
.comment-list .reply a,
|
|
|
|
.widecolumn label,
|
|
|
|
.widecolumn .mu_register label {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
color: {$colors['secondary_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Secondary Text Color */
|
|
|
|
blockquote,
|
|
|
|
.logged-in-as a:hover,
|
|
|
|
.comment-author a:hover {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
border-color: {$colors['secondary_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Border Color */
|
|
|
|
hr,
|
|
|
|
.dropdown-toggle:hover,
|
|
|
|
.dropdown-toggle:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
background-color: {$colors['border_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Border Color */
|
|
|
|
pre,
|
|
|
|
abbr[title],
|
|
|
|
table,
|
|
|
|
th,
|
|
|
|
td,
|
|
|
|
input,
|
|
|
|
textarea,
|
|
|
|
.main-navigation ul,
|
|
|
|
.main-navigation li,
|
|
|
|
.post-navigation,
|
2014-12-06 21:40:21 -05:00
|
|
|
.post-navigation div + div,
|
2014-11-07 15:55:23 -05:00
|
|
|
.pagination,
|
|
|
|
.comment-navigation,
|
|
|
|
.widget li,
|
|
|
|
.widget_categories .children,
|
|
|
|
.widget_nav_menu .sub-menu,
|
|
|
|
.widget_pages .children,
|
|
|
|
.site-header,
|
|
|
|
.site-footer,
|
2014-12-06 21:40:21 -05:00
|
|
|
.hentry + .hentry,
|
2014-11-07 15:55:23 -05:00
|
|
|
.author-info,
|
|
|
|
.entry-content .page-links a,
|
|
|
|
.page-links > span,
|
|
|
|
.page-header,
|
|
|
|
.comments-area,
|
2014-12-06 21:40:21 -05:00
|
|
|
.comment-list + .comment-respond,
|
2014-11-07 15:55:23 -05:00
|
|
|
.comment-list article,
|
|
|
|
.comment-list .pingback,
|
|
|
|
.comment-list .trackback,
|
|
|
|
.comment-list .reply a,
|
|
|
|
.no-comments {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
border-color: {$colors['border_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Border Focus Color */
|
|
|
|
a:focus,
|
|
|
|
button:focus,
|
|
|
|
input:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
outline-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
outline-color: {$colors['border_focus_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
input:focus,
|
|
|
|
textarea:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
border-color: {$colors['border_focus_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sidebar Link Color */
|
|
|
|
.secondary-toggle:before {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['sidebar_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.site-title a,
|
|
|
|
.site-description {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['sidebar_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sidebar Text Color */
|
|
|
|
.site-title a:hover,
|
|
|
|
.site-title a:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['secondary_sidebar_textcolor']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sidebar Border Color */
|
|
|
|
.secondary-toggle {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
border-color: {$colors['sidebar_border_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sidebar Border Focus Color */
|
|
|
|
.secondary-toggle:hover,
|
|
|
|
.secondary-toggle:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
border-color: {$colors['sidebar_border_focus_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.site-title a {
|
2014-12-16 07:27:26 -05:00
|
|
|
outline-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
|
|
|
|
outline-color: {$colors['sidebar_border_focus_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Meta Background Color */
|
|
|
|
.entry-footer {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['meta_box_background_color']};
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
@media screen and (min-width: 38.75em) {
|
|
|
|
/* Main Text Color */
|
|
|
|
.page-header {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
@media screen and (min-width: 59.6875em) {
|
|
|
|
/* Make sure its transparent on desktop */
|
|
|
|
.site-header,
|
|
|
|
.secondary {
|
|
|
|
background-color: transparent;
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/* Sidebar Background Color */
|
|
|
|
.widget button,
|
|
|
|
.widget input[type="button"],
|
|
|
|
.widget input[type="reset"],
|
|
|
|
.widget input[type="submit"],
|
2014-10-20 14:57:26 -04:00
|
|
|
.widget_calendar tbody a,
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget_calendar tbody a:hover,
|
|
|
|
.widget_calendar tbody a:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['header_background_color']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/* Sidebar Link Color */
|
|
|
|
.secondary a,
|
2014-10-20 14:57:26 -04:00
|
|
|
.dropdown-toggle:after,
|
|
|
|
.widget-title,
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget blockquote cite,
|
|
|
|
.widget blockquote small {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget button,
|
|
|
|
.widget input[type="button"],
|
|
|
|
.widget input[type="reset"],
|
|
|
|
.widget input[type="submit"],
|
|
|
|
.widget_calendar tbody a {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.textwidget a {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/* Sidebar Text Color */
|
|
|
|
.secondary a:hover,
|
|
|
|
.secondary a:focus,
|
2014-10-20 14:57:26 -04:00
|
|
|
.main-navigation .menu-item-description,
|
|
|
|
.widget,
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget blockquote,
|
|
|
|
.widget .wp-caption-text,
|
|
|
|
.widget .gallery-caption {
|
2014-12-16 07:27:26 -05:00
|
|
|
color: {$colors['secondary_sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget button:hover,
|
|
|
|
.widget button:focus,
|
|
|
|
.widget input[type="button"]:hover,
|
|
|
|
.widget input[type="button"]:focus,
|
|
|
|
.widget input[type="reset"]:hover,
|
|
|
|
.widget input[type="reset"]:focus,
|
|
|
|
.widget input[type="submit"]:hover,
|
|
|
|
.widget input[type="submit"]:focus,
|
|
|
|
.widget_calendar tbody a:hover,
|
|
|
|
.widget_calendar tbody a:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['secondary_sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget blockquote {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['secondary_sidebar_textcolor']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
/* Sidebar Border Color */
|
2014-10-20 14:57:26 -04:00
|
|
|
.main-navigation ul,
|
|
|
|
.main-navigation li,
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget input,
|
|
|
|
.widget textarea,
|
|
|
|
.widget table,
|
|
|
|
.widget th,
|
|
|
|
.widget td,
|
|
|
|
.widget pre,
|
2014-10-20 14:57:26 -04:00
|
|
|
.widget li,
|
|
|
|
.widget_categories .children,
|
|
|
|
.widget_nav_menu .sub-menu,
|
|
|
|
.widget_pages .children,
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget abbr[title] {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['sidebar_border_color']};
|
2014-11-03 12:01:23 -05:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.dropdown-toggle:hover,
|
|
|
|
.dropdown-toggle:focus,
|
|
|
|
.widget hr {
|
2014-12-16 07:27:26 -05:00
|
|
|
background-color: {$colors['sidebar_border_color']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.widget input:focus,
|
|
|
|
.widget textarea:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
border-color: {$colors['sidebar_border_focus_color']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-07 15:55:23 -05:00
|
|
|
.sidebar a:focus,
|
|
|
|
.dropdown-toggle:focus {
|
2014-12-16 07:27:26 -05:00
|
|
|
outline-color: {$colors['sidebar_border_focus_color']};
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
2014-11-07 15:55:23 -05:00
|
|
|
}
|
2014-12-16 07:27:26 -05:00
|
|
|
CSS;
|
|
|
|
|
|
|
|
return $css;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Output an Underscore template for generating CSS for the color scheme.
|
|
|
|
*
|
|
|
|
* The template generates the css dynamically for instant display in the Customizer
|
|
|
|
* preview.
|
|
|
|
*
|
|
|
|
* @since Twenty Fifteen 1.0
|
|
|
|
*/
|
|
|
|
function twentyfifteen_color_scheme_css_template() {
|
|
|
|
$colors = array(
|
|
|
|
'background_color' => '{{ data.background_color }}',
|
|
|
|
'header_background_color' => '{{ data.header_background_color }}',
|
|
|
|
'box_background_color' => '{{ data.box_background_color }}',
|
|
|
|
'textcolor' => '{{ data.textcolor }}',
|
|
|
|
'secondary_textcolor' => '{{ data.secondary_textcolor }}',
|
|
|
|
'border_color' => '{{ data.border_color }}',
|
|
|
|
'border_focus_color' => '{{ data.border_focus_color }}',
|
|
|
|
'sidebar_textcolor' => '{{ data.sidebar_textcolor }}',
|
|
|
|
'sidebar_border_color' => '{{ data.sidebar_border_color }}',
|
|
|
|
'sidebar_border_focus_color' => '{{ data.sidebar_border_focus_color }}',
|
|
|
|
'secondary_sidebar_textcolor' => '{{ data.secondary_sidebar_textcolor }}',
|
|
|
|
'meta_box_background_color' => '{{ data.meta_box_background_color }}',
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
<script type="text/html" id="tmpl-twentyfifteen-color-scheme">
|
|
|
|
<?php echo twentyfifteen_get_color_scheme_css( $colors ); ?>
|
2014-11-07 15:55:23 -05:00
|
|
|
</script>
|
|
|
|
<?php
|
Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.
Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799
Built from https://develop.svn.wordpress.org/trunk@29892
git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 15:28:18 -04:00
|
|
|
}
|
2014-11-07 15:55:23 -05:00
|
|
|
add_action( 'customize_controls_print_footer_scripts', 'twentyfifteen_color_scheme_css_template' );
|