Add registered fonts to theme JSON AFTER the child and parent data has been merged. #47290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This fixes a problem noted here: Automattic/themes#6827
In short because fonts registered via Font Provider are appended to a CHILD theme's data any fonts provided by the PARENT are no longer provided.
This change appends the fonts to the theme data AFTER the parent and child data have been merged.
Testing Instructions
You will need to test with a rather specific theme scenario at the moment.
In an environment with Gutenberg plugin activated
Jetpack activated and the Google Font Provider activated
(wpcom simple sites fit this scenario)
Using this branch of Blockbase (which permist SOME but not ALL Jetpack fonts to be registered)
activate a Blockbase CHILD theme (such as Geologist).
Navigate to the Site Editor and observe the collection of fonts provided. Note that ALL of the fonts offered by Blockbase as well as ALL of the fonts provided by Jetpack are available.
This fixes the problem noted here where the original change (#6777) was rolled back.
Screenshots or screencast