[wp-trac] [WordPress Trac] #54679: Add missing default template areas to the editor settings

WordPress Trac noreply at wordpress.org
Wed Dec 22 07:43:34 UTC 2021


#54679: Add missing default template areas to the editor settings
--------------------------+-----------------------------
 Reporter:  Mamaduka      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The default template area settings got lost during backporting for 5.9.

 In the Gutenberg plugin, we're filtering `block_editor_settings_all` to
 add this setting for block themes -
 https://github.com/WordPress/gutenberg/blob/trunk/lib/editor-
 settings.php#L20-L32.

 **Testing**

 Running following snippet in DevTools console currently returns an empty
 array:

 `wp.data.select('core/editor').__experimentalGetDefaultTemplatePartAreas();`


 After the fix, it should return the following values:


 {{{
 [
     {
         "area": "uncategorized",
         "label": "General",
         "description": "General templates often perform a specific role
 like displaying post content, and are not tied to any particular area.",
         "icon": {},
         "area_tag": "div"
     },
     {
         "area": "header",
         "label": "Header",
         "description": "The Header template defines a page area that
 typically contains a title, logo, and main navigation.",
         "icon": {},
         "area_tag": "header"
     },
     {
         "area": "footer",
         "label": "Footer",
         "description": "The Footer template defines a page area that
 typically contains site credits, social links, or any other combination of
 blocks.",
         "icon": {},
         "area_tag": "footer"
     }
 ]
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54679>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list