[wp-trac] [WordPress Trac] #19937: 'remove_menu_page' causes a Warning when 'Edit Image'

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 31 20:43:12 UTC 2012


#19937: 'remove_menu_page' causes a Warning when 'Edit Image'
---------------------------+------------------------------
 Reporter:  carlos_a_sanz  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:  3.3.1
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------------------

Comment (by nacin):

 Admin menu functions such as add_menu_page(), add_submenu_page(),
 remove_menu_page(), and remove_submenu_page(), need to happen on the
 `admin_menu` hook, not the `admin_init` hook.

 The admin_init hook fires in some situations where there is no UI for
 which a menu will be built -- for example, the media popup, or admin-ajax.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19937#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list