From 4c3a10e66f838051dd52118d0249cc47c01037d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Thu, 25 Aug 2022 14:46:34 +0200 Subject: [PATCH 1/3] Rich text: log deprecation message for multiline prop --- packages/block-editor/src/components/rich-text/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 78116251224c7e..e046e10ddb9dd1 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -115,6 +115,14 @@ function RichTextWrapper( }, forwardedRef ) { + if ( multiline ) { + deprecated( 'wp.blockEditor.RichText multiline prop', { + since: '14.1', + alternative: 'nested blocks (InnerBlocks)', + link: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/', + } ); + } + const instanceId = useInstanceId( RichTextWrapper ); identifier = identifier || instanceId; From 14cc9fee93e12096eee78df2fce5021ada63609b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Thu, 25 Aug 2022 15:30:44 +0200 Subject: [PATCH 2/3] Use WP versions --- packages/block-editor/src/components/rich-text/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index e046e10ddb9dd1..54222f27aa5f60 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -117,7 +117,8 @@ function RichTextWrapper( ) { if ( multiline ) { deprecated( 'wp.blockEditor.RichText multiline prop', { - since: '14.1', + since: '6.1', + version: '6.2', alternative: 'nested blocks (InnerBlocks)', link: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/', } ); From 653b7a0271d68923696dec01afe556de77527bdd Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Fri, 26 Aug 2022 12:59:59 +0300 Subject: [PATCH 3/3] Update packages/block-editor/src/components/rich-text/index.js --- packages/block-editor/src/components/rich-text/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 54222f27aa5f60..e19d9276ab2e78 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -118,7 +118,7 @@ function RichTextWrapper( if ( multiline ) { deprecated( 'wp.blockEditor.RichText multiline prop', { since: '6.1', - version: '6.2', + version: '6.3', alternative: 'nested blocks (InnerBlocks)', link: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/', } );