Opened 6 years ago
Closed 15 months ago
#52497 closed enhancement (duplicate)
New filter "wp_script_attributes" doesn't take effort in enqueued scripts
| Reported by: | szaqal21 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Script Loader | Version: | 5.7 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
"wp_script_attributes" filter hasn't been added to tag output in WP_Scripts->do_item():
$tag .= sprintf( "<script%s src='%s' id='%s-js'></script>\n", $this->type_attr, $src, esc_attr( $handle ) );
adding defer or async attributes still requires usage of "script_loader_src" or "script_loader_tag" filters.
Change History (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related to #39941 and [50167].
I think this is tracked as part of #59446.
Works seems to be happening in https://github.com/WordPress/wordpress-develop/pull/498.