diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index ace9811f32..9cfbfdb5dc 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -169,12 +169,17 @@ function register_block_style_handle( $metadata, $field_name ) { $style_handle = generate_block_asset_handle( $metadata['name'], $field_name ); $block_dir = dirname( $metadata['file'] ); + $style_file = realpath( "$block_dir/$style_path" ); $result = wp_register_style( $style_handle, plugins_url( $style_path, $metadata['file'] ), array(), - filemtime( realpath( "$block_dir/$style_path" ) ) + filemtime( $style_file ) ); + if ( file_exists( str_replace( '.css', '-rtl.css', $style_file ) ) ) { + wp_style_add_data( $style_handle, 'rtl', 'replace' ); + } + return $result ? $style_handle : false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index aa4ec57ead..e4ffbe07d0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49981'; +$wp_version = '5.7-alpha-49982'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.