• Resolved eggplantstudios

    (@shawneggplantstudiosca)


    Hey,

    You have a private variable $supported_roles, where you list out the roles this plugin works for. But it isn’t filterable. Adding/removing roles from this list is impossible without editing your plugin files.

    Can you please add a filter in the get_supported_roles() function so your users can add additional roles, or could you use the $wp_roles global to programmatically add ALL defined roles into the $supported_roles array?

    ty

    https://ww.wp.xz.cn/plugins/use-administrator-password/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    A filter has been added in 1.2.1.

    programmatically add ALL defined roles

    There’s a comment in the source code explaining why that’s not done. The plugin’s core feature – of allowing you to log into a lower ranked role’s account – requires that roles are ranked. There’s no fail-safe way to rank arbitrary roles which aren’t part of stock WP.

    David

    Thread Starter eggplantstudios

    (@shawneggplantstudiosca)

    Thanks david <3

    I totally understand about auto-adding roles, the filter will be great for us. Tx

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding more $supported_roles’ is closed to new replies.