Skip to content

Instantly share code, notes, and snippets.

@stefanbc
Created April 4, 2013 11:48
Show Gist options
  • Save stefanbc/5309742 to your computer and use it in GitHub Desktop.
Save stefanbc/5309742 to your computer and use it in GitHub Desktop.
Remove any Wordpress user role
<?php
require_once 'wp-load.php';
$wp_roles = new WP_Roles();
$wp_roles->remove_role("YOUR_ROLE"); // author, editor, contributor
$names = $wp_roles->get_names();
print_r($names);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment