Fix new RTL file loading when style concatenation is enabled.
see #24977. git-svn-id: https://develop.svn.wordpress.org/trunk@26128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d57f3a4442
commit
7d2ba3675e
@ -117,13 +117,13 @@ foreach( $load as $handle ) {
|
||||
$style = $wp_styles->registered[$handle];
|
||||
$path = ABSPATH . $style->src;
|
||||
|
||||
$content = get_file($path) . "\n";
|
||||
|
||||
if ( $rtl && isset($style->extra['rtl']) && $style->extra['rtl'] ) {
|
||||
$rtl_path = is_bool($style->extra['rtl']) ? str_replace( '.min.css', '-rtl.min.css', $path ) : ABSPATH . $style->extra['rtl'];
|
||||
$content .= get_file($rtl_path) . "\n";
|
||||
if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
|
||||
// All default styles have fully independent RTL files.
|
||||
$path = str_replace( '.min.css', '-rtl.min.css', $path );
|
||||
}
|
||||
|
||||
$content = get_file( $path ) . "\n";
|
||||
|
||||
if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) {
|
||||
$content = str_replace( '../images/', '../wp-includes/images/', $content );
|
||||
$out .= str_replace( '../js/tinymce/', '../wp-includes/js/tinymce/', $content );
|
||||
|
@ -591,6 +591,9 @@ function wp_default_styles( &$styles ) {
|
||||
|
||||
foreach ( $rtl_styles as $rtl_style ) {
|
||||
$styles->add_data( $rtl_style, 'rtl', 'replace' );
|
||||
if ( $suffix ) {
|
||||
$styles->add_data( $rtl_style, 'suffix', $suffix );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user