[wp-trac] [WordPress Trac] #46981: Bundled themes should pass version to wp_enqueue_script() to ensure proper cache busting

WordPress Trac noreply at wordpress.org
Wed May 8 11:43:21 UTC 2019


#46981: Bundled themes should pass version to wp_enqueue_script() to ensure proper
cache busting
---------------------------+-----------------------
 Reporter:  dswebsme       |       Owner:  dswebsme
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  5.2.1
Component:  Bundled Theme  |     Version:  5.1.1
 Severity:  minor          |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+-----------------------

Comment (by dswebsme):

 @justinahinon Thanks for your question and quick work on the patch. To
 clarify, this ticket is specifically referring to wp_enqueue_script() in
 all bundled themes EXCEPT twentynineteen which already uses the preferred
 `wp_get_theme()->get( 'Version' )` method.

 All wp_enqueue_style() calls in pre-twentynineteen bundled themes have
 been addressed in #46979 which is currently awaiting testing and review
 (we could definitely use your help there!)

 Finally, as a note related to static version parameters vs.
 `wp_get_theme()->get( 'Version' )` the DEV team decided that bundled
 themes prior to twentynineteen should use static version numbers for
 maximum backwards compatibility with older versions of WordPress ( ref:
 https://core.trac.wordpress.org/ticket/39997#comment:30 ).

 There is still some legwork to do on this issue which includes auditing
 the last modified dates of all pre-twentynineteen bundled theme script
 assets, similar to what @desrosj and I did for #46979.

 Thanks for helping out!

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


More information about the wp-trac mailing list