Block Editor: Only list custom block templates in the template selector.
Previously all block templates including the hierarchy templates were being shown in the CPT template selector. Props mamaduka. See #54335. Built from https://develop.svn.wordpress.org/trunk@52334 git-svn-id: http://core.svn.wordpress.org/trunk@51926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
177a4d830b
commit
76419adcaa
|
@ -1250,8 +1250,8 @@ final class WP_Theme implements ArrayAccess {
|
|||
}
|
||||
|
||||
if ( current_theme_supports( 'block-templates' ) ) {
|
||||
$block_templates = get_block_templates( array(), 'wp_template' );
|
||||
foreach ( get_post_types( array( 'public' => true ) ) as $type ) {
|
||||
$block_templates = get_block_templates( array( 'post_type' => $type ), 'wp_template' );
|
||||
foreach ( $block_templates as $block_template ) {
|
||||
$post_templates[ $type ][ $block_template->slug ] = $block_template->title;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-beta1-52333';
|
||||
$wp_version = '5.9-beta1-52334';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue