[buddypress-trac] [BuddyPress Trac] #6501: Allow additional arguments to be passed to bp_current_user_can()

buddypress-trac noreply at wordpress.org
Sat Jun 20 13:54:57 UTC 2015


#6501: Allow additional arguments to be passed to bp_current_user_can()
------------------------------------+---------------------------
 Reporter:  thebrandonallen         |       Owner:  boonebgorges
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  2.4
Component:  API - Roles/Capability  |     Version:  1.6
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch               |
------------------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"9957"]:
 {{{
 #!CommitTicketReference repository="" revision="9957"
 Convert second parameter of `bp_current_user_can()` to an `$args` array.

 This makes the syntax simpler for the vast majority of use cases, where an
 explicit `blog_id` doesn't need to be specified. It also makes it possible
 to
 pass additional arguments, such as an `item_id`, to
 `bp_current_user_can()`.

 An integer passed as the second parameter will trigger the backward-
 compatibility layer.

 Props thebrandonallen, r-a-y.
 See #5121. Fixes #6501.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6501#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list