updated theme GeneratePress version 3.2.0

This commit is contained in:
2022-10-27 11:14:10 +00:00
committed by Gitium
parent 7b1024e711
commit 1465186bc5
41 changed files with 3367 additions and 4581 deletions

View File

@ -499,4 +499,24 @@ function generatepress_typography_live_update( id, selector, property, unit, med
}
}
} );
wp.customize( 'generate_settings[global_colors]', function( value ) {
value.bind( function( newval ) {
var globalColors = '';
newval.forEach( function( item ) {
globalColors += '--' + item.slug + ':' + item.color + ';';
} );
if ( $( 'style#global_colors' ).length ) {
$( 'style#global_colors' ).html( ':root{' + globalColors + '}' );
} else {
$( 'head' ).append( '<style id="global_colors">:root{' + globalColors + '}</style>' );
setTimeout( function() {
$( 'style#global_colors' ).not( ':last' ).remove();
}, 100 );
}
} );
} );
}( jQuery ) );