WordPress.org

Make WordPress Core

Ticket #16118: umbercode.16118.patch

File umbercode.16118.patch, 1.0 KB (added by Umbercode, 8 years ago)

uses (!IE) as trigger to circumvent false positives

  • wp-includes/class.wp-styles.php

    # HG changeset patch
    # User Umber code
    # Date 1341556621 -10800
    # Node ID 40119f6f1f0773a953aac6d4d51b7bf8a5391c84
    # Parent  fa79228320849f3683a5af6b12c9b298f3760e64
    Patch for !IE conditionals
    
    diff -r fa7922832084 -r 40119f6f1f07 wp-includes/class.wp-styles.php
    a b  
    6767
    6868                $end_cond = $tag = '';
    6969                if ( isset($obj->extra['conditional']) && $obj->extra['conditional'] ) {
    70                         $tag .= "<!--[if {$obj->extra['conditional']}]>\n";
    71                         $end_cond = "<![endif]-->\n";
     70                        if ( strpos(strtoupper($obj->extra['conditional']), "(!IE)") ) {
     71                                $tag .= "<!--[if {$obj->extra['conditional']}]><!-->\n";
     72                                $end_cond = "<!--<![endif]-->\n";
     73                        }
     74                else {
     75                                $tag .= "<!--[if {$obj->extra['conditional']}]>\n";
     76                                $end_cond = "<![endif]-->\n";
     77                        }
    7278                }
    7379
    7480                $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );