Skip to content

Commit 30b928a

Browse files
committed
compute_preset_vars: no need to compute presets that do not have vars
1 parent 299a5a6 commit 30b928a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/class-wp-theme-json-gutenberg.php

+4
Original file line numberDiff line numberDiff line change
@@ -1772,6 +1772,10 @@ protected static function replace_slug_in_string( $input, $slug ) {
17721772
protected static function compute_preset_vars( $settings, $origins ) {
17731773
$declarations = array();
17741774
foreach ( static::PRESETS_METADATA as $preset_metadata ) {
1775+
if ( ! isset( $preset_metadata['css_vars'] ) ) {
1776+
continue;
1777+
}
1778+
17751779
$values_by_slug = static::get_settings_values_by_slug( $settings, $preset_metadata, $origins );
17761780
foreach ( $values_by_slug as $slug => $value ) {
17771781
$declarations[] = array(

0 commit comments

Comments
 (0)