-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Impossible to set empty array on editor-font-sizes. #13824
Fix: Impossible to set empty array on editor-font-sizes. #13824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me; excited for more font size improvements to land :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most all of this code in client-assets.php
is going away (#13569), we should avoid making changes here.
What patch (if any) do we need to make to core to ensure this is reflected upstream?
@jorgefilipecosta Is there an associated core Trac issue I can follow for applying the fix to core? |
Hi @aduth, I'm sorry I missed the pings, I added a core patch in https://core.trac.wordpress.org/ticket/46290. |
Thanks @jorgefilipecosta 👍 |
Description
When setting an empty array on editor-font-sizes nothing happens, and the default font-sizes are used.
This PR's fixes the problem and makes sure that when
add_theme_support('editor-color-palette', array());
is added no available font sizes appear in the font size picker. This PR 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.This change needs to be ported into core.
How has this been tested?
I changed the default font sizes of twenty nineteen theme to:
I verified no default font sizes appear on the editor and just the custom size picker is available.