[wp-trac] [WordPress Trac] #22249: Add ability to set or remove attributes on enqueued scripts and styles.
WordPress Trac
noreply at wordpress.org
Mon Nov 24 04:08:39 UTC 2014
#22249: Add ability to set or remove attributes on enqueued scripts and styles.
-------------------------------------------------+-------------------------
Reporter: ryanve | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future
Component: Script Loader | Release
Severity: normal | Version:
Keywords: dev-feedback has-patch reporter- | Resolution:
feedback 2nd-opinion needs-testing | Focuses:
-------------------------------------------------+-------------------------
Comment (by jtsternberg):
[22249-2.diff](https://core.trac.wordpress.org/attachment/ticket/22249/22249-2.diff)
Contains updates to:
- Change `$in_footer` param for `wp_register_script` and
`wp_enqueue_script` to an `$args` array where 'attributes' could be passed
with an array of attribute key/value pairs. Also accepts 'in_footer' as a
parameter and has a back-compat check for a passed non-array value.
- Includes the `src` attribute/value, the `type` attribute/value, and any
attributes passed in via the new `$args` param on `wp_register_script` and
`wp_enqueue_script` in the array of attributes passed to the new
`script_loader_attributes` filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22249#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list