Make WordPress Core

Ticket #58132: 58132-3.diff

File 58132-3.diff, 520 bytes (added by gaft, 10 months ago)

using wp_normalize_path to fix

  • src/wp-includes/block-template-utils.php

    diff --git src/wp-includes/block-template-utils.php src/wp-includes/block-template-utils.php
    index cf0c4af12e..7015307eed 100644
    function _get_block_templates_files( $template_type ) { 
    318318                                -5
    319319                        );
    320320                        $new_template_item = array(
    321                                 'slug'  => $template_slug,
     321                                'slug'  => wp_normalize_path( $template_slug ),
    322322                                'path'  => $template_file,
    323323                                'theme' => $theme_slug,
    324324                                'type'  => $template_type,