Opened 12 years ago
Closed 12 years ago
#28287 closed defect (bug) (duplicate)
CPT with 'show_in_menu' => 'users.php' does not get highlighted when adding new
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.9.1 |
| Component: | Posts, Post Types | Keywords: | has-patch |
| Focuses: | administration | Cc: |
Description (last modified by )
When registering a post type as a submenu of a top level menu, the submenu item does not get highlighted correctly when adding a new item to the post type.
Code to reproduce:
add_action ('init', 'cptest');
function cptest ()
{
$args = array
(
'labels' => array
(
'name' => 'FooBars',
'singular_name' => 'FooBar',
),
'public' => false,
'show_ui' => true,
'show_in_menu' => 'users.php',
);
register_post_type ('foobar', $args);
}
- Click Users -> FooBars
- In the newly opened admin page, click Add New (add new FooBar)
- The All Users submenu item gets highlighted, instead of FooBars
This is very similar to ticket #24137, and is fixed by patch 24137.2.patch by markjaquith, attached to that ticket and replicated as attachment to this ticket.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
fixes ticket 28287