From 91e536521875130897a727b8a134d1358e77da8e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 28 Feb 2019 21:43:04 +0000 Subject: [PATCH] Editor: Allow the default font size options to be removed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. git-svn-id: https://develop.svn.wordpress.org/trunk@44782 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 5556bd7a62..6e353943b0 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -306,7 +306,7 @@ if ( false !== $color_palette ) { $editor_settings['colors'] = $color_palette; } -if ( ! empty( $font_sizes ) ) { +if ( false !== $font_sizes ) { $editor_settings['fontSizes'] = $font_sizes; }