Changeset 3321408
- Timestamp:
- 07/02/2025 06:07:52 PM (9 months ago)
- Location:
- cache-using-gzip
- Files:
-
- 20 added
- 3 edited
-
tags/2.9.0 (added)
-
tags/2.9.0/autoload.php (added)
-
tags/2.9.0/cache-using-gzip.php (added)
-
tags/2.9.0/classes (added)
-
tags/2.9.0/classes/CUGZ (added)
-
tags/2.9.0/classes/CUGZ/class-cugz-gzip-cache.php (added)
-
tags/2.9.0/css (added)
-
tags/2.9.0/css/jquery-ui.css (added)
-
tags/2.9.0/css/jquery-ui.min.css (added)
-
tags/2.9.0/css/style.css (added)
-
tags/2.9.0/css/style.min.css (added)
-
tags/2.9.0/js (added)
-
tags/2.9.0/js/main.js (added)
-
tags/2.9.0/js/main.min.js (added)
-
tags/2.9.0/license.txt (added)
-
tags/2.9.0/readme.txt (added)
-
tags/2.9.0/templates (added)
-
tags/2.9.0/templates/htaccess.sample (added)
-
tags/2.9.0/templates/nginx.conf.sample (added)
-
tags/2.9.0/templates/options-page.php (added)
-
trunk/cache-using-gzip.php (modified) (1 diff)
-
trunk/classes/CUGZ/class-cugz-gzip-cache.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cache-using-gzip/trunk/cache-using-gzip.php
r3316386 r3321408 5 5 /* 6 6 * Plugin Name: Cache Using Gzip 7 * Version: 2. 8.97 * Version: 2.9.0 8 8 * Description: Creates gzip files on your server to immensly improve page speed for site visitors 9 9 * Author: Cache Using Gzip -
cache-using-gzip/trunk/classes/CUGZ/class-cugz-gzip-cache.php
r3316386 r3321408 217 217 $this->site_url = get_site_url(); 218 218 219 $this->host = getenv('HTTP_HOST');220 221 $this->cache_dir = strtok(WP_CONTENT_DIR.'/cugz_gzip_cache/'.$this->host, ':');219 $this->host = $this->get_host(); 220 221 $this->cache_dir = WP_CONTENT_DIR.'/cugz_gzip_cache/'.$this->host; 222 222 223 223 $this->settings_url = admin_url(self::$options_page_url); … … 1325 1325 1326 1326 /** 1327 * Retrieves the hostname for use in the cache directory file path. 1328 * 1329 * @return string the hostname or localhost if unable to determine 1330 */ 1331 private function get_host() 1332 { 1333 if (!empty($_SERVER['HTTP_HOST'])) { 1334 $host = $_SERVER['HTTP_HOST']; 1335 } elseif ($env_host = getenv('HTTP_HOST')) { 1336 $host = $env_host; 1337 } elseif (!empty($_SERVER['SERVER_NAME'])) { 1338 $host = $_SERVER['SERVER_NAME']; 1339 } else { 1340 $host = 'localhost'; 1341 } 1342 1343 $host = strtolower($host); 1344 $host = preg_replace('/:\d+$/', '', $host); // remove port if present 1345 $host = preg_replace('/[^a-z0-9\-\.]/', '_', $host); // replace unwanted chars 1346 1347 return $host; 1348 } 1349 1350 /** 1327 1351 * Updates the value of a specified option in the WordPress database. 1328 1352 * -
cache-using-gzip/trunk/readme.txt
r3316386 r3321408 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 2. 8.97 Stable tag: 2.9.0 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 84 84 85 85 == Changelog == 86 87 = 2.9.0 = 88 Bugfix: In specific environments, the hostname is undetermined, causing the wp-content directory to be deleted upon plugin deactivation 86 89 87 90 = 2.8.9 =
Note: See TracChangeset
for help on using the changeset viewer.