PluginProbe
Ultimate WP Mail / trunk
Ultimate WP Mail vtrunk
1.3.13 1.3.12 trunk 0.11 0.25 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 All 46 releases
ultimate-wp-mail / includes / SMSQueue.class.php

SMSQueue.class.php in Ultimate WP Mail trunk, at includes/SMSQueue.class.php

55 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( !defined( 'ABSPATH' ) ) exit;
3
4 if ( !class_exists( 'ewduwpmSMSQueue' ) ) {
5 /**
6 * Class to queue/process emails that are sent using the wp_mail function
7 *
8 * @since 1.1.0
9 */
10
11 require_once( EWD_UWPM_PLUGIN_DIR . '/lib/wp-background-processing/wp-async-request.php' );
12 require_once( EWD_UWPM_PLUGIN_DIR . '/lib/wp-background-processing/wp-background-process.php' );
13
14 class ewduwpmSMSQueue extends EWD_WP_Background_Process {
15
16 /**
17 * @var string
18 */
19 protected $action = 'sms_queue_process';
20
21 /**
22 * Task
23 *
24 * Perform any actions required on each queue item. Return the modified
25 * item for further processing in the next pass through. Or, return false
26 * to remove the item from the queue.
27 *
28 * @param mixed $item Queue item to iterate over
29 *
30 * @return mixed
31 */
32 protected function task( $item ) {
33 global $ewd_uwpm_controller;
34
35 $url = add_query_arg(
36 array(
37 'plugin' => 'uwpm',
38 'license_key' => urlencode( get_option( 'uwpm-ultimate-license-key', 'no license key entered' ) ),
39 'admin_email' => urlencode( $ewd_uwpm_controller->settings->get_setting( 'ultimate-purchase-email' ) ),
40 'phone_number' => urlencode( $item['to'] ),
41 'message' => urlencode( $item['message'] ),
42 'country_code' => urlencode( $ewd_uwpm_controller->settings->get_setting( 'sms-country-code' ) )
43 ),
44 'http://www.etoilewebdesign.com/sms-handling/sms-client.php'
45 );
46
47 $opts = array( 'http' =>array( 'method' => "GET" ) );
48 $context = stream_context_create( $opts );
49 $return = json_decode( file_get_contents( $url, false, $context ) );
50
51 return false;
52 }
53 }
54
55 }