WordPress.org

Forums

Members
Update Documentation: current_user_can(); (1 post)

  1. CFS
    Member
    Posted 1 year ago #

    In your documentation you wrote that when using current_user_can(), "..you can check for a specific role by inputting the role name instead of the capability name. It works the same way."

    The WordPress docs advises not pass a role name to current_user_can() as it is not guaranteed to work correctly. See Ticket #22624: http://core.trac.wordpress.org/ticket/22624.

    Appthemes has created a good alternative function to use: http://docs.appthemes.com/tutorials/wordpress-check-user-role-function/

    http://wordpress.org/plugins/members/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Members
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.