/**
* Paste the code into your functions.php
* For more info about the options available visit: http://codex.wordpress.org/Roles_and_Capabilities
*/
/**
* Add new permissions/capabilities to a specific role
*
* @param string $role
* @param string $cap
*/
function add_capability($role,$cap) {
$role_obj = get_role($role); // get the the role object
$role_obj->add_cap($cap); // add $cap capability to this role object
}
//add_capability('subscriber','read_private_pages'); //Example
/**
* Remove existing permissions/capabilities to a specific role
*
* @param string $role
* @param string $cap
*/
function remove_capability($role,$cap) {
$role_obj = get_role($role); // get the the role object
$role_obj->remove_cap($cap); // add $cap capability to this role object
}
//remove_capability('subscriber','read_private_pages'); //Example