[wp-trac] [WordPress Trac] #22624: New current_user_has_role function to work for roles like current_user_can does for caps

WordPress Trac noreply at wordpress.org
Thu Sep 26 15:22:54 UTC 2013


#22624: New current_user_has_role function to work for roles like current_user_can
does for caps
-----------------------------+------------------------------
 Reporter:  sc0ttkclark      |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Users            |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by knutsp):

 -1

 Plugins should check for capabilities, not roles. Roles are arbitrary
 names for collections of capabilities that happen to be on the site. Sites
 uses custom roles for their users will suffer if and when role checking
 becomes more common that it already is.

 To save some code lines, or elements of logical expressions, is not a use
 case.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/22624#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list