[wp-trac] [WordPress Trac] #37171: Implement preconnect to Google fonts in themes twenty eleven, twelve, thirteen, fourteen, fifteen, sixteen
WordPress Trac
noreply at wordpress.org
Mon Sep 19 18:30:10 UTC 2016
- Previous message: [wp-trac] [WordPress Trac] #37171: Implement preconnect to Google fonts in themes twenty eleven, twelve, thirteen, fourteen, fifteen, sixteen
- Next message: [wp-trac] [WordPress Trac] #37171: Implement preconnect to Google fonts in themes twenty eleven, twelve, thirteen, fourteen, fifteen, sixteen
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
#37171: Implement preconnect to Google fonts in themes twenty eleven, twelve,
thirteen, fourteen, fifteen, sixteen
-----------------------------+--------------------------
Reporter: superpoincare | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 4.7
Component: Bundled Theme | Version: 4.6
Severity: normal | Resolution:
Keywords: good-first-bug | Focuses: performance
-----------------------------+--------------------------
Comment (by superpoincare):
Replying to [comment:11 leobaiano]:
I think the way to do it is using wp_resource_hints() introduced in
Worpress 4.6.
This is because it gives the optionality of dequeueing it. An example
scenario would be: someone using the Twenty Twelve theme and decides to
not use Open Sans and use system fonts instead.
But the way to undo it using your patch would be to add a header.php in
the child theme and remove the lines, which people may not like, since
many times people just use child style.css and functions.php.
So the best way to preconnect is in functions.php of the bundled themes
with a condition that if the fonts are in the queue, add a preconnect.
This way someone who is using say a Twenty Twelve theme and has dequeued
Google fonts in his/her child theme is unaffected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37171#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
- Previous message: [wp-trac] [WordPress Trac] #37171: Implement preconnect to Google fonts in themes twenty eleven, twelve, thirteen, fourteen, fifteen, sixteen
- Next message: [wp-trac] [WordPress Trac] #37171: Implement preconnect to Google fonts in themes twenty eleven, twelve, thirteen, fourteen, fifteen, sixteen
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the wp-trac
mailing list