Skip to content

Commit

Permalink
Post Featured Image: Remove 'clear' control (#27291)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Nov 26, 2020
1 parent 7da2bb8 commit be6fc5b
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
Icon,
ToggleControl,
PanelBody,
ToolbarGroup,
ToolbarButton,
withNotices,
} from '@wordpress/components';
import {
Expand Down Expand Up @@ -104,22 +102,14 @@ function PostFeaturedImageDisplay( {
</InspectorControls>
<BlockControls>
{ !! media && (
<ToolbarGroup>
<ToolbarButton
name="unset"
onClick={ () => setFeaturedImage( 0 ) }
>
{ __( 'Clear' ) }
</ToolbarButton>
<MediaReplaceFlow
mediaId={ featuredImage }
mediaURL={ media.source_url }
allowedTypes={ ALLOWED_MEDIA_TYPES }
accept="image/*"
onSelect={ onSelectImage }
onError={ onUploadError }
/>
</ToolbarGroup>
<MediaReplaceFlow
mediaId={ featuredImage }
mediaURL={ media.source_url }
allowedTypes={ ALLOWED_MEDIA_TYPES }
accept="image/*"
onSelect={ onSelectImage }
onError={ onUploadError }
/>
) }
</BlockControls>
<div { ...useBlockProps() }>{ image }</div>
Expand Down

0 comments on commit be6fc5b

Please sign in to comment.