Changeset 54290
- Timestamp:
- 09/23/2022 01:24:24 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r54276 r54290 224 224 225 225 $style_handle = generate_block_asset_handle( $metadata['name'], $field_name, $index ); 226 $block_dir = dirname( $metadata['file'] ); 227 $style_file = wp_normalize_path( realpath( "$block_dir/$style_path" ) ); 228 $has_style_file = false !== $style_file; 226 $has_style_file = false !== $style_path_norm; 229 227 $version = ! $is_core_block && isset( $metadata['version'] ) ? $metadata['version'] : false; 230 228 $style_uri = $has_style_file ? $style_uri : false; … … 235 233 $version 236 234 ); 237 if ( file_exists( str_replace( '.css', '-rtl.css', $style_ file) ) ) {235 if ( file_exists( str_replace( '.css', '-rtl.css', $style_path_norm ) ) ) { 238 236 wp_style_add_data( $style_handle, 'rtl', 'replace' ); 239 237 } 240 238 if ( $has_style_file ) { 241 wp_style_add_data( $style_handle, 'path', $style_ file);242 } 243 244 $rtl_file = str_replace( "$suffix.css", "-rtl$suffix.css", $style_ file);239 wp_style_add_data( $style_handle, 'path', $style_path_norm ); 240 } 241 242 $rtl_file = str_replace( "$suffix.css", "-rtl$suffix.css", $style_path_norm ); 245 243 if ( is_rtl() && file_exists( $rtl_file ) ) { 246 244 wp_style_add_data( $style_handle, 'path', $rtl_file );
Note: See TracChangeset
for help on using the changeset viewer.