[wp-trac] [WordPress Trac] #20182: add_menu_page does nothing in wp 3.4 alpha

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 6 06:50:09 UTC 2012


#20182: add_menu_page does nothing in wp 3.4 alpha
----------------------------+-----------------------------
 Reporter:  helgatheviking  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  3.4
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 add_menu_page does nothing in wp 3.4 alpha.. not sure how to tell which
 build i'm using but i updated the bleeding edge nightly on 5 march.

 following code works just fine for me in 3.3.  also globally declaring
 $menu and the print_r($menu); doesn't do anything either.

 {{{
 add_action('admin_menu', 'my_admin_menu');

 function my_admin_menu(){
         add_menu_page('custom menu title', 'custom menu', 'administrator',
 'custompage', 'custom_menu_page', '', 6);
 }


 function custom_menu_page(){
    echo "Admin Page Test";
 }
 }}}

 additionally, each array in the $menu variable now only has 5 keys?

  * The elements in the array are :
  *     0: Menu item name
  *     1: Minimum level or capability required.
  *     2: The URL of the item's file
  *     3: Class
  *     4: ID
  *     5: Icon for top level menu

 according to some print_r() results on another site running 3.3.1 the icon
 is/was key #6

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20182>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list