[wp-trac] [WordPress Trac] #16326: remove_menu_page doesn't work

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 20 22:39:20 UTC 2011


#16326: remove_menu_page doesn't work
----------------------------+-----------------------------
 Reporter:  czepol          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.1
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 Probably a mistake. Maybe I'm doing something wrong, but:

 {{{
 <?php

 require_once(ABSPATH . 'wp-admin/includes/admin.php');

 remove_menu_page( 'link-manager.php' );

 ?>
 }}}


 This code returns error:
 Warning: Invalid argument supplied for foreach() in /var/www/3.1/app/wp-
 admin/includes/plugin.php on line 1263

 plugin.php:1263:
 {{{
 foreach ( $menu as $i => $item ) {
 }}}
 This code returns NULL:
 {{{
 global $menu;
 var_dump($menu);
 }}}

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


More information about the wp-trac mailing list