[wp-trac] [WordPress Trac] #55985: [Twenty Twelve to Twenty Seventeen]: bundle Google Fonts in each theme

WordPress Trac noreply at wordpress.org
Tue Sep 6 21:50:53 UTC 2022


#55985: [Twenty Twelve to Twenty Seventeen]: bundle Google Fonts in each theme
---------------------------+----------------------
 Reporter:  luminuu        |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  high           |   Milestone:  6.1
Component:  Bundled Theme  |     Version:
 Severity:  major          |  Resolution:
 Keywords:  has-patch      |     Focuses:  privacy
---------------------------+----------------------

Comment (by sabernhardt):

 The block editor had trouble with `add_editor_style()` because full URLs
 do not get the base directory in the inline script. It required a
 [https://github.com/sabernhardt/wordpress-develop/pull/15/files#diff-
 8c3f51fd56a17466e174f0253e44cd0af2f945e1baf164537e693443b4ed7291R176
 relative reference]. Then removing the parent/child theme directory should
 make creating new `mce_css` functions unnecessary.

 Maintaining 3 stylesheets for Twenty Thirteen—and 7 stylesheets each for
 Twenty Fifteen and Twenty Sixteen—is a lot of duplication, but I think
 combining them is important. If anyone else dequeues the font stylesheet
 in their current child theme (or a plugin), the theme would need to keep a
 single stylesheet with the same ID to continue dequeuing the font(s).

 I started creating a collection of child themes to test each theme in
 different scenarios:
 - no font change
 - using a custom Google stylesheet
 - supplying a new self-hosted font stylesheet in the child theme
 - dequeuing fonts
 - replacing the function output with an empty string when the theme checks
 if `function_exists` (Twenty Fifteen and Twenty Sixteen)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55985#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list