﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21162,Add !IE conditional comment on $wp_styles->add_data,Umbercode,,"There is no way to use `$wp_styles->add_data(""css_ie"", ""conditional"", ""!IE"");` and target non-IE browsers.
There are use cases for this for example:
{{{
<!--[if (gt IE 8) | (IEMobile)]><!-->
<link rel='stylesheet' href='<?php bloginfo(""template_url""); ?>/css/style.css'><!--<![endif]-->

<!--[if (lt IE 9) & (!IEMobile)]>
<link rel='stylesheet' href='<?php bloginfo(""template_url""); ?>/css/ie.css'><![endif]-->
}}}

I do not know how to attach a patch or diff file but I changed the code in class.wp-styles.php between lines 69 and 75 to:

{{{
if ( isset($obj->extra['conditional']) && $obj->extra['conditional'] ) {
	if (strpos(strtoupper($obj->extra['conditional']), ""!IE"")) {
	   $tag .= ""<!--[if {$obj->extra['conditional']}]><!-->\n"";
	   $end_cond = ""<!--<![endif]-->\n"";
	}
	else {
	   $tag .= ""<!--[if {$obj->extra['conditional']}]>\n"";
	   $end_cond = ""<![endif]-->\n"";
	}
}}}

which seems to work.",enhancement,closed,normal,,General,,normal,duplicate,,
