WordPress.org

Make WordPress Core

Ticket #16118: garyc40.16118.diff

File garyc40.16118.diff, 902 bytes (added by garyc40, 3 years ago)

included edge cases. eg. [if !IE 8]

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

    diff --git wp-includes/class.wp-styles.php wp-includes/class.wp-styles.php
    index ecc0bb9..f9bc027 100644
    class WP_Styles extends WP_Dependencies { 
    6262 
    6363                $end_cond = $tag = ''; 
    6464                if ( isset($this->registered[$handle]->extra['conditional']) && $this->registered[$handle]->extra['conditional'] ) { 
    65                         $tag .= "<!--[if {$this->registered[$handle]->extra['conditional']}]>\n"; 
    66                         $end_cond = "<![endif]-->\n"; 
     65                        $tag .= "<!--[if {$this->registered[$handle]->extra['conditional']}]>"; 
     66                        if ( $this->registered[$handle]->extra['conditional'][0] ) { 
     67                                $tag .= '<!-->'; 
     68                                $end_cond = '<!--'; 
     69                        } 
     70                        $tag .= "\n"; 
     71                        $end_cond .= "<![endif]-->\n"; 
    6772                } 
    6873 
    6974                $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );