mirror of
git://develop.git.wordpress.org/
synced 2025-04-21 04:31:55 +02:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51031 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d7f99f31e6
commit
6945095a3e
@ -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'] ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user