Opened 5 years ago
Closed 5 months ago
#52497 closed enhancement (duplicate)
New filter "wp_script_attributes" doesn't take effort in enqueued scripts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.7 |
| Component: | Script Loader | Keywords: | |
| Focuses: | Cc: |
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.
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.