Plugin Directory

Changeset 2551245


Ignore:
Timestamp:
06/21/2021 07:59:02 AM (5 years ago)
Author:
wilsos6
Message:

Version 2.2.9 commit.

Location:
joy-of-text/trunk
Files:
2 added
4 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • joy-of-text/trunk/classes/class-jot-plugin-admin.php

    r2474746 r2551245  
    406406            echo "<div class='jot-footer-upgrade'>" . __("Upgrade to the ","jot-plugin") . "<a href='https://www.getcloudsms.com/downloads/joy-of-text-pro-version-3/' target='_blank'>" .  __("Joy Of Text Pro Version","jot-plugin") . "</a>.";       
    407407           
    408             $end_date = new DateTime("03/31/2021");
     408            $end_date = new DateTime("07/31/2021");
    409409            $now = new DateTime();
    410410
  • joy-of-text/trunk/classes/class-jot-plugin-settings.php

    r2474746 r2551245  
    616616                        }
    617617                    }
     618                    // Render account status
     619            $twilio_acc_details_json = Joy_Of_Text_Plugin()->currentsmsprovider->getAccountDetails();         
     620            $twilio_acc_details = json_decode($twilio_acc_details_json);
     621            $twilio_acc_status = isset($twilio_acc_details->status) ? $twilio_acc_details->status : "";
     622            $twilio_acc_name   = isset($twilio_acc_details->friendly_name) ? $twilio_acc_details->friendly_name : "";
     623            $twilio_acc_type   = isset($twilio_acc_details->type) ? $twilio_acc_details->type : "";
     624            $display_acc_status = (($twilio_acc_status != "" && !is_numeric($twilio_acc_status)) ? $twilio_acc_status : "<<Not set>>" );
     625            $display_acc_name = (($twilio_acc_name != "") ? $twilio_acc_name  : "<<Not set>>" );
     626            $display_acc_type = (($twilio_acc_type != "") ? $twilio_acc_type  : "<<Not set>>" );
     627            $html .= $this->render_row('jot-accountstatus','',ucfirst($display_acc_status),$tab);
     628            $html .= $this->render_row('jot-accountname','',ucfirst($display_acc_name),$tab);
     629            $html .= $this->render_row('jot-accounttype','',ucfirst($display_acc_type),$tab);
    618630                   
    619631                    // Get account balance info
  • joy-of-text/trunk/classes/smsproviders/class-jot-provider-twilio.php

    r2327333 r2551245  
    252252                        'description' => __( 'Select the Twilio number you wish to send your SMS messages from.', 'jot-plugin' )
    253253                    );
     254                    $settings_fields['jot-accountstatus'] = array(
     255                        'name' => __( 'Twilio Account Status', 'jot-plugin' ),
     256                        'type' => 'textvalue',
     257                        'default' => '',
     258                        'section' => 'smsprovider',
     259                        'sectiontab'  => 'twiliosettings',
     260                        'subform' => 'main',                       
     261                        'description' => __( 'Twilio account status', 'jot-plugin' )
     262                    );
     263                    $settings_fields['jot-accountname'] = array(
     264                        'name' => __( 'Twilio Account Name', 'jot-plugin' ),
     265                        'type' => 'textvalue',
     266                        'default' => '',
     267                        'section' => 'smsprovider',
     268                        'sectiontab'  => 'twiliosettings',
     269                        'subform' => 'main',                       
     270                        'description' => __( 'Twilio account name', 'jot-plugin' )
     271                    );
     272                    $settings_fields['jot-accounttype'] = array(
     273                        'name' => __( 'Twilio Account Type', 'jot-plugin' ),
     274                        'type' => 'textvalue',
     275                        'default' => '',
     276                        'section' => 'smsprovider',
     277                        'sectiontab'  => 'twiliosettings',
     278                        'subform' => 'main',                       
     279                        'description' => __( 'Twilio account type', 'jot-plugin' )
     280                    );
    254281                    $settings_fields['jot-accountbalance'] = array(
    255282                        'name' => __( 'Twilio Account Balance', 'jot-plugin' ),
     
    320347    }
    321348   
     349    /**
     350    * Get account details from Twilio
     351    */
     352    public function getAccountDetails() {
     353           
     354           
     355            $selected_provider = Joy_Of_Text_Plugin()->currentsmsprovidername;
     356            $sid = Joy_Of_Text_Plugin()->settings->get_smsprovider_settings('jot-accountsid-' . $selected_provider);
     357                                   
     358            try {                     
     359               
     360                $data = array();
     361                $url = "https://api.twilio.com/2010-04-01/Accounts/$sid.json";
     362                $jot_response = Joy_Of_Text_Plugin()->messenger->call_curl($url,$data,'get');   
     363               
     364                return $jot_response;                 
     365           
     366            }  catch (Exception $e) {
     367                // Ignore error
     368            }
     369    }
     370   
    322371   
    323372} // end class
  • joy-of-text/trunk/joy-of-text.php

    r2474746 r2551245  
    1717 * Plugin URI:        http://www.getcloudsms.com
    1818 * Description:       Send SMS and text-to-voice messages to your customers, subscribers, followers, members and friends.
    19  * Version:           2.2.8
     19 * Version:           2.2.9
    2020 * Author:            Stuart Wilson
    2121 * Author URI:        http://www.getcloudsms.com
     
    3232  *
    3333  * Version
     34  * 2.2.9 - Added Twilio account details to Messaging-Settings-Twilio Settings tab
    3435  * 2.2.8 - Changes to the Extensions tab
    3536  * 2.2.7 - Minor change to the layout of the Messages tab.
     
    121122            $this->product = "JOT Lite";                       
    122123            $this->token = 'jot-plugin';
    123             $this->version = '2.2.8';
     124            $this->version = '2.2.9';
    124125            $this->debug = false;           
    125126           
  • joy-of-text/trunk/readme.txt

    r2474746 r2551245  
    44Tags:  twilio, message, sms, mms, text, mobile, sms scheduler, scheduler, woocommerce, membermouse, voice message, notification, subscribe, buddypress, gravity forms
    55Requires at least: 3.0.1
    6 Tested up to: 5.6.1
    7 Stable tag: 5.6.1
     6Tested up to: 5.7.2
     7Stable tag: 5.7.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    260260== Changelog ==
    261261
     262= 2.2.9 =
     263* Added Twilio account details to Messaging-Settings-Twilio Settings tab
     264
    262265= 2.2.8 =
    263266* Changes to the Extensions tab
     
    390393== Upgrade Notice ==
    391394
    392 = 2.2.8 =
    393 * Changes to the Extensions tab
    394 
     395= 2.2.9 =
     396* Added Twilio account details to Messaging-Settings-Twilio Settings tab
     397
Note: See TracChangeset for help on using the changeset viewer.