WordPress.org

Make WordPress Core

Changeset 26128


Ignore:
Timestamp:
11/13/2013 05:09:40 AM (7 years ago)
Author:
nacin
Message:

Fix new RTL file loading when style concatenation is enabled.

see #24977.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/load-styles.php

    r24868 r26128  
    118118    $path = ABSPATH . $style->src;
    119119
    120     $content = get_file($path) . "\n";
     120    if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
     121        // All default styles have fully independent RTL files.
     122        $path = str_replace( '.min.css', '-rtl.min.css', $path );
     123    }
    121124
    122     if ( $rtl && isset($style->extra['rtl']) && $style->extra['rtl'] ) {
    123         $rtl_path = is_bool($style->extra['rtl']) ? str_replace( '.min.css', '-rtl.min.css', $path ) : ABSPATH . $style->extra['rtl'];
    124         $content .= get_file($rtl_path) . "\n";
    125     }
     125    $content = get_file( $path ) . "\n";
    126126
    127127    if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) {
  • trunk/src/wp-includes/script-loader.php

    r26107 r26128  
    592592    foreach ( $rtl_styles as $rtl_style ) {
    593593        $styles->add_data( $rtl_style, 'rtl', 'replace' );
     594        if ( $suffix ) {
     595            $styles->add_data( $rtl_style, 'suffix', $suffix );
     596        }
    594597    }
    595598}
Note: See TracChangeset for help on using the changeset viewer.