Opened 10 years ago
Closed 8 years ago
#30813 closed enhancement (wontfix)
Add a function to create a single Google font url
Reported by: | grapplerulrich | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Script Loader | Keywords: | |
Focuses: | Cc: |
Description
I have been thinking how we can standardize the hooks for styles and scripts so that styles and scripts are loaded twice when enqueued by both a plugin and theme or two plugins.
Google web fonts are also affected by this. It would be great if WordPress only loaded one Google font url.
My solution is to add a function to WordPress which can be hooked into using a filter so to add the fonts that are needed by the plugins and themes.
https://github.com/grappler/wp-standard-handles/blob/master/functions.php[
Change History (3)
Note: See
TracTickets for help on using
tickets.
No traction in two years. With the move to native system fonts in #36753, Google web fonts are no longer used in core, so adding a function to enqueue them doesn't seem suitable for core.