[wp-trac] [WordPress Trac] #20029: preview button shown on post screen with non-public custom post types

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 13 06:59:06 UTC 2012


#20029: preview button shown on post screen with non-public custom post types
--------------------------+-----------------------------------------------
 Reporter:  intoxstudio   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Types    |    Version:  3.3.1
 Severity:  normal        |   Keywords:  has-patch 2nd-opinion ux-feedback
--------------------------+-----------------------------------------------
 Registering a custom post type with the following arguments

 {{{
 $args = array(
 'public' => false,
 'show_ui' => true
 );
 }}}

 means that the post type shouldn't be public but still shown in the
 administration (obviously). Therefore it makes no sense that a preview
 button is visible on the post screen, as it will lead to nothing (404);
 ie. the use case is nonexistent.

 This patch checks if a post type is public before adding the preview
 button to the post screen.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20029>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list