From 8c9bccd59c1e43b8cb1d311d87a73b9e61a2ad72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= <4710635+ellatrix@users.noreply.github.com> Date: Mon, 12 Sep 2022 16:00:26 +0200 Subject: [PATCH] Rich text: remove deprecated wrapperClassName prop (#44033) --- .../src/components/rich-text/index.js | 15 +------------- .../src/components/rich-text/index.native.js | 20 +------------------ 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 21c004b225f6c5..a49286e3ce38a3 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -332,7 +332,7 @@ function RichTextWrapper( } const TagName = tagName; - const content = ( + return ( <> { isSelected && ( @@ -424,19 +424,6 @@ function RichTextWrapper( /> ); - - if ( ! wrapperClassName ) { - return content; - } - - deprecated( 'wp.blockEditor.RichText wrapperClassName prop', { - since: '5.4', - alternative: 'className prop or create your own wrapper div', - version: '6.2', - } ); - - const className = classnames( 'block-editor-rich-text', wrapperClassName ); - return
{ content }
; } const ForwardedRichTextContainer = forwardRef( RichTextWrapper ); diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index e1e12cde222ace..45826129017a86 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -36,7 +36,6 @@ import { toHTMLString, slice, } from '@wordpress/rich-text'; -import deprecated from '@wordpress/deprecated'; import { isURL } from '@wordpress/url'; /** @@ -58,7 +57,6 @@ import { } from './utils'; import EmbedHandlerPicker from './embed-handler-picker'; -const wrapperClasses = 'block-editor-rich-text'; const classes = 'block-editor-rich-text__editable'; function RichTextWrapper( @@ -582,7 +580,7 @@ function RichTextWrapper( const mergedRef = useMergeRefs( [ forwardedRef, fallbackRef ] ); - const content = ( + return ( ); - - if ( ! wrapperClassName ) { - return content; - } - - deprecated( 'wp.blockEditor.RichText wrapperClassName prop', { - since: '5.4', - alternative: 'className prop or create your own wrapper div', - version: '6.2', - } ); - - return ( -
- { content } -
- ); } const ForwardedRichTextContainer = forwardRef( RichTextWrapper );