Exclusion Based Redirects
-
This was originally a review, but a mod removed it because they thought it was too support like.
There’s no option to redirect everyone except certain roles. For that, don’t use this plugin, instead just use wp_redirect() in the “template_redirect” hook.
Example to capture user role:
$roles = ( array ) wp_get_current_user()->roles; if (!in_array("administrator", $roles)) {
See https://developer.www.ads-software.com/reference/functions/wp_redirect/ and https://wordpress.stackexchange.com/questions/12535/which-hook-should-be-used-to-add-an-action-containing-a-redirect
To turn this into a support request (it was not originally intended to be) you are free to add this as a feature. It would make the plugin more useful.
I won’t be installing the plugin however, because now I have a snippet that does what I need it to.
BTW, I gave this plugin 5 stars for being well written. I have nothing against the person/people who developed it; just a little annoyed by the random WP mod that removed my review. I come from a more open-source, user-generated culture, so maybe my expectations are just wrong.
- The topic ‘Exclusion Based Redirects’ is closed to new replies.