From cb3984de47eaaffda4b50394b3c1f01099ab1bbc Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 28 Feb 2019 21:44:49 +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. Built from https://develop.svn.wordpress.org/trunk@44782 git-svn-id: http://core.svn.wordpress.org/trunk@44614 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 5556bd7a62..6e353943b0 100644 --- a/wp-admin/edit-form-blocks.php +++ b/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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index cdb792f92a..e9b2e35f4e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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.