Admin Approval For Different User Roles

This function allows user roles which have the ‘list_users’ capability to see and interact with the Admin Approval panel.

1
2
3
4
5
6
7
/*
 * Allow users with capability delete_users to view the admin approval panel
 */
add_filter( 'wppb_admin_approval_user_capability', 'wppb_change_admin_approval_user_capability');
function wppb_change_admin_approval_user_capability($cap){
    return 'list_users';
}