Make WordPress Core

Changeset 56789

Timestamp:
10/05/2023 05:13:09 PM (10 months ago)
Author:
audrasjb
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.
Merges [56785] to the 6.3 branch.
Fixes #59489. See #59111.

Location:
branches/6.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.3

  • branches/6.3/src/wp-includes/blocks/index.php

    r56528 r56789  
    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.