-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update improve backward compatibility for deprecated settings #25738
Update improve backward compatibility for deprecated settings #25738
Conversation
Size Change: +944 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
It seems once we do that folks, should have the possibility to upgrade to the new API useEditorFeature. So I think it's probably better to wait for 5.6 before landing this as |
393ccf9
to
ff854cd
Compare
This PR is a must-have for 5.6 because without the PR on 5.6 on themes that don't explicitly set a color palette, or gradients, or font sizes the defaults will not appear. As now the defaults are passed by the global styles mechanism that will not be part of 5.6. |
Fixes #25652 |
ff854cd
to
17f8811
Compare
I hate to say it, but this actually broke backwards compatibility (at least in the way we were using it). In order to enable custom line height for all themes, we were filtering editor settings to add the |
In WordPress/gutenberg#25738, Gutenberg moved the lineHeight setting to a new place in the settings object. It also introduced a (sort of?) bug where even though it has a mechanism to use the deprecated location for the setting, it is never used because the default value is returned instead. This simply updates our existing filter to enable line height in the new location if the new location exists. I left the old setting in place as well, just in case we still need to support older gutenberg versions.
Hi @noahtallen I believe this is a bug we need to fix. However, it seems to me that the bug is not in the client's Essentially, we need to make this work for the following two use cases:
|
This PR improves backward compatibility for deprecated settings.
It now follows this model:
How has this been tested?
I verified the default settings appear on the playground.
I verified the normal post editor still used settings from theme.json