-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
In wp-includes/block-template-utils.php, there are four core constants defined for template part areas:
WP_TEMPLATE_PART_AREA_HEADER
WP_TEMPLATE_PART_AREA_FOOTER
WP_TEMPLATE_PART_AREA_SIDEBAR
WP_TEMPLATE_PART_AREA_UNCATEGORIZED
However, in the function get_allowed_block_template_part_areas(), only the Header, Footer, and Uncategorized areas are included in the $default_area_definitions array. The Sidebar area is defined as a constant but is not returned by the function that determines which areas are "allowed" or registered by default in the UI.
I would like to clarify if the omission of WP_TEMPLATE_PART_AREA_SIDEBAR from get_allowed_block_template_part_areas() is an intentional design choice or an oversight.
If it is an oversight, the Sidebar area should be added to the default array so that theme developers can use the sidebar area without needing to manually filter default_wp_template_part_areas.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 6.9.1
- No Gutenberg plugin
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure