[wp-trac] [WordPress Trac] #59302: Update script registration in default themes to use new function signature
WordPress Trac
noreply at wordpress.org
Wed Sep 6 21:21:33 UTC 2023
#59302: Update script registration in default themes to use new function signature
---------------------------+--------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4
Component: Bundled Theme | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: performance
---------------------------+--------------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
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/59302#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list