From e8e8c95c787aa2cbd310a53357ccbab4539170bf Mon Sep 17 00:00:00 2001 From: Zebulan Stanphill Date: Tue, 20 Oct 2020 18:09:04 -0500 Subject: [PATCH] Hide redundant Post Visibility legend. --- .../components/sidebar/post-visibility/index.js | 2 +- .../src/components/post-visibility/index.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/edit-post/src/components/sidebar/post-visibility/index.js b/packages/edit-post/src/components/sidebar/post-visibility/index.js index 69fa3b262f48f..ac61504f3e3f2 100644 --- a/packages/edit-post/src/components/sidebar/post-visibility/index.js +++ b/packages/edit-post/src/components/sidebar/post-visibility/index.js @@ -58,7 +58,7 @@ export function PostVisibility() { ) } ) } - { canEdit && } + { canEdit && } ) } /> diff --git a/packages/editor/src/components/post-visibility/index.js b/packages/editor/src/components/post-visibility/index.js index 25810c563da1b..914f577cc4c80 100644 --- a/packages/editor/src/components/post-visibility/index.js +++ b/packages/editor/src/components/post-visibility/index.js @@ -66,7 +66,12 @@ export class PostVisibility extends Component { } render() { - const { visibility, password, instanceId } = this.props; + const { + visibility, + password, + instanceId, + showLegend = true, + } = this.props; const visibilityHandlers = { public: { @@ -88,9 +93,11 @@ export class PostVisibility extends Component { key="visibility-selector" className="editor-post-visibility__dialog-fieldset" > - - { __( 'Post Visibility' ) } - + { showLegend && ( + + { __( 'Post Visibility' ) } + + ) } { visibilityOptions.map( ( { value, label, info } ) => (