[wp-trac] [WordPress Trac] #6422: Admin Menu bug
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 27 18:01:41 GMT 2008
#6422: Admin Menu bug
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: Administration | Version: 2.5
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
I suspect this one will be a bit tricky... :)
If you create a theme with a file name that is included in the submenu
already, then the menu no longer works as expected.
To reproduce: Create a theme with a file called widgets.php, include that
file from the functions.php, and from that file, register an admin screen
using:
{{{
add_submenu_page(
'themes.php',
__('Whatever'),
__('Whatever'),
'switch_themes',
basename(__FILE__),
'foobar'
);
}}}
Upon doing so, wp-admin/widgets.php is no longer available -- that menu
item points to themes.php?page=widgets.php instead.
I'm guessing this also works with plugins. I also vaguely recall a weird
bug reported by Ozh that might be related to this one.
--
Ticket URL: <http://trac.wordpress.org/ticket/6422>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list