WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/23/2010 11:46:07 PM (11 years ago)
Author:
nacin
Message:

Proper RTL + .dev.css support, first pass. See #12292

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-styles.php

    r13193 r13351  
    6969        $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
    7070        if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) {
    71             if ( is_bool( $this->registered[$handle]->extra['rtl'] ) )
    72                 $rtl_href = str_replace( '.css', '-rtl.css', $this->_css_href( $this->registered[$handle]->src , $ver, "$handle-rtl" ));
    73             else
     71            if ( is_bool( $this->registered[$handle]->extra['rtl'] ) ) {
     72                $suffix = isset( $this->registered[$handle]->extra['suffix'] ) ? $this->registered[$handle]->extra['suffix'] : '';
     73                $rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $this->registered[$handle]->src , $ver, "$handle-rtl" ));
     74            } else {
    7475                $rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
     76            }
    7577
    7678            $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
Note: See TracChangeset for help on using the changeset viewer.