[wp-trac] [WordPress Trac] #56112: Allow remote pattern registration in theme.json when core patterns are disabled

WordPress Trac noreply at wordpress.org
Fri Jul 29 08:29:27 UTC 2022


#56112: Allow remote pattern registration in theme.json when core patterns are
disabled
-------------------------+-----------------------
 Reporter:  ndiego       |       Owner:  audrasjb
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  6.0.2
Component:  Editor       |     Version:  6.0
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------
Changes (by audrasjb):

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


Comment:

 In [changeset:"53793" 53793]:
 {{{
 #!CommitTicketReference repository="" revision="53793"
 Themes: Allow remote pattern registration in `theme.json` when core
 patterns are disabled.

 In 6.0 there is now a functionality that allows to register selected
 remote patterns (from the Pattern Directory) via `theme.json`. However, it
 requires to fully enable all core and remote patterns. This can be a
 blocker for user adoption.

 Many theme authors want to have all core and remote patterns disabled by
 default using `remove_theme_support( 'core-block-patterns' )`. This
 changeset ensures they are serving only patterns relevant to their theme.

 This changeset removes theme support check from the function that
 registers remote patterns specified in `theme.json`. This allows theme
 authors to disable core patterns but then selectively register the ones
 they want from the Pattern Directory. If a theme author intentionally
 specifies patterns in `theme.json`, they probably intend for them to be
 present in the pattern inserter and the check is not required.

 This change will make the Pattern Directory more appealing/usable from the
 theme author's perspective.

 Props ndiego, ryelle.
 Fixes #56112.
 }}}

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


More information about the wp-trac mailing list