-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Disable the Preview button when post type isn't viewable #6232
Conversation
@pento There doesn't seem to be a good way to test a component using
Is there a direction you can point me in, or should we punt on it for now? |
@danielbachhuber, given that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Merged to include in the release. |
@heldervilela Could you start a new issue for your bug, please? Having a new issue will help ensure the conversation isn't lost, and that your particular need is tracked through to resolution. |
Description
In the classic editor, the preview button is only available if is_post_type_viewable returns true. We are updating the logic to follow the same behavior.
Fixes #5749
Previously #5770 #6120
How Has This Been Tested?
Register a post type with publicly_queryable set to false.
E.g:
Verify preview button is not available for posts of this Post Type.