diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php index e482799f4f..f4442471e1 100644 --- a/wp-includes/class-wp-theme-json.php +++ b/wp-includes/class-wp-theme-json.php @@ -1313,7 +1313,7 @@ class WP_Theme_JSON { continue; } - $class_name = sanitize_title( _wp_array_get( $layout_definition, array( 'className' ), false ) ); + $class_name = _wp_array_get( $layout_definition, array( 'className' ), false ); $spacing_rules = _wp_array_get( $layout_definition, array( 'spacingStyles' ), array() ); if ( @@ -1370,7 +1370,7 @@ class WP_Theme_JSON { ) { $valid_display_modes = array( 'block', 'flex', 'grid' ); foreach ( $layout_definitions as $layout_definition ) { - $class_name = sanitize_title( _wp_array_get( $layout_definition, array( 'className' ), false ) ); + $class_name = _wp_array_get( $layout_definition, array( 'className' ), false ); $base_style_rules = _wp_array_get( $layout_definition, array( 'baseStyles' ), array() ); if ( @@ -1567,6 +1567,9 @@ class WP_Theme_JSON { $stylesheet = ''; foreach ( static::PRESETS_METADATA as $preset_metadata ) { + if ( empty( $preset_metadata['classes'] ) ) { + continue; + } $slugs = static::get_settings_slugs( $settings, $preset_metadata, $origins ); foreach ( $preset_metadata['classes'] as $class => $property ) { foreach ( $slugs as $slug ) { @@ -1764,6 +1767,9 @@ class WP_Theme_JSON { protected static function compute_preset_vars( $settings, $origins ) { $declarations = array(); foreach ( static::PRESETS_METADATA as $preset_metadata ) { + if ( empty( $preset_metadata['css_vars'] ) ) { + continue; + } $values_by_slug = static::get_settings_values_by_slug( $settings, $preset_metadata, $origins ); foreach ( $values_by_slug as $slug => $value ) { $declarations[] = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index a19fb27f3c..3d24c8f562 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56544'; +$wp_version = '6.4-alpha-56545'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.