[wp-trac] [WordPress Trac] #22245: Add Hook: "script_loader_tag"

WordPress Trac noreply at wordpress.org
Mon Oct 22 04:09:18 UTC 2012


#22245: Add Hook: "script_loader_tag"
-----------------------------+------------------------
 Reporter:  ryanve           |       Owner:
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  General          |     Version:
 Severity:  normal           |  Resolution:  duplicate
 Keywords:                   |
-----------------------------+------------------------

Comment (by ryanve):

 @scribu another potential use case is wrapping a script in IE conditionals
 (see #16024)

 {{{
 add_filter( 'script_loader_tag', function ( $html, $handle ) {
     return 'html5-shim' === $handle' ? <!--[if lt IE 9]>' . $html .
 '<![endif]-->' : $html;
 }, 12, 2);
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22245#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list