[wp-trac] [WordPress Trac] #25397: In admin menu, current menu item applied to parent CPT when adding a new post for a CPT that is under it.
WordPress Trac
noreply at wordpress.org
Mon Sep 23 15:50:39 UTC 2013
#25397: In admin menu, current menu item applied to parent CPT when adding a new
post for a CPT that is under it.
--------------------------+------------------------------
Reporter: ericlewis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by ericlewis):
To reproduce:
{{{
/**
* Register the page section post type.
*
* Page section post types will be related to pages, and make up the
content
* of a page.
*/
function register_page_section_post_type() {
register_post_type( 'page-section', array(
'labels' => array(
'name' => 'Page Sections',
'singular_name' => 'Page Section',
'add_new' => 'Add New',
'add_new_item' => 'Add New Page Section',
'edit_item' => 'Edit Page Section',
'new_item' => 'New Page Section',
'view_item' => 'View Page Section',
'search_items' => 'Search Page Sections',
'not_found' => 'No page sections found.',
'not_found_in_trash' => 'No page sections found in
Trash.',
'all_items' => 'All Page Sections'
),
'public' => false,
'publicly_queryable' => false,
'capability_type' => 'page',
'show_ui' => true,
'show_in_menu' => 'edit.php?post_type=page',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => false,
'query_var' => false,
'supports' => array( 'title', 'editor', 'revisions' ),
) );
}
add_action( 'init', 'register_page_section_post_type' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25397#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list