-
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
Update Font Library non-REST API code to align with Core standards #58607
Update Font Library non-REST API code to align with Core standards #58607
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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/compat/wordpress-6.5/fonts/class-wp-font-collection.php ❔ lib/compat/wordpress-6.5/fonts/class-wp-font-library.php ❔ lib/compat/wordpress-6.5/fonts/class-wp-font-utils.php ❔ lib/compat/wordpress-6.5/fonts/fonts.php |
* @return array Modified upload directory. | ||
* @return array Modified allowed mime types. |
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 believe this was incorrect but flagging just in case.
I'm going to try and rebase this now. |
b84483e
to
12e969d
Compare
Thanks. I will abstain from committing code for now. |
Yes, I believe it should return the response of |
✅ in 4373d07 |
@pbking Are you able to advise on the Google fonts collection URL? |
@getdave I think this thread can have the answer to this: |
12f980a
to
d16d226
Compare
@anton-vlasenko Are we in a good place to merge this now? |
@getdave |
This reverts commit d16d226.
Flaky tests detected in ac52e89. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7761362749
|
@getdave, I think it's good to go. Just not sure where this bit in the function gutenberg_init_font_library() {
gutenberg_create_initial_post_types();
gutenberg_create_initial_rest_routes();
} There were tons of changes in the trunk, so I had to start this PR from scratch. |
* Remove empty line after @return * Fix comment format * Applying fixes from #58607 * Improve readability. --------- Co-authored-by: Anton Vlasenko <[email protected]> Co-authored-by: getdave <[email protected]> Co-authored-by: anton-vlasenko <[email protected]> Co-authored-by: pbking <[email protected]> Co-authored-by: matiasbenedetto <[email protected]>
@anton-vlasenko it seems valid. It's not adding anything new, just calling some parts of the code differently. It seems like added recently vs what's in trunk. In both cases (trunk and this branch) the code invoked is working fine. It's safe to add. |
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.
Thanks for the enhancements. The changes look good to me.
What?
Aligns the Font Library code with Core PHP standards.
See #55277 (comment)
Co-authored-by: getdave [email protected]
Co-authored-by: anton-vlasenko [email protected]
Co-authored-by: hellofromtonya [email protected]
Co-authored-by: pbking [email protected]
wp_unregister_font_collection
to provide areturn
value because currently it doesn't.google-fonts-to-wordpress-collection
has aTODO
to update to "production font collection":Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast