[wp-trac] [WordPress Trac] #60779: Twenty Twenty: use $theme_version variable for font stylesheet

WordPress Trac noreply at wordpress.org
Fri Mar 15 08:03:06 UTC 2024


#60779: Twenty Twenty: use $theme_version variable for font stylesheet
---------------------------+-----------------------------
 Reporter:  sabernhardt    |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:
 Severity:  minor          |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 When [57311] added a font stylesheet,
 {{{ wp_get_theme()->get( 'Version' ) }}}
 identified the theme version within `wp_enqueue_style()`.

 1. `twentytwenty_register_styles()` already has a `$theme_version`
 variable for use with other stylesheets, and it could be reused.
 2. `twentytwenty_block_editor_styles()` is the only function that includes
 `wp_get_theme()->get( 'Version' )` without declaring the variable, and now
 the function uses it twice.
 3. `twentytwenty_register_scripts()` and
 `twentytwenty_customize_preview_init()` have the variable but only use it
 once each.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60779>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list