Block Editor: Fix logic to enable custom colors, gradients, and font sizes.
The logic to enable or disabled colors, gradients, and font sizes missed a negative operator, so when things should be enabled they weren't and they should be disabled they were enabled. This commit fixes the logic. Props ntsekouras. See #53175. Built from https://develop.svn.wordpress.org/trunk@51031 git-svn-id: http://core.svn.wordpress.org/trunk@50640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b1666e78fb
commit
60d7dcdc61
|
@ -303,11 +303,11 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
|||
unset( $editor_settings['__experimentalFeatures']['color']['gradients'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['color']['custom'] ) ) {
|
||||
$editor_settings['disableCustomColors'] = $editor_settings['__experimentalFeatures']['color']['custom'];
|
||||
$editor_settings['disableCustomColors'] = ! $editor_settings['__experimentalFeatures']['color']['custom'];
|
||||
unset( $editor_settings['__experimentalFeatures']['color']['custom'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['color']['customGradient'] ) ) {
|
||||
$editor_settings['disableCustomGradients'] = $editor_settings['__experimentalFeatures']['color']['customGradient'];
|
||||
$editor_settings['disableCustomGradients'] = ! $editor_settings['__experimentalFeatures']['color']['customGradient'];
|
||||
unset( $editor_settings['__experimentalFeatures']['color']['customGradient'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] ) ) {
|
||||
|
@ -315,7 +315,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
|||
unset( $editor_settings['__experimentalFeatures']['typography']['fontSizes'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] ) ) {
|
||||
$editor_settings['disableCustomFontSizes'] = $editor_settings['__experimentalFeatures']['typography']['customFontSize'];
|
||||
$editor_settings['disableCustomFontSizes'] = ! $editor_settings['__experimentalFeatures']['typography']['customFontSize'];
|
||||
unset( $editor_settings['__experimentalFeatures']['typography']['customFontSize'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['typography']['customLineHeight'] ) ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-51030';
|
||||
$wp_version = '5.8-alpha-51031';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue