Closed matiasbenedetto closed 1 month ago
Does adding its own endpoint mean that there is data that cannot be obtained using the core API alone? Looks like __experimentalGetCurrentThemeGlobalStylesVariations has the information we need.
Something that is different in this endpoint than in __experimentalGetCurrentThemeGlobalStylesVariations
is that the font paths are absolute. I haven't found a good way to guess the theme URL from the frontend.
Does adding its own endpoint mean that there is data that cannot be obtained using the core API alone?
I think the frontend could cobble together the data using that and other APIs but I agree it's nice to have everything packaged nicely and ready-to-go with this one API addition.
I added some unit tests and merged trunk to fix some conflicts.
I think this is good to bring in and focus on the last branch.
What?
/wp-json/create-block-theme/v1/font-families
) that returns a list of font families used by a theme, including their style variants.Why?
Example:
With TT4 theme activated you should get an answer like this from the endpoint
/wp-json/create-block-theme/v1/font-families
: