Editor: Correct variable names in `get_block_editor_settings()`.
Incorrect variable names were leading to unreachable conditional statements. Follow up to [51149]. Props johnbillion, mukesh27. See #53458. Built from https://develop.svn.wordpress.org/trunk@51213 git-svn-id: http://core.svn.wordpress.org/trunk@50822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c54b44e75a
commit
821327ca70
|
@ -310,27 +310,27 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||||
|
|
||||||
$editor_settings['__experimentalFeatures'] = $theme_json->get_settings();
|
$editor_settings['__experimentalFeatures'] = $theme_json->get_settings();
|
||||||
// These settings may need to be updated based on data coming from theme.json sources.
|
// These settings may need to be updated based on data coming from theme.json sources.
|
||||||
if ( isset( $settings['__experimentalFeatures']['color']['palette'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['color']['palette'] ) ) {
|
||||||
$colors_by_origin = $settings['__experimentalFeatures']['color']['palette'];
|
$colors_by_origin = $editor_settings['__experimentalFeatures']['color']['palette'];
|
||||||
$settings['colors'] = isset( $colors_by_origin['user'] ) ?
|
$editor_settings['colors'] = isset( $colors_by_origin['user'] ) ?
|
||||||
$colors_by_origin['user'] : (
|
$colors_by_origin['user'] : (
|
||||||
isset( $colors_by_origin['theme'] ) ?
|
isset( $colors_by_origin['theme'] ) ?
|
||||||
$colors_by_origin['theme'] :
|
$colors_by_origin['theme'] :
|
||||||
$colors_by_origin['core']
|
$colors_by_origin['core']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( isset( $settings['__experimentalFeatures']['color']['gradients'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['color']['gradients'] ) ) {
|
||||||
$gradients_by_origin = $settings['__experimentalFeatures']['color']['gradients'];
|
$gradients_by_origin = $editor_settings['__experimentalFeatures']['color']['gradients'];
|
||||||
$settings['gradients'] = isset( $gradients_by_origin['user'] ) ?
|
$editor_settings['gradients'] = isset( $gradients_by_origin['user'] ) ?
|
||||||
$gradients_by_origin['user'] : (
|
$gradients_by_origin['user'] : (
|
||||||
isset( $gradients_by_origin['theme'] ) ?
|
isset( $gradients_by_origin['theme'] ) ?
|
||||||
$gradients_by_origin['theme'] :
|
$gradients_by_origin['theme'] :
|
||||||
$gradients_by_origin['core']
|
$gradients_by_origin['core']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( isset( $settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
|
||||||
$font_sizes_by_origin = $settings['__experimentalFeatures']['typography']['fontSizes'];
|
$font_sizes_by_origin = $editor_settings['__experimentalFeatures']['typography']['fontSizes'];
|
||||||
$settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ?
|
$editor_settings['fontSizes'] = isset( $font_sizes_by_origin['user'] ) ?
|
||||||
$font_sizes_by_origin['user'] : (
|
$font_sizes_by_origin['user'] : (
|
||||||
isset( $font_sizes_by_origin['theme'] ) ?
|
isset( $font_sizes_by_origin['theme'] ) ?
|
||||||
$font_sizes_by_origin['theme'] :
|
$font_sizes_by_origin['theme'] :
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue