-
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
Font Library: create fonts dir if a font face needs to use the file system #56120
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-family.php |
I think perhaps this change handles that situation, which has already been merged but might not have been in the build that was being tested. |
@pbking thanks for pointing that out. Yep, that change should fix the problem when you try to add fonts using the API but I'm not sure that a REST API controller should be in charge of creating a directory but it doesn't hurt. Apart from that, I think the PHP class in charge of writing the font assets to the filesystem should be able to write the containing folder so I think this PR is still needed. |
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.
This tests well for me! I can successfully install a font from Google Fonts with this PR ✅
I've left a minor comment with a suggested wording change.
Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
What?
Font Library: create fonts dir if a font face needs to use the filesystem
Why?
Because if the fonts directory is not created the writing of the fonts files can fail on certain servers.
How?
create fonts dir if a font face needs to use the filesystem
Testing Instructions