Hey Chris,
Apologies I misread your first message!
I could do a reverse of it I guess, it could be a toggle that let you use the fields to exclude OR include.
The problem is I can then see people wanting to say – include these but exclude those which is where things can get progressively messy and not easy for the average user. Just typing thoughts out loud but always welcome feedback and thoughts on how you see this working.
This can already be achieved with the hook I mentioned earlier. Note that the plugin blocks the user if it returns true
. Therefore in this case if their id
is not 4
, block them.
function myExlogCustomExcluder($userData) {
return $userData['id'] != 4;
}
add_filter('exlog_hook_filter_custom_should_exclude', 'myExlogCustomExcluder', 10, 1);
If you’re not familiar with where to put this code this plugin may be of use:
https://en-gb.www.ads-software.com/plugins/code-snippets/