Changeset 2120548
- Timestamp:
- 07/10/2019 08:18:59 AM (7 years ago)
- Location:
- joy-of-text/trunk
- Files:
-
- 2 added
- 2 deleted
- 6 edited
-
classes/class-jot-plugin-admin.php (modified) (1 diff)
-
classes/class-jot-plugin-options.php (modified) (3 diffs)
-
classes/class-jot-plugin-settings.php (modified) (1 diff)
-
classes/class-jot-plugin-shortcodes.php (modified) (1 diff)
-
css/jot-2-2-3.css (deleted)
-
css/jot-2-2-4.css (added)
-
joy-of-text.php (modified) (3 diffs)
-
js/jot-messenger-2-2-3.js (deleted)
-
js/jot-messenger-2-2-4.js (added)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
joy-of-text/trunk/classes/class-jot-plugin-admin.php
r2083201 r2120548 162 162 } 163 163 164 public function write_group_list_fields($sections,$tab) { 165 166 164 public function write_group_list_fields($sections,$tab) { 165 167 166 echo "<form id=\"group-list-fields-form\" action=\"\" method=\"post\">"; 168 167 echo "<input type=\"hidden\" name=\"jot-form-id\" value=\"jot-group-add\">"; -
joy-of-text/trunk/classes/class-jot-plugin-options.php
r1904319 r2120548 452 452 # code... 453 453 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 } 455 473 456 474 … … 571 589 $msg= ""; 572 590 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 } 574 610 575 611 $response = array('errormsg'=> $msg, 'errorcode' => $error, 'errorfield' => $errorfield,'url'=> "", 'sqlerr' => $wpdb->last_error, 'lastid'=> $lastmemid, 'verifiednumber' => $verified_number ); … … 697 733 698 734 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 700 741 $success=$wpdb->delete( $table_mem, array( 'jot_grpid' => $formdata['jot_grpid'],'jot_grpmemid' => $formdata['jot_grpmemid'] ) ); 701 742 $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 } 702 749 } 703 750 -
joy-of-text/trunk/classes/class-jot-plugin-settings.php
r1966987 r2120548 1900 1900 } 1901 1901 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 1902 1923 } // End Class -
joy-of-text/trunk/classes/class-jot-plugin-shortcodes.php
r1913477 r2120548 69 69 // Select the primary group id - i.e. the first in the list 70 70 $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)) ) { 74 73 // Id is not an integer 75 74 $error = 1; 76 } else {75 } else { 77 76 78 77 //Get group invite details from database. -
joy-of-text/trunk/joy-of-text.php
r2083201 r2120548 17 17 * Plugin URI: http://www.getcloudsms.com 18 18 * Description: Send SMS and text-to-voice messages to your customers, subscribers, followers, members and friends. 19 * Version: 2.2. 319 * Version: 2.2.4 20 20 * Author: Stuart Wilson 21 21 * Author URI: http://www.getcloudsms.com … … 32 32 * 33 33 * Version 34 * 2.2.4 - Added filters which are called when a new subscriber is added or removed from the group. 34 35 * 2.2.3 - Fixed issue where settings were not saving correctly. 35 36 * 2.2.2 - Added field length counters on the message fields * … … 113 114 $this->product = "JOT Lite"; 114 115 $this->token = 'jot-plugin'; 115 $this->version = '2.2. 3';116 $this->version = '2.2.4'; 116 117 $this->debug = false; 117 118 -
joy-of-text/trunk/readme.txt
r2098038 r2120548 4 4 Tags: twilio, message, sms, mms, text, mobile, sms scheduler, scheduler, woocommerce, membermouse, voice message, notification, subscribe, buddypress, gravity forms 5 5 Requires at least: 3.0.1 6 Tested up to: 5.2. 17 Stable tag: 5.2. 16 Tested up to: 5.2.2 7 Stable tag: 5.2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 200 200 Please refer to [Twilio's charges](https://www.twilio.com/sms/pricing) for more detail. 201 201 202 = What hooks are available? = 203 204 The following hook is triggered, after someone subscribes using the subscription form, [jotform] - 205 `do_action('jot_after_subscriber_added',$subscriber_args)` 206 207 where $subscriber_args, is an array containing the member's ID, name and phone number. 208 209 The 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 212 where $subscriber_args, is an array containing the member's ID, name and phone number. 213 214 The 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 217 where $member is an array containing details of the member and $group is the group id, which will be set to 1. 218 202 219 == Screenshots == 203 220 … … 228 245 == Changelog == 229 246 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 230 250 = 2.2.3 = 231 251 * Fixed an issue where settings were not saving correctly. … … 340 360 == Upgrade Notice == 341 361 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.