[wp-trac] [WordPress Trac] #24570: Add conditional tag support for wp_enqueue_script functions

WordPress Trac noreply at wordpress.org
Wed Jun 12 17:32:32 UTC 2013


#24570: Add conditional tag support for wp_enqueue_script functions
-----------------------------+-----------------------------
 Reporter:  Otto42           |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 The style enqueueing functions support the use of conditionals for adding
 IE-style comment conditionals around stylesheet declarations, like so:

 {{{
 wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() .
 '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
 $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
 }}}

 This same support should be migrated to the javascript enqueueing system,
 so as to allow specific javascripts to be loaded only in IE.

 This would allow the declaration of html5.js to be properly enqueued
 instead of hardcoded into the header.php of twentyeleven, twentytwelve,
 and twentythirteen.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24570>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list