-
Notifications
You must be signed in to change notification settings - Fork 101
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
Filter the font directory to work with the VIP Filesystem #5265
Conversation
48ed51d
to
8ce2218
Compare
8ce2218
to
cc7ea3f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5265 +/- ##
=============================================
- Coverage 29.02% 28.95% -0.08%
- Complexity 4822 4823 +1
=============================================
Files 283 283
Lines 20937 20934 -3
=============================================
- Hits 6077 6061 -16
- Misses 14860 14873 +13 ☔ View full report in Codecov by Sentry. |
I think codecov might not realize the test ultimately executes the code via a filter :) |
cc7ea3f
to
9cbad3e
Compare
return; | ||
} | ||
|
||
$font_dir = \wp_get_font_dir(); |
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.
We need to follow this PR: WordPress/wordpress-develop#6211
In case the function is renamed/changed. (Or test it by doing the filter instead.)
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.
We need to follow this PR: WordPress/wordpress-develop#6211
In case the function is renamed/changed. (Or test it by doing the filter instead.)
I'll try to remember to come back and let you know.
I've been doing some expreiments on my local build and don't intend to change the name of the function or the filter but will confirm.
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!
3e1a4e7
to
8e0ebde
Compare
8e0ebde
to
4868b84
Compare
4868b84
to
6bc5fa2
Compare
Quality Gate passedIssues Measures |
* Jetpack: Make 13.2 default (#5326) * Prevent saving unnecessary Jetpack post_by_email_address* DB options (#5311) * chore(deps): Bump actions/checkout from 4.1.1 to 4.1.2 (#5329) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4.1.1...v4.1.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump softprops/action-gh-release from 2.0.3 to 2.0.4 (#5330) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@v2.0.3...v2.0.4) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump webpack-dev-server in /search/search-dev-tools (#5328) Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.0.2 to 5.0.3. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md) - [Commits](webpack/webpack-dev-server@v5.0.2...v5.0.3) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump @types/node in /__tests__/e2e (#5327) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.25 to 20.11.26. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update wp-parsely submodule to version 3.14.1 (#5334) * chore(deps-dev): Bump @types/node in /__tests__/e2e (#5332) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.26 to 20.11.27. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump postcss-preset-env from 9.5.0 to 9.5.1 (#5333) Bumps [postcss-preset-env](https://github.com/csstools/postcss-plugins/tree/HEAD/plugin-packs/postcss-preset-env) from 9.5.0 to 9.5.1. - [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/CHANGELOG.md) - [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugin-packs/postcss-preset-env) --- updated-dependencies: - dependency-name: postcss-preset-env dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Removes extraneous text from command description. (#5335) When describing the command with `wp help vipsupport`, an out-of-place text would appear after the command desciption: "Class command". * chore(deps-dev): Bump sass in /search/search-dev-tools (#5336) Bumps [sass](https://github.com/sass/dart-sass) from 1.71.1 to 1.72.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.71.1...1.72.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump follow-redirects from 1.15.5 to 1.15.6 (#5338) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump follow-redirects in /search/search-dev-tools (#5337) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.4...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Akismet to 5.3.1 (#5321) * chore(deps-dev): Bump @types/node in /__tests__/e2e (#5340) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.27 to 20.11.28. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * WP 6.5 Font Library: Filter the font directory to work with the VIP Filesystem (#5265) Uses the `font_dir` filter to set the font library upload location to the default upload directory. * chore(deps): Bump preact from 10.19.6 to 10.19.7 in /search/search-dev-tools (#5345) * chore(deps): Bump preact in /search/search-dev-tools Bumps [preact](https://github.com/preactjs/preact) from 10.19.6 to 10.19.7. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](preactjs/preact@10.19.6...10.19.7) --- updated-dependencies: - dependency-name: preact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Regenerate the bundle --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: WordPress VIP Bot <[email protected]> * chore(deps-dev): Bump postcss-preset-env from 9.5.1 to 9.5.2 (#5344) Bumps [postcss-preset-env](https://github.com/csstools/postcss-plugins/tree/HEAD/plugin-packs/postcss-preset-env) from 9.5.1 to 9.5.2. - [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/CHANGELOG.md) - [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugin-packs/postcss-preset-env) --- updated-dependencies: - dependency-name: postcss-preset-env dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update wp-parsely submodule to version 3.14.2 (#5346) * chore(deps-dev): Bump @babel/plugin-syntax-decorators (#5355) Bumps [@babel/plugin-syntax-decorators](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-decorators) from 7.24.0 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-plugin-syntax-decorators) --- updated-dependencies: - dependency-name: "@babel/plugin-syntax-decorators" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump @types/node in /__tests__/e2e (#5354) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.28 to 20.11.30. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump @babel/plugin-syntax-decorators in /__tests__/e2e (#5353) Bumps [@babel/plugin-syntax-decorators](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-decorators) from 7.24.0 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-plugin-syntax-decorators) --- updated-dependencies: - dependency-name: "@babel/plugin-syntax-decorators" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): Bump @babel/plugin-transform-class-properties (#5348) Bumps [@babel/plugin-transform-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-properties) from 7.23.3 to 7.24.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.1/packages/babel-plugin-transform-class-properties) --- updated-dependencies: - dependency-name: "@babel/plugin-transform-class-properties" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Jetpack: Revert to 13.1 for WP 6.3 (#5361) * Disable "Invite user to WordPress.com" checkbox temporarily (#5366) Add Jetpack SSO workaround to allow user creation on VIP --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Rebecca Hum <[email protected]> Co-authored-by: Tallulah <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Henrique Mouta <[email protected]> Co-authored-by: Bruno Basto <[email protected]> Co-authored-by: Brooke <[email protected]> Co-authored-by: Noah Allen <[email protected]> Co-authored-by: WordPress VIP Bot <[email protected]> Co-authored-by: Alex Cicovic <[email protected]> Co-authored-by: Luiz Tiago Oliveira <[email protected]> Co-authored-by: Alec Geatches <[email protected]>
Description
WordPress 6.5 introduces the Font Library, which allows customers to upload custom fonts and use them with global styles.
We need to use the new
font_dir
filter to ensure this will work in the VIP FS, since the default font dir is not writable on our platform.This ultimately changes the font dir and URL to:
Normal/root site:
vip://wp-content/uploads/fonts
https://$site_url/wp-content/uploads/fonts
Network site:
vip://wp-content/uploads/sites/$network_site_id/fonts
https://$site_url/$network_site_path/wp-content/uploads/sites/$network_site_id/fonts
Changelog Description
Use a custom font directory for the new Font Library
WordPress 6.5 introduces the Font Library, which allows you to upload and manage your own font files from the site editor. We have used the new
font_dir
filter to set the font upload directory towp-content/uploads/fonts
to get this feature working with the VIP Filesystem.Pre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist
Steps to Test
This recording shows the process:
Screen.Recording.2024-02-21.at.1.56.18.PM.mov