From f50646d6c48b702dc81e6dd09f6fb66a715b3d39 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 30 Nov 2016 22:57:35 +0000 Subject: [PATCH] Twenty Seventeen: Allow child themes to easily extend custom color patterns By adding a filter, child themes can add additional selectors onto the custom color scheme CSS. Like so: {{{ // Add child theme selectors for color schemes. function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) { $css .= ' .colors-custom .content-menu > article:not(.has-post-thumbnail), .colors-custom .content-menu > section:not(.has-post-thumbnail) { border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */ }'; return $css; } add_filter( 'twentyseventeen_custom_colors_css', 'dynamic_seventeen_custom_colors_css', 10, 3 ); }}} Merge of [39386] to the 4.7 branch. Props celloexpressions. See #38949. Built from https://develop.svn.wordpress.org/branches/4.7@39387 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39327 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentyseventeen/inc/color-patterns.php | 12 +++++++++++- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyseventeen/inc/color-patterns.php b/wp-content/themes/twentyseventeen/inc/color-patterns.php index c3913e1e6b..a59e64457f 100644 --- a/wp-content/themes/twentyseventeen/inc/color-patterns.php +++ b/wp-content/themes/twentyseventeen/inc/color-patterns.php @@ -557,5 +557,15 @@ body.colors-custom, } }'; - return $css; + + /** + * Filters Twenty Seventeen custom colors CSS. + * + * @since Twenty Seventeen 1.0 + * + * @param $css string Base theme colors CSS. + * @param $hue int The user's selected color hue. + * @param $saturation string Filtered theme color saturation level. + */ + return apply_filters( 'twentyseventeen_custom_colors_css', $css, $hue, $saturation ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index f48d6d7282..218468b407 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-RC1-39385'; +$wp_version = '4.7-RC1-39387'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.