Skip to content

Commit

Permalink
Removed unused fields from media modal when adding featured image.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jan 2, 2018
1 parent 99728d6 commit d931e5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/components/post-featured-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function PostFeaturedImage( { featuredImageId, onUpdateImage, onRemoveImage, med
buttonProps={ { className: 'button-link editor-post-featured-image__preview' } }
onSelect={ onUpdateImage }
type="image"
modalClass="editor-post-featured-image__media-modal"
>
{ media && !! media.data &&
<ResponsiveWrapper
Expand All @@ -59,6 +60,7 @@ function PostFeaturedImage( { featuredImageId, onUpdateImage, onRemoveImage, med
buttonProps={ { className: 'editor-post-featured-image__toggle button-link' } }
onSelect={ onUpdateImage }
type="image"
modalClass="editor-post-featured-image__media-modal"
>
{ postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL }
</MediaUploadButton>
Expand Down
7 changes: 7 additions & 0 deletions editor/components/post-featured-image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
font-style: italic;
margin: 10px 0;
}

// Should be replaced with a config in media modal.
.editor-post-featured-image__media-modal {
.setting[data-setting="caption"], .setting[data-setting="description"] {
display: none;
}
}

0 comments on commit d931e5f

Please sign in to comment.