Skip to main content

better_messages_get_user_roles

REQUIREMENTS

To be able to implement this guide, you need to learn how to insert PHP snippets to your website.

You can find guide here: WP Beginner

This filter allows to customize user roles which is used by plugin to apply restrictions, limitations and other role based features.

add_filter('better_messages_get_user_roles', 'custom_user_roles', 20, 2 );

function custom_user_roles( $roles, $user_id ){

// Do roles modifications here

return $roles;
}