Mechanism to send to users of secured WordPress install new notifications by SMS or email?

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.

Read More

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?

Related posts

Leave a Reply

2 comments

  1. I’d say there’s three specific requirements here;

    1. Allow users to choose notification times, timezone aware
    2. Hook into transition_post_status to listen up for new posts, and then take action
    3. Find a decent SMS API

    For 1), hook into show_user_profile to output your time picker field(s), and personal_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 (see wp-admin/options-general.php, lines 138 to 250 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.