WordPress.org

Make WordPress Core

Ticket #16118: greuben-16118.diff

File greuben-16118.diff, 1.2 KB (added by greuben, 10 years ago)
  • wp-includes/class.wp-styles.php

     
    6161                $title = isset($this->registered[$handle]->extra['title']) ? "title='" . esc_attr( $this->registered[$handle]->extra['title'] ) . "'" : '';
    6262
    6363                $end_cond = $tag = '';
    64                 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";
     64                if ( isset($this->registered[$handle]->extra['conditional']) && $this->registered[$handle]->extra['conditional'] ) {                   
     65                        $tag .= "<!--[if {$this->registered[$handle]->extra['conditional']}]";
     66                        if( strpos( $this->registered[$handle]->extra['conditional'], '!' ) === 0 ) {
     67                                $tag .= "-->\n";
     68                                $end_cond .= "<!--";
     69                        } else {
     70                                $tag .= ">\n";
     71                                $end_cond .= "<!";
     72                        }
     73                        $end_cond .= "[endif]-->\n";
    6774                }
    6875
    6976                $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );