Check if add_menu_page exists or not

Posted by Prem Tiwari | Updated on

You can use the fourth parameter of add_menu_page(), the my_unique_slug, to check if the page exists:

$GLOBALS['admin_page_hooks'] is the list of registered pages.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers