[wp-trac] [WordPress Trac] #56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post
WordPress Trac
noreply at wordpress.org
Sat Nov 19 08:47:05 UTC 2022
#56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post
-----------------------------------+---------------------------------------
Reporter: domainsupport | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Editor | Version: 6.0
Severity: normal | Resolution:
Keywords: has-patch needs- | Focuses: administration, template
testing |
-----------------------------------+---------------------------------------
Comment (by domainsupport):
''No wonder'' it was **so** difficult to find a way to inject fonts into
the Global Styles interface! I've just read this on
https://make.wordpress.org/core/2022/04/22/status-of-webfonts-api-for-
wordpress-6-0-inclusion/ ...
> This led to the decision to pursue a pared down version that only
supports declaring fonts within a theme.json file, that is only available
to theme authors, rather than to the wider extender base (i.e., plugin
authors). To ensure this approach, the core of the API was put into a
private theme.json handler preventing plugins from registering or
enqueuing, bypassing the current performance and robustness concerns.
So ... my bad for finding this loop-hole way to do precisely what is quite
clearly not meant to be done but like you say, it is a bug nonetheless :)
If it were up to me I would vote for custom multidimensional array unique
function unless the Webfonts API is imminent ... ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56078#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list