Change WordPress user roles and capabilities › Forums › How to or FAQ › Custom User Edit Page › Reply To: Custom User Edit Page
16/05/2017 at 06:50
#3731
Vladimir
Keymaster
Beta 2 of version 4.34.2 is available after login from download page.
Related changes:
- Update: Core version: “Users->Grant Roles” button worked only for superadmin or user with ‘ure_manage_options’ capability. User with ‘edit_users’ can use this feature now.
- New: Core version: Boolean filter ‘ure_users_select_primary_role’ can hide ‘Primary role’ selection controls from the user profile edit page. Boolean filter ‘ure_users_show_wp_change_role’ can hide “Change Role” bulk action selection control from the Users page. So it’s possible to configure permissions for user who can change just other roles of a user without changing his primary role.
Custom filter samples:
add_filter('ure_users_select_primary_role', 'ure_users_select_primary_role');
function ure_users_select_primary_role($show) {
$show = false;
return $show;
}
add_filter('ure_users_show_wp_change_role', 'ure_show_wp_change_role');
function ure_show_wp_change_role($show) {
$show = false;
return $show;
}