Bug: Adminize hides wrong submenu page in re-ordered sub-menus
-
Hello Frank,
I have Adminimize installed along side WP-CRM System plugin. WP-CRM hooks on the filter
custom_menu_orderto change the order of its sub-menu (by altering theglobal $submenuvariable). Adminimize caches & displays revised indexed values of the sub-menu in its settings page.However, when Adminimize hides selected menus for a role, for a user with that role who logs into the dashboard, Adminimize hides the wrong sub-menus because it hooks onto the action
admin_menuwhich fires before the filtercustom_menu_order. As a result the wrong menu gets hidden.To fix this, I found that simply changing the Adminimize function
_mw_adminimize_set_menu_optionhook from the actionadmin_menuto the filtercustom_menu_orderworks beautifully.This is on line 437 of of the file
adminimize.phpwhich I changed to,add_filter( 'custom_menu_order', '_mw_adminimize_set_menu_option', 99999 );
The topic ‘Bug: Adminize hides wrong submenu page in re-ordered sub-menus’ is closed to new replies.