Opened 3 years ago

Last modified 4 months ago

#13592 new enhancement

script_loader_src and style_loader_tag filters

Reported by: olivM Owned by:
Priority: normal Milestone: Future Release
Component: General Version:
Severity: normal Keywords: has-patch needs-testing
Cc: quietnic, tollmanz@…, td@…, retlehs

Description

i'm trying to build a scripts and styles minifier.
( i don't like the way wp-minify does it ... )

thanks to the style_loader_tag filters, i'm pretty proud of my work for stylesheets.

but why don't we have a script_loader_tag ?

something like this in class.wp-scripts.php :

   $src .= apply_filters( 'script_loader_tag', "<script type='text/javascript' src='$src'></script>\n", $handle );

ok i'll try to submit a real patch.

Attachments (1)

13592.patch (760 bytes) - added by Quiet Nic 2 years ago.
Add script_loader_tag filter to match style_loader_tag.

Download all attachments as: .zip

Change History (11)

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Add script_loader_tag filter to match style_loader_tag.

  • Cc Quiet Nic added
  • Keywords has-patch added; needs-patch removed
  • Cc quietnic added
  • Keywords needs-testing added

## not directly related to the ticket, but not sure where else to post this - remove if inappropriate ##

My apologies to the users Quiet and Nic (if they exist) who were inadvertently Cc'd to this ticket. It seems Trac, as with WP.org, has problems with names containing spaces.

After reading a number of WP.org support threads registering a new user seems to be the only option, so here I am, on a new user. Sorry for the mess.

#22245 was marked as a duplicate.

  • Cc Quiet Nic removed

So what happened to the "script_loader_tag" filter? See #22245

  • Type changed from feature request to enhancement
  • Cc tollmanz@… added
  • Cc td@… added
  • Cc retlehs added
Note: See TracTickets for help on using tickets.