Skip to content

Commit

Permalink
Image: Use the correct method for caption class in recent deprecation (
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored and tellthemachines committed Jul 25, 2023
1 parent 0c46818 commit 04dced7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/image/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import classnames from 'classnames';
import {
RichText,
useBlockProps,
__experimentalGetElementClassName,
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
} from '@wordpress/block-editor';

Expand Down Expand Up @@ -721,7 +722,9 @@ const v6 = {
) }
{ ! RichText.isEmpty( caption ) && (
<RichText.Content
className={ getBorderClassesAndStyles( 'caption' ) }
className={ __experimentalGetElementClassName(
'caption'
) }
tagName="figcaption"
value={ caption }
/>
Expand Down

0 comments on commit 04dced7

Please sign in to comment.