I have a family website, private, requires a WordPress account, in WordPress. Some of my family members would like to get the option for notifications of new posts by email or text message.
Email seems easy enough, there are plugins and services for that.
But I’m concerned about text messages because we are geographically spread out, and I would like the option to queue the messages so that they are sent to users only within hours they choose.
External services or services based off RSS are not a great fit because the RSS feeds are not public and I’d like to keep it that way.
Is there a plugin suited to these specific requirements?
I’d say there’s three specific requirements here;
transition_post_status
to listen up for new posts, and then take actionFor 1), hook into
show_user_profile
to output your time picker field(s), andpersonal_options_update
to save them.You could detect the user’s timezone automatically, either via IP address or JavaScript, but I’d recommend just a
<select />
that allows them to pick their locale manually (seewp-admin/options-general.php
, lines138
to250
for how WordPress generates a timezone select).As for 2), check out my other answer on new post notification. You’ll obviously want to modify this to notify all your users (as opposed to just the admin), but it should start you off nicely.
Finally 3), unless you can find an SMS API where you can specify the time the message gets sent, you’ll have to take advantage of WP Cron. Rather than setting an event for each user, I’d advise setting up an hourly one, that simply looks for any users who should now be notified & fires an SMS request.
Check out the developer api at http://www.sendmode.com/developers , sign up for a free acccount and you will get 25 credits to test it as a solution.