[wp-trac] [WordPress Trac] #59583: Patterns: `theme` attribute not inserted in Template Part blocks

WordPress Trac noreply at wordpress.org
Thu Oct 12 16:39:42 UTC 2023


#59583: Patterns: `theme` attribute not inserted in Template Part blocks
--------------------------------------+------------------------------
 Reporter:  Bernhard Reiter           |       Owner:  Bernhard Reiter
     Type:  defect (bug)              |      Status:  closed
 Priority:  high                      |   Milestone:  6.4
Component:  General                   |     Version:
 Severity:  major                     |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+------------------------------
Changes (by Bernhard Reiter):

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


Comment:

 In [changeset:"56896" 56896]:
 {{{
 #!CommitTicketReference repository="" revision="56896"
 Patterns: Don't inject `theme` attribute on frontend.

 Having the patterns registry inject the `theme` attribute into all
 Template Part blocks inside every pattern was found to negatively impact
 performance. It turns out that it's only required for the editor (i.e. in
 the REST API) but not on the frontend; there, it's instead possible to
 fall back to the currently active theme.

 The latter change was made to the Pattern and Template Part blocks in
 https://github.com/WordPress/gutenberg/pull/55217, which was sync'ed to
 Core in [56849]. Consequently, this changeset removes `theme` attribute
 insertion from the frontend.

 Props flixos90, gziolo, dmsnell, hellofromtonya.
 Fixes #59583.
 }}}

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


More information about the wp-trac mailing list