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

[Fonts API] Remove adding missing fonts into theme.json #51716

Closed
hellofromtonya opened this issue Jun 20, 2023 · 1 comment
Closed

[Fonts API] Remove adding missing fonts into theme.json #51716

hellofromtonya opened this issue Jun 20, 2023 · 1 comment
Assignees
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@hellofromtonya
Copy link
Contributor

Part of #41479.

Reference: #41479 (comment)

What problem does this address?

As shared in Ongoing Roadmap update #41479 (comment), the Fonts API will no longer inject / add fonts into theme.json. Rather, it will become read-only of the theme.json merged data.

What is your proposed solution?

Remove the WP_Fonts_Resolver::add_missing_fonts_to_theme_json() and associated methods in the resolver.

Remove where WP_Fonts_Resolver::add_missing_fonts_to_theme_json() is invoked in WP_Theme_JSON_Resolver_Gutenberg::get_theme_data().

Remove all associated tests.

Merge Caution - Wait for Font Library

Be careful of when to merge the PR that resolves this ticket. Removing this method should happen when the Font Library is already or is about to merged into trunk.

This method adds fonts that plugins register with the Fonts API. That functionality is needed for sites like WPCOM and any other site that is using a plugin to register fonts. Once the Font Library lands, then the PR for this ticket can be merged.

@hellofromtonya
Copy link
Contributor Author

This issue is no longer valid as it's being resolved in the new Font Face and Font Library implementations.

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants