Hyper Cache - Version 2.2.4

Version Description

Download this release

Release Info

Developer satollo
Plugin Icon wp plugin Hyper Cache
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.2.4

Files changed (8) hide show
  1. advanced-cache.php +38 -5
  2. by_BY.php +29 -0
  3. en_US.php +23 -0
  4. it_IT.php +2 -2
  5. options.php +148 -117
  6. plugin.php +13 -39
  7. readme.txt +39 -31
  8. zh_CN.php +39 -0
advanced-cache.php CHANGED
@@ -7,13 +7,22 @@ if (!$hyper_cache_enabled) return false;
7
  // Do not cache post request (comments, plugins and so on)
8
  if ($_SERVER["REQUEST_METHOD"] == 'POST') return false;
9
 
 
 
 
10
  $hyper_uri = $_SERVER['REQUEST_URI'];
11
 
 
 
12
  // Checks for rejected url
13
  if ($hyper_cache_reject)
14
  {
15
  foreach($hyper_cache_reject as $uri)
16
  {
 
 
 
 
17
  if (substr($hyper_uri, 0, strlen($uri)) == $uri) return false;
18
  }
19
  }
@@ -67,6 +76,20 @@ if (is_file($hyper_file))
67
  $hyper_data = unserialize(file_get_contents(ABSPATH . 'wp-content/hyper-cache/404.dat'));
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  header('Content-Type: ' . $hyper_data['mime']);
71
 
72
  // Send the cached html
@@ -110,7 +133,7 @@ ob_start('hyper_cache_callback');
110
  // Called whenever the page generation is ended
111
  function hyper_cache_callback($buffer)
112
  {
113
- global $hyper_cache_redirects, $hyper_redirect, $hyper_file, $hyper_cache_compress, $hyper_cache_name, $hyper_cache_gzip;
114
 
115
  // WP is sending a redirect
116
  if ($hyper_redirect)
@@ -123,6 +146,11 @@ function hyper_cache_callback($buffer)
123
  return $buffer;
124
  }
125
 
 
 
 
 
 
126
  if (is_feed() && !$hyper_cache_feed)
127
  {
128
  return $buffer;
@@ -133,13 +161,15 @@ function hyper_cache_callback($buffer)
133
  // Can be a trackback or other things without a body. We do not cache them, WP needs to get those calls.
134
  if (strlen($buffer) == 0) return '';
135
 
 
 
136
  if (is_feed())
137
  {
138
- $data['mime'] = 'text/xml;charset=UTF-8';
139
  }
140
  else
141
  {
142
- $data['mime'] = 'text/html;charset=UTF-8';
143
  }
144
 
145
  // Clean up a it the html, this is a energy saver plugin!
@@ -192,7 +222,10 @@ function hyper_cache_write(&$data)
192
 
193
  $file = fopen($hyper_file, 'w');
194
  fwrite($file, serialize($data));
195
- fclose($file);
 
 
 
196
  }
197
 
198
  function hyper_cache_compress(&$buffer)
@@ -222,7 +255,7 @@ function hyper_mobile_type()
222
  if (!$hyper_cache_mobile) return '';
223
 
224
  $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
225
- $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");
226
  foreach ($hyper_agents as $hyper_a)
227
  {
228
  if (strpos($hyper_agent, $hyper_a) !== false)
7
  // Do not cache post request (comments, plugins and so on)
8
  if ($_SERVER["REQUEST_METHOD"] == 'POST') return false;
9
 
10
+ // Try to avoid enabling the cache if sessions are managed with request parameters and a session is active
11
+ if (defined(SID) && SID != '') return false;
12
+
13
  $hyper_uri = $_SERVER['REQUEST_URI'];
14
 
15
+ if ($hyper_cache_urls == 'default' && strpos($hyper_uri, '?') !== false) return false;
16
+
17
  // Checks for rejected url
18
  if ($hyper_cache_reject)
19
  {
20
  foreach($hyper_cache_reject as $uri)
21
  {
22
+ if (substr($uri, 0, 1) == '"')
23
+ {
24
+ if ($uri == '"' . $hyper_uri . '"') return false;
25
+ }
26
  if (substr($hyper_uri, 0, strlen($uri)) == $uri) return false;
27
  }
28
  }
76
  $hyper_data = unserialize(file_get_contents(ABSPATH . 'wp-content/hyper-cache/404.dat'));
77
  }
78
 
79
+ if (array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER))
80
+ {
81
+ $if_modified_since = strtotime(preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]));
82
+ if ($if_modified_since >= filectime($hyper_file))
83
+ {
84
+ header("HTTP/1.0 304 Not Modified");
85
+ flush();
86
+ die();
87
+ }
88
+ }
89
+
90
+
91
+ header('Last-Modified: ' . date("r", filectime($hyper_file)));
92
+
93
  header('Content-Type: ' . $hyper_data['mime']);
94
 
95
  // Send the cached html
133
  // Called whenever the page generation is ended
134
  function hyper_cache_callback($buffer)
135
  {
136
+ global $hyper_cache_charset, $hyper_cache_home, $hyper_cache_redirects, $hyper_redirect, $hyper_file, $hyper_cache_compress, $hyper_cache_name, $hyper_cache_gzip;
137
 
138
  // WP is sending a redirect
139
  if ($hyper_redirect)
146
  return $buffer;
147
  }
148
 
149
+ if (is_home() && $hyper_cache_home)
150
+ {
151
+ return $buffer;
152
+ }
153
+
154
  if (is_feed() && !$hyper_cache_feed)
155
  {
156
  return $buffer;
161
  // Can be a trackback or other things without a body. We do not cache them, WP needs to get those calls.
162
  if (strlen($buffer) == 0) return '';
163
 
164
+ if (!$hyper_cache_charset) $hyper_cache_charset = 'UTF-8';
165
+
166
  if (is_feed())
167
  {
168
+ $data['mime'] = 'text/xml;charset=' . $hyper_cache_charset;
169
  }
170
  else
171
  {
172
+ $data['mime'] = 'text/html;charset=' . $hyper_cache_charset;
173
  }
174
 
175
  // Clean up a it the html, this is a energy saver plugin!
222
 
223
  $file = fopen($hyper_file, 'w');
224
  fwrite($file, serialize($data));
225
+ fclose($file);
226
+
227
+ header('Last-Modified: ' . date("r", filectime($hyper_file)));
228
+
229
  }
230
 
231
  function hyper_cache_compress(&$buffer)
255
  if (!$hyper_cache_mobile) return '';
256
 
257
  $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
258
+ $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");
259
  foreach ($hyper_agents as $hyper_a)
260
  {
261
  if (strpos($hyper_agent, $hyper_a) !== false)
by_BY.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $hyper_labels['wp_cache_not_enabled'] = "Сістэма кэшавання wordPress не ўключаная. Калі ласка, актывуйце яе даданнем паказанага ніжэй радка ў wp-config.php. Дзякуй!";
4
+ $hyper_labels['configuration'] = "Канфігурацыя";
5
+ $hyper_labels['activate'] = "Актываваць кэш?";
6
+ $hyper_labels['timeout'] = "Час жыцця кэшаваных старонак";
7
+ $hyper_labels['timeout_desc'] = "хвілін (усталюеце ў 0, каб яны заставаліся)";
8
+ $hyper_labels['count'] = "Усяго кэшаваных старонак (кэшаваныя рэдырэкты лічацца таксама)";
9
+ $hyper_labels['save'] = "Захаваць";
10
+ //$hyper_labels['store'] = "Store pages as";
11
+ //$hyper_labels['folder'] = "Cache folder";
12
+ $hyper_labels['gzip'] = "Gzip сціск";
13
+ $hyper_labels['gzip_desc'] = "Адпраўляць сціснутыя ў gzip старонкі для падтрымоўваемых браўзэраў";
14
+ $hyper_labels['clear'] = "Ачысціць кэш";
15
+ $hyper_labels['compress_html'] = "Аптымізаваць HTML";
16
+ $hyper_labels['compress_html_desc'] = "Паспрабаваць аптымізаваць HTML, выдаляючы нявыкарыстаныя прабелы. Не рабіце гэтага, калі вы выкарыстоўваеце тэгі &lt;pre&gt; у вашых запісах";
17
+ $hyper_labels['redirects'] = "Кэшаваць WP рэдырэкты";
18
+ $hyper_labels['redirects_desc'] = "Могуць быць праблемы з некаторымі канфігурацыямі. Паспрабуйце.";
19
+ $hyper_labels['mobile'] = "Дэтэктаваць і кэшаваць старонкі для мабільных прылад";
20
+ $hyper_labels['clean_interval'] = "Аўтаачыстка кожныя";
21
+ $hyper_labels['clean_interval_desc'] = "хвілін (усталюеце ў 0 каб адключыць)";
22
+ $hyper_labels['not_activated'] = "Hyper Cache не ўсталяваны карэктна: некаторыя файлы або дырэкторыі не створаныя. Праверце, што на дырэкторыю wp-content усталяваныя правільныя правы (777) і выдаліце файл advanced-cache.php у ёй. Дэактывуйце і пераактывуйце плагін паўторна.";
23
+ $hyper_labels['expire_type'] = "Як чысціць кэш";
24
+ $hyper_labels['expire_type_desc'] = "(на новых запісах, абноўленых запісах, каментарах)";
25
+ $hyper_labels['advanced_options'] = "Пашыраныя налады";
26
+ $hyper_labels['reject'] = "выключыць URI";
27
+ $hyper_labels['reject_desc'] = "Адзін на радок. Калі URI (eg. /video/my-new-performance) пачынаецца з адной з гэтых радкоў, то ён не будзе кэшаваны.";
28
+
29
+ ?>
en_US.php CHANGED
@@ -30,6 +30,29 @@ $hyper_labels['advanced_options'] = "Advanced options";
30
  $hyper_labels['reject'] = "URI to reject";
31
  $hyper_labels['reject_desc'] = "One per line. When a URI (eg. /video/my-new-performance) starts with one of the listed lines, it won't be cached.";
32
 
 
 
33
 
 
 
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ?>
30
  $hyper_labels['reject'] = "URI to reject";
31
  $hyper_labels['reject_desc'] = "One per line. When a URI (eg. /video/my-new-performance) starts with one of the listed lines, it won't be cached.";
32
 
33
+ $hyper_labels['home'] = "Do not cache the home";
34
+ $hyper_labels['home_desc'] = "Enabling this option, the home page and the subsequent pages for older posts will not be cached.";
35
 
36
+ $hyper_labels['feed'] = "Cache the feed?";
37
+ $hyper_labels['feed_desc'] = "Usually not, so we are sure to feed always an updated feed even if we do a strong cache of the web pages";
38
 
39
+ // New from version 2.2.4
40
+ $hyper_labels['urls_analysis'] = "URLs with query string";
41
+ $hyper_labels['urls_analysis_desc'] = "URLs with parameters are URLs like www.satollo.com?param=value.";
42
+ $hyper_labels['urls_analysis_desc'] .= "Hyper Cache creates cache page names using the full URL, with its parameters.";
43
+ $hyper_labels['urls_analysis_desc'] .= "When using permalinks, URLs parameters are ignored by WordPress so calling tha same post URL with fake parameters creates many identical cache entries, with disk space waste.";
44
+ $hyper_labels['urls_analysis_desc'] .= "There is an exception: the 's' parameter is used by WordPress to actite the internal search engine.";
45
+ $hyper_labels['urls_analysis_desc'] .= "So if you disable the URLs with parameter caching, the search results won't be cached.";
46
+ $hyper_labels['urls_analysis_desc'] .= "Other plugins can use parameters, caching of those URLs can rise up problem or be a performance improvement.";
47
+ $hyper_labels['urls_analysis_desc'] .= "I cannot give you a final solution... BUT if you have the permalink disabled the cache will work only with this option enabled.";
48
+
49
+ $hyper_labels['urls_analysis_default'] = "Do NOT cache URLs with parameters";
50
+ $hyper_labels['urls_analysis_full'] = "Cache all URLs";
51
+ // To be implemented
52
+ //$hyper_labels['urls_analysis_removeqs'] = "Remove query string and redirect";
53
+
54
+ $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
  ?>
it_IT.php CHANGED
@@ -19,12 +19,12 @@ $hyper_labels['redirects_desc'] = "Potrebbe creare problemi con alcune configura
19
  $hyper_labels['mobile'] = "Riconosci i dispositivi mobili";
20
  $hyper_labels['clean_interval'] = "Ottimizza la cache ogni";
21
  $hyper_labels['clean_interval_desc'] = "minuti (imposta a zero per disabilitare)";
22
- $hyper_labels['not_activated'] = "Hyper Cache non installato correttamente: qualche file o qualche cartelle non stata creata. Controlla se la wp-content scrivibile e rimuovi il file advanced-cache.php se presente in essa. Disattiva e riattiva il plugin.";
23
  $hyper_labels['expire_type'] = "Come invalidare la cache";
24
  //$hyper_labels['expire_type_desc'] = "(nuovi articoli, articoli modificati, commenti, ...)";
25
  $hyper_labels['advanced_options'] = "Opzioni avanzate";
26
  $hyper_labels['reject'] = "URI da rifiutare";
27
- $hyper_labels['reject_desc'] = "Uno per linea. Quando un URI (ad esempio /video/my-new-performance) inizia con uno di quelli scritti non verr� messo in cache.";
28
 
29
  ?>
30
 
19
  $hyper_labels['mobile'] = "Riconosci i dispositivi mobili";
20
  $hyper_labels['clean_interval'] = "Ottimizza la cache ogni";
21
  $hyper_labels['clean_interval_desc'] = "minuti (imposta a zero per disabilitare)";
22
+ $hyper_labels['not_activated'] = "Hyper Cache non è installato correttamente: qualche file o qualche cartelle non è stata creata. Controlla se la wp-content è scrivibile e rimuovi il file advanced-cache.php se presente in essa. Disattiva e riattiva il plugin.";
23
  $hyper_labels['expire_type'] = "Come invalidare la cache";
24
  //$hyper_labels['expire_type_desc'] = "(nuovi articoli, articoli modificati, commenti, ...)";
25
  $hyper_labels['advanced_options'] = "Opzioni avanzate";
26
  $hyper_labels['reject'] = "URI da rifiutare";
27
+ $hyper_labels['reject_desc'] = "Uno per linea. Quando un URI (ad esempio /video/my-new-performance) inizia con uno di quelli scritti non verrà messo in cache.";
28
 
29
  ?>
30
 
options.php CHANGED
@@ -5,18 +5,18 @@ if (WPLANG != '') @include(ABSPATH . 'wp-content/plugins/hyper-cache/' . WPLANG
5
 
6
  function hyper_request($name, $default=null)
7
  {
8
- if (!isset($_POST[$name]))
9
  {
10
- return $default;
11
  }
12
-
13
- if (get_magic_quotes_gpc())
14
  {
15
- return hyper_stripslashes($_POST[$name]);
16
  }
17
- else
18
  {
19
- return $_POST[$name];
20
  }
21
  }
22
 
@@ -28,7 +28,7 @@ function hyper_stripslashes($value)
28
 
29
  function hyper_field_checkbox($name, $label='', $tips='', $attrs='') {
30
  global $options;
31
-
32
  echo '<th scope="row">';
33
  echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
34
  echo '<td><input type="checkbox" ' . $attrs . ' name="options[' . $name . ']" value="1" ' . ($options[$name]!= null?'checked':'') . '/>';
@@ -62,7 +62,7 @@ function hyper_field_textarea($name, $label='', $tips='', $attrs='') {
62
  }
63
 
64
  $installed = is_dir(ABSPATH . 'wp-content/hyper-cache') && is_file(ABSPATH . 'wp-content/advanced-cache.php') &&
65
- filesize(ABSPATH . 'wp-content/advanced-cache.php') == filesize(ABSPATH . 'wp-content/plugins/hyper-cache/advanced-cache.php');
66
 
67
 
68
  if ($installed && isset($_POST['clear']))
@@ -75,17 +75,18 @@ if ($installed && isset($_POST['save']))
75
  {
76
  $options = hyper_request('options');
77
 
78
- if ($options['timeout'] == '' || !is_numeric($options['timeout']))
79
  {
80
- $options['timeout'] = 60;
81
  }
82
-
83
- if ($options['clean_interval'] == '' || !is_numeric($options['clean_interval']))
84
  {
85
- $options['clean_interval'] = 0;
86
- }
87
-
88
  $buffer = "<?php\n";
 
89
  $buffer .= '$hyper_cache_enabled = ' . ($options['enabled']?'true':'false') . ";\n";
90
  $buffer .= '$hyper_cache_compress = ' . ($options['compress']?'true':'false') . ";\n";
91
  $buffer .= '$hyper_cache_timeout = ' . $options['timeout'] . ";\n";
@@ -93,15 +94,17 @@ if ($installed && isset($_POST['save']))
93
  $buffer .= '$hyper_cache_redirects = ' . ($options['redirects']?'true':'false') . ";\n";
94
  $buffer .= '$hyper_cache_mobile = ' . ($options['mobile']?'true':'false') . ";\n";
95
  $buffer .= '$hyper_cache_feed = ' . ($options['feed']?'true':'false') . ";\n";
 
96
  //$buffer .= '$hyper_cache_folder = \'' . $options['folder'] . "';\n";
97
- if (function_exists('gzencode'))
98
- {
99
  $buffer .= '$hyper_cache_gzip = ' . ($options['gzip']?'true':'false') . ";\n";
100
  $buffer .= '$hyper_cache_storage = \'' . $options['storage'] . "';\n";
101
  }
 
102
  $buffer .= '$hyper_cache_folder = \'' . ABSPATH . 'wp-content/hyper-cache' . "';\n";
103
  $buffer .= '$hyper_cache_clean_interval = ' . $options['clean_interval'] . ";\n";
104
-
105
  if (trim($options['reject']) != '')
106
  {
107
  $options['reject'] = str_replace(' ', "\n", $options['reject']);
@@ -113,12 +116,12 @@ if ($installed && isset($_POST['save']))
113
  {
114
  $uri = trim($uri);
115
  if ($uri == '') continue;
116
- $buffer .= "'" . addslashes(trim($uri)) . "',";
117
  $options['reject'] .= $uri . "\n";
118
  }
119
  $buffer = rtrim($buffer, ',');
120
  $buffer .= ");\n";
121
- }
122
  $buffer .= '?>';
123
  $file = fopen(ABSPATH . 'wp-content/hyper-cache-config.php', 'w');
124
  fwrite($file, $buffer);
@@ -128,146 +131,174 @@ if ($installed && isset($_POST['save']))
128
  else
129
  {
130
  $options = get_option('hyper');
131
- if ($options['timeout'] == '')
132
  {
133
- $options['timeout'] = 60;
134
  }
135
- if ($options['clean_interval'] == '')
136
  {
137
- $options['clean_interval'] = 1440;
138
- }
139
  }
140
 
141
  ?>
142
  <div class="wrap">
143
  <form method="post">
144
  <h2>Hyper Cache</h2>
145
-
146
- <?php
147
- if (!$installed)
148
- {
149
- echo '<div class="alert error" style="margin-top:10px;"><p>';
150
- echo $hyper_labels['not_activated'];
151
- echo '</p></div>';
152
- }
153
- ?>
154
-
155
- <?php
156
- if (!defined('WP_CACHE') ) {
157
- echo '<div class="alert error" style="margin-top:10px;"><p>';
158
- echo $hyper_labels['wp_cache_not_enabled'];
159
- echo "<pre>define('WP_CACHE', true);</pre>";
160
- echo '</p></div>';
161
- }
162
- ?>
163
 
164
- <p>Check the advanced options if you are using the Global Translator Plugin</p>
165
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  <h3><?php echo $hyper_labels['configuration']; ?></h3>
167
  <table class="form-table">
168
- <tr valign="top">
169
- <?php hyper_field_checkbox('enabled', $hyper_labels['activate']); ?>
170
- </tr>
171
- <tr valign="top">
172
- <?php hyper_field_text('timeout', $hyper_labels['timeout'], $hyper_labels['timeout_desc'], 'size="5"'); ?>
173
- </tr>
174
- <tr valign="top">
175
- <?php hyper_field_text('clean_interval', $hyper_labels['clean_interval'], $hyper_labels['clean_interval_desc'], 'size="5"'); ?>
176
- </tr>
177
-
178
- <tr valign="top">
179
  <th scope="row"><label><?php echo $hyper_labels['expire_type']; ?></label></th>
180
  <td>
181
  <select name="options[expire_type]">
182
- <option value="post_strictly" <?php echo ($options['expire_type'] == 'post_strictly')?'selected':''; ?>>Single pages strictly</option>
183
- <option value="post" <?php echo ($options['expire_type'] == 'post')?'selected':''; ?>>Single pages</option>
184
- <option value="all" <?php echo ($options['expire_type'] == 'all')?'selected':''; ?>>All</option>
185
- <option value="none" <?php echo ($options['expire_type'] == 'none')?'selected':''; ?>>None</option>
186
  </select><br />
187
- <?php echo $hyper_labels['expire_type_desc']; ?><br />
188
  <?php echo $hyper_labels['expire_type_desc']; ?>
189
  </td>
190
- </tr>
191
- <tr valign="top">
192
- <?php hyper_field_checkbox('feed', 'Cache the feeds?'); ?>
193
- </tr>
194
- <tr valign="top">
195
- <?php hyper_field_checkbox('compress', $hyper_labels['compress_html'], $hyper_labels['compress_html_desc']); ?>
196
- </tr>
197
- <tr valign="top">
198
- <?php hyper_field_checkbox('mobile', $hyper_labels['mobile']); ?>
199
- </tr>
200
- <tr valign="top">
201
  <th scope="row"><label><?php echo $hyper_labels['gzip']; ?></label></th>
202
  <td>
203
- <?php if (function_exists('gzencode')) { ?>
204
  <input type="checkbox" name="options[gzip]" value="1" <?php echo $options['gzip']!=null?'checked':''; ?> />
205
  <br />
206
  <?php echo $hyper_labels['gzip_desc']; ?>
207
- <?php } else { ?>
208
- There is not "gzencode" function, may be you PHP has not the zlib extension active.
209
- <?php } ?>
210
  </td>
211
- </tr>
212
 
213
- <!--
214
- <tr valign="top">
215
- <?php hyper_field_text('folder', $hyper_labels['folder'], $hyper_labels['folder_desc'], 'size="5"'); ?>
216
- </tr>
217
  -->
218
- <tr valign="top">
219
- <th scope="row"><?php echo $hyper_labels['count']; ?></th>
220
  <td><?php echo hyper_count(); ?></td>
221
- </tr>
222
- </table>
223
-
224
 
225
  <h3><?php echo $hyper_labels['advanced_options']; ?></h3>
226
  <table class="form-table">
227
- <tr valign="top">
228
- <?php hyper_field_checkbox('redirects', $hyper_labels['redirects'], $hyper_labels['redirects_desc']); ?>
229
- </tr>
230
- <tr valign="top">
231
- <th scope="row"><label>Storage</label></th>
 
 
 
232
  <td>
233
- <?php if (function_exists('gzencode')) { ?>
234
- <select name="options[storage]">
235
- <option value="default" <?php echo ($options['storage'] == 'default')?'selected':''; ?>>Default</option>
236
- <option value="minimize" <?php echo ($options['storage'] == 'minimize')?'selected':''; ?>>Minimize the disk space</option>
237
- </select>
238
- <?php } else { ?>
239
- You have not the zlib extension installed, leave the default option!
240
- <?php } ?>
241
  </td>
242
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  <tr valign="top">
244
  <th scope="row"><label><?php echo $hyper_labels['reject']; ?></label></th>
245
  <td>
246
  <textarea wrap="off" rows="5" cols="70" name="options[reject]"><?php echo htmlspecialchars($options['reject']); ?></textarea>
247
  <br />
248
  <?php echo $hyper_labels['reject_desc']; ?>
249
-
250
  <?php
251
- $languages = get_option('gltr_preferred_languages');
252
- if (is_array($languages))
253
- {
254
- echo '<br />';
255
- $home = get_option('home');
256
- $x = strpos($home, '/', 8); // skips http://
257
- $base = '';
258
- if ($x !== false) $base = substr($home, $x);
259
- echo 'It seems you have Global Translator installed. The URI prefixes below can be added to avoid double caching of translated pages:<br />';
260
- foreach($languages as $l) echo $base . '/' . $l . '/ ';
261
- }
262
  ?>
263
  </td>
264
- </tr>
265
  </table>
266
 
267
-
268
  <p class="submit">
269
- <input class="button" type="submit" name="save" value="<?php echo $hyper_labels['save']; ?>">
270
  <input class="button" type="submit" name="clear" value="<?php echo $hyper_labels['clear']; ?>">
271
- </p>
272
  </form>
273
  </div>
5
 
6
  function hyper_request($name, $default=null)
7
  {
8
+ if (!isset($_POST[$name]))
9
  {
10
+ return $default;
11
  }
12
+
13
+ if (get_magic_quotes_gpc())
14
  {
15
+ return hyper_stripslashes($_POST[$name]);
16
  }
17
+ else
18
  {
19
+ return $_POST[$name];
20
  }
21
  }
22
 
28
 
29
  function hyper_field_checkbox($name, $label='', $tips='', $attrs='') {
30
  global $options;
31
+
32
  echo '<th scope="row">';
33
  echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
34
  echo '<td><input type="checkbox" ' . $attrs . ' name="options[' . $name . ']" value="1" ' . ($options[$name]!= null?'checked':'') . '/>';
62
  }
63
 
64
  $installed = is_dir(ABSPATH . 'wp-content/hyper-cache') && is_file(ABSPATH . 'wp-content/advanced-cache.php') &&
65
+ @filesize(ABSPATH . 'wp-content/advanced-cache.php') == @filesize(ABSPATH . 'wp-content/plugins/hyper-cache/advanced-cache.php');
66
 
67
 
68
  if ($installed && isset($_POST['clear']))
75
  {
76
  $options = hyper_request('options');
77
 
78
+ if ($options['timeout'] == '' || !is_numeric($options['timeout']))
79
  {
80
+ $options['timeout'] = 60;
81
  }
82
+
83
+ if ($options['clean_interval'] == '' || !is_numeric($options['clean_interval']))
84
  {
85
+ $options['clean_interval'] = 0;
86
+ }
87
+
88
  $buffer = "<?php\n";
89
+ $buffer .= '$hyper_cache_charset = "' . get_option('blog_charset') . '"' . ";\n";
90
  $buffer .= '$hyper_cache_enabled = ' . ($options['enabled']?'true':'false') . ";\n";
91
  $buffer .= '$hyper_cache_compress = ' . ($options['compress']?'true':'false') . ";\n";
92
  $buffer .= '$hyper_cache_timeout = ' . $options['timeout'] . ";\n";
94
  $buffer .= '$hyper_cache_redirects = ' . ($options['redirects']?'true':'false') . ";\n";
95
  $buffer .= '$hyper_cache_mobile = ' . ($options['mobile']?'true':'false') . ";\n";
96
  $buffer .= '$hyper_cache_feed = ' . ($options['feed']?'true':'false') . ";\n";
97
+ $buffer .= '$hyper_cache_home = ' . ($options['home']?'true':'false') . ";\n";
98
  //$buffer .= '$hyper_cache_folder = \'' . $options['folder'] . "';\n";
99
+ if (function_exists('gzencode'))
100
+ {
101
  $buffer .= '$hyper_cache_gzip = ' . ($options['gzip']?'true':'false') . ";\n";
102
  $buffer .= '$hyper_cache_storage = \'' . $options['storage'] . "';\n";
103
  }
104
+ $buffer .= '$hyper_cache_urls = \'' . $options['urls'] . "';\n";
105
  $buffer .= '$hyper_cache_folder = \'' . ABSPATH . 'wp-content/hyper-cache' . "';\n";
106
  $buffer .= '$hyper_cache_clean_interval = ' . $options['clean_interval'] . ";\n";
107
+
108
  if (trim($options['reject']) != '')
109
  {
110
  $options['reject'] = str_replace(' ', "\n", $options['reject']);
116
  {
117
  $uri = trim($uri);
118
  if ($uri == '') continue;
119
+ $buffer .= "\"" . addslashes(trim($uri)) . "\",";
120
  $options['reject'] .= $uri . "\n";
121
  }
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);
131
  else
132
  {
133
  $options = get_option('hyper');
134
+ if ($options['timeout'] == '')
135
  {
136
+ $options['timeout'] = 60;
137
  }
138
+ if ($options['clean_interval'] == '')
139
  {
140
+ $options['clean_interval'] = 1440;
141
+ }
142
  }
143
 
144
  ?>
145
  <div class="wrap">
146
  <form method="post">
147
  <h2>Hyper Cache</h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
 
149
+ <?php
150
+ if (!$installed)
151
+ {
152
+ echo '<div class="alert error" style="margin-top:10px;"><p>';
153
+ echo $hyper_labels['not_activated'];
154
+ echo '</p></div>';
155
+ }
156
+ ?>
157
+
158
+ <?php
159
+ if (!defined('WP_CACHE') ) {
160
+ echo '<div class="alert error" style="margin-top:10px;"><p>';
161
+ echo $hyper_labels['wp_cache_not_enabled'];
162
+ echo "<pre>define('WP_CACHE', true);</pre>";
163
+ echo '</p></div>';
164
+ }
165
+ ?>
166
+ <p>To have more information about Hyper Cache read the <a href="http://www.satollo.com/english/wordpress/hyper-cache">official plugin page</a>
167
+ or write me to info@satollo.com.</p>
168
+
169
+ <p>Consider a <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483">DONATION</a> to support this plugin or
170
+ if it <strong>saved you a lot of money</strong> avoiding expensive hosting providers to sustain your blog traffic...</p>
171
+
172
+ <p>
173
+ My other plugins:
174
+ <a href="http://www.satollo.com/english/wordpress/post-layout">Post Layout</a>,
175
+ <a href="http://www.satollo.com/english/wordpress/feed-layout">Feed Layout</a>,
176
+ </p>
177
+
178
+ <p>Check the advanced options if you are using the Global Translator Plugin or if you are NOT using
179
+ permalinks (eg. IIS hosted blogs).</p>
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>
186
+ <tr valign="top">
187
+ <?php hyper_field_text('timeout', $hyper_labels['timeout'], $hyper_labels['timeout_desc'], 'size="5"'); ?>
188
+ </tr>
189
+ <tr valign="top">
190
+ <?php hyper_field_text('clean_interval', $hyper_labels['clean_interval'], $hyper_labels['clean_interval_desc'], 'size="5"'); ?>
191
+ </tr>
192
+
193
+ <tr valign="top">
194
  <th scope="row"><label><?php echo $hyper_labels['expire_type']; ?></label></th>
195
  <td>
196
  <select name="options[expire_type]">
197
+ <option value="post_strictly" <?php echo ($options['expire_type'] == 'post_strictly')?'selected':''; ?>>Single pages strictly</option>
198
+ <option value="post" <?php echo ($options['expire_type'] == 'post')?'selected':''; ?>>Single pages</option>
199
+ <option value="all" <?php echo ($options['expire_type'] == 'all')?'selected':''; ?>>All</option>
200
+ <option value="none" <?php echo ($options['expire_type'] == 'none')?'selected':''; ?>>None</option>
201
  </select><br />
 
202
  <?php echo $hyper_labels['expire_type_desc']; ?>
203
  </td>
204
+ </tr>
205
+ <tr valign="top">
206
+ <?php hyper_field_checkbox('feed', $hyper_labels['feed'], $hyper_labels['feed_desc']); ?>
207
+ </tr>
208
+ <tr valign="top">
209
+ <?php hyper_field_checkbox('compress', $hyper_labels['compress_html'], $hyper_labels['compress_html_desc']); ?>
210
+ </tr>
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>
217
+ <?php if (function_exists('gzencode')) { ?>
218
  <input type="checkbox" name="options[gzip]" value="1" <?php echo $options['gzip']!=null?'checked':''; ?> />
219
  <br />
220
  <?php echo $hyper_labels['gzip_desc']; ?>
221
+ <?php } else { ?>
222
+ <?php echo $hyper_labels['gzip_nogzencode_desc']; ?>
223
+ <?php } ?>
224
  </td>
225
+ </tr>
226
 
227
+ <!--
228
+ <tr valign="top">
229
+ <?php hyper_field_text('folder', $hyper_labels['folder'], $hyper_labels['folder_desc'], 'size="5"'); ?>
230
+ </tr>
231
  -->
232
+ <tr valign="top">
233
+ <th scope="row"><?php echo $hyper_labels['count']; ?></th>
234
  <td><?php echo hyper_count(); ?></td>
235
+ </tr>
236
+ </table>
237
+
238
 
239
  <h3><?php echo $hyper_labels['advanced_options']; ?></h3>
240
  <table class="form-table">
241
+ <tr valign="top">
242
+ <?php hyper_field_checkbox('home', $hyper_labels['home'], $hyper_labels['home_desc']); ?>
243
+ </tr>
244
+ <tr valign="top">
245
+ <?php hyper_field_checkbox('redirects', $hyper_labels['redirects'], $hyper_labels['redirects_desc']); ?>
246
+ </tr>
247
+ <tr valign="top">
248
+ <th scope="row"><label><?php echo $hyper_labels['storage']; ?></label></th>
249
  <td>
250
+ <?php if (function_exists('gzencode')) { ?>
251
+ <select name="options[storage]">
252
+ <option value="default" <?php echo ($options['storage'] == 'default')?'selected':''; ?>>Default</option>
253
+ <option value="minimize" <?php echo ($options['storage'] == 'minimize')?'selected':''; ?>>Minimize the disk space</option>
254
+ </select>
255
+ <?php } else { ?>
256
+ <?php echo $hyper_labels['storage_nogzencode_desc']; ?>
257
+ <?php } ?>
258
  </td>
259
+ </tr>
260
+ <tr valign="top">
261
+ <th scope="row"><label><?php echo $hyper_labels['urls_analysis']; ?></label></th>
262
+ <td>
263
+ <select name="options[urls]">
264
+ <option value="default" <?php echo ($options['urls'] == 'default')?'selected':''; ?>><?php echo $hyper_labels['urls_analysis_default']; ?></option>
265
+ <option value="full" <?php echo ($options['urls'] == 'full')?'selected':''; ?>><?php echo $hyper_labels['urls_analysis_full']; ?></option>
266
+ <!--
267
+ <option value="removeqs" <?php echo ($options['removeqs'] == 'full')?'selected':''; ?>><?php echo $hyper_labels['urls_analysis_removeqs']; ?></option>
268
+ -->
269
+ </select>
270
+ <br />
271
+ <?php echo $hyper_labels['urls_analysis_desc']; ?>
272
+ </td>
273
+ </tr>
274
  <tr valign="top">
275
  <th scope="row"><label><?php echo $hyper_labels['reject']; ?></label></th>
276
  <td>
277
  <textarea wrap="off" rows="5" cols="70" name="options[reject]"><?php echo htmlspecialchars($options['reject']); ?></textarea>
278
  <br />
279
  <?php echo $hyper_labels['reject_desc']; ?>
280
+
281
  <?php
282
+ $languages = get_option('gltr_preferred_languages');
283
+ if (is_array($languages))
284
+ {
285
+ echo '<br />';
286
+ $home = get_option('home');
287
+ $x = strpos($home, '/', 8); // skips http://
288
+ $base = '';
289
+ if ($x !== false) $base = substr($home, $x);
290
+ echo 'It seems you have Global Translator installed. The URI prefixes below can be added to avoid double caching of translated pages:<br />';
291
+ foreach($languages as $l) echo $base . '/' . $l . '/ ';
292
+ }
293
  ?>
294
  </td>
295
+ </tr>
296
  </table>
297
 
298
+
299
  <p class="submit">
300
+ <input class="button" type="submit" name="save" value="<?php echo $hyper_labels['save']; ?>">
301
  <input class="button" type="submit" name="clear" value="<?php echo $hyper_labels['clear']; ?>">
302
+ </p>
303
  </form>
304
  </div>
plugin.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Hyper Cache
4
  Plugin URI: http://www.satollo.com/english/wordpress/hyper-cache
5
- Description: Hyper Cache is an extremely aggressive cache for WordPress even for mobile blogs. After an upgrade, DEACTIVATE, REACTIVATE and RECONFIGURE. ALWAYS!
6
- Version: 2.1.3
7
  Author: Satollo
8
  Author URI: http://www.satollo.com
9
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -30,42 +30,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
  Changelog
31
  ---
32
 
33
- Version 1.2.x
34
- - new version with many improvements, maybe not very safe
35
-
36
- Version 1.1.1
37
- - added an option to invalidate single post pages
38
-
39
- Version 1.1
40
- - fixed behaviour with password protected posts
41
- - added a bit of html compression (not gzip)
42
-
43
- Verison 1.0.9
44
- - fixed a bug in the "not expire" management
45
-
46
- Version 1.0.8
47
- - fixed the "clear cache" that didn't work when "not exipre on actions" was set
48
-
49
- Version 1.0.7
50
- - Fixed the mime type for feed
51
- - Added the "do not expire on actions" option
52
-
53
- Version 1.0.6
54
- - German translation by Frank Luef
55
- - Fixed some not blocking url when installing without the WP_CACHE defined
56
- - Fixed a message key in the .po files
57
-
58
- Version 1.0.5
59
- - Add italian translation
60
- - Add the "clear the cache" button
61
- - Add the cache page count
62
-
63
- Version 1.0.4
64
- - Thank you to Amaury Balmer for this version
65
- - Add french translation
66
- - Improve options with WordPress 2.5
67
- - Fix bug with WP 2.5 cookies
68
- - Minor changes
69
  */
70
 
71
  $hyper_options = get_option('hyper');
@@ -100,6 +66,14 @@ function hyper_deactivate()
100
  hyper_delete_path(ABSPATH . 'wp-content/hyper-cache');
101
  }
102
 
 
 
 
 
 
 
 
 
103
  add_action('admin_menu', 'hyper_admin_menu');
104
  function hyper_admin_menu()
105
  {
@@ -233,7 +207,7 @@ function hyper_delete_path($path)
233
  {
234
  if ($file != '.' && $file != '..')
235
  {
236
- unlink($path . '/' . $file);
237
  }
238
  }
239
  closedir($handle);
2
  /*
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.4
7
  Author: Satollo
8
  Author URI: http://www.satollo.com
9
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
30
  Changelog
31
  ---
32
 
33
+ See the readme.txt.
34
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  */
36
 
37
  $hyper_options = get_option('hyper');
66
  hyper_delete_path(ABSPATH . 'wp-content/hyper-cache');
67
  }
68
 
69
+ add_filter("plugin_action_links_hyper-cache/plugin.php", 'hyper_plugin_action_links');
70
+ function hyper_plugin_action_links($links)
71
+ {
72
+ $settings_link = '<a href="options-general.php?page=hyper-cache/options.php">' . __( 'Settings' ) . '</a>';
73
+ array_unshift($links, $settings_link);
74
+ return $links;
75
+ }
76
+
77
  add_action('admin_menu', 'hyper_admin_menu');
78
  function hyper_admin_menu()
79
  {
207
  {
208
  if ($file != '.' && $file != '..')
209
  {
210
+ @unlink($path . '/' . $file);
211
  }
212
  }
213
  closedir($handle);
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Hyper Cache ===
2
  Tags: cache,chaching,speed,performance,super cache,wp cache
3
  Requires at least: 2.1
4
- Tested up to: 2.6.3
5
- Stable tag: 2.1.3
6
- Donate link: http://www.satollo.com/english/donate
7
  Contributors: satollo,momo360modena
8
 
9
- Hyper Cache is an extremely aggressive cache for WordPress.
10
 
11
  == Description ==
12
 
@@ -14,39 +14,35 @@ Hyper Cache is a new cache system for WordPress, specifically written for
14
  people which have their blogs on *low resources hosting provider*
15
  (cpu and mysql).
16
 
17
- Hyper Cache has the nice feature to be compatible with the plugin "wp-pda"
18
- which enables a blog to be *accessible from mobile devices* showing the
19
- contents with a different ad optimized theme.
20
 
21
- Hyper Cache can manage (both) *plain and gzip compressed pages*, reducing the
22
- bandwidth usage and making the pages load faster.
 
 
 
 
 
 
23
 
24
- Hyper Cache can do *cache autoclean* to reduce the disk usage removing the old
25
- cached pages at specified intervals of time.
26
 
27
- Hyper Cache caches the not found requests, the WordPress redirect requests,
28
- the feed requests.
29
 
30
- Hyper Cache can be easly translated and the translation tested without compile
31
- a language file: just copy the en_US.php file and start to translate.
32
-
33
- Global Translator detection.
34
-
35
- More information on Hyper Cache page (below) or write me to info@satollo.com.
36
-
37
- http://www.satollo.com/english/wordpress/hyper-cache
38
 
39
  Thanks to:
40
- - Amaury Balmer for internationalization and other modifications
41
- - Frank Luef for german translation
42
- - HypeScience, Martin Steldinger, Giorgio Guglielmino for test and bugs submissions
43
- - Ishtiaq to ask me about compatibility with wp-pda
44
- - Gene Steinberg to ask for an autoclean system
45
- - many others I don't remember
46
 
47
- To do:
48
- - make the cache directory configurable because if you are on NFS the plugin can load too much the server (Deepak Gupta)
49
- - execute the cache page so it's possible to insert php code - has many drawbacks I need to evluate well how to implement this feature (RT Cunningham)
 
 
 
50
 
51
  == Installation ==
52
 
@@ -58,8 +54,20 @@ Before upgrade DEACTIVATE the plugin and then ACTIVATE and RECONFIGURE!
58
 
59
  == Frequently Asked Questions ==
60
 
61
- No questions have been asked.
 
 
 
 
 
 
 
 
 
62
 
 
 
 
63
  == Screenshots ==
64
 
65
  No screenshots are available.
1
  === Hyper Cache ===
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.4
6
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
7
  Contributors: satollo,momo360modena
8
 
9
+ Hyper Cache is flexyble and easy cache system for WordPress.
10
 
11
  == Description ==
12
 
14
  people which have their blogs on *low resources hosting provider*
15
  (cpu and mysql).
16
 
17
+ Some features:
 
 
18
 
19
+ * compatible with the plugin wp-pda which enables a blog to be *accessible from mobile devices*
20
+ * manages (both) *plain and gzip compressed pages*
21
+ * autoclean system to reduce the disk usage
22
+ * 404 caching
23
+ * redirects caching
24
+ * easy to configure
25
+ * Global Translator compatibility
26
+ * Last Modified http header compatibility with 304 responses
27
 
28
+ More can be read on the [official plugin page](http://www.satollo.com/english/wordpress/hyper-cache) and write me
29
+ if you have issues to info@satollo.com.
30
 
31
+ **Check out my other plugins**:
 
32
 
33
+ * [Hyper Cache](http://www.satollo.com/english/wordpress/hyper-cache "Hyper Cache WordPress plugin: when performance and flexibilty are not an option")
34
+ * [Post Layout](http://www.satollo.com/english/wordpress/post-layout "Post Layout WordPress plugin: the easy way to enrich your posts")
35
+ * [Feed Layout](http://www.satollo.com/english/wordpress/feed-layout "Feed Layout WordPress plugin: the easy way to enrich your feed contents")
36
+ * [Dynatags](http://www.satollo.com/english/wordpress/dynatags "Dynatags WordPress plugin: Create your own custom short tag in seconds")
 
 
 
 
37
 
38
  Thanks to:
 
 
 
 
 
 
39
 
40
+ * Amaury Balmer for internationalization and other modifications
41
+ * Frank Luef for german translation
42
+ * HypeScience, Martin Steldinger, Giorgio Guglielmino for test and bugs submissions
43
+ * Ishtiaq to ask me about compatibility with wp-pda
44
+ * Gene Steinberg to ask for an autoclean system
45
+ * many others I don't remember
46
 
47
  == Installation ==
48
 
54
 
55
  == Frequently Asked Questions ==
56
 
57
+ **How can I submit a bug?**
58
+
59
+ Write me to info@satollo.com, please, it's the quicker way to have it fixed. You can write to the
60
+ WordPress forum, too, but I read it rarely.
61
+
62
+ **Where can I find versions history?**
63
+
64
+ On this page: [Post Layout versions](http://www.satollo.com/english/wordpress/post-layout/versions).
65
+
66
+ **Other FAQs?**
67
 
68
+ I'm collection tips and FAQ on [this page](http://www.satollo.com/english/wordpress/hyper-cache/configuration)
69
+ so I can update it more easly.
70
+
71
  == Screenshots ==
72
 
73
  No screenshots are available.
zh_CN.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $hyper_labels['wp_cache_not_enabled'] = "WordPress缓存系统尚未启动。请在wp-config.php中添加以下一行代码来激活它。谢谢";
4
+ $hyper_labels['configuration'] = "恭喜";
5
+ $hyper_labels['activate'] = "是否启用缓存?勾选之";
6
+ $hyper_labels['timeout'] = "缓存文件在多少分钟后过期";
7
+ $hyper_labels['timeout_desc'] = "分钟 (设置为0的话则代表永不过期)";
8
+ $hyper_labels['count'] = "总共缓存页数 (重定向缓存也算在内)";
9
+ $hyper_labels['save'] = "保存";
10
+ //$hyper_labels['store'] = "Store pages as";
11
+ //$hyper_labels['folder'] = "Cache folder";
12
+ $hyper_labels['gzip'] = "Gzip 压缩";
13
+ $hyper_labels['gzip_desc'] = "发送gzip压缩去激活浏览器";
14
+ $hyper_labels['clear'] = "清除缓存";
15
+ $hyper_labels['compress_html'] = "优化HTML";
16
+ $hyper_labels['compress_html_desc'] = "通过取出无用的空格去最优化HTML。如果文章内含有&lt;pre&gt;标签就不要使用该选项";
17
+ $hyper_labels['redirects'] = "缓存WordPress的重定向页面";
18
+ $hyper_labels['redirects_desc'] = "可能导致一些配置问题,试试看,希望没有问题";
19
+ $hyper_labels['mobile'] = "检测和为手机设备缓存";
20
+ $hyper_labels['clean_interval'] = "每多少分钟后自动清除";
21
+ $hyper_labels['clean_interval_desc'] = "分钟 (设置为0的话则代表永不清除)";
22
+ $hyper_labels['not_activated'] = "Hyper Cache(极限缓存) 没有被正确安装:一些文件和目录没有成功创建。检查看wp-content目录是可写且可删除其内的advanced-cache.php。停用并重启用该插件。";
23
+ $hyper_labels['expire_type'] = "什么事件下缓存页面会被删除";
24
+ $hyper_labels['expire_type_desc'] = "<b>None</b>: 任何事件下(评论,新文章等),缓存都不会被删除<br />";
25
+ $hyper_labels['expire_type_desc'] .= "<b>Single pages</b>: 文章被修改(包括添加了评论),首页和相关缓存被删除。新发表文章时候会清空所有的缓存。<br />";
26
+ $hyper_labels['expire_type_desc'] .= "<b>Single pages strictly</b>: 类似单个页面,但是添加新文章时不会清空所有的缓存<br />";
27
+ $hyper_labels['expire_type_desc'] .= "<b>All</b>: 所有的缓存页面(博客总是最新的)<br />";
28
+ $hyper_labels['expire_type_desc'] .= "注意:当你选中'Single pages strictly',一个新的文章会出现在首页,但不会出现在分类和标签页里面。如果你在边栏使用了‘新近文章’插件或特色,它不会显示更新的。";
29
+ $hyper_labels['advanced_options'] = "高级选项";
30
+ $hyper_labels['reject'] = "拒绝的地址";
31
+ $hyper_labels['reject_desc'] = "一个一行。当一个地址(如/video/my-new-performance)按照以下地址开始的话,它不会被缓存。";
32
+
33
+ $hyper_labels['home'] = "不缓存首页";
34
+ $hyper_labels['home_desc'] = "打开这个选项,首页和其下的旧文章页面不会被缓存。";
35
+
36
+ $hyper_labels['feed'] = "是否缓存feed?";
37
+ $hyper_labels['feed_desc'] = "一般不,这样我们能保证feed总是最新的,甚至我们在网站上使用了强力的缓存。";
38
+
39
+ ?>