bbp_get_wp_roles()
Get the $wp_roles global without needing to declare it everywhere
Description
Return
(WP_Roles)
Source
File: bp-forums/core/capabilities.php
function bbp_get_wp_roles() {
global $wp_roles;
// Load roles if not set
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
return $wp_roles;
}
Changelog
| Version | Description |
|---|---|
| bbPress (r4293) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.