Answers for "wp add role capabilities"

0

wp add role capabilities

######## Custom Code ############

// get the the role object
$role_object = get_role( $role_name );

// add $cap capability to this role object
$role_object->add_cap( $capability_name );

// remove $cap capability from this role object
$role_object->remove_cap( $capability_name );

reference:
https://wordpress.stackexchange.com/questions/13413/how-to-add-a-capability-to-a-user-role

######## From Plugins ############
https://wordpress.org/plugins/members/
https://wordpress.org/plugins/user-role-editor/#description
https://wordpress.org/support/article/roles-and-capabilities/#manage_network_plugins
Posted by: Guest on June-07-2021

Browse Popular Code Answers by Language