Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › User Profile Fields › Reply To: User Profile Fields
24/01/2023 at 04:52
#8147
Keymaster
Hi,
Syntax error is at the prev line – missed closing bracket ‘)’ after (‘custom_role’). It should be:
if (current_user_can('custom_role')) {
add_action( 'admin_footer', 'user_profile_fields_disable_js' );
}