Skip to content

Instantly share code, notes, and snippets.

@FernE97
Last active December 22, 2015 10:09
Show Gist options
  • Save FernE97/6456688 to your computer and use it in GitHub Desktop.
Save FernE97/6456688 to your computer and use it in GitHub Desktop.
WordPress: Display roles and remove by name
<?php
$wp_roles = new WP_Roles();
$names = $wp_roles->get_names();
print_r($names);
$wp_roles->remove_role('role_name');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment