WordPress.org

Make WordPress Core

Opened 2 months ago

#52497 new enhancement

New filter "wp_script_attributes" doesn't take effort in enqueued scripts

Reported by: szaqal21 Owned by:
Milestone: Awaiting Review 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 (0)

Note: See TracTickets for help on using tickets.