Make WordPress Core

Changeset 56785

Timestamp:
10/04/2023 10:21:17 PM (10 months ago)
Author:
joemcgill
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/index.php

    r56559 r56785  
    6969    if ( ! $files ) {
    7070        $files = glob( wp_normalize_path( BLOCKS_PATH . '**/**.css' ) );
     71
     72
     73
     74
    7175        $files = array_map(
    72             static function ( $file ) {
    73                 return str_replace( BLOCKS_PATH, '', $file );
     76            static function ( $file ) {
     77                return str_replace( , '', $file );
    7478            },
    7579            $files
Note: See TracChangeset for help on using the changeset viewer.