-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Webfonts: register and enqueue fonts by font-family #39559
Merged
Merged
Commits on Apr 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 130fb24 - Browse repository at this point
Copy the full SHA 130fb24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ad1a8e - Browse repository at this point
Copy the full SHA 7ad1a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f061bdf - Browse repository at this point
Copy the full SHA f061bdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 000c8ec - Browse repository at this point
Copy the full SHA 000c8ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1971d4 - Browse repository at this point
Copy the full SHA f1971d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 009d2b2 - Browse repository at this point
Copy the full SHA 009d2b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 826a94b - Browse repository at this point
Copy the full SHA 826a94bView commit details -
Configuration menu - View commit details
-
Copy full SHA for bbb8197 - Browse repository at this point
Copy the full SHA bbb8197View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1ea79f - Browse repository at this point
Copy the full SHA e1ea79fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf7b349 - Browse repository at this point
Copy the full SHA bf7b349View commit details -
Move webfonts logic from wordpress-6.0 to experimental
The API, although looking really good, is not ready for Core. So we must move it from wordpress-6.0 to experimental, and only add it there when it's ready to enter WordPress. Relocate files to /lib/experimental. Per the Gutenberg PHP > File structure documentation https://github.com/WordPress/gutenberg/tree/trunk/lib#file-structure.
Configuration menu - View commit details
-
Copy full SHA for 340df68 - Browse repository at this point
Copy the full SHA 340df68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9fe1f80 - Browse repository at this point
Copy the full SHA 9fe1f80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fba7fb - Browse repository at this point
Copy the full SHA 6fba7fbView commit details -
Fix tests with _doing_it_wrong.
Tests for methods that have a `_doing_it_wrong()` require an `expectedIncorrectUsage` annotation, proper usage of test fixture methods, and the usage of `__METHOD__` when invoking `_doing_it_wrong()`. This commit: - Fixes the test fixtures to use snake_case format and calling of the parent fixtures. - Refactors `get_font_slug()` tests into data providers (preferred in Core) and separates tests that will trigger `_doing_it_wrong()` to use the annotation. - Uses `__METHOD__` instead of `__FUNCTION__` in each `_doing_it_wrong()` instance.
Configuration menu - View commit details
-
Copy full SHA for 8392827 - Browse repository at this point
Copy the full SHA 8392827View commit details -
Add
get_webfonts_by_provider()
method to handle regrouping.The `WP_Webfonts::generate_styles()` should not be aware of how to reorganize the webfonts from grouped by font-family to grouped by provider. Why? This is a separate task from generating styles for the webfonts. This commit creates a private method called `get_webfonts_by_provider()` to encapsulate the know-how for this reorganizational work. It also includes a micro-optimization that eliminates an extra `foreach` loop and the building of an unnecessary `$webfonts` array of arrays.
Configuration menu - View commit details
-
Copy full SHA for 6d66272 - Browse repository at this point
Copy the full SHA 6d66272View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90cc444 - Browse repository at this point
Copy the full SHA 90cc444View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc63012 - Browse repository at this point
Copy the full SHA cc63012View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.