Changeset 2429029
- Timestamp:
- 11/30/2020 11:24:47 PM (5 years ago)
- Location:
- cynderhost/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (1 diff)
-
cynderhost.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cynderhost/trunk/README.txt
r2428940 r2429029 33 33 == Changelog == 34 34 35 = 1.4.4 = 36 * Fixed: Hotfix for Smart Purge bug causing pages to not be purged on first update 37 35 38 = 1.4.3 = 36 39 * Improved: Reordered API call order for better purge consistency -
cynderhost/trunk/cynderhost.php
r2428940 r2429029 9 9 * Plugin URI: https://cynderhost.com 10 10 * Description: Provides an easy interface to clear the CynderHost CDN cache, both automatically and programmatically. 11 * Version: 1.4. 311 * Version: 1.4.4 12 12 * Author: CynderHost 13 13 * Author URI: https://profiles.wordpress.org/cynderhost/ … … 24 24 25 25 //Define version 26 define('CYNDERHOST_VERSION', '1.4. 3');26 define('CYNDERHOST_VERSION', '1.4.4'); 27 27 28 28 /** … … 131 131 )); 132 132 //we don't know the response anyways 133 133 134 return true; 134 135 } … … 149 150 $response = wp_remote_post("https://api.cynderhost.com/high-performance/cache/local/purge-some/", array( 150 151 'method' => 'POST', 151 'timeout' => 10,152 'timeout' => 0.12, 152 153 'redirection' => 5, 153 154 'blocking' => false, … … 158 159 $response = wp_remote_post("https://api.cynderhost.com/high-performance/cache/cdn/purge-some/", array( 159 160 'method' => 'POST', 160 'timeout' => 10,161 'timeout' => 0.12, 161 162 'redirection' => 5, 162 163 'blocking' => false, … … 178 179 function cynderhost_comment_update_function($ns, $os, $comment) 179 180 { 180 if ($ns != "approved" && $os != "approved" ){181 return null;182 }181 if ($ns != "approved" && $os != "approved" ){ 182 return null; 183 } 183 184 if ($comment->comment_parent > 0) 184 185 { … … 282 283 */ 283 284 function schedule_cache_cynderhost_selective_purge($postid, $post = "") 284 { 285 $sh = wp_schedule_single_event(time(), 'cynderhost_purge_cron_multi', array( $postid, $post ) ); 286 spawn_cron(); 285 { 286 if ($post->post_status == "publish" || $post->post_status == "private" || $post->post_status == "trash"){ 287 wp_schedule_single_event(time(), 'cynderhost_purge_cron_multi', array( $postid, $post ) ); 288 spawn_cron(); 289 } 287 290 } 288 291 … … 321 324 { 322 325 echo '<div class="notice notice-info is-dismissible"> 323 <p>' . $v['message'] . '</p>324 </div>';326 <p>' . $v['message'] . '</p> 327 </div>'; 325 328 } 326 329 } … … 438 441 $this->cynderhost_cdn_settings_options = get_option('cynderhost_cdn_settings_option_name'); ?> 439 442 440 <div class="wrap">441 <h2>CynderHost CDN Settings</h2>442 <p>Configure caching purging settings for CynderHost CDN</p>443 <p>API key can be found in the hosting panel under CDN</p>444 <?php settings_errors(); ?>445 446 <form method="post" action="options.php">447 <?php443 <div class="wrap"> 444 <h2>CynderHost CDN Settings</h2> 445 <p>Configure caching purging settings for CynderHost CDN</p> 446 <p>API key can be found in the hosting panel under CDN</p> 447 <?php settings_errors(); ?> 448 449 <form method="post" action="options.php"> 450 <?php 448 451 settings_fields('cynderhost_cdn_settings_option_group'); 449 452 do_settings_sections('cynderhost-cdn-settings-admin'); 450 453 submit_button($text = "Save & Purge Cache"); 451 454 ?> 452 </form>453 </div>454 <?php455 </form> 456 </div> 457 <?php 455 458 } 456 459
Note: See TracChangeset
for help on using the changeset viewer.