• Resolved jimk1416

    (@jimk1416)


    I’ve been using this code to display an additional logged on user role.
    Is there a way to modify this so I can display 2 additional roles besides the Administrator. For example “Subscribers” and “Editors”

    function my_auli_get_role__in( $role__in ) {
    	$role__in[] = 'Subscriber'; // custom role, first character capitalized
    	return $role__in;
    }
    add_filter( 'auli_get_role__in', 'my_auli_get_role__in' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi, you can just add another line.

    function my_auli_get_role__in( $role__in ) { $role__in[] = 'Subscriber'; $role__in[] = 'Editor'; // custom role, first character capitalized return $role__in; } add_filter( 'auli_get_role__in', 'my_auli_get_role__in' );
    Sorry for this mess.

    Thread Starter jimk1416

    (@jimk1416)

    Thank you. Fabulous

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use for more than one additional role’ is closed to new replies.