[wp-trac] [WordPress Trac] #30616: No Edit Post link in Toolbar if post type is placed as a sub menu using show_in_menu
WordPress Trac
noreply at wordpress.org
Sat Dec 6 18:06:31 UTC 2014
#30616: No Edit Post link in Toolbar if post type is placed as a sub menu using
show_in_menu
-----------------------------------------------+---------------------------
Reporter: Dumian | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Posts, Post Types | Review
Severity: normal | Version: trunk
Focuses: ui, accessibility, administration | Keywords:
-----------------------------------------------+---------------------------
If we create new post type with register_post_type function using
'edit.php' as a value of show_in_menu argument (in order to place our post
type as a sub menu of Posts in WP Admin area), then if we create new post
and display it in the frontend there will be no Edit link in Toolbar
(Admin Bar).
Steps to reproduce this bug are very simple (tested in WordPress 4.0.1):
1. Copy the code below and paste it into functions.php file
{{{
function codex_custom_init() {
$args = array(
'public' => true,
'label' => 'Books',
'show_in_menu' => 'edit.php'
);
register_post_type( 'book', $args );
}
add_action( 'init', 'codex_custom_init' );
}}}
2. Create new post in our newly created Post Type.
3. Click 'View Post' button.
(To see the post maybe you have to flush rewrite rules)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list