- echo apply_filters( 'style_loader_tag', "<link rel='stylesheet' href='$href' type='text/css' media='$media' />\n", $handle );
- if ( 'rtl' === $this->text_direction && isset($this->registered[$handle]->extra['rtl']) && $this->registered[$handle]->extra['rtl'] ) {
- if ( is_bool( $this->registered[$handle]->extra['rtl'] ) )
- $rtl_href = str_replace( '.css', '-rtl.css', $href );
- else
- $rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
+ $tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
+ if ( 'rtl' === $this->text_direction && isset($obj->extra['rtl']) && $obj->extra['rtl'] ) {
+ if ( is_bool( $obj->extra['rtl'] ) ) {
+ $suffix = isset( $obj->extra['suffix'] ) ? $obj->extra['suffix'] : '';
+ $rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $obj->src , $ver, "$handle-rtl" ));
+ } else {
+ $rtl_href = $this->_css_href( $obj->extra['rtl'], $ver, "$handle-rtl" );
+ }