[wp-trac] [WordPress Trac] #49742: No longer able to enqueue multiple Google Fonts with wp_enqueue_style
WordPress Trac
noreply at wordpress.org
Fri Oct 15 08:50:27 UTC 2021
#49742: No longer able to enqueue multiple Google Fonts with wp_enqueue_style
---------------------------+------------------------------
Reporter: tannerm | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by Otto42):
Replying to [comment:6 leecollings]:
> I have to say I'm absolutely shocked that I've only discovered this
issue, and that someone reported it (with a solution) over a year ago. And
it still hasn't been fixed in WordPress yet.
There is no easy way to "fix" this in WordPress. Google decided on a path
that is fundamentally incompatible with how the rest of the world uses
query variables and thus PHP itself, which WordPress is built atop of,
doesn't much like it. They didn't used to do this. No idea why Google
changed how their Fonts work in this way.
The workaround is to use "null" for the version parameter when using
wp_enqueue_style on Google Fonts, and this is an acceptable workaround
since you shouldn't be versioning external style libraries anyway.
In other words, there is no "urgency" here. There is a rather simple
workaround, and the problem itself is not in WordPress's code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49742#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list