[wp-trac] [WordPress Trac] #58634: Update uses of script registration functions to use new function signature

WordPress Trac noreply at wordpress.org
Wed Sep 6 21:21:32 UTC 2023


#58634: Update uses of script registration functions to use new function signature
-------------------------------------------------+-------------------------
 Reporter:  joemcgill                            |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.4
Component:  General                              |     Version:  6.3
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch needs-      |     Focuses:  javascript
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 In [changeset:"56526" 56526]:
 {{{
 #!CommitTicketReference repository="" revision="56526"
 Bundled Theme: Update default themes to use new script function signature.

 In WordPress 6.3, the last parameter of `wp_register_script()` and
 `wp_enqueue_script()` was changed to an array rather than a boolean. While
 a boolean is still supported for backward compatibility, it makes sense to
 update the codebase to use the new signature.

 The updates are fully backward compatible:
 * In places where `true` was provided, `array( 'in_footer' => true )` will
 still be interpreted as a boolean true in WordPress versions prior to 6.3.
 * In places where `false` was provided, the parameter is omitted which
 will work correctly throughout all WordPress versions given that is and
 has been the default value anyway.

 Props mrinal013, huzaifaalmesbah, niravsherasiya7707, joemcgill.
 Fixes #59302.
 See #58634.
 }}}

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


More information about the wp-trac mailing list