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. Built from https://develop.svn.wordpress.org/trunk@51203 git-svn-id: http://core.svn.wordpress.org/trunk@50812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b32d8c1bf6
commit
8ea2e04925
|
@ -354,11 +354,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||||
unset( $editor_settings['__experimentalFeatures']['typography']['customLineHeight'] );
|
unset( $editor_settings['__experimentalFeatures']['typography']['customLineHeight'] );
|
||||||
}
|
}
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['units'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['units'] ) ) {
|
||||||
if ( ! is_array( $editor_settings['__experimentalFeatures']['spacing']['units'] ) ) {
|
$editor_settings['enableCustomUnits'] = $editor_settings['__experimentalFeatures']['spacing']['units'];
|
||||||
$editor_settings['enableCustomUnits'] = false;
|
|
||||||
} else {
|
|
||||||
$editor_settings['enableCustomUnits'] = count( $editor_settings['__experimentalFeatures']['spacing']['units'] ) > 0;
|
|
||||||
}
|
|
||||||
unset( $editor_settings['__experimentalFeatures']['spacing']['units'] );
|
unset( $editor_settings['__experimentalFeatures']['spacing']['units'] );
|
||||||
}
|
}
|
||||||
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['customPadding'] ) ) {
|
if ( isset( $editor_settings['__experimentalFeatures']['spacing']['customPadding'] ) ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-beta2-51202';
|
$wp_version = '5.8-beta2-51203';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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