Version Description
Download this release
Release Info
Developer | satollo |
Plugin | Hyper Cache |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- advanced-cache.php +13 -4
- en_US.php +7 -0
- options.php +64 -2
- plugin.php +1 -1
- readme.txt +1 -1
advanced-cache.php
CHANGED
@@ -27,6 +27,15 @@ if ($hyper_cache_reject)
|
|
27 |
}
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
// Do not use or cache pages when a wordpress user is logged on
|
31 |
foreach ($_COOKIE as $n=>$v)
|
32 |
{
|
@@ -250,13 +259,13 @@ function hyper_cache_compress(&$buffer)
|
|
250 |
|
251 |
function hyper_mobile_type()
|
252 |
{
|
253 |
-
global $hyper_cache_mobile;
|
254 |
|
255 |
-
if (!$hyper_cache_mobile) return '';
|
256 |
|
257 |
$hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
258 |
-
|
259 |
-
foreach ($
|
260 |
{
|
261 |
if (strpos($hyper_agent, $hyper_a) !== false)
|
262 |
{
|
27 |
}
|
28 |
}
|
29 |
|
30 |
+
if (count($hyper_cache_reject_agents) > 0)
|
31 |
+
{
|
32 |
+
$hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
33 |
+
foreach ($hyper_cache_reject_agents as $hyper_a)
|
34 |
+
{
|
35 |
+
if (strpos($hyper_agent, $hyper_a) !== false) return false;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
// Do not use or cache pages when a wordpress user is logged on
|
40 |
foreach ($_COOKIE as $n=>$v)
|
41 |
{
|
259 |
|
260 |
function hyper_mobile_type()
|
261 |
{
|
262 |
+
global $hyper_cache_mobile, $hyper_cache_mobile_agents;
|
263 |
|
264 |
+
if (!$hyper_cache_mobile || !$hyper_cache_mobile_agents) return '';
|
265 |
|
266 |
$hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
267 |
+
//$hyper_agents = explode(',', "elaine/3.0,iphone,ipod,palm,eudoraweb,blazer,avantgo,windows ce,cellphone,small,mmef20,danger,hiptop,proxinet,newt,palmos,netfront,sharp-tq-gx10,sonyericsson,symbianos,up.browser,up.link,ts21i-10,mot-v,portalmmm,docomo,opera mini,palm,handspring,nokia,kyocera,samsung,motorola,mot,smartphone,blackberry,wap,playstation portable,lg,mmp,opwv,symbian,epoc");
|
268 |
+
foreach ($hyper_cache_mobile_agents as $hyper_a)
|
269 |
{
|
270 |
if (strpos($hyper_agent, $hyper_a) !== false)
|
271 |
{
|
en_US.php
CHANGED
@@ -55,4 +55,11 @@ $hyper_labels['storage'] = "Storage";
|
|
55 |
$hyper_labels['storage_nogzencode_desc'] = "You have not the zlib extension installed, leave the default option!";
|
56 |
|
57 |
$hyper_labels['gzip_nogzencode_desc'] = "There is not 'gzencode' function, may be you PHP has not the zlib extension active.";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
?>
|
55 |
$hyper_labels['storage_nogzencode_desc'] = "You have not the zlib extension installed, leave the default option!";
|
56 |
|
57 |
$hyper_labels['gzip_nogzencode_desc'] = "There is not 'gzencode' function, may be you PHP has not the zlib extension active.";
|
58 |
+
|
59 |
+
// New from version 2.2.5
|
60 |
+
$hyper_labels['reject_agents'] = "User agents to reject";
|
61 |
+
$hyper_labels['reject_agents_desc'] = "A 'one per line' list of user agents that, when matched, makes to sip the caching process.";
|
62 |
+
$hyper_labels['mobile_agents'] = "Mobile user agents";
|
63 |
+
$hyper_labels['mobile_agents_desc'] = "A 'one per line' list of user agents to identify mobile devices.";
|
64 |
+
$hyper_labels['_notranslation'] = "Do not use translations for this configuration panel";
|
65 |
?>
|
options.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
@include(ABSPATH . 'wp-content/plugins/hyper-cache/en_US.php');
|
4 |
-
if (WPLANG != '') @include(ABSPATH . 'wp-content/plugins/hyper-cache/' . WPLANG . '.php');
|
5 |
|
6 |
function hyper_request($name, $default=null)
|
7 |
{
|
@@ -122,6 +124,43 @@ if ($installed && isset($_POST['save']))
|
|
122 |
$buffer = rtrim($buffer, ',');
|
123 |
$buffer .= ");\n";
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
$buffer .= '?>';
|
126 |
$file = fopen(ABSPATH . 'wp-content/hyper-cache-config.php', 'w');
|
127 |
fwrite($file, $buffer);
|
@@ -130,7 +169,6 @@ if ($installed && isset($_POST['save']))
|
|
130 |
}
|
131 |
else
|
132 |
{
|
133 |
-
$options = get_option('hyper');
|
134 |
if ($options['timeout'] == '')
|
135 |
{
|
136 |
$options['timeout'] = 60;
|
@@ -139,6 +177,10 @@ else
|
|
139 |
{
|
140 |
$options['clean_interval'] = 1440;
|
141 |
}
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
?>
|
@@ -180,6 +222,9 @@ if (!defined('WP_CACHE') ) {
|
|
180 |
|
181 |
<h3><?php echo $hyper_labels['configuration']; ?></h3>
|
182 |
<table class="form-table">
|
|
|
|
|
|
|
183 |
<tr valign="top">
|
184 |
<?php hyper_field_checkbox('enabled', $hyper_labels['activate']); ?>
|
185 |
</tr>
|
@@ -211,6 +256,14 @@ if (!defined('WP_CACHE') ) {
|
|
211 |
<tr valign="top">
|
212 |
<?php hyper_field_checkbox('mobile', $hyper_labels['mobile']); ?>
|
213 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
<tr valign="top">
|
215 |
<th scope="row"><label><?php echo $hyper_labels['gzip']; ?></label></th>
|
216 |
<td>
|
@@ -293,6 +346,15 @@ if (!defined('WP_CACHE') ) {
|
|
293 |
?>
|
294 |
</td>
|
295 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
</table>
|
297 |
|
298 |
|
1 |
<?php
|
2 |
|
3 |
+
$options = get_option('hyper');
|
4 |
+
|
5 |
@include(ABSPATH . 'wp-content/plugins/hyper-cache/en_US.php');
|
6 |
+
if (!$options['_notranslation'] && WPLANG != '') @include(ABSPATH . 'wp-content/plugins/hyper-cache/' . WPLANG . '.php');
|
7 |
|
8 |
function hyper_request($name, $default=null)
|
9 |
{
|
124 |
$buffer = rtrim($buffer, ',');
|
125 |
$buffer .= ");\n";
|
126 |
}
|
127 |
+
|
128 |
+
if (trim($options['reject_agents']) != '')
|
129 |
+
{
|
130 |
+
$options['reject_agents'] = str_replace(' ', "\n", $options['reject_agents']);
|
131 |
+
$options['reject_agents'] = str_replace("\r", "\n", $options['reject_agents']);
|
132 |
+
$buffer .= '$hyper_cache_reject_agents = array(';
|
133 |
+
$reject_agents = explode("\n", $options['reject_agents']);
|
134 |
+
$options['reject_agents'] = '';
|
135 |
+
foreach ($reject_agents as $uri)
|
136 |
+
{
|
137 |
+
$uri = trim($uri);
|
138 |
+
if ($uri == '') continue;
|
139 |
+
$buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
|
140 |
+
$options['reject_agents'] .= $uri . "\n";
|
141 |
+
}
|
142 |
+
$buffer = rtrim($buffer, ',');
|
143 |
+
$buffer .= ");\n";
|
144 |
+
}
|
145 |
+
|
146 |
+
if (trim($options['mobile_agents']) != '')
|
147 |
+
{
|
148 |
+
$options['mobile_agents'] = str_replace(' ', "\n", $options['mobile_agents']);
|
149 |
+
$options['mobile_agents'] = str_replace("\r", "\n", $options['mobile_agents']);
|
150 |
+
$buffer .= '$hyper_cache_mobile_agents = array(';
|
151 |
+
$mobile_agents = explode("\n", $options['mobile_agents']);
|
152 |
+
$options['mobile_agents'] = '';
|
153 |
+
foreach ($mobile_agents as $uri)
|
154 |
+
{
|
155 |
+
$uri = trim($uri);
|
156 |
+
if ($uri == '') continue;
|
157 |
+
$buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
|
158 |
+
$options['mobile_agents'] .= $uri . "\n";
|
159 |
+
}
|
160 |
+
$buffer = rtrim($buffer, ',');
|
161 |
+
$buffer .= ");\n";
|
162 |
+
}
|
163 |
+
|
164 |
$buffer .= '?>';
|
165 |
$file = fopen(ABSPATH . 'wp-content/hyper-cache-config.php', 'w');
|
166 |
fwrite($file, $buffer);
|
169 |
}
|
170 |
else
|
171 |
{
|
|
|
172 |
if ($options['timeout'] == '')
|
173 |
{
|
174 |
$options['timeout'] = 60;
|
177 |
{
|
178 |
$options['clean_interval'] = 1440;
|
179 |
}
|
180 |
+
if ($options['mobile_agents'] == '')
|
181 |
+
{
|
182 |
+
$options['mobile_agents'] = "elaine/3.0\niphone\nipod\npalm\neudoraweb\nblazer\navantgo\nwindows ce\ncellphone\nsmall\nmmef20\ndanger\nhiptop\nproxinet\nnewt\npalmos\nnetfront\nsharp-tq-gx10\nsonyericsson\nsymbianos\nup.browser\nup.link\nts21i-10\nmot-v\nportalmmm\ndocomo\nopera mini\npalm\nhandspring\nnokia\nkyocera\nsamsung\nmotorola\nmot\nsmartphone\nblackberry\nwap\nplaystation portable\nlg\nmmp\nopwv\nsymbian\nepoc";
|
183 |
+
}
|
184 |
}
|
185 |
|
186 |
?>
|
222 |
|
223 |
<h3><?php echo $hyper_labels['configuration']; ?></h3>
|
224 |
<table class="form-table">
|
225 |
+
<tr valign="top">
|
226 |
+
<?php hyper_field_checkbox('_notranslation', $hyper_labels['_notranslation']); ?>
|
227 |
+
</tr>
|
228 |
<tr valign="top">
|
229 |
<?php hyper_field_checkbox('enabled', $hyper_labels['activate']); ?>
|
230 |
</tr>
|
256 |
<tr valign="top">
|
257 |
<?php hyper_field_checkbox('mobile', $hyper_labels['mobile']); ?>
|
258 |
</tr>
|
259 |
+
<tr valign="top">
|
260 |
+
<th scope="row"><label><?php echo $hyper_labels['mobile_agents']; ?></label></th>
|
261 |
+
<td>
|
262 |
+
<textarea wrap="off" rows="5" cols="70" name="options[mobile_agents]"><?php echo htmlspecialchars($options['mobile_agents']); ?></textarea>
|
263 |
+
<br />
|
264 |
+
<?php echo $hyper_labels['mobile_agents_desc']; ?>
|
265 |
+
</td>
|
266 |
+
</tr>
|
267 |
<tr valign="top">
|
268 |
<th scope="row"><label><?php echo $hyper_labels['gzip']; ?></label></th>
|
269 |
<td>
|
346 |
?>
|
347 |
</td>
|
348 |
</tr>
|
349 |
+
<tr valign="top">
|
350 |
+
<th scope="row"><label><?php echo $hyper_labels['reject_agents']; ?></label></th>
|
351 |
+
<td>
|
352 |
+
<textarea wrap="off" rows="5" cols="70" name="options[reject_agents]"><?php echo htmlspecialchars($options['reject_agents']); ?></textarea>
|
353 |
+
<br />
|
354 |
+
<?php echo $hyper_labels['reject_agents_desc']; ?>
|
355 |
+
</td>
|
356 |
+
</tr>
|
357 |
+
|
358 |
</table>
|
359 |
|
360 |
|
plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Hyper Cache
|
4 |
Plugin URI: http://www.satollo.com/english/wordpress/hyper-cache
|
5 |
Description: Hyper Cache is a features rich cache system WordPress. After an upgrade, DEACTIVATE, REACTIVATE and RECONFIGURE. ALWAYS!
|
6 |
-
Version: 2.2.
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.com
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
3 |
Plugin Name: Hyper Cache
|
4 |
Plugin URI: http://www.satollo.com/english/wordpress/hyper-cache
|
5 |
Description: Hyper Cache is a features rich cache system WordPress. After an upgrade, DEACTIVATE, REACTIVATE and RECONFIGURE. ALWAYS!
|
6 |
+
Version: 2.2.5
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.com
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: cache,chaching,speed,performance,super cache,wp cache
|
3 |
Requires at least: 2.1
|
4 |
Tested up to: 2.7.1
|
5 |
-
Stable tag: 2.2.
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
|
7 |
Contributors: satollo,momo360modena
|
8 |
|
2 |
Tags: cache,chaching,speed,performance,super cache,wp cache
|
3 |
Requires at least: 2.1
|
4 |
Tested up to: 2.7.1
|
5 |
+
Stable tag: 2.2.5
|
6 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
|
7 |
Contributors: satollo,momo360modena
|
8 |
|