-
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: Add missing files to lib/load.php #48108
Fonts API: Add missing files to lib/load.php #48108
Conversation
Flaky tests detected in 046fe87. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4187175706
|
Followed the test instructions, and tests well. I haven't verified the whole CSS, but the style element is present, and it starts with the |
Tested again with the newly updated instructions. Seems to work fine. CSS in the backend and front is: https://gist.github.com/fullofcaffeine/9037402cd58f65cd29b9637df686cde2 |
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
When I examine the
Update: I've followed the test steps and everything works as described except for the order of |
Notes: The problem is not in the Google Fonts plugin. It's in a custom implementation that is using |
@fullofcaffeine @anton-vlasenko @ironprogrammer The root of the problem is that a custom implementation is using Can you please retest? |
Thanks for the patch, @hellofromtonya 🙌🏻 Test ReportEnvironment
Actual Results
Additional Notes
$webfonts_provider = new WP_Webfonts_Provider_Local(); |
Test ReportEnv:
Test ResultsBefore applying this PRUpon activating the tester plugin, got a fatal error: Fatal error: Class 'WP_Webfonts_Provider_Local' not found in ../wp-content/plugins/fonts-api-bc-tester/class-fonts-provider.php on line 6 Yes, can reproduce the issue. After applying this PR
<style id="wp-fonts-fonts-tester">
@font-face{font-family:"Playfair Display";font-style:normal;font-weight:100 900;font-display:fallback;src:local("Playfair Display"), url('/wp-content/plugins/fonts-api-bc-tester/fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');}@font-face{font-family:"Playfair Display";font-style:italic;font-weight:100 900;font-display:fallback;src:local("Playfair Display"), url('/wp-content/plugins/fonts-api-bc-tester/fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');}
</style>
Works as expected ✅ |
* Add missing files to lib/load.php` * Guard loading the experimental files
* Add missing files to lib/load.php` * Guard loading the experimental files
Closed #48107.
What?
Load all of the deprecated files into memory.
Why?
To avoid fatal errors for sites that are actively using the non-deprecated architecture, i.e. before the API was renamed and redesigned.
How?
Add each file in
lib/experimental/fonts-api/deprecations/
to thelib/load.php
file.Testing Instructions
Step 1: Activate the Twenty Twenty-Three theme.
Step 2: Activate the Gutenberg plugin.
Step 3: Upload this plugin file and then activate it.
fonts-api-bc-tester.zip
Step 4: Reset the global styles to the default by:
Step 5: Select a Playflair Display font for the headings. In the Google Styles UI
Typography
.Headings
.FONT
selectPlayflair Display
(a Google Font).APPEARANCE
, selectBold Italic
. (Notice the heading should change)Step 6: Examine the dynamically generated
@font-face
stylings in the admin area by:wp-fonts-fonts-tester
(which is in the<head>
)<style>
element to inspect the CSSwp-fonts-fonts-tester
<style>
element to inspect the CSS