bbp_remove_roles

Removes bbPress-specific user roles.

Description

bbp_remove_roles(); 

Usage

  1. if ( !function_exists( 'bbp_remove_roles' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/capabilities.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_remove_roles(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/core/capabilities.php  
  1. function bbp_remove_roles() { 
  2.  
  3. // Remove the bbPress roles 
  4. foreach ( array_keys( bbp_get_dynamic_roles() ) as $bbp_role ) { 
  5. remove_role( $bbp_role ); 
  6.  
  7. // Some early adopters may have a deprecated visitor role. It was later 
  8. // replaced by the Spectator role. 
  9. remove_role( 'bbp_visitor' );