A Lightweight WordPress plugin that adds a Content Manager role to wp-admin. Restricts the role of installing plugins and themes. Adds common capabilities to admin.
- Edit/Add posts
- Edit/Add media
- Edit/Add pages
- Edit/Add custom post types
- Edit options pages created by ACF
- Edit/Add Menus in Layouts
- Manage comments
- Manage languages
- Manage SEO
'redandblue-user-roles/rnb_urc_comments'
(true|false) Toggle Comment editing. Default false (hide)
'redandblue-user-roles/rnb_urc_users'
(true|false) Toggle User editing. Default false (hide)
'redandblue-user-roles/rnb_urc_comments'
(array) Overwrite capabilities array. See documentation of Roles and Capabilities
// Allow editing of users
add_filter('redandblue-user-roles/rnb_urc_users', function () {
return true;
});
// Overwriting default capabilities by passing a inline function into filter which returns an array
add_filter('redandblue-user-roles/rnb_urc_caps', function () {
return [
'edit_posts' => false
];
});
// refresh_redandblue_role function must be used after updating capabilities. (Better method will be implemented in upcoming versions)
refresh_redandblue_role(); // this function needs to be run only ones to update
wp rnb-refresh-roles
- Filters to disable/enable caps in theme functions
- Add multisite capabilities
- More filters?
- Better way to refresh caps (WP CLI Command perhaps)