Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Visibility options #17407

Open
woorise opened this issue Sep 11, 2019 · 7 comments
Open

Remove Visibility options #17407

woorise opened this issue Sep 11, 2019 · 7 comments
Labels
[Feature] Document Settings Document settings experience [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@woorise
Copy link

woorise commented Sep 11, 2019

Is there any way to remove the visibility options from the Status & Visibility section?

@swissspidy swissspidy added the [Feature] Document Settings Document settings experience label Sep 16, 2019
@mtias mtias added the [Feature] Extensibility The ability to extend blocks or the editing experience label Aug 30, 2020
@paaljoachim
Copy link
Contributor

Hey @woorise

I see your issue has been overlooked.

Let's see if someone can give a comment here.
@WordPress/gutenberg-core

@swissspidy swissspidy added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Jan 18, 2021
@ntsekouras
Copy link
Contributor

Hey @woorise - currently there is not an option to do that and honestly I don't know if it's a good idea implement this in core.

I think an easy alternative would be to use just some css to hide it, no?

@woorise
Copy link
Author

woorise commented Jan 22, 2021

Hey @ntsekouras, that's how we do it right now but it would be nice to have a better control over the options to prevent more experienced users to alter them.

We are running a multisite installation and we would like to conditionally show/hide some options such as the "Stick to the top of the blog" or the "Pending review".

@gziolo
Copy link
Member

gziolo commented Jan 22, 2021

It was implemented with #17117:

You can remove this panel with the following JS call:

wp.data.dispatch( 'core/edit-post' ).removeEditorPanel( 'post-status' );

@gziolo gziolo closed this as completed Jan 22, 2021
@paaljoachim
Copy link
Contributor

Do we have docs for the JS call?

@mkaz

@gziolo gziolo reopened this Jan 22, 2021
@gziolo
Copy link
Member

gziolo commented Jan 22, 2021

Actually, it's an individual visibility option from the panel.

Is there any way to remove the visibility options from the Status & Visibility section?

It can be disabled by removing the permission for the user:

export function PostVisibilityCheck( { hasPublishAction, render } ) {
const canEdit = hasPublishAction;
return render( { canEdit } );
}

However, it's too general I don't think that useful in this context.

@noisysocks
Copy link
Member

The dropdown proposed in #42030 (comment) would address this.

Screen.Recording.2022-06-30.at.22.20.02.mov

@noisysocks noisysocks self-assigned this Jul 15, 2022
@noisysocks noisysocks removed their assignment Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

7 participants