diff --git src/bp-core/bp-core-caps.php src/bp-core/bp-core-caps.php
index f6e30bb..ff383e8 100644
|
|
function bp_set_current_user_default_role() { |
268 | 268 | function bp_current_user_can( $capability, $blog_id = 0 ) { |
269 | 269 | |
270 | 270 | // Use root blog if no ID passed |
271 | | if ( empty( $blog_id ) ) |
| 271 | if ( empty( $blog_id ) ) { |
272 | 272 | $blog_id = bp_get_root_blog_id(); |
| 273 | } |
| 274 | |
| 275 | $_args = array_slice( func_get_args(), 2 ); |
| 276 | $args = array_merge( array( $blog_id, $capability ), $_args ); |
273 | 277 | |
274 | | $retval = current_user_can_for_blog( $blog_id, $capability ); |
| 278 | $retval = call_user_func_array( 'current_user_can_for_blog', $args ); |
275 | 279 | |
276 | 280 | /** |
277 | 281 | * Filters whether or not the current user has a given capability. |
… |
… |
function bp_current_user_can( $capability, $blog_id = 0 ) { |
281 | 285 | * @param bool $retval Whether or not the current user has the capability. |
282 | 286 | * @param string $capability The capability being checked for. |
283 | 287 | * @param int $blog_id Blog ID. Defaults to the BP root blog. |
| 288 | * @param array $_args Array of extra arguments passed. |
284 | 289 | */ |
285 | | return (bool) apply_filters( 'bp_current_user_can', $retval, $capability, $blog_id ); |
| 290 | return (bool) apply_filters( 'bp_current_user_can', $retval, $capability, $blog_id, $_args ); |
286 | 291 | } |
287 | 292 | |
288 | 293 | /** |