mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 16:15:24 +01:00
Themes: Fix core block style paths on Windows.
This is a follow-up to [56528], which normalizes the `BLOCKS_PATH` for Windows prior to making paths relative for caches during the registration process. Prior to this change, incorrect file paths would lead to broken styles for core blocks on Windows. Props wildworks, pbiron, flixos90, joemcgill. Fixes #59489. See #59111. Built from https://develop.svn.wordpress.org/trunk@56785 git-svn-id: http://core.svn.wordpress.org/trunk@56297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a0d3ee6717
commit
7291a4dfa0
@ -68,9 +68,13 @@ function register_core_block_style_handles() {
|
||||
|
||||
if ( ! $files ) {
|
||||
$files = glob( wp_normalize_path( BLOCKS_PATH . '**/**.css' ) );
|
||||
|
||||
// Normalize BLOCKS_PATH prior to substitution for Windows environments.
|
||||
$normalized_blocks_path = wp_normalize_path( BLOCKS_PATH );
|
||||
|
||||
$files = array_map(
|
||||
static function ( $file ) {
|
||||
return str_replace( BLOCKS_PATH, '', $file );
|
||||
static function ( $file ) use ( $normalized_blocks_path ) {
|
||||
return str_replace( $normalized_blocks_path, '', $file );
|
||||
},
|
||||
$files
|
||||
);
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4-beta2-56783';
|
||||
$wp_version = '6.4-beta2-56785';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user