Add Capability of Custom Plugin to a Role
Add Capability of Custom Plugin to a Role
To add new Capability of a custom made plugin in WordPress to a specific Role.
function add_theme_caps() { // gets the author role $role = get_role('editor'); // This only works, because it accesses the class instance. // would allow the author to edit others' posts for current theme only // just mention your plugin filename like I have edit_events.php as my plugin $role->add_cap('edit_events');…
View On WordPress














