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
252 253 254 255 256 257 258 259 260 | 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.