Support » Plugins » Hacks » Hide Specific Divs from specific user role groups

  • andrewrowland.g

    (@andrewrowlandggmailcom)


    What is the most secure way to hide specific divs from everyone besides a specific user role group?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Simply wrapping the div output in a if(current_user_can('unique_capability')) block should be secure enough if the server is properly configured. Where ‘unique_capability’ is a capability assigned only to the specific role that is allowed to see the content.

    AFAIK there is no way for anyone to see this content unless they are a properly logged in user with that assigned role.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Specific Divs from specific user role groups’ is closed to new replies.