Changeset 1490873
- Timestamp:
- 09/06/2016 10:06:02 AM (10 years ago)
- Location:
- all-push-notification
- Files:
-
- 43 added
- 2 edited
-
tags/1.2 (added)
-
tags/1.2/all-push-notification-for-wp.php (added)
-
tags/1.2/css (added)
-
tags/1.2/css/custom.css (added)
-
tags/1.2/css/images (added)
-
tags/1.2/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png (added)
-
tags/1.2/css/images/ui-bg_diagonals-thick_20_666666_40x40.png (added)
-
tags/1.2/css/images/ui-bg_flat_10_000000_40x100.png (added)
-
tags/1.2/css/images/ui-bg_glass_100_f6f6f6_1x400.png (added)
-
tags/1.2/css/images/ui-bg_glass_100_fdf5ce_1x400.png (added)
-
tags/1.2/css/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.2/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png (added)
-
tags/1.2/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (added)
-
tags/1.2/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (added)
-
tags/1.2/css/images/ui-icons_222222_256x240.png (added)
-
tags/1.2/css/images/ui-icons_228ef1_256x240.png (added)
-
tags/1.2/css/images/ui-icons_444444_256x240.png (added)
-
tags/1.2/css/images/ui-icons_555555_256x240.png (added)
-
tags/1.2/css/images/ui-icons_777620_256x240.png (added)
-
tags/1.2/css/images/ui-icons_777777_256x240.png (added)
-
tags/1.2/css/images/ui-icons_cc0000_256x240.png (added)
-
tags/1.2/css/images/ui-icons_ef8c08_256x240.png (added)
-
tags/1.2/css/images/ui-icons_ffd27a_256x240.png (added)
-
tags/1.2/css/images/ui-icons_ffffff_256x240.png (added)
-
tags/1.2/css/jquery-ui.css (added)
-
tags/1.2/css/pqselect.bootstrap.dev.css (added)
-
tags/1.2/css/pqselect.bootstrap.min.css (added)
-
tags/1.2/css/pqselect.dev.css (added)
-
tags/1.2/css/pqselect.min.css (added)
-
tags/1.2/index.php (added)
-
tags/1.2/js (added)
-
tags/1.2/js/jquery.validate.min.js (added)
-
tags/1.2/js/pqselect.dev.js (added)
-
tags/1.2/js/pqselect.min.js (added)
-
tags/1.2/pushnotification (added)
-
tags/1.2/pushnotification-admin (added)
-
tags/1.2/pushnotification-admin/class-custom-pushnotification.php (added)
-
tags/1.2/pushnotification-admin/class-pushnotification-admin.php (added)
-
tags/1.2/pushnotification-admin/class-pushnotification-settings.php (added)
-
tags/1.2/pushnotification/class-pushnotification-android.php (added)
-
tags/1.2/pushnotification/class-pushnotification-ios.php (added)
-
tags/1.2/pushnotification/class-pushnotification.php (added)
-
tags/1.2/readme.txt (added)
-
trunk/all-push-notification-for-wp.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
all-push-notification/trunk/all-push-notification-for-wp.php
r1487061 r1490873 4 4 Plugin URI: https://wordpress.org/plugins/all-push-notification/ 5 5 Description: Send push notifications to iOS and Android with custom Editor from wp-admin & When admin publish a new post/page and even new comment is added to any post. 6 Version: 1. 16 Version: 1.2 7 7 Author: GTL Developers (GTL) 8 8 */ … … 25 25 // And here goes the activation function: 26 26 function all_pushnotification_forwp_install() { 27 27 28 global $wpdb; 28 29 $all_pushnotification_logs = $wpdb->prefix . 'all_pushnotification_logs'; … … 40 41 41 42 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 42 dbDelta( $pushnotification_log_sql ); 43 dbDelta( $pushnotification_log_sql ); 44 45 43 46 $pushnotification_token_sql = "CREATE TABLE $all_pushnotification_token ( 44 47 `push_token_id` int(11) NOT NULL AUTO_INCREMENT, … … 60 63 wp_mkdir_p( $user_dirname ); 61 64 } 62 65 63 66 } 64 67 … … 147 150 $last_updatedate=current_time( 'mysql' ); 148 151 $all_pushnotification_token = $wpdb->prefix . 'all_pushnotification_token'; 149 $wpdb->replace($all_pushnotification_token,array('push_token_id' => $user_id,'device_token' => $user_device_token,'os_type' => $user_os_type,'user_id' => $user_id,'last_updatedate' => $last_updatedate),array('%d','%s','%s','%d','%s')); 152 153 $wpdb->replace($all_pushnotification_token,array('push_token_id' => null,'device_token' => $user_device_token,'os_type' => $user_os_type,'user_id' => $user_id,'last_updatedate' => $last_updatedate),array('%d','%s','%s','%d','%s')); 150 154 //echo $wpdb->last_error; 151 155 … … 162 166 $last_updatedate=current_time( 'mysql' ); 163 167 $all_pushnotification_token = $wpdb->prefix . 'all_pushnotification_token'; 164 $wpdb->replace($all_pushnotification_token,array('push_token_id' => $user_id,'device_token' => $user_device_token,'os_type' => $user_os_type,'user_id' => $user_id,'last_updatedate' => $last_updatedate),array('%d','%s','%s','%d','%s')); 168 169 $wpdb->replace($all_pushnotification_token,array('push_token_id' => null,'device_token' => $user_device_token,'os_type' => $user_os_type,'user_id' => $user_id,'last_updatedate' => $last_updatedate),array('%d','%s','%s','%d','%s')); 165 170 //echo $wpdb->last_error; 166 171 } 167 172 168 173 # user login API action. 169 function all_PushNotifications_user_login($user_login, $ID) { 174 add_action('wp_login', 'all_PushNotifications_user_login', 10, 2); 175 function all_PushNotifications_user_login($user_login, $user) { 170 176 global $wpdb; 171 $ user_id;177 $datapost=getallheaders(); 172 178 $user_device_token=$datapost['device_token']; 173 $user_os_type=$datapost['os_type']; 174 $all_pushnotification_token = $wpdb->prefix . 'all_pushnotification_token'; 175 $wpdb->update($all_pushnotification_token,array('device_token' => $user_device_token,'os_type' => $user_os_type,'last_updatedate' => $last_updatedate),array('push_token_id' => $user_id),array('%s','%s','%s'), array( '%d' )); 179 $user_os_type=$datapost['os_type']; 180 $last_updatedate=current_time( 'mysql' ); 181 $user_login=$user->user_login; 182 $user_id=$user->ID; 183 $all_pushnotification_token = $wpdb->prefix . 'all_pushnotification_token'; 184 185 $wpdb->update($all_pushnotification_token,array('device_token' => $user_device_token,'os_type' => $user_os_type,'last_updatedate' => $last_updatedate),array('user_id' => $user_id),array('%s','%s','%s'), array( '%d' )); 176 186 //echo $wpdb->last_error; 177 187 178 188 } 189 179 190 180 191 # user loginout action. … … 299 310 $request_uri_referrer = $_SERVER['HTTP_REFERER']; 300 311 $request_uri_referrer_parts = explode( 'page=' , $request_uri_referrer ); 301 $current_page_url=$request_uri_referrer_parts[1]; 302 303 if ($current_page_url=='all-PushNotifications-WP-settings') { 304 305 $mydir = '/ioscerti'; 306 $param['path'] = $param['basedir'] . $mydir; 307 $param['url'] = $param['baseurl'] . $mydir; 308 309 } 312 if(isset($request_uri_referrer_parts[1])) { 313 $current_page_url=$request_uri_referrer_parts[1]; 314 315 if ($current_page_url=='all-PushNotifications-WP-settings') { 316 317 $mydir = '/ioscerti'; 318 $param['path'] = $param['basedir'] . $mydir; 319 $param['url'] = $param['baseurl'] . $mydir; 320 321 } 322 } 323 310 324 } 311 325 -
all-push-notification/trunk/readme.txt
r1487061 r1490873 5 5 Requires at least: 3.5 6 6 Tested up to: 4.6 7 Stable tag: 1. 17 Stable tag: 1.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 66 66 == Changelog == 67 67 68 = 1.2 = 69 * Bug Fix: In login, device token was not getting updated - Which is solved now. 70 68 71 = 1.1 = 69 72 * Added plugin support for Firebase Cloud Messaging(FCM) , On deactivation All the settings will be removed , On delete the plugin tables and all settigns will drop. … … 75 78 76 79 == Upgrade Notice == 77 78 = 1.1 = 79 * Added plugin support for Firebase Cloud Messaging(FCM) , On deactivation All the settings will be removed , On delete the plugin tables and all settigns will drop. 80 81 *Updated custom and default message when User send notifiction via Custom message , add/edit post or page 80 Bug Fix: In login, device token was not getting updated - Which is solved now. 82 81 83 82 == Translations ==
Note: See TracChangeset
for help on using the changeset viewer.