[wp-trac] [WordPress Trac] #28287: CPT with 'show_in_menu' => 'users.php' does not get highlighted when adding new
WordPress Trac
noreply at wordpress.org
Fri May 16 22:44:35 UTC 2014
#28287: CPT with 'show_in_menu' => 'users.php' does not get highlighted when adding
new
-------------------------------+-----------------------------
Reporter: dontdream | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 3.9.1
Severity: normal | Keywords:
Focuses: administration |
-------------------------------+-----------------------------
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);
}
}}}
1. Click ''Users -> FooBars''
2. In the newly opened admin page, click ''Add New'' (add new FooBar)
3. 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28287>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list