WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 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)

#1 @nacin
6 years ago

  • Type changed from defect (bug) to enhancement

#2 @iseulde
5 years ago

  • Version trunk deleted

#3 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.