Skip to content
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: changing the upload directory to wp-content/fonts #54122

Merged
merged 5 commits into from
Sep 1, 2023

Conversation

jffng
Copy link
Contributor

@jffng jffng commented Sep 1, 2023

What?

Fixes #53965, simplified alternative to #54076 as suggested by @matiasbenedetto .

Why?

We want the fonts to be stored in wp-content/fonts instead of wp-content/uploads/fonts.

How?

Changes the set_upload_dir and get_fonts_dir functions.

Testing Instructions

  1. Run the unit tests locally (npm run test:unit:php)
  2. Test manually in your console by following these instructions: Fonts Library: change upload directory to wp-content/fonts #54076 (comment)

Screenshots or screencast

@jffng jffng added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Sep 1, 2023
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

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-library.php
❔ phpunit/tests/fonts/font-library/wpFontFamily/base.php
❔ phpunit/tests/fonts/font-library/wpFontFamily/install.php
❔ phpunit/tests/fonts/font-library/wpFontFamily/uninstall.php
❔ phpunit/tests/fonts/font-library/wpFontLibrary/getFontsDir.php
❔ phpunit/tests/fonts/font-library/wpFontLibrary/setUploadDir.php
❔ phpunit/tests/fonts/font-library/wpRestFontLibraryController/installFonts.php
@jffng jffng marked this pull request as ready for review September 1, 2023 19:19
@jffng jffng changed the title Font Library: try changing the upload directory Sep 1, 2023
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Flaky tests detected in 538d030.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6053126918
📝 Reported issues:

Copy link
Contributor

@matiasbenedetto matiasbenedetto left a comment

Choose a reason for hiding this comment

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

I made a small change regarding avoiding one hardcoded variable in the tests base class.

Apart from that it tests and works as expected. LGTM
Thanks for working on this 🚀

@matiasbenedetto matiasbenedetto enabled auto-merge (squash) September 1, 2023 20:02
@matiasbenedetto matiasbenedetto merged commit ac32ed5 into trunk Sep 1, 2023
49 checks passed
@matiasbenedetto matiasbenedetto deleted the try/set-upload-dir branch September 1, 2023 20:36
@github-actions github-actions bot added this to the Gutenberg 16.7 milestone Sep 1, 2023
@mikachan mikachan added the Needs PHP backport Needs PHP backport to Core label Sep 6, 2023
@mikachan mikachan added [Feature] Typography Font and typography-related issues and PRs [Type] Enhancement A suggestion for improvement. and removed [Type] Task Issues or PRs that have been broken down into an individual action to take labels Sep 20, 2023
@youknowriad youknowriad added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Needs PHP backport Needs PHP backport to Core labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Typography Font and typography-related issues and PRs [Type] Enhancement A suggestion for improvement.
4 participants