Changeset 1209513
- Timestamp:
- 07/30/2015 08:21:00 AM (11 years ago)
- File:
-
- 1 edited
-
simple-parse-push-service/trunk/simpleParsePS.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-parse-push-service/trunk/simpleParsePS.php
r963086 r1209513 2 2 /** 3 3 * @package Simple_Parse_Push_Service 4 * @version 1.3. 14 * @version 1.3.2 5 5 */ 6 6 /* … … 9 9 Description: This is a simple implementation for Parse.com Push Service (for iOS, Android, Windows, Windows Phone or any other devices may add). You can send a push notification via admin panel or with a post update/creation. In order to use this plugin you MUST have an account with Parse.com and cURL ENABLED. 10 10 Author: Tsolis Dimitris - Sotiris 11 Version: 1.3. 111 Version: 1.3.2 12 12 Author URI: 13 13 License: GPLv2 or later … … 21 21 $scheduledPosts = array(); 22 22 23 if (!defined('SPPS_VERSION')) define('SPPS_VERSION', '1.3. 1');23 if (!defined('SPPS_VERSION')) define('SPPS_VERSION', '1.3.2'); 24 24 25 25 ///////////////////////////////////////////////////////// … … 63 63 64 64 $savedPostTypes = get_option('simpar_metabox_pt'); 65 if ( count( $savedPostTypes ) ) { 65 66 if ( count( $savedPostTypes ) == 0) { // bug fix: admin area is really slow... 66 67 $savedPostTypes[] = 'post'; 67 68 addOrUpdateOption('simpar_metabox_pt', $savedPostTypes); 68 69 $savedPostTypes = get_option('simpar_metabox_pt'); 69 } 70 } else { 71 // distincts the post-types array 72 // remaining from the bug above that was filling the array with the same data 73 $savedPostTypes = array_unique($savedPostTypes); 74 } 75 70 76 foreach ($savedPostTypes as $postType) { 71 77 add_meta_box( … … 135 141 function addOrUpdateOption($option_name, $value) { 136 142 if ( get_option( $option_name ) !== false ) { 137 update_option( $option_name, $value ); 143 if ( get_option( $option_name ) !== $value) 144 update_option( $option_name, $value ); 138 145 } else { 139 146 add_option( $option_name, $value ); … … 251 258 252 259 function simpar_save_post($new_status, $old_status, $post) { 260 if ( $old_status == 'draft' && $new_status == 'publish' ) { 261 simpar_send_post($post->ID); 262 } 263 253 264 if ( get_option('simpar_discardScheduledPosts') == 'true' ) 254 265 return; // disabled by user
Note: See TracChangeset
for help on using the changeset viewer.