Support » Plugin: Menu Item Visibility Control » Show menu item only administrator

  • Hi,
    How show a menu item to only administrator?
    I have used a logic “in_array(‘administrator’, $GLOBALS[‘current_user’]->roles)”.
    But its not working.
    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author shazdeh


    Might be better to use:

    current_user_can( 'manage_options' )

    Only admins can “manage options”, so the menu will then be displayed only to administrators.

Viewing 1 replies (of 1 total)
  • The topic ‘Show menu item only administrator’ is closed to new replies.