[wp-trac] Re: [WordPress Trac] #6422: Admin Menu bug

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 15 11:00:58 GMT 2009


#6422: Admin Menu bug
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  anonymous
     Type:  defect (bug)       |       Status:  new      
 Priority:  normal             |    Milestone:  2.9      
Component:  Administration     |      Version:  2.5      
 Severity:  normal             |   Resolution:           
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  reporter-feedback =>

Comment:

 It is.

 In function.php:

 {{{
 include dirname(__FILE__) . '/widgets.php';
 }}}

 In the theme's widgets.php file:

 {{{
 <?php
 function foo() {
         add_submenu_page(
                 'themes.php',
                 __('Whatever'),
                 __('Whatever'),
                 'switch_themes',
                 basename(__FILE__),
                 'bar'
                 );
 }

 function bar() {
         echo 'bar';
 }

 add_action('admin_menu', 'foo');
 ?>
 }}}

 Browse Appearance / Widgets -> It no longer is available.

 Fixing it will likely be complex, as I'm guessing one would need to mess
 around with the way the menu and submenu global arrays are keyed.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6422#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list