[wp-trac] [WordPress Trac] #16024: Conditional Comments for JS
WordPress Trac
noreply at wordpress.org
Wed Dec 24 05:31:46 UTC 2014
#16024: Conditional Comments for JS
-------------------------------------------------+-------------------------
Reporter: filosofo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: Script Loader | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit- | Focuses: template
tests dev-feedback |
-------------------------------------------------+-------------------------
Changes (by morganestes):
* keywords: has-patch needs-testing needs-unit-tests => has-patch needs-
testing needs-unit-tests dev-feedback
Comment:
The conditional comments in `.6.diff` are for downlevel-hidden content. I
believe the intent is to add the script if the condition is `true`, which
means (if I'm reading http://msdn.microsoft.com/en-
us/library/ms537512%28v=vs.85%29.aspx#syntax correctly) we'll want to use
downlevel-revealed comments like this instead.
Am I missing anything?
**downlevel-hidden**
{{{
$cond_before = "<!--[if {$conditional}]>\n";
$cond_after = "\n<![endif]-->";
}}}
**downlevel-revealed**
{{{
$cond_before = "<![if {$conditional}]>\n";
$cond_after = "\n<![endif]>";
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16024#comment:84>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list