From f89a03bc11f2d95f6543f60b2b9e885ebf12bd22 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Tue, 31 May 2022 16:52:24 +0300 Subject: [PATCH 1/2] adds placeholder when feature image is in use --- .../block-library/src/cover/edit/index.js | 61 +++++++++++++------ packages/block-library/src/cover/editor.scss | 27 ++++++++ 2 files changed, 68 insertions(+), 20 deletions(-) diff --git a/packages/block-library/src/cover/edit/index.js b/packages/block-library/src/cover/edit/index.js index 677c25035cf0ae..4a381daf3de16d 100644 --- a/packages/block-library/src/cover/edit/index.js +++ b/packages/block-library/src/cover/edit/index.js @@ -24,6 +24,7 @@ import { import { __ } from '@wordpress/i18n'; import { useSelect, useDispatch } from '@wordpress/data'; import { isBlobURL } from '@wordpress/blob'; +import { SVG, Path } from '@wordpress/primitives'; import { store as noticesStore } from '@wordpress/notices'; /** @@ -46,6 +47,18 @@ import ResizableCover from './resizable-cover'; extend( [ namesPlugin ] ); +const placeholderIllustration = ( + + + +); + function getInnerBlocksTemplate( attributes ) { return [ [ @@ -212,7 +225,7 @@ function CoverEdit( { overlayColor, }; - if ( ! hasInnerBlocks && ! hasBackground ) { + if ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) { return ( <> -