Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6ca902d
google fonts collection data provisional url
matiasbenedetto Jan 16, 2024
9e3c3f8
rename controller methods
matiasbenedetto Jan 16, 2024
78c6941
fix get_items parameters
matiasbenedetto Jan 16, 2024
399cf88
fix endpoint return
matiasbenedetto Jan 16, 2024
b600531
rafactor font collection class
matiasbenedetto Jan 17, 2024
adaebd6
fix tests for the refactored class
matiasbenedetto Jan 17, 2024
2e57945
refactor font collections rest controller
matiasbenedetto Jan 17, 2024
cc7067f
update font collection tests
matiasbenedetto Jan 17, 2024
8fe9713
update the frontend to use the new endpoint data schema
matiasbenedetto Jan 17, 2024
9f4cfe2
format php
matiasbenedetto Jan 17, 2024
8dcdcf2
Merge branch 'try/font-library-refactor' into try/font-collection-new…
matiasbenedetto Jan 17, 2024
823a580
adding linter line ignore rul
matiasbenedetto Jan 17, 2024
6dff6f1
replacing throwing an exception by calling doing_it_wrong
matiasbenedetto Jan 18, 2024
778d27b
add translation marks
matiasbenedetto Jan 18, 2024
3c011c8
user ternary operator
matiasbenedetto Jan 18, 2024
e698680
correct translation formatting and comments
matiasbenedetto Jan 18, 2024
3a5b423
renaming function
matiasbenedetto Jan 19, 2024
6f9463b
renaming tests
matiasbenedetto Jan 19, 2024
9d1d78b
improve url matching
matiasbenedetto Jan 19, 2024
ed27754
return error without rest_ensure_response
matiasbenedetto Jan 19, 2024
ae2f519
Merge branch 'try/font-collection-new-schema' of github.com:WordPress…
matiasbenedetto Jan 19, 2024
21b21d5
fix contradictory if condition
matiasbenedetto Jan 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
google fonts collection data provisional url
  • Loading branch information
matiasbenedetto committed Jan 16, 2024
commit 6ca902da6cd801130d0769f0bd425c50c6ea4ce9
3 changes: 2 additions & 1 deletion lib/experimental/fonts/font-library/font-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ function wp_unregister_font_collection( $collection_id ) {
'slug' => 'default-font-collection',
'name' => 'Google Fonts',
'description' => __( 'Add from Google Fonts. Fonts are copied to and served from your site.', 'gutenberg' ),
'src' => 'https://s.w.org/images/fonts/16.7/collections/google-fonts-with-preview.json',
// TODO: This URL needs to be updated to the wporg hosted one prior to the Gutenberg 17.6 release.
'src' => 'https://raw.githubusercontent.com/WordPress/google-fonts-to-wordpress-collection/main/releases/gutenberg-17.6/google-fonts.json',
);

wp_register_font_collection( $default_font_collection );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the font collection registered on every request? If the font collection is only needed in wp-admin and rest api requests, maybe there is a hook we can for collection registration.

Expand Down