-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Webfonts API - webfonts collection implementation #1736
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
cef117a
1st Webfonts API implementation - to change.
aristath 9facf39
Register collections instead of individual fonts
aristath 85e0fb9
New architecture scaffolding.
hellofromtonya 5ee49bb
Add get_validated_params method
aristath a1f34f0
Tweak validation for local fonts
aristath d5ac8df
fix paths
aristath 6531b66
typo
aristath f99faf4
Adds tests and fixes for WP_Webfonts_Registry.
hellofromtonya 42bc934
Adds tests amd fixes for WP_Webfonts_Provider_Registry.
hellofromtonya 1804d67
Adds tests and fixes for WP_Webfonts_Controller.
hellofromtonya a2331ae
Moved schema validator to separate class.
hellofromtonya ee9ea3b
Made font weight and style optional.
hellofromtonya 0ad4f54
Fix method name
aristath 566fea7
validation: should use kebab since it's 1 step before the CSS output
aristath ecfa1da
Fix styles generation
aristath 45c6f21
remove blank line (CS)
aristath 78812dd
Add editor styles for webfonts
aristath 75c0bf9
Make function public. We'll need it for the theme.json implementation
aristath 228508d
Revert "Make function public. We'll need it for the theme.json implem…
aristath 880178d
Account for "file:./" URLs defined in a theme.json file.
aristath 780cda6
Update docblocks and remove final for testing.
hellofromtonya da9ebcf
Replaces _doing_it_wrong() with trigger_error().
hellofromtonya a73bc1d
Moves validation from providers to Validator.
hellofromtonya 9966b19
Adds src validation to Validator.
hellofromtonya 56ebaa7
Remove invalid_parameters & related method
aristath 0c0354b
Improves readability, usability, and performance.
hellofromtonya 2e541a1
Remove file:./ implementation
aristath 1d92844
update tests
aristath e5ca831
CS
aristath 33872b8
more tests fixes
aristath 551adee
Make links relative if URL is on-site
aristath 846e860
Update tests for local URLs CSS generation
aristath dab75cc
Add check to verify the provider is registered.
aristath d14aa9e
This was already done
aristath d87a3b8
test unregistered provider
aristath 646c9c0
cs
aristath fe29ea7
Trigger error when provider is not registered
aristath 01fd844
CS fix
aristath 27116bc
Fix some failing tests
aristath 4be94a3
meh, copy/pasta typo-error
aristath d2f1474
Fix failing test for unregistered provider
aristath dc5ed3f
minor improvements to the validator
aristath 291e4a8
fix docs & typos
aristath 4b7b099
another typo fix
aristath 88fb4af
Don't check if provider is registered
aristath 699f96c
This is not necessary, the browser won't get a request for this URL.
aristath e22ed3e
CS
aristath 4757065
simplify configuration params
aristath d2b2c91
Add docs to the register method
aristath 09742ca
This was removed
aristath 571c40d
Check if provider is a subclass of WP_Webfonts_Provider
aristath 022467a
more docs
aristath 68f439a
more docs
aristath b2aef24
rename the webfonts file.
aristath cf6ac7c
Remove get_by_font_family and related tests
aristath 46c87d5
Move font-family quoting to css-generation method
aristath 5bf5f66
Simplify the controller
aristath e31dee5
Move require_once to script_loader.php
aristath 9ae7f9a
add missing "since" to classes
aristath 0883e97
Simplify the preconnect-URLs implementation
aristath 2d0274b
minify styles if not debugging scripts
aristath 28445b3
Removes store by font-family during register.
hellofromtonya aff4233
Abstracts generating resources hints.
aristath 1ec9d69
Fix method parameter name typo.
hellofromtonya 6b08c0a
Fix variable name typo.
hellofromtonya a9c62fc
Remove unused key variable from `foreach`.
hellofromtonya b0e0296
Fixes to tests from code review.
hellofromtonya febc81b
Skip "provider" in CSS generation in the local provider.
aristath de65387
Update src/wp-includes/webfonts-api/class-wp-webfonts-registry.php
aristath 00c54aa
Allow using a range of font-weights for google-fonts
aristath 0e75bcf
provider no longer printed in the CSS
aristath ec7c787
Require 'is-external' => true to load external API webfonts
aristath 2139913
fix some (not all) test failures
aristath 4ea1f34
bugfix
aristath 864b5d1
typecast to array
aristath 9dd78c0
Improves the WP_Webfonts_Controller::generate_styles().
hellofromtonya 0f89538
Require valid CSS properties for webfont schema.
hellofromtonya 9a9f91c
Document classname needs for provider registration.
hellofromtonya d035860
Removes WP_Webfonts_Provider::prepare().
hellofromtonya 3929bf9
Require CSS properties in snake_case for registration.
hellofromtonya 125c29c
Shortens the Controller's getter names.
hellofromtonya 1380de5
Use MINUTE_IN_SECONDS constant instead of hard coded 60.
hellofromtonya acde215
Type cast font weights to int for range().
hellofromtonya f88500c
Remove unnecessary empty line.
hellofromtonya 6a0c723
Micro-optimizations, fixes, and comments.
hellofromtonya 14efc74
Removes unnecessary guard clauses.
hellofromtonya c8ea408
Makes reflection get_webfonts_property() consistent in tests.
hellofromtonya d898462
Simplify wp_register_webfonts by removing the unnecessary guard clause.
hellofromtonya cb0c9bc
Adds tests for Google Fonts provider `get_css()`.
hellofromtonya 81bba48
Changes the remote privacy permission logic.
hellofromtonya 81326fd
Code review: comments, typos, micro-optimizations.
hellofromtonya 6024894
Adds remaining class DocBlock comments.
hellofromtonya aa08030
typo fix
aristath 0ce34f6
should be an instance of WP_Webfonts_Controller, not WP_Webfonts
aristath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix docs & typos
- Loading branch information
commit 291e4a831d49d9100d2854b7a9a36f8bc0af11e0
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.