Admin Menus and Plugins
-
I have two plugins, one of which is dependant on the other. Both have option pages in the admin section. I want to show or hide the second plugins options page according to a setting selected on the first plugin’s options page.
That much works up to a point. I can use add_action and remove_action to add or remove the second plugin’s options page. Unfortunately, the menu at the top of the admin screen doesn’t seem to update. For example, if I choose to remove the second plugin’s option page the menu still shows a tab for it — but if I click that tab I get an error page.
However, if I click on another option menu tab — or if I press the button to update my options a second time — the menu adjusts itself and stops showing the second plugin’s tab.
Is there any way to get the menu to sort itself out on the first update of the options?
- The topic ‘Admin Menus and Plugins’ is closed to new replies.