Changeset 5329 for trunk/bp-core/bp-core-caps.php
- Timestamp:
- 11/14/2011 05:19:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-caps.php
r5304 r5329 378 378 } 379 379 380 /** 381 * Whether current user has a capability or role. Can be passed blog ID, or will 382 * use the root blod by default 383 * 384 * @since BuddyPress (1.6) 385 * 386 * @param string $capability Capability or role name. 387 * @param int $blog_id Blog ID 388 * @return bool 389 */ 390 function bp_current_user_can( $capability, $blog_id = 0 ) { 391 392 // Use root blog if no ID passed 393 if ( empty( $blog_id ) ) 394 $blog_id = bp_get_root_blog_id(); 395 396 $retval = current_user_can_for_blog( $blog_id, $capability ); 397 398 return (bool) apply_filters( 'bp_current_user_can', $retval, $capability, $blog_id ); 399 } 400 380 401 ?>
Note: See TracChangeset
for help on using the changeset viewer.