-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use slug
instead of id
for Font Collection
#57735
Use slug
instead of id
for Font Collection
#57735
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/experimental/fonts/font-library/class-wp-font-collection.php ❔ lib/experimental/fonts/font-library/class-wp-font-library.php ❔ lib/experimental/fonts/font-library/class-wp-rest-font-collections-controller.php ❔ lib/experimental/fonts/font-library/font-library.php ❔ phpunit/tests/fonts/font-library/wpFontCollection/__construct.php ❔ phpunit/tests/fonts/font-library/wpFontCollection/getConfig.php ❔ phpunit/tests/fonts/font-library/wpFontCollection/getConfigAndData.php ❔ phpunit/tests/fonts/font-library/wpFontLibrary/getFontCollection.php ❔ phpunit/tests/fonts/font-library/wpFontLibrary/getFontCollections.php ❔ phpunit/tests/fonts/font-library/wpFontLibrary/registerFontCollection.php ❔ phpunit/tests/fonts/font-library/wpFontLibrary/unregisterFontCollection.php ❔ phpunit/tests/fonts/font-library/wpRestFontCollectionsController/getFontCollection.php ❔ phpunit/tests/fonts/font-library/wpRestFontCollectionsController/getFontCollections.php ❔ phpunit/tests/fonts/font-library/wpRestFontCollectionsController/registerRoutes.php |
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.
I think there was a mistake while committing to this branch because the changes don't match the PR title and description.
d4c6df4
to
0094034
Compare
Sorry @matiasbenedetto I'm not sure what happend with the work. I force-pushed and the changes are here now. |
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.
The changes are looking and testing good.
Let's ship them after the CI pass.
What?
This removes the
id
property from the Font Collection object and usesslug
instead.Why?
The value is treated like a slug, but with the wrong name. This just changes what we call it.
Fixes: (?)
How?
By changing the
Font Collection
class, the rest controller, the default collection and all related unit tests.Testing Instructions
The unit tests should all pass.
The "default" (Google Fonts) collection should still be available to the user.
NOTE: These changes are dependent on #57734 being merged first; those changes are already incorporated into these.