Make WordPress Core


Ignore:
Timestamp:
06/04/2024 08:13:01 AM (9 months ago)
Author:
ellatrix
Message:

Editor: Fix block template files query for a post-type.

See https://github.com/WordPress/gutenberg/pull/61244.
See https://github.com/WordPress/wordpress-develop/pull/6468.

Fixes #61110.

Props mamaduka, mukesh27, grantmkin, vcanales, ellatrix, oandregal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/getBlockTemplates.php

    r56971 r58323  
    189189     * @dataProvider data_get_block_templates_should_respect_posttypes_property
    190190     * @ticket 55881
     191     * @ticket 61110
    191192     *
    192193     * @param string $post_type Post type for query.
     
    204205    /**
    205206     * Data provider.
     207     *
     208     * The `custom-hero-template` is intentionally omitted from the theme.json's `customTemplates`.
     209     * See: https://core.trac.wordpress.org/ticket/61110.
    206210     *
    207211     * @return array
     
    212216                'post_type' => 'post',
    213217                'expected'  => array(
     218                    'block-theme//custom-hero-template',
    214219                    'block-theme//custom-single-post-template',
    215220                ),
     
    218223                'post_type' => 'page',
    219224                'expected'  => array(
     225                    'block-theme//custom-hero-template',
    220226                    'block-theme//page-home',
    221227                ),
Note: See TracChangeset for help on using the changeset viewer.