Changeset 8942 for trunk/src/bp-core/bp-core-caps.php
- Timestamp:
- 08/18/2014 01:15:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-caps.php
r7847 r8942 10 10 // Exit if accessed directly 11 11 if ( !defined( 'ABSPATH' ) ) exit; 12 13 /** 14 * Return an array of roles from the currently loaded blog 15 * 16 * WordPress roles are dynamically flipped when calls to switch_to_blog() and 17 * restore_current_blog() are made, so we use and trust WordPress core to have 18 * loaded the correct results for us here. As enhancements are made to 19 * WordPresss's RBAC, so should our capability functions here. 20 * 21 * @since BuddyPress (2.1.0) 22 * 23 * @return array 24 */ 25 function bp_get_current_blog_roles() { 26 global $wp_roles; 27 28 // Sanity check on roles global variable 29 $roles = isset( $wp_roles->roles ) 30 ? $wp_roles->roles 31 : array(); 32 33 // Apply WordPress core filter to editable roles 34 $roles = apply_filters( 'editable_roles', $roles ); 35 36 // Return the editable roles 37 return apply_filters( 'bp_get_current_blog_roles', $roles, $wp_roles ); 38 } 12 39 13 40 /**
Note: See TracChangeset
for help on using the changeset viewer.