mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Editor: Fix get_block_templates() to get templates for a post type.
When a post type is passed to `get_block_templates()` in the query, return only the templates that match that post type. Fixes an issue where: * when a block template provided by a theme has been edited by the user * and that template has specific defined `postTypes` * but after editing, the template was available for all post types. Follow-up to [52062]. Props aljullu, bernhard-reiter, hellofromTonya. Fixes #55881. git-svn-id: https://develop.svn.wordpress.org/trunk@54184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>Custom Single Post template</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -58,6 +58,11 @@
|
||||
{
|
||||
"name": "page-home",
|
||||
"title": "Homepage template"
|
||||
},
|
||||
{
|
||||
"name": "custom-single-post-template",
|
||||
"title": "Custom Single Post template",
|
||||
"postTypes": ["post"]
|
||||
}
|
||||
],
|
||||
"templateParts": [
|
||||
|
||||
Reference in New Issue
Block a user