Home Forums General Issues User role selector Reply To: User role selector

  • Hi,

    This post is a bit old but it mights be useful for others.

    This plugin is working for me (ACF 5.8.5 / WordPress 4.x or 5.x)
    It uses the same functions describe in the documentation:

    As far as i know it’s update for all versions of ACF 5.
    (There is a callback file for ACF4, i don’t know if it’s working).


    You could only use the ID return value, the object return doesn’t work (i don’t know why).

    Basically it uses the global variable $wp_roles and the method $wp_roles->roles to get all roles.

    It uses also a get_role() function to display the name in back-end.

    If you want a role object using this plugin, you could retrieve it with the ID’s returned.
    It’s not the best way but it’s working.

    Finally it could be really usefull to integrate this field in a future version 😉