Make WordPress Core

Ticket #56325: 56325.4.diff

File 56325.4.diff, 789 bytes (added by SergeyBiryukov, 3 years ago)

Refreshed after [54323]

  • src/wp-includes/blocks.php

     
    251251        }
    252252
    253253        if ( $has_style_file ) {
    254                 if ( file_exists( str_replace( '.css', '-rtl.css', $style_path_norm ) ) ) {
    255                         wp_style_add_data( $style_handle, 'rtl', 'replace' );
    256                 }
    257 
    258254                wp_style_add_data( $style_handle, 'path', $style_path_norm );
    259255
    260256                $rtl_file = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $style_path_norm );
     257
    261258                if ( is_rtl() && file_exists( $rtl_file ) ) {
     259                        wp_style_add_data( $style_handle, 'rtl', 'replace' );
     260                        wp_style_add_data( $style_handle, 'suffix', $suffix );
    262261                        wp_style_add_data( $style_handle, 'path', $rtl_file );
    263262                }
    264263        }