diff --git a/wp-includes/class.wp-styles.php b/wp-includes/class.wp-styles.php
index 97acdf804..ecc0bb9e2 100644
--- a/wp-includes/class.wp-styles.php
+++ b/wp-includes/class.wp-styles.php
@@ -68,10 +68,12 @@ class WP_Styles extends WP_Dependencies {
$tag .= apply_filters( 'style_loader_tag', "\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', $this->_css_href( $this->registered[$handle]->src , $ver, "$handle-rtl" ));
- else
+ if ( is_bool( $this->registered[$handle]->extra['rtl'] ) ) {
+ $suffix = isset( $this->registered[$handle]->extra['suffix'] ) ? $this->registered[$handle]->extra['suffix'] : '';
+ $rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $this->registered[$handle]->src , $ver, "$handle-rtl" ));
+ } else {
$rtl_href = $this->_css_href( $this->registered[$handle]->extra['rtl'], $ver, "$handle-rtl" );
+ }
$tag .= apply_filters( 'style_loader_tag', "\n", $handle );
}
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index b3f04ded9..adf900de5 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -433,6 +433,8 @@ function wp_default_styles( &$styles ) {
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
$rtl_styles = array( 'wp-admin', 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
+ // Any rtl stylesheets that don't have a .dev version for ltr
+ $no_suffix = array( 'farbtastic' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20100217';
@@ -468,8 +470,11 @@ function wp_default_styles( &$styles ) {
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
$styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100215' );
- foreach ( $rtl_styles as $rtl_style )
+ foreach ( $rtl_styles as $rtl_style ) {
$styles->add_data( $rtl_style, 'rtl', true );
+ if ( $suffix && ! in_array( $rtl_style, $no_suffix ) )
+ $styles->add_data( $rtl_style, 'suffix', $suffix );
+ }
}
/**