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

WordPress Trac noreply at wordpress.org
Sat Feb 4 20:10:23 UTC 2023


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

Comment (by sabernhardt):

 Notes for pull requests 3992 to 3997:

 1. To avoid errors in the block editor with the more recent five themes,
 the theme directory is removed from the function output in
 `add_editor_style`. Making the stylesheet relative gives a `baseURL` for
 the relative font URLs in the stylesheet so the editor does not try
 loading them from the `wp-admin` directory. If anyone has replaced the
 theme setup function from Twenty Fourteen, Twenty Fifteen or Twenty
 Sixteen, that child theme would need updating.
 2. License information at the top of LICENSE.txt files is similar to what
 is in Twenty Twenty-Two. The README files also include copyright and
 licensing information, consistent with other themes.
 3. These font filenames would not change with any future updates, though
 the PRs include version numbers for the font files and the stylesheets. If
 instead we prefer to leave the stylesheet version as `null` and remove the
 query strings, visitors probably would not mind reusing the cached version
 of either the stylesheet or font files (if/when we update them). Without
 the query strings, updating fonts could be a little simpler, too.
 4. The resource hint function still can be used with a child theme or
 plugin, but site owners would need to opt-in to adding it for their custom
 Google stylesheet.
 5. I have appreciated the ability to override the font function output in
 Twenty Fifteen and Twenty Sixteen, so I added a `function_exists` check to
 the other four themes. This way, we can recommend that for custom URLs in
 any of these themes instead of dequeue functions or something else.

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


More information about the wp-trac mailing list