From f1cfc3b9881a5cb1f74d62616146a0e106f76a67 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 5 Apr 2022 10:59:47 +0400 Subject: [PATCH] Post Template: Add missing 'wp-block-post' class in the editor (#40010) * Post Template: Add missing 'wp-block-post' class in the editor * Apply class to innerBlocks --- packages/block-library/src/post-template/edit.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/post-template/edit.js b/packages/block-library/src/post-template/edit.js index bcf4f909d6a8f0..2422f242aa6901 100644 --- a/packages/block-library/src/post-template/edit.js +++ b/packages/block-library/src/post-template/edit.js @@ -26,7 +26,10 @@ const TEMPLATE = [ ]; function PostTemplateInnerBlocks() { - const innerBlocksProps = useInnerBlocksProps( {}, { template: TEMPLATE } ); + const innerBlocksProps = useInnerBlocksProps( + { className: 'wp-block-post' }, + { template: TEMPLATE } + ); return
  • ; } @@ -38,6 +41,9 @@ function PostTemplateBlockPreview( { } ) { const blockPreviewProps = useBlockPreview( { blocks, + props: { + className: 'wp-block-post', + }, } ); const handleOnClick = () => {