// Only need to load a page once to get this into db, then comment out (or place in theme/plugin activation)
// WP Codex: http://codex.wordpress.org/Roles_and_Capabilities
$result = add_role(
'basic_contributor',
__( 'Basic Contributor' ),
array(
'read' => true, // true allows this capability
'edit_posts' => true,
'delete_posts' => false, // Use false to explicitly deny
)
);
if ( null !== $result ) {
echo 'Yay! New role created!';
} else {
echo 'Oh... the basic_contributor role already exists.';
}
// Or remove a role
remove_role( 'basic_contributor' );