Blacklist parameter to bypass filter for objects
dnaber-de opened this issue · comments
Just tried out the plugin an I like the approach. One typical use case for me is that I want to clean the user database from genuine email addresses except those of the admins/site maintainers. It would be nice to have an option, that bypasses the filter for the provided object IDs. E.g. clean up all email addresses except those of user 1, 3 and 5:
$ wp ha -f users.user_email='user__ID__@localhost' --exclude=1,3,5
Great idea, are you able to put out a PR?
You would want to make changes to the user pruner:
https://github.com/10up/wp-hammer/blob/master/includes/pruners/users.php
And for parsing the arg, parse_arguments in:
https://github.com/10up/wp-hammer/blob/master/includes/Settings.php
Sure, hope I find time within the next week for this.
Any update @dnaber-de ?
No not really, sorry. To be honest, I had problems in understanding the code structure. After I failed with the tests in #3 I stopped working on this. Meanwhile I'm using plain SQL to anonymize user data.
closing this out