remove_role

Remove role, if it exists.

Description

remove_role( (string) $role ); 

Parameters (1)

0. $role (string)
Role name.

Usage

  1. if ( !function_exists( 'remove_role' ) ) { 
  2. require_once ABSPATH . WPINC . '/capabilities.php'; 
  3.  
  4. // Role name. 
  5. $role = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = remove_role($role); 
  9.  

Defined (1)

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

/wp-includes/capabilities.php  
  1. function remove_role( $role ) { 
  2. wp_roles)->remove_role( $role );