[wp-trac] [WordPress Trac] #55881: Block templates with specific postTypes that have been edited by the user can be selected for any other post type

WordPress Trac noreply at wordpress.org
Thu Sep 15 22:26:43 UTC 2022


#55881: Block templates with specific postTypes that have been edited by the user
can be selected for any other post type
--------------------------+-----------------------------
 Reporter:  aljullu       |       Owner:  hellofromTonya
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.1
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by hellofromTonya):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54184" 54184]:
 {{{
 #!CommitTicketReference repository="" revision="54184"
 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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55881#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list