diff --git a/assets/css/podcasting-editor-screen.css b/assets/css/podcasting-editor-screen.css index fefe73b..2566d93 100644 --- a/assets/css/podcasting-editor-screen.css +++ b/assets/css/podcasting-editor-screen.css @@ -2,3 +2,12 @@ .components-base-control { width: 100%; } +.cover-art-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.cover-art-container button { + margin: 10px 0; +} diff --git a/assets/js/edit.js b/assets/js/edit.js index f561a72..f2b736a 100644 --- a/assets/js/edit.js +++ b/assets/js/edit.js @@ -47,7 +47,11 @@ function useFeaturedImage() { editPost({ featured_media: imageId }); }; - return { featuredImageUrl, setFeaturedImage }; + const removeFeaturedImage = () => { + editPost({ featured_media: 0 }); + }; + + return { featuredImageUrl, setFeaturedImage, removeFeaturedImage }; } class Edit extends Component { @@ -74,7 +78,8 @@ class Edit extends Component { isSelected, attributes, featuredImageUrl, - setFeaturedImage + setFeaturedImage, + removeFeaturedImage } = this.props; const { caption, explicit } = attributes; const duration = attributes.duration || ''; @@ -304,7 +309,7 @@ class Edit extends Component {
{__('The featured image of the current post is used as the episode cover art. Please select a featured image to set it.', 'simple-podcasting')}
-