<?php #/*
#Plugin Name: Test Role Plugin
#Description: Adds a single test role 'Test' to demo a WP bug
#Author: whiteatom
#Version: 1.0

register_activation_hook(__FILE__, 'create_role' ); // creates roles
register_deactivation_hook(__FILE__, 'delete_role' );

function create_role(){
     $editor = get_role('editor');
     $ed_caps = $editor->capabilities;
	add_role('test-role', 'Test', $ed_caps);
}

function delete_role(){
	remove_role('test-role');
}

?>