Plugin Directory

Changeset 2120548


Ignore:
Timestamp:
07/10/2019 08:18:59 AM (7 years ago)
Author:
wilsos6
Message:

Version 2.2.4 commit

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

Legend:

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

    r2083201 r2120548  
    162162        }
    163163       
    164         public function write_group_list_fields($sections,$tab) {
    165            
    166            
     164        public function write_group_list_fields($sections,$tab) {           
     165           
    167166            echo "<form id=\"group-list-fields-form\" action=\"\" method=\"post\">";
    168167            echo "<input type=\"hidden\"  name=\"jot-form-id\" value=\"jot-group-add\">";
  • joy-of-text/trunk/classes/class-jot-plugin-options.php

    r1904319 r2120548  
    452452                # code...
    453453                break;
    454         }         
     454        }
     455       
     456        // Action hook fired if subscriber is added successfully.
     457        if ($error == 0) {
     458            $allgroups = array();
     459            $allgroups[] = $output['jot-group-id'];
     460            $subscriber_args = array('jot_grpid'         => $allgroups,
     461                                     'jot_grpmemid'      => $lastmemid,
     462                                     'jot_grpmemname'    => sanitize_text_field (substr($output['jot-subscribe-name'],0,40)),
     463                                     'jot_grpmemnum'     => $verified_number,                               
     464                                     'jot_grpmememail'   => '',
     465                                     'jot_grpmemaddress' => '',
     466                                     'jot_grpmemcity'    => '',
     467                                     'jot_grpmemstate'   => '',
     468                                     'jot_grpmemzip'     => '',
     469                                     'jot_grpmemts'      => current_time('mysql', 0)
     470                                     );
     471            do_action('jot_after_subscriber_added',$subscriber_args);
     472        }
    455473             
    456474                             
     
    571589                       $msg= "";
    572590                break;
    573         }   
     591        }
     592       
     593        // Action hook fired if subscriber is added successfully.
     594        if ($error == 0) {
     595            $allgroups = array();
     596            $allgroups[] = $jot_grpid;
     597            $subscriber_args = array('jot_grpid'         => $allgroups,
     598                                     'jot_grpmemid'      => $lastmemid,
     599                                     'jot_grpmemname'    => sanitize_text_field (substr($jot_grpmemname,0,40)),
     600                                     'jot_grpmemnum'     => $verified_number,                               
     601                                     'jot_grpmememail'   => '',
     602                                     'jot_grpmemaddress' => '',
     603                                     'jot_grpmemcity'    => '',
     604                                     'jot_grpmemstate'   => '',
     605                                     'jot_grpmemzip'     => '',
     606                                     'jot_grpmemts'      => current_time('mysql', 0)
     607                                     );
     608            do_action('jot_after_member_added',$subscriber_args);
     609        }       
    574610               
    575611        $response = array('errormsg'=> $msg, 'errorcode' => $error, 'errorfield' => $errorfield,'url'=> "", 'sqlerr' => $wpdb->last_error, 'lastid'=> $lastmemid, 'verifiednumber' => $verified_number );
     
    697733   
    698734           
    699         if ( $error==0 ) {               
     735        if ( $error==0 ) {
     736           
     737                // Get member details
     738                $member = Joy_Of_Text_Plugin()->messenger->get_member($formdata['jot_grpmemid']);
     739               
     740                // Delete member
    700741                $success=$wpdb->delete( $table_mem,  array( 'jot_grpid' =>  $formdata['jot_grpid'],'jot_grpmemid' => $formdata['jot_grpmemid'] ) );
    701742                $success=$wpdb->delete( $table_xref, array( 'jot_grpid' =>  $formdata['jot_grpid'],'jot_grpmemid' => $formdata['jot_grpmemid'] ) );
     743               
     744                if ($success > 0) {
     745                    // Action hook for deleted user                   
     746                    $group = (array) Joy_Of_Text_Plugin()->settings->get_group_details($formdata['jot_grpid']);
     747                    do_action('jot_after_member_deletion_from_group',$member, $group);
     748                }
    702749        }
    703750       
  • joy-of-text/trunk/classes/class-jot-plugin-settings.php

    r1966987 r2120548  
    19001900    }
    19011901       
     1902        public function get_group_details($jotgrpid) {
     1903           
     1904        if (!$jotgrpid) {
     1905        return;
     1906        }
     1907       
     1908            //Get group list from database.
     1909            global $wpdb;
     1910            $table = $wpdb->prefix."jot_groups";
     1911            $sql = " SELECT jot_groupid, jot_groupname,jot_groupdesc, jot_ts " .
     1912                   " FROM " . $table .
     1913                   " WHERE jot_groupid = " . $jotgrpid;
     1914           
     1915            $sql = apply_filters('jot_get_group_details_sql',$sql, $jotgrpid);
     1916           
     1917            $groupdetails = $wpdb->get_row( $sql );   
     1918   
     1919            return apply_filters('jot_get_group_details',$groupdetails,$jotgrpid);
     1920           
     1921        }
     1922       
    19021923} // End Class
  • joy-of-text/trunk/classes/class-jot-plugin-shortcodes.php

    r1913477 r2120548  
    6969           // Select the primary group id - i.e. the first in the list   
    7070           $group_id = isset($all_group_id[0]) ? $all_group_id[0] : "";
    71          
    72        
    73                 if ( !$group_id ) {
     71             
     72           if ( ! ctype_digit(strval($group_id)) ) {
    7473                    // Id is not an integer         
    7574                    $error = 1;
    76                 } else {
     75               } else {
    7776               
    7877                    //Get group invite details from database.
  • joy-of-text/trunk/joy-of-text.php

    r2083201 r2120548  
    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.3
     19 * Version:           2.2.4
    2020 * Author:            Stuart Wilson
    2121 * Author URI:        http://www.getcloudsms.com
     
    3232  *
    3333  * Version
     34  * 2.2.4 - Added filters which are called when a new subscriber is added or removed from the group.
    3435  * 2.2.3 - Fixed issue where settings were not saving correctly.
    3536  * 2.2.2 - Added field length counters on the message fields  *       
     
    113114            $this->product = "JOT Lite";                       
    114115            $this->token = 'jot-plugin';
    115             $this->version = '2.2.3';
     116            $this->version = '2.2.4';
    116117            $this->debug = false;           
    117118           
  • joy-of-text/trunk/readme.txt

    r2098038 r2120548  
    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.2.1
    7 Stable tag: 5.2.1
     6Tested up to: 5.2.2
     7Stable tag: 5.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    200200Please refer to [Twilio's charges](https://www.twilio.com/sms/pricing) for more detail.
    201201
     202= What hooks are available? =
     203
     204The following hook is triggered, after someone subscribes using the subscription form, [jotform] -
     205`do_action('jot_after_subscriber_added',$subscriber_args)`
     206
     207where $subscriber_args, is an array containing the member's ID, name and phone number.
     208
     209The following hooks triggered, after a new member has been added to the group, using the JOT admin screens -
     210`do_action('jot_after_member_added',$subscriber_args)`
     211
     212where $subscriber_args, is an array containing the member's ID, name and phone number.
     213
     214The following hooks triggered, after a member has been removed from the group, using the JOT admin screens -
     215`do_action('jot_after_member_deletion_from_group',$member, $group)`
     216
     217where $member is an array containing details of the member and $group is the group id, which will be set to 1.
     218
    202219== Screenshots ==
    203220
     
    228245== Changelog ==
    229246
     247= 2.2.4 =
     248* Added new action hooks, which are triggered when a user is added (through the admin screens or subscription form) and deleted.
     249
    230250= 2.2.3 =
    231251* Fixed an issue where settings were not saving correctly.
     
    340360== Upgrade Notice ==
    341361
    342 = 2.2.3 =
    343 * Fixed an issue where settings were not saving correctly.
     362= 2.2.4 =
     363* Added new action hooks, which are triggered when a user is added (through the admin screens or subscription form) and deleted.
Note: See TracChangeset for help on using the changeset viewer.