Using remove_menu_page causes error throughout other admin sections
-
As soon as I add a call to remove_menu_page in my functions.php I get several errors in the Pages and Menus section of the admin. The error is always:
Warning: Invalid argument supplied for foreach() in ~sitepath~\wp-admin\includes\plugin.php on line 1261
It doesn’t appear to matter what menu I try to remove, if any calls to that function are made it causes the error to occur. A couple specific places it occurs is when using Quick Update on a post/page or when adding items to a Menu.
I’m calling the remove_menu_page from the ‘admin_init’ hook.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using remove_menu_page causes error throughout other admin sections’ is closed to new replies.