[wp-trac] [WordPress Trac] #19085: Removing First Submenu Page in Admin Menu breaks URL for Menu Page
WordPress Trac
noreply at wordpress.org
Sat Oct 19 03:01:06 UTC 2013
#19085: Removing First Submenu Page in Admin Menu breaks URL for Menu Page
----------------------------+------------------------------
Reporter: mikeschinkel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.1
Severity: major | Resolution:
Keywords: has-patch |
----------------------------+------------------------------
Changes (by eclare):
* cc: eclare (added)
Comment:
This is a bigger issue -''' one can not make a link to the Menu item that
is different from the 1st Submenu item.'''
I know that "it's not a bug - it's a feature", but the side effect - like
said above - is quite bad.
This prevents removing some submenus, for example if I want to remove the
"Home" that is the 1st submenu of the Dashboard menu, I use the following
code:
{{{
add_action('admin_menu', 'register_custom_admin_menus');
function register_custom_admin_menus() {
remove_submenu_page('index.php', 'index.php');
}
}}}
This will remove the "Home" menu, but as stated above, the current WP code
makes it so the menu link for the Dashboard changes to the next submenu
item, which is update-core.php (Update). This makes it impossible to
access the Dashboard. This is just an example.
I do not believe that plocha's patch fixes this. It looks like it only
allows you to remove a submenu that has the same link as the main menu
(which I believe is working without this patch), but it still doesn't fix
the issue that the Menu links gets the new link from the 1st Submenu page.
Therefore, I think this should be marked as needs-patch. Please correct me
if I'm wrong.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19085#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list