Changeset 2552305
- Timestamp:
- 06/22/2021 07:02:03 PM (5 years ago)
- Location:
- speedien
- Files:
-
- 3 edited
- 9 copied
-
tags/1.0.6 (copied) (copied from speedien/trunk)
-
tags/1.0.6/advanced-cache.php (copied) (copied from speedien/trunk/advanced-cache.php)
-
tags/1.0.6/readme.txt (copied) (copied from speedien/trunk/readme.txt) (2 diffs)
-
tags/1.0.6/speedien.php (copied) (copied from speedien/trunk/speedien.php) (1 diff)
-
tags/1.0.6/speedien_admin_bar.php (copied) (copied from speedien/trunk/speedien_admin_bar.php)
-
tags/1.0.6/speedien_admin_notice.php (copied) (copied from speedien/trunk/speedien_admin_notice.php)
-
tags/1.0.6/speedien_cache.php (copied) (copied from speedien/trunk/speedien_cache.php) (2 diffs)
-
tags/1.0.6/speedien_purge_hooks.php (copied) (copied from speedien/trunk/speedien_purge_hooks.php)
-
tags/1.0.6/speedien_ui.php (copied) (copied from speedien/trunk/speedien_ui.php)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/speedien.php (modified) (1 diff)
-
trunk/speedien_cache.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
speedien/tags/1.0.6/readme.txt
r2552304 r2552305 5 5 Tested up to: 5.7 6 6 Requires PHP: 5.6 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 137 137 == Changelog == 138 138 139 = 1.0.6 - 22 Jun, 2021 = 140 - Enabled 'always-on' CDN for all pages 141 139 142 = 1.0.5 - 19 Jun, 2021 = 140 143 - Improved 404 and error handling -
speedien/tags/1.0.6/speedien.php
r2552304 r2552305 7 7 * Text Domain: speedien 8 8 * Domain Path: / 9 * Version: 1.0. 59 * Version: 1.0.6 10 10 */ 11 11 -
speedien/tags/1.0.6/speedien_cache.php
r2552304 r2552305 57 57 ob_start("speedien_submit_to_cloud"); 58 58 } 59 else 60 { 61 ob_start("speedien_cdn_rewrite"); 62 } 59 63 } 60 64 … … 93 97 } 94 98 $response = wp_remote_post(SPEEDIEN_API_URL . '/process', array('body' => array('api_key' => $api_key, 'site_id' => $site_id, 'host' => $host, 'path' => $path, 'buffer' => $buffer,),'timeout' => 10,)); 99 return $buffer; 100 } 101 102 function speedien_cdn_rewrite($buffer) 103 { 104 $cdnurl = get_option('speedien_cdnurl'); 105 106 if(empty($cdnurl)) 107 { 108 $options = get_option('speedien_options'); 109 $data = array('api_key'=>$options['speedien_field_api_key'], 'site_id' => $options['speedien_field_site_id']); 110 111 $response = wp_remote_post(SPEEDIEN_API_URL . '/cdnurl', array('body' => $data, 'timeout' => 10)); 112 $cdnurl = $response['body']; 113 update_option('speedien_cdnurl',$cdnurl); 114 } 115 116 $buffer = str_replace(get_site_url().'/wp-content',$cdnurl.'/wp-content',$buffer); 117 $buffer = str_replace(get_site_url().'/wp-includes',$cdnurl.'/wp-includes',$buffer); 95 118 return $buffer; 96 119 } -
speedien/trunk/readme.txt
r2550897 r2552305 5 5 Tested up to: 5.7 6 6 Requires PHP: 5.6 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 137 137 == Changelog == 138 138 139 = 1.0.6 - 22 Jun, 2021 = 140 - Enabled 'always-on' CDN for all pages 141 139 142 = 1.0.5 - 19 Jun, 2021 = 140 143 - Improved 404 and error handling -
speedien/trunk/speedien.php
r2550897 r2552305 7 7 * Text Domain: speedien 8 8 * Domain Path: / 9 * Version: 1.0. 59 * Version: 1.0.6 10 10 */ 11 11 -
speedien/trunk/speedien_cache.php
r2551096 r2552305 57 57 ob_start("speedien_submit_to_cloud"); 58 58 } 59 else 60 { 61 ob_start("speedien_cdn_rewrite"); 62 } 59 63 } 60 64 … … 93 97 } 94 98 $response = wp_remote_post(SPEEDIEN_API_URL . '/process', array('body' => array('api_key' => $api_key, 'site_id' => $site_id, 'host' => $host, 'path' => $path, 'buffer' => $buffer,),'timeout' => 10,)); 99 return $buffer; 100 } 101 102 function speedien_cdn_rewrite($buffer) 103 { 104 $cdnurl = get_option('speedien_cdnurl'); 105 106 if(empty($cdnurl)) 107 { 108 $options = get_option('speedien_options'); 109 $data = array('api_key'=>$options['speedien_field_api_key'], 'site_id' => $options['speedien_field_site_id']); 110 111 $response = wp_remote_post(SPEEDIEN_API_URL . '/cdnurl', array('body' => $data, 'timeout' => 10)); 112 $cdnurl = $response['body']; 113 update_option('speedien_cdnurl',$cdnurl); 114 } 115 116 $buffer = str_replace(get_site_url().'/wp-content',$cdnurl.'/wp-content',$buffer); 117 $buffer = str_replace(get_site_url().'/wp-includes',$cdnurl.'/wp-includes',$buffer); 95 118 return $buffer; 96 119 }
Note: See TracChangeset
for help on using the changeset viewer.