Ticket #55311: 55311.diff
| File 55311.diff, 1.3 KB (added by , 4 years ago) |
|---|
-
src/wp-includes/blocks.php
107 107 return false; 108 108 } 109 109 // Path needs to be normalized to work in Windows env. 110 $wpinc_path_norm = wp_normalize_path( ABSPATH . WPINC);110 $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); 111 111 $script_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $script_path ) ); 112 112 $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm ); 113 113 … … 149 149 if ( empty( $metadata[ $field_name ] ) ) { 150 150 return false; 151 151 } 152 $wpinc_path_norm = wp_normalize_path( ABSPATH . WPINC);152 $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) ); 153 153 $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm ); 154 154 if ( $is_core_block && ! wp_should_load_separate_core_block_assets() ) { 155 155 return false; … … 243 243 if ( ! is_array( $metadata ) || empty( $metadata['name'] ) ) { 244 244 return false; 245 245 } 246 $metadata['file'] = wp_normalize_path( $metadata_file);246 $metadata['file'] = wp_normalize_path( realpath( $metadata_file ) ); 247 247 248 248 /** 249 249 * Filters the metadata provided for registering a block type.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)