The Navigation block has a hard-coded list of allowed inner blocks:
|
const ALLOWED_BLOCKS = [ |
|
'core/navigation-link', |
|
'core/search', |
|
'core/social-links', |
|
'core/page-list', |
|
'core/spacer', |
|
]; |
But plugins might want to add more blocks to that list. For example, WooCommerce could add a Product Search block or a minicart block (ie: a link to the Cart which shows the number of products in the cart).
If I'm not wrong, there is no way plugins can do that right now, so this issue is about making the ALLOWED_BLOCKS list filterable or introducing some other API so plugins can extend the list of allowed blocks inside the Navigation block.
The Navigation block has a hard-coded list of allowed inner blocks:
gutenberg/packages/block-library/src/navigation/edit.js
Lines 32 to 38 in d77994e
But plugins might want to add more blocks to that list. For example, WooCommerce could add a Product Search block or a minicart block (ie: a link to the Cart which shows the number of products in the cart).
If I'm not wrong, there is no way plugins can do that right now, so this issue is about making the
ALLOWED_BLOCKSlist filterable or introducing some other API so plugins can extend the list of allowed blocks inside the Navigation block.