diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index fc80ef3e1b..9b1aa739ad 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -310,27 +310,27 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex $editor_settings['__experimentalFeatures'] = $theme_json->get_settings(); // These settings may need to be updated based on data coming from theme.json sources. - if ( isset( $settings['__experimentalFeatures']['color']['palette'] ) ) { - $colors_by_origin = $settings['__experimentalFeatures']['color']['palette']; - $settings['colors'] = isset( $colors_by_origin['user'] ) ? + if ( isset( $editor_settings['__experimentalFeatures']['color']['palette'] ) ) { + $colors_by_origin = $editor_settings['__experimentalFeatures']['color']['palette']; + $editor_settings['colors'] = isset( $colors_by_origin['user'] ) ? $colors_by_origin['user'] : ( isset( $colors_by_origin['theme'] ) ? $colors_by_origin['theme'] : $colors_by_origin['core'] ); } - if ( isset( $settings['__experimentalFeatures']['color']['gradients'] ) ) { - $gradients_by_origin = $settings['__experimentalFeatures']['color']['gradients']; - $settings['gradients'] = isset( $gradients_by_origin['user'] ) ? + if ( isset( $editor_settings['__experimentalFeatures']['color']['gradients'] ) ) { + $gradients_by_origin = $editor_settings['__experimentalFeatures']['color']['gradients']; + $editor_settings['gradients'] = isset( $gradients_by_origin['user'] ) ? $gradients_by_origin['user'] : ( isset( $gradients_by_origin['theme'] ) ? $gradients_by_origin['theme'] : $gradients_by_origin['core'] ); } - if ( isset( $settings['__experimentalFeatures']['typography']['fontSizes'] ) ) { - $font_sizes_by_origin = $settings['__experimentalFeatures']['typography']['fontSizes']; - $settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ? + if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) { + $font_sizes_by_origin = $editor_settings['__experimentalFeatures']['typography']['fontSizes']; + $editor_settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ? $font_sizes_by_origin['user'] : ( isset( $font_sizes_by_origin['theme'] ) ? $font_sizes_by_origin['theme'] : diff --git a/wp-includes/version.php b/wp-includes/version.php index f2482c79ea..162a7238df 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-beta2-51212'; +$wp_version = '5.8-beta2-51213'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.