Thread Starter
Tanner
(@tannerchung)
https://www.role-editor.com/forums/topic/other-roles-addon-does-not-work-on-administrator-role/
I just found out that this is supposed to be offered in pro. I tried the pro feature but there is a bug that’s documented in that link.
“Other Roles Access” add-on included into Pro version has another purpose while contains the same “other roles” word. I answered on your questions at the Pro version related forum that it’s not a bug, but a feature.
In order to fulfill the task from this topic title use custom filters:
add_filter('ure_show_additional_capabilities_section', 'ure_show_additional_capabilities_section');
add_filter('ure_bulk_grant_roles', 'ure_show_additional_capabilities_section');
function ure_show_additional_capabilities_section($show) {
$user = wp_get_current_user();
if (in_array('user-manager', $user->roles)) {
$show = false;
}
return $show;
}
Thread Starter
Tanner
(@tannerchung)
I’ve tried adding this code block to functions.php and it crashes the site
Error messages from the server logs will be useful in this case.
I made another test – code works without error. You can send your own functions.php (zip it) to support [at-sign] role-editor.com. I will look what may be wrong with your version.
Thread Starter
Tanner
(@tannerchung)
Nevermind I got it working. For anyone who is following it’s because of some errors in my MU plugin that I created for this.