[wp-trac] [WordPress Trac] #10891: Internal support for conditional scripts (same as existing conditional style support)
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 3 02:17:54 UTC 2009
#10891: Internal support for conditional scripts (same as existing conditional
style support)
-------------------------+--------------------------------------------------
Reporter: jdub | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.9
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Although it's not exposed through the wp_enqueue_style API, you can add a
conditional to the queued style (by twiddling $wp_styles) and
WP_Styles::do_item will do the right thing. This is used within core to
provide CSS to poopy browsers ("lt IE 7").
This patch adds similar internal-only support for script conditionals to
WP_Scripts::do_item.
It might be nice to expose this in the wp_enqueue_* API at some point, but
for now this will do. :-)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10891>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list