Code Monkey home page Code Monkey logo

dm-twilio's Introduction

DM Twilio

WordPress plugin to send SMS via Twilio and track message delivery within WordPress.

This plugin is designed for developers and doesn't provide any "out of the box" functionality for end-users.

Installation

The best way to install this plugin is via Composer composer require deliciousmedia/dm-twilio. You could also download it directly, but you'll need to manually include the Twilio PHP SDK.

Once activated, you'll be prompted to fill in your Twilio account SID and token. You'll then be able to choose an outbound number from the available SMS enabled numbers in your Twilio account.

Usage

Message data is stored in the dmtwilio_message custom post type, and status tracked via the dmtwilio_message_status taxonomy allowing you to access the information via existing WordPress functionality if desired.

Send a message with dmtwilio_send_message($to_number, $message); this function returns the Twilio message SID which can then be used to track the message status with dmtwilio_get_message_status($sid);.

Development

You can set the DMTWILIO_CALLBACK_ENDPOINT constant to override the Twilio callback URL for local development via a service such as ngrok.

The dmtwilio_message custom post type is hidden by default, but you can expose it be either setting DM_ENVIRONMENT to "DEV" or by overwriting the pluggable dm_is_dev function to return true in your development environment.

Todo

  • Housekeeping functions to remove old messages.
  • Better handling of missing Twilio SDK.
  • Option to remove all data on uninstall.
  • Validate number before sending.

Built by the team at Delicious Media, a specialist WordPress development agency based in Sheffield, UK.

dm-twilio's People

Contributors

davepullig avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.