Add comments for extra CSS functionality.
This commit is contained in:
parent
e19f50a636
commit
41b34d72d6
3 changed files with 5 additions and 3 deletions
|
@ -450,7 +450,8 @@ add_color_rule( 'fg2', '#FAFBF6', array(
|
|||
), __( 'Tertiary Color' ) );
|
||||
|
||||
/**
|
||||
* Custom CSS
|
||||
* Custom CSS.
|
||||
* The plugin takes the body of this function and applies it in a style tag in the document head.
|
||||
*/
|
||||
function seedlet_custom_colors_extra_css() {
|
||||
$colors_array = get_theme_mod( 'colors_manager' );
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
} );
|
||||
} );
|
||||
|
||||
// The wpcom colors plugin does not handle live updates of extra CSS.
|
||||
// This function provides the CSS updates via JavaScript.
|
||||
// Since the plugin handles customizer preview updates via the postMessage transport,
|
||||
// we need to manually override the "extra CSS" when a user selects a different color palette.
|
||||
wp.customize( 'colors_manager[colors]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
const { bg, fg1, fg2 } = to;
|
||||
|
|
|
@ -221,6 +221,7 @@ add_color_rule( 'fg2', '#FAFBF6', array(
|
|||
|
||||
/**
|
||||
* Custom CSS
|
||||
* The plugin takes the body of this function and applies it in a style tag in the document head.
|
||||
*/
|
||||
function seedlet_custom_colors_extra_css() {
|
||||
$colors_array = get_theme_mod( 'colors_manager' );
|
||||
|
|
Loading…
Reference in a new issue