mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Editor: Allow custom-units to be an array.
The changes in [50959] introduced an issue where `custom_units` was always being coerced into a boolean value. This should support `array` values. Props kraftner, youknowriad, nosolosw, jorgefilipecosta. Fixes #53472. git-svn-id: https://develop.svn.wordpress.org/trunk@51203 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -354,11 +354,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||
unset( $editor_settings['__experimentalFeatures']['typography']['customLineHeight'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['units'] ) ) {
|
||||
if ( ! is_array( $editor_settings['__experimentalFeatures']['spacing']['units'] ) ) {
|
||||
$editor_settings['enableCustomUnits'] = false;
|
||||
} else {
|
||||
$editor_settings['enableCustomUnits'] = count( $editor_settings['__experimentalFeatures']['spacing']['units'] ) > 0;
|
||||
}
|
||||
$editor_settings['enableCustomUnits'] = $editor_settings['__experimentalFeatures']['spacing']['units'];
|
||||
unset( $editor_settings['__experimentalFeatures']['spacing']['units'] );
|
||||
}
|
||||
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['customPadding'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user