Editor: Allow the default font size options to be removed.

Similar to `editor-color-palette`, a theme or plugin should be able to set the theme support for `editor-font-sizes` to an empty array, indicating that no additional font sizes should be available in the block’s ‘Text Settings’. The current conditional was using `empty()`, which was incorrectly causing the default font sizes to be used instead.

Props jorgefilipecosta, chrisvanpatten, SergeyBiryukov.
Fixes #46290.
Built from https://develop.svn.wordpress.org/trunk@44782


git-svn-id: http://core.svn.wordpress.org/trunk@44614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-02-28 21:44:49 +00:00
parent 0e5e765a1b
commit cb3984de47
2 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ if ( false !== $color_palette ) {
$editor_settings['colors'] = $color_palette; $editor_settings['colors'] = $color_palette;
} }
if ( ! empty( $font_sizes ) ) { if ( false !== $font_sizes ) {
$editor_settings['fontSizes'] = $font_sizes; $editor_settings['fontSizes'] = $font_sizes;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.2-alpha-44781'; $wp_version = '5.2-alpha-44782';
/** /**
* 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.