Replaces CSS variables with their values in place.
Parameters
$styles
arrayrequired- CSS declarations to convert.
$values
arrayrequired- key => value pairs to use for replacement.
Source
}
if ( isset( $settings['gradients'] ) ) {
$theme_settings['settings']['color']['gradients'] = $settings['gradients'];
}
if ( isset( $settings['fontSizes'] ) ) {
$font_sizes = $settings['fontSizes'];
// Back-compatibility for presets without units.
foreach ( $font_sizes as $key => $font_size ) {
if ( is_numeric( $font_size['size'] ) ) {
$font_sizes[ $key ]['size'] = $font_size['size'] . 'px';
}
}
$theme_settings['settings']['typography']['fontSizes'] = $font_sizes;
}
if ( isset( $settings['enableCustomSpacing'] ) ) {
$theme_settings['settings']['spacing']['padding'] = $settings['enableCustomSpacing'];
}
if ( isset( $settings['spacingSizes'] ) ) {
$theme_settings['settings']['spacing']['spacingSizes'] = $settings['spacingSizes'];
}
return $theme_settings;
}
/**
* Returns the current theme's wanted patterns(slugs) to be
* registered from Pattern Directory.
*
* @since 6.0.0
*
* @return string[]
*/
public function get_patterns() {
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.