Conversation
supportHey, 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://wordpress.org/plugins/use-administrator-password/
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
Thanks david <3 I totally understand about auto-adding roles, the filter will be great for us. Tx
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
Thanks david <3 I totally understand about auto-adding roles, the filter will be great for us. Tx