• 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!!

Viewing 1 replies (of 1 total)
  • Thread Starter raulsan

    (@raulsan)

    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');
    }
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Menu for authors’ is closed to new replies.