-
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
Font Face API: use gutenberg_get_global_settings
instead of private API
#53805
Conversation
743a9e8
to
3a14a2c
Compare
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/compat/wordpress-6.4/fonts/font-face/class-wp-font-face-resolver.php |
The Font Face files are being relocated to prepare for merging into Core. Once #53858 is merged, then I'll circle back to this PR to get it updated. |
3a14a2c
to
8ec62ce
Compare
#53805 has been merged, so I rebased this PR. |
Tested - same results with this PR. Thank you @oandregal! |
Changes the resolver to use wp_get_global_settings() instead of the chained objects to get the merged data layer. Reference: WordPress/gutenberg#53805 Props @oandregal.
This PR has been backported to WordPress Core. I added it to the Core PR WordPress/wordpress-develop@e1da7ab ✅ |
Removed backport label as Font Face was merged into Core via changeset https://core.trac.wordpress.org/changeset/56500 ✅ |
Part of #41479.
What
This substitutes the call to a private API
WP_Theme_JSON_Resolver_Gutenberg::get_merged_data()->get_settings();
for the public API equivalentgutenberg_get_global_settings()
.Why
We should use our public APIs when possible.
How to test
Verify all tests pass.