Hide admin menu on update_option
OK, so you put your form in manu page callback and the code that is processing that form is also in that same function. And you register your manu pages on admin_menu hook. All of that means that when you process your form and change the value of your option, the menu is already registered. … Read more