Forums
Forums / Plugins / Menu for authors
(@raulsan)
17 years, 5 months ago
Hello, I am developing a plugin with a new menu. I did it and it works, the problem is that it is only visible for administrators. How can I make it visible for Authors?
my code for the now is:
<?php define('__DIR__',pathinfo(__FILE__,PATHINFO_DIRNAME)); add_action('admin_menu','menu_panels'); function menu_panels(){ add_menu_page(__('Panels'), __('Panels'), 3, __DIR__ . '/pag-panels.php'); } ?>
THANK YOU!!
OK, I solved it myself, the only problem is that I needed a lower user_level. It works with 2:
<?php define('__DIR__',pathinfo(__FILE__,PATHINFO_DIRNAME)); add_action('admin_menu','menu_panels'); function menu_panels(){ add_menu_page(__('Panels'), __('Panels'), 2, __DIR__ . '/pag-panels.php'); } ?>
The topic ‘Menu for authors’ is closed to new replies.