bbp_remove_caps

Removes capabilities from WordPress user roles.

Description

bbp_remove_caps(); 

Usage

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

Defined (1)

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

/includes/core/capabilities.php  
  1. function bbp_remove_caps() { 
  2.  
  3. // Loop through available roles and remove caps 
  4. foreach ( bbp_get_wp_roles()->role_objects as $role ) { 
  5. foreach ( array_keys( bbp_get_caps_for_role( $role->name ) ) as $cap ) { 
  6. $role->remove_cap( $cap ); 
  7.  
  8. do_action( 'bbp_remove_caps' );