• jodeepeevor

    (@jodeepeevor)


    Hiya

    I’m using your shortcode – in_array(‘subscriber’, $GLOBALS[‘current_user’]->roles) – please can you tell me what to change to add administrator to this too?

    thanks jodee

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

    (@shazdeh)

    Hi!

    You can simply use the or operator:

    
    in_array('subscriber', $GLOBALS['current_user']->roles) || in_array('administrator', $GLOBALS['current_user']->roles)
    
Viewing 1 replies (of 1 total)
  • The topic ‘Hide menu items from two roles’ is closed to new replies.