Disable Preview button for non-viewable post types. #5749
Labels
Core REST API Task
Task for Core REST API efforts
[Type] Bug
An existing feature does not function as intended
Milestone
Issue Overview
Currently if a post type is not viewable (as determined by
is_post_type_viewable
in core), the Classic Editor and Post list table will not show a Preview button or link, but Gutenberg shows the button regardless. This results in a false-impression that users can preview a post if they are editing in Gutenberg and will result a broken link.This happens on the latest
master
of Gutenberg.Steps to Reproduce (for bugs)
publicly_queryable
set tofalse
.Expected Behavior
If a post type is not viewable (ie.
public
orpublicly_queryable
, Gutenberg should not display a Preview button in the UI.Current Behavior
Gutenberg displays a Preview button in the editor UI regardless of the post type properties that should otherwise disable it.
The text was updated successfully, but these errors were encountered: