[wp-trac] [WordPress Trac] #46290: Port from Gutenberg editor: Fix: Impossible to set empty array on editor-font-sizes.

WordPress Trac noreply at wordpress.org
Wed Feb 20 22:02:47 UTC 2019


#46290: Port from Gutenberg editor: Fix: Impossible to set empty array on editor-
font-sizes.
------------------------------+-----------------------------
 Reporter:  jorgefilipecosta  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------------
 This ticket ports to core a fix already applied in the Gutenberg editor
 plugin.
 This part of the code is going to be removed from the plugin so it is
 important to get this change on the core.
 Gutenberg PR: https://github.com/WordPress/gutenberg/pull/13824

 More details:
 When setting an empty array on editor-font-sizes theme support setting
 nothing happens, and the default font-sizes were used by the editor.
 This patch fixes the problem and makes sure that when `add_theme_support
 ('editor-color-palette', array());` is added no available font sizes
 appear on the editor. This patch uses the same approach used in colors and
 makes the behavior consistent with what happens when an empty array is set
 on editor-color-palette.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46290>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list