-
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
[Fonts API] removing files and files loading no longer needed #57972
Conversation
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/load.php |
This PR not only removes the deprecated Fonts API but also turns on the Font Library by default. Will this be a problem (thinking of Jetpack)? |
Had a conversation with @matiasbenedetto. Jetpack is now using the Font Library by default, i.e. not the Fonts API. Should be okay then. |
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.
LGTM 👍 (And woohoo for this old, deprecated code to finally be gone.)
@hellofromtonya I needed to add an additional re-declaration guard on
Could you check this again, please? |
Whoops, also need to remove the Fonts API tests. This whole folder can be removed https://github.com/WordPress/gutenberg/tree/trunk/phpunit/tests/fonts-api. |
require __DIR__ . '/experimental/fonts/font-library/font-library.php'; | ||
|
||
// Load the Font Face and Font Face Resolver, if not already loaded by WordPress Core. | ||
if ( ! class_exists( 'WP_Font_Face' ) ) { |
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.
@matiasbenedetto this check needs to stay as Core loads these files. If the website has < WP 6.4.0, then the files are loaded.
All tests are failing (not just fonts) for:
which was fixed a little bit ago by b2c2a08. This PR will need a rebase to pull the changes into it. |
9ce81cb
to
7410fa4
Compare
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.
Re-reviewing. All of the Fonts API files including the tests are now removed.
This PR is ready for merge into trunk
. Thanks @matiasbenedetto ⭐
Thanks for the review and the fixes 🌟 |
What?
Removing source files around the deprecated Fonts API they are not longer needed.
See: #51820
Why?
Fixes: #51820
How?
Removing the files and the conditional loading of them.
Testing Instructions