From fa28288ca182ff86a4f32965d652b46cc0e3c7be Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Fri, 3 Nov 2023 22:52:11 +0900 Subject: [PATCH] Update `blockEditor.__unstableCanInsertBlockType` hook namespace --- packages/block-library/src/form/index.js | 2 +- packages/block-library/src/template-part/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/form/index.js b/packages/block-library/src/form/index.js index a67fc67ca06f0..1e45c642b6d48 100644 --- a/packages/block-library/src/form/index.js +++ b/packages/block-library/src/form/index.js @@ -27,7 +27,7 @@ export const init = () => { const DISALLOWED_PARENTS = [ 'core/form' ]; addFilter( 'blockEditor.__unstableCanInsertBlockType', - 'removeTemplatePartsFromPostTemplates', + 'core/block-library/preventInsertingFormIntoAnotherForm', ( canInsert, blockType, diff --git a/packages/block-library/src/template-part/index.js b/packages/block-library/src/template-part/index.js index c64f093427f95..a68dd2301be22 100644 --- a/packages/block-library/src/template-part/index.js +++ b/packages/block-library/src/template-part/index.js @@ -60,7 +60,7 @@ export const init = () => { const DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ]; addFilter( 'blockEditor.__unstableCanInsertBlockType', - 'removeTemplatePartsFromPostTemplates', + 'core/block-library/removeTemplatePartsFromPostTemplates', ( canInsert, blockType,