[wp-trac] [WordPress Trac] #58717: async
WordPress Trac
noreply at wordpress.org
Wed Jul 5 14:05:27 UTC 2023
#58717: async
---------------------------+------------------------------
Reporter: camaran | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
---------------------------+------------------------------
Comment (by roytanck):
Thanks for your ticket. I do not believe `wp_enqueue_script` supports this
syntax. The fifth attribute should be a simple boolean (true or false),
and determines whether the script is loaded in the footer.
It is possible however to add the `async` attribute using the
`script_loader_tag` filter hook. See
https://wordpress.stackexchange.com/a/198372 for an example.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58717#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list