Changeset 6147 for branches/2.5/includes/core/capabilities.php
- Timestamp:
- 12/09/2016 07:30:14 AM (9 years ago)
- File:
-
- 1 edited
-
branches/2.5/includes/core/capabilities.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/includes/core/capabilities.php
r6125 r6147 293 293 * @since bbPress (r4290) 294 294 * 295 * @param WP_Roles $wp_roles The main WordPress roles global 296 * 295 297 * @uses bbp_get_wp_roles() To load and get the $wp_roles global 296 298 * @uses bbp_get_dynamic_roles() To get and add bbPress's roles to $wp_roles 297 299 * @return WP_Roles The main $wp_roles global 298 300 */ 299 function bbp_add_forums_roles() { 300 $wp_roles = bbp_get_wp_roles(); 301 301 function bbp_add_forums_roles( $wp_roles = null ) { 302 303 // Attempt to get global roles if not passed in & not mid-initialization 304 if ( ( null === $wp_roles ) && ! doing_action( 'wp_roles_init' ) ) { 305 $wp_roles = bbp_get_wp_roles(); 306 } 307 308 // Loop through dynamic roles and add them to the $wp_roles array 302 309 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) { 303 310 $wp_roles->roles[$role_id] = $details; … … 306 313 } 307 314 315 // Return the modified $wp_roles array 308 316 return $wp_roles; 309 317 }
Note: See TracChangeset
for help on using the changeset viewer.