#20182 closed defect (bug) (invalid)
add_menu_page does nothing in wp 3.4 alpha
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.4 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
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
Change History (2)
Note: See
TracTickets for help on using
tickets.
ummmm, awesome facepalm is awesome. please chalk this up to working too late when i should be sleeping.