motivmedia
Forum Replies Created
-
Forum: Plugins
In reply to: [IP2Location Country Blocker] Arbitrary mail addresses for notificationsWell, for security reasons I think it’s not that expendient to create a separate user just to send emails to. Can you be a bit more specific about the “security concerns”? I’m taking, this doesn’t mean spam, but leaking data?
Hi @amirfallah
thanks for the quick reply. Brilliant! And perfect timing from my viewpoint ??
Thanks for the great work!
Thank you. I do know how cron jobs in WordPress work, though. This is within a custom plugin with its own scheduled task which, for testing, I increased the frequency of and trigger by calling wp-cron.php?doing_wp_cron while not logged in. As mentioned, other changes in there get performed, even other options for WP Statistics. It is just the geoip option that doesn’t get changed – for whatever reason.
Edit: Hold that, it just did work. Still is the case that geoip out of several other options was the only one that didn’t change before. Now it did and I’ll have to figure out how I managed to mess that up before. Thanks for your patience, much apreciated!
- This reply was modified 6 months, 1 week ago by motivmedia.
Well, it performs all the other actions in there. WP Cron does work. I suspect that I need to load something as it seems to make a difference if it runs when I’m logged in vs. when I’m not.
Hi @amirfallah
thanks for the quick reply! I think I might have missed some critical info: My code does work if I put it in functions.php or anything I trigger by manually accessing it but this is run by wp-cron. And then it seemingly does nothing. Will try out the download code, though. Thank you!
Thank you, much appreciated!
Well, I’m not surprised – it’s got a clean interface, one wouldn’t overlook that ?? Can I suggest adding that geo info to the notification mail at some point?
Yes. I know. And it is because the “To” is empty. Intentionally, as the only way to reliably prevent a mail getting sent. As seen in my code and as described.
My question is if you can suggest a way to achieve what I need to – preventing mails to get sent as most precisely explained by the very code (unedited) I commented – without creating log entries. My reasoning being that I don’t need to be warned of anything that I very much intentionally did.
Hello Amimul.
As I wrote, the (seemingly only working) way to disable sending password change notifications in WordPress based on conditions instead of wholesale is to filter the array used to send it and remove the recipient (to) there. THis is the code:add_filter('wp_password_change_notification_email', function($wp_password_change_notification_email, $user) { if($user->roles == array('subscriber')) { $wp_password_change_notification_email['to'] = ''; } return $wp_password_change_notification_email; }, 10, 2);
My tests gave me those in the log file view:
I’m fully aware that trying to send an email without an adressee will fail. I am not saying the log entry is wrong. But as you can see from my code, it is my intention that those mails aren’t sent, so I’m basically getting false positives in the sense that there is no problem. This is something I’d prefer to prevent. And I’m not sure what to do.
Again, I don’t see a flaw in your plugin. Just the chance that you might know a better way to achieve what I want – suppressing mails under certain conditions – without creating log entries.
Hi.
Thanks for the quick reply. You got me confused. I was talking about bots like GoogleBot, the referrers are something different. But I’m a huge idiot as I just noticed (after all that time) that there is an option that automatically updates the bot list on plugin update m( Well, at least now I’ve found that.Have a beautiful day and again, thanks for the quick reply.
@twinpictures Can’t find the award option. Wait… this isn’t Reddit? ?? Thank you for the fix, looking forward to the update!
- This reply was modified 2 years, 6 months ago by motivmedia.
Came here to report the same. Commenting to receive follow-up notifications ??
Forum: Plugins
In reply to: [Limit Login Attempts Reloaded] Allow other user roles to handle lockoutI second this request as I came here with the intention to ask for the same (although I was under the impression it was tied to manage_options).
Possible alternative to OP’s suggestion of a filter hook: LLAR could also introduce a custom capability for that. Checking if a user can manage the blocklist would be somthhing like this:
current_usercan(‘activate_plugins’) || current_usercan(‘llar_manage’)Forum: Plugins
In reply to: [WooCommerce Product Dependencies] Quotation marks displayed as entitiesHi and thanks for the reply.
That’s a bit confusing now. I’ve installed your plugin, noticed the entities, went to look for translation files and found them in wp-content/languages/plugins. I didn’t put them there and I definitely didn’t create the files – although I’m familiar with the process because I have translated plugins before.If we have multi-language sites we use WPML, but this isn’t one, WPML isn’t installed and nothing else that would translate something automatically. The thought of automatic translation seems dreadful to me.
To be clear, I edited the translation in the po/mo and am using this currently. No issue there. But wherever the translation came from, an update would overwrite my changes. Is there maybe something like community translations here in the official repo I’m not aware of?
Can confirm as well. It seems to be active for new posts by default. At least as of 2.7 it won’t reactivate when updating the post.
This is very much not resolved.
- This reply was modified 2 years, 11 months ago by motivmedia.