Make WordPress Core

Ticket #58132: 58132-1.diff

File 58132-1.diff, 765 bytes (added by gaft, 11 months ago)

directly to the actual check line

  • 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..ce44c728ea 100644
    function get_block_templates( $query = array(), $template_type = 'wp_template' ) 
    978978                                true
    979979                        );
    980980                        $fits_slug_query =
    981                                 ! isset( $query['slug__in'] ) || in_array( $template_file['slug'], $query['slug__in'], true );
     981                                ! isset( $query['slug__in'] ) || in_array( str_replace( '\\', '/', $template_file['slug'] ), $query['slug__in'], true );
    982982                        $fits_area_query =
    983983                                ! isset( $query['area'] ) || $template_file['area'] === $query['area'];
    984984                        $should_include  = $is_not_custom && $fits_slug_query && $fits_area_query;