[wp-trac] [WordPress Trac] #23814: non-public post types which are shown in admin ui still have 'view post' message

WordPress Trac noreply at wordpress.org
Mon Mar 18 20:57:19 UTC 2013


#23814: non-public post types which are shown in admin ui still have 'view post'
message
-----------------------------+--------------------------
 Reporter:  netweblogic      |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Post Types
  Version:                   |   Severity:  minor
 Keywords:                   |
-----------------------------+--------------------------
 When using CPTs that are public = false yet can be edited in the admin, it
 will still show a 'View post' link in the updated message when
 creating/updating a CPT.

 This is not right because this leads to a 404 page. When viewing the admin
 list of that CPT the hoverable actions do not show the 'view' link, which
 is correct.

 Simple example to reproduce the issue:


 {{{
 function codex_custom_init() {
         $args = array( 'public' => false, 'show_ui' => true,
 'show_in_admin_bar' => true, 'label' => 'Books' );
         register_post_type( 'book', $args );
 }
 add_action( 'init', 'codex_custom_init' );
 }}}

 flick 'public' on and off, saving permalinks in between and try saving
 book CPTs to see the 'view post' link as well as a 404 page if public =
 false.

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


More information about the wp-trac mailing list