bbPress::roles_init()
Initialize forum-specific roles
Description Description
Source Source
File: bbpress.php
public function roles_init() { // Get role IDs $keymaster = bbp_get_keymaster_role(); $moderator = bbp_get_moderator_role(); $participant = bbp_get_participant_role(); $spectator = bbp_get_spectator_role(); $blocked = bbp_get_blocked_role(); // Build the roles into one useful array $this->roles[ $keymaster ] = new WP_Role( 'Keymaster', bbp_get_caps_for_role( $keymaster ) ); $this->roles[ $moderator ] = new WP_Role( 'Moderator', bbp_get_caps_for_role( $moderator ) ); $this->roles[ $participant ] = new WP_Role( 'Participant', bbp_get_caps_for_role( $participant ) ); $this->roles[ $spectator ] = new WP_Role( 'Spectator', bbp_get_caps_for_role( $spectator ) ); $this->roles[ $blocked ] = new WP_Role( 'Blocked', bbp_get_caps_for_role( $blocked ) ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |