Version Description
- Minor code review
- Removed cookie based cache disabling
Download this release
Release Info
Developer | satollo |
Plugin | Hyper Cache |
Version | 3.2.7 |
Comparing to | |
See all releases |
Code changes from version 3.1.8 to 3.2.7
- advanced-cache.php +14 -19
- languages/hyper-cache-ru_RU.mo +0 -0
- languages/hyper-cache-ru_RU.po +234 -284
- languages/hyper-cache.pot +407 -178
- options.php +74 -55
- plugin.php +678 -753
- readme.txt +202 -156
advanced-cache.php
CHANGED
@@ -39,11 +39,6 @@ if (defined('SID') && SID != '') {
|
|
39 |
return false;
|
40 |
}
|
41 |
|
42 |
-
if (isset($_COOKIE['cache_disable'])) {
|
43 |
-
$cache_stop = true;
|
44 |
-
return false;
|
45 |
-
}
|
46 |
-
|
47 |
if (!$hyper_cache_is_bot || $hyper_cache_is_bot && !HC_BOTS_IGNORE_NOCACHE) {
|
48 |
if (isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') {
|
49 |
hyper_cache_header('stop - no cache header');
|
@@ -76,7 +71,7 @@ if (HC_HTTPS === 0 && $hyper_cache_is_ssl) {
|
|
76 |
}
|
77 |
|
78 |
if (HC_REJECT_AGENTS_ENABLED && isset($_SERVER['HTTP_USER_AGENT'])) {
|
79 |
-
if (preg_match('#(HC_REJECT_AGENTS)#i',
|
80 |
hyper_cache_header('stop - user agent');
|
81 |
$cache_stop = true;
|
82 |
return false;
|
@@ -103,7 +98,7 @@ if (!empty($_COOKIE)) {
|
|
103 |
return false;
|
104 |
}
|
105 |
if (HC_REJECT_COOKIES_ENABLED) {
|
106 |
-
if (preg_match('#(HC_REJECT_COOKIES)#i',
|
107 |
hyper_cache_header('stop - bypass cookie');
|
108 |
$cache_stop = true;
|
109 |
return false;
|
@@ -125,8 +120,8 @@ if (HC_MOBILE === 1 && $hyper_cache_is_mobile) {
|
|
125 |
|
126 |
//$hc_file = ABSPATH . 'wp-content/cache/lite-cache' . $_SERVER['REQUEST_URI'] . '/index' . $hc_group . '.html';
|
127 |
$hc_uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
|
128 |
-
|
129 |
-
$hc_file = 'HC_FOLDER/' .
|
130 |
if (HC_GZIP == 1 && $hyper_cache_gzip_accepted) {
|
131 |
$hc_gzip = true;
|
132 |
} else {
|
@@ -181,11 +176,9 @@ if (HC_BROWSER_CACHE) {
|
|
181 |
$hc_cache_max_age = time() + (24 * 3600) - $hc_file_time;
|
182 |
}
|
183 |
}
|
184 |
-
header('Cache-Control:
|
185 |
-
//header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $hc_cache_max_age) . " GMT");
|
186 |
} else {
|
187 |
-
header('Cache-Control:
|
188 |
-
//header('Pragma: no-cache');
|
189 |
}
|
190 |
|
191 |
if ($hc_gzip) {
|
@@ -205,18 +198,20 @@ if (HC_READFILE) {
|
|
205 |
die();
|
206 |
|
207 |
function hyper_cache_sanitize_uri($uri) {
|
208 |
-
$uri = preg_replace('
|
209 |
-
$uri = preg_replace('
|
210 |
-
|
211 |
if (empty($uri) || $uri[0] != '/') {
|
212 |
$uri = '/' . $uri;
|
213 |
}
|
214 |
-
if (strlen($uri) > 1 && substr($uri, -1, 1) == '/') {
|
215 |
-
$uri = rtrim($uri, '/') . '_';
|
216 |
-
}
|
217 |
return $uri;
|
218 |
}
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
function hyper_cache_header($value) {
|
221 |
header('X-Hyper-Cache: ' . $value, false);
|
222 |
}
|
39 |
return false;
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
if (!$hyper_cache_is_bot || $hyper_cache_is_bot && !HC_BOTS_IGNORE_NOCACHE) {
|
43 |
if (isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') {
|
44 |
hyper_cache_header('stop - no cache header');
|
71 |
}
|
72 |
|
73 |
if (HC_REJECT_AGENTS_ENABLED && isset($_SERVER['HTTP_USER_AGENT'])) {
|
74 |
+
if (preg_match('#(HC_REJECT_AGENTS)#i', $_SERVER['HTTP_USER_AGENT'])) {
|
75 |
hyper_cache_header('stop - user agent');
|
76 |
$cache_stop = true;
|
77 |
return false;
|
98 |
return false;
|
99 |
}
|
100 |
if (HC_REJECT_COOKIES_ENABLED) {
|
101 |
+
if (preg_match('#(HC_REJECT_COOKIES)#i', $n)) {
|
102 |
hyper_cache_header('stop - bypass cookie');
|
103 |
$cache_stop = true;
|
104 |
return false;
|
120 |
|
121 |
//$hc_file = ABSPATH . 'wp-content/cache/lite-cache' . $_SERVER['REQUEST_URI'] . '/index' . $hc_group . '.html';
|
122 |
$hc_uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
|
123 |
+
$hc_host = hyper_cache_sanitize_host($_SERVER['HTTP_HOST']);
|
124 |
+
$hc_file = 'HC_FOLDER/' . $hc_host . $hc_uri . '/index' . $hyper_cache_group . '.html';
|
125 |
if (HC_GZIP == 1 && $hyper_cache_gzip_accepted) {
|
126 |
$hc_gzip = true;
|
127 |
} else {
|
176 |
$hc_cache_max_age = time() + (24 * 3600) - $hc_file_time;
|
177 |
}
|
178 |
}
|
179 |
+
header('Cache-Control: public, max-age=' . $hc_cache_max_age, false);
|
|
|
180 |
} else {
|
181 |
+
header('Cache-Control: public, max-age=0, no-cache, no-transform', false);
|
|
|
182 |
}
|
183 |
|
184 |
if ($hc_gzip) {
|
198 |
die();
|
199 |
|
200 |
function hyper_cache_sanitize_uri($uri) {
|
201 |
+
$uri = preg_replace('|[^a-zA-Z0-9/\-_]+|', '_', $uri);
|
202 |
+
$uri = preg_replace('|/+|', '/', $uri);
|
203 |
+
$uri = rtrim($uri, '/');
|
204 |
if (empty($uri) || $uri[0] != '/') {
|
205 |
$uri = '/' . $uri;
|
206 |
}
|
|
|
|
|
|
|
207 |
return $uri;
|
208 |
}
|
209 |
|
210 |
+
function hyper_cache_sanitize_host($host) {
|
211 |
+
$host = preg_replace('|[^a-zA-Z0-9\.]+|', '', $host);
|
212 |
+
return strtolower($host);
|
213 |
+
}
|
214 |
+
|
215 |
function hyper_cache_header($value) {
|
216 |
header('X-Hyper-Cache: ' . $value, false);
|
217 |
}
|
languages/hyper-cache-ru_RU.mo
CHANGED
Binary file
|
languages/hyper-cache-ru_RU.po
CHANGED
@@ -1,501 +1,451 @@
|
|
1 |
# SOME DESCRIPTIVE TITLE.
|
2 |
# This file is put in the public domain.
|
3 |
-
# FIRST AUTHOR <
|
4 |
#
|
5 |
msgid ""
|
6 |
msgstr ""
|
7 |
-
"Project-Id-Version: Hyper Cache 3.
|
8 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
|
9 |
"POT-Creation-Date: 2009-09-29 15:57+0000\n"
|
10 |
-
"PO-Revision-Date:
|
11 |
"Last-Translator: artnikov <artnikov@ya.ru>\n"
|
12 |
"Language-Team: \n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
"Language: ru_RU\n"
|
17 |
-
"X-Generator: Poedit 1.
|
18 |
|
19 |
-
#: options.php:
|
20 |
-
msgid "Options saved. If you
|
21 |
-
msgstr ""
|
22 |
-
"Настройки сохранены. Если вы изменяете страницы, то исключения изменяются в "
|
23 |
-
"кеше"
|
24 |
|
25 |
-
#: options.php:
|
26 |
#, php-format
|
27 |
-
msgid ""
|
28 |
-
"
|
29 |
-
"the file or folder permissions."
|
30 |
-
msgstr ""
|
31 |
-
"Не удается создать файл <code>wp-content/advanced-cache.php</code> file. "
|
32 |
|
33 |
-
#: options.php:
|
34 |
msgid "The cache folder has been cleaned."
|
35 |
msgstr "Кэш папка была очищена."
|
36 |
|
37 |
-
#: options.php:
|
38 |
msgid "Done!"
|
39 |
msgstr "Отлично!"
|
40 |
|
41 |
-
#: options.php:
|
42 |
msgid "Options deleted"
|
43 |
msgstr "Настройки сброшены"
|
44 |
|
45 |
-
#: options.php:
|
46 |
msgid "Cache size"
|
47 |
msgstr "Размер КЭШа"
|
48 |
|
49 |
-
#: options.php:
|
50 |
msgid "Old Hyper Cache options are missing or not readable."
|
51 |
msgstr "Настройки ранней версии Hyper Cache отсутствуют или повреждены."
|
52 |
|
53 |
-
#: options.php:
|
54 |
msgid "Old options imported, now review them and save."
|
55 |
msgstr "Прежние настройки импортированы, их можно просмотреть и сохранить."
|
56 |
|
57 |
-
#: options.php:
|
58 |
#, php-format
|
59 |
-
msgid ""
|
60 |
-
"
|
61 |
-
"\"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
|
62 |
-
msgstr ""
|
63 |
-
"Вы должны добавить в файле wp-config.php (после строки <code>define(\"WPLANG"
|
64 |
-
"\", \"\");</code>) код: <code>define(\"WP_CACHE\", true);</code>."
|
65 |
|
66 |
-
#: options.php:
|
67 |
msgid "You must save the options since some files must be updated."
|
68 |
msgstr "Вы должны сохранить настройки, так как файлы должны быть обновлены."
|
69 |
|
70 |
-
#: options.php:
|
71 |
#, php-format
|
72 |
msgid "Hyper Cache was not able to create or find the"
|
73 |
msgstr "Hyper Cache не удалось создать или найти"
|
74 |
|
75 |
-
#: options.php:
|
76 |
#, php-format
|
77 |
-
msgid ""
|
78 |
-
"folder, please create it manually with list, write and read permissions "
|
79 |
-
"(usually 777)."
|
80 |
msgstr "папку, пожалуйста создайте его вручную, с правами (обычно 777)."
|
81 |
|
82 |
-
#: options.php:
|
83 |
#, php-format
|
84 |
-
msgid ""
|
85 |
-
"
|
86 |
-
"\"_blank\"> permalink structure under the Permalink panel</a> otherwise "
|
87 |
-
"Hyper Cache cannot work properly."
|
88 |
-
msgstr ""
|
89 |
-
"Вы должны выбрать другую папку <a href=\"options-permalink.php\" target="
|
90 |
-
"\"_blank\"> для постоянной ссылки</a> в противном случае Hyper Cache не "
|
91 |
-
"может работать должным образом."
|
92 |
|
93 |
-
#: options.php:
|
94 |
#, php-format
|
95 |
msgid ""
|
96 |
-
"Please, refer to the <a href=\"http://www.satollo.net/plugins/hyper-cache\" "
|
97 |
-
"
|
98 |
-
"forums/forum/hyper-cache\" target=\"_blank\">official forum</a> for support. "
|
99 |
-
"<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-"
|
100 |
-
"xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
|
101 |
-
"\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png"
|
102 |
-
"\"></a> Even <b>2$</b> helps! (<a href=\"http://www.satollo.net/donations\" "
|
103 |
-
"target=\"_blank\">read more</a>)"
|
104 |
msgstr ""
|
105 |
-
"Пожалуйста, обратитесь
|
106 |
-
"\"
|
107 |
-
|
108 |
-
|
109 |
-
"xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
|
110 |
-
"\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png"
|
111 |
-
"\"></a> Даже <b>2$</b> поддержка! (<a href=\"http://www.satollo.net/donations"
|
112 |
-
"\" target=\"_blank\">читать далее</a>)"
|
113 |
-
|
114 |
-
#: options.php:252
|
115 |
#, php-format
|
116 |
-
msgid ""
|
117 |
-
"
|
118 |
-
"www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
|
119 |
-
msgstr ""
|
120 |
-
"Хотите полную маркетинговую почтовую систему на вашем сайте? Пробуйте мой "
|
121 |
-
"бесплатный плагин <a href=\"http://www.satollo.net/plugins/newsletter\" "
|
122 |
-
"target=\"_blank\">Newsletter</a>."
|
123 |
|
124 |
-
#: options.php:
|
125 |
msgid "Clean the whole cache"
|
126 |
msgstr "Удалить весь кеш"
|
127 |
|
128 |
-
#: options.php:
|
129 |
msgid "Clean home and archives"
|
130 |
msgstr "Очистка архивов и домашней"
|
131 |
|
132 |
-
#: options.php:
|
133 |
msgid "Compute the cache size"
|
134 |
msgstr "Вычесление размера КЕШа"
|
135 |
|
136 |
-
#: options.php:
|
137 |
msgid "Import old options"
|
138 |
msgstr "Импортировать настройки"
|
139 |
|
140 |
-
#: options.php:
|
141 |
msgid "Sure? Your setting will be overwritten."
|
142 |
msgstr "Уверены? Ваши настройки будут записаны поверх!"
|
143 |
|
144 |
-
#: options.php:
|
145 |
msgid "General"
|
146 |
msgstr "Главные"
|
147 |
|
148 |
-
#: options.php:
|
149 |
msgid "Bypasses"
|
150 |
msgstr "Исключения"
|
151 |
|
152 |
-
#: options.php:
|
153 |
msgid "Mobile"
|
154 |
msgstr "Мобильный"
|
155 |
|
156 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
msgid "Disable translations"
|
158 |
msgstr "Отключить перевод"
|
159 |
|
160 |
-
#: options.php:275
|
161 |
msgid "Disable"
|
162 |
msgstr "Отключить"
|
163 |
|
164 |
-
#: options.php:
|
165 |
-
msgid ""
|
166 |
-
"If you want to see this panel with the original labels, you can disable the "
|
167 |
-
"tranlsation."
|
168 |
msgstr "Если ВЫ хотите видеть настройки без перевода, можете его отключить."
|
169 |
|
170 |
-
#: options.php:
|
171 |
msgid "Cached pages will be valid for"
|
172 |
msgstr "Кэшированные страницы, будут действительны в течение"
|
173 |
|
174 |
-
#: options.php:
|
175 |
msgid "0 means forever."
|
176 |
msgstr "0 означает, что навсегда."
|
177 |
|
178 |
-
#: options.php:
|
179 |
msgid "Enable compression"
|
180 |
msgstr "Включить сжатие"
|
181 |
|
182 |
-
#: options.php:
|
183 |
-
msgid ""
|
184 |
-
"
|
185 |
-
"already compressing the pages."
|
186 |
-
msgstr ""
|
187 |
-
"Если на сайте появились нечитаемые символы, то лучше отключить, так как на "
|
188 |
-
"сервере существует сжатие .gzip"
|
189 |
|
190 |
-
#: options.php:
|
191 |
msgid "When the home is refreshed, refresh even the"
|
192 |
msgstr "Когда обновлена домашняя страница, обновятся остальные."
|
193 |
|
194 |
-
#: options.php:
|
195 |
msgid "latest post"
|
196 |
msgstr "последние записи"
|
197 |
|
198 |
-
#: options.php:
|
199 |
msgid "The number of latest posts to invalidate when the home is invalidated."
|
200 |
msgstr "Число последних записей, изменятся, когда изменена главная."
|
201 |
|
202 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
msgid "Cache folder"
|
204 |
-
msgstr "
|
205 |
|
206 |
-
#: options.php:313
|
207 |
msgid "path on disk"
|
208 |
msgstr "путь к папке"
|
209 |
|
210 |
-
#: options.php:
|
211 |
#, php-format
|
212 |
-
msgid ""
|
213 |
-
"
|
214 |
-
"create a symbolic link"
|
215 |
-
msgstr ""
|
216 |
-
"Не включено по умолчанию. Вы можете проверить и создать символическую ссылку"
|
217 |
-
|
218 |
-
#: options.php:317
|
219 |
-
msgid "Your blog is located on"
|
220 |
-
msgstr "блог находится на"
|
221 |
|
222 |
-
#: options.php:
|
223 |
msgid "A wrong configuration can destroy your blog."
|
224 |
msgstr "Неправильная конфигурация может уничтожить ваш сайт."
|
225 |
|
226 |
-
#: options.php:
|
227 |
msgid "Next autoclean will run in"
|
228 |
-
msgstr "Далее эта функция будет выполняться
|
|
|
|
|
|
|
|
|
229 |
|
230 |
-
#: options.php:
|
231 |
msgid "minutes"
|
232 |
msgstr "минуты"
|
233 |
|
234 |
-
#: options.php:
|
235 |
msgid "The autoclean process removes old files to save disk space."
|
236 |
-
msgstr ""
|
237 |
-
"Автоочистка, удаляет устаревшие файлы, для оптимизации дискового "
|
238 |
-
"пространства."
|
239 |
|
240 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
241 |
msgid "Allow browser caching"
|
242 |
msgstr "Разрешение кеширования браузерами"
|
243 |
|
244 |
-
#: options.php:
|
245 |
msgid "enable it"
|
246 |
-
msgstr "
|
247 |
|
248 |
-
#: options.php:
|
249 |
msgid "with an expire time of"
|
250 |
msgstr "по истечению"
|
251 |
|
252 |
-
#: options.php:
|
253 |
msgid "hours"
|
254 |
msgstr "часов"
|
255 |
|
256 |
-
#: options.php:
|
257 |
msgid ""
|
258 |
-
"When enabled Hyper Cache sends a signal to the browser allowing it to NOT "
|
259 |
-
"
|
260 |
-
"If you set an expire time greater than zero, the browser should keep the "
|
261 |
-
"copy for that amount of hours, otherwise Hyper Cache will tell the browser "
|
262 |
-
"to keep the copy until the page expire in the blog cache.<br>Usually I keep "
|
263 |
-
"this feature disabled."
|
264 |
msgstr ""
|
265 |
-
"Когда включен, Hyper Cache посылает сигнал браузеру, позволяющий НЕ
|
266 |
-
"
|
267 |
-
"устанавливаете время сохранения, больше чем ноль, браузер должен сохранить "
|
268 |
-
"копию определенное время, иначе Hyper Cache скажет браузеру сохранять копию, "
|
269 |
-
"пока не истечет время сохранения в кэше сайта.<br>Обычно я оставляю эту "
|
270 |
-
"настройку заблокированной."
|
271 |
|
272 |
-
#: options.php:
|
273 |
-
msgid "HTTPS
|
274 |
-
msgstr "
|
|
|
|
|
|
|
|
|
275 |
|
276 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
msgid "Do not cache the home page"
|
278 |
-
msgstr "Не
|
279 |
|
280 |
-
#: options.php:
|
281 |
-
msgid ""
|
282 |
-
"
|
283 |
-
|
284 |
-
|
285 |
-
"
|
286 |
-
"даже со статической домашней страницей."
|
287 |
|
288 |
-
#: options.php:
|
289 |
msgid "Do not cache the \"404 - Not found\" page"
|
290 |
msgstr "Не кэшировать \"стр.404\" "
|
291 |
|
292 |
-
#: options.php:
|
293 |
-
msgid ""
|
294 |
-
"
|
295 |
-
"Requests which lead to a 404 not found page overload you blog since "
|
296 |
-
"WordPress must generate a full page so caching it help in reduce that "
|
297 |
-
"overload."
|
298 |
-
msgstr ""
|
299 |
-
"Когда активно, Hyper Cache не работает с кэшируемым 404, страницей. Запросы, "
|
300 |
-
"которые приводят к 404 перегружают сайт, так как WordPress должен выдать "
|
301 |
-
"полную страницу... , включение параметра помогает уменьшить нагрузку"
|
302 |
|
303 |
-
#: options.php:
|
304 |
msgid "Do not cache the blog main feeds"
|
305 |
msgstr "Не кешировать ленту комментариев"
|
306 |
|
307 |
-
#: options.php:
|
308 |
msgid "When active, the main blog feed %s is not cached."
|
309 |
msgstr "Когда активно, главная лента новостей RSS не кэшируется"
|
310 |
|
311 |
-
#: options.php:
|
312 |
msgid "Do not cache single post comment feed"
|
313 |
msgstr "Не кешировать ленту RSS комментариев"
|
314 |
|
315 |
-
#: options.php:
|
316 |
-
msgid ""
|
317 |
-
"
|
318 |
-
"this reject since it saves disk space and comment feed on single posts are "
|
319 |
-
"not usually used."
|
320 |
-
msgstr ""
|
321 |
-
"Когда активно, страница комментариев не кэшируется. Обычно включается, так "
|
322 |
-
"как это сохраняет дисковое пространство."
|
323 |
|
324 |
-
#: options.php:
|
325 |
msgid "Exact URIs to bypass"
|
326 |
-
msgstr "Точный URI
|
327 |
|
328 |
-
#: options.php:
|
329 |
-
#: options.php:420
|
330 |
msgid "Enable"
|
331 |
msgstr "Включить"
|
332 |
|
333 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
334 |
#, php-format
|
335 |
-
msgid ""
|
336 |
-
"
|
337 |
-
"post</code> URI and a request is received for <code>http://youblog."
|
338 |
-
"com<strong>/my-single-post</strong></code> that page is not cached. A "
|
339 |
-
"request for <code>http://youblog.com<strong>/my-single-post-something</"
|
340 |
-
"strong></code> IS cached."
|
341 |
-
msgstr ""
|
342 |
-
"Тем URIs точно соответствуют. Например, если Вы добавляете <code>/my-single-"
|
343 |
-
"post </code>, URI и запрос получены для <code>http://youblog.com<strong>/my-"
|
344 |
-
"single-post</strong></code>, что страница не кэшируется. Запрос о "
|
345 |
-
"<code>http://youblog.com<strong>/my-single-post-something</strong></code> "
|
346 |
-
"кэшируется."
|
347 |
|
348 |
-
#: options.php:
|
349 |
msgid "(Starting with) URIs to bypass"
|
350 |
-
msgstr "(Начиная с) URI исключить"
|
351 |
|
352 |
-
#: options.php:
|
353 |
#, php-format
|
354 |
-
msgid ""
|
355 |
-
"
|
356 |
-
"you add the <code>/my-single-post</code> URI and a request is received for "
|
357 |
-
"<code>http://youblog.com<strong>/my-single-post</strong></code> that page IS "
|
358 |
-
"cached. A request for <code>http://youblog.com<strong>/my-single-post-"
|
359 |
-
"something</strong></code> IS cached as well."
|
360 |
-
msgstr ""
|
361 |
-
"То соответствие URIs - требуемые начала URI с одним из них. Например, если "
|
362 |
-
"Вы добавляете<code>/my-single-post</code> URI кешируется так же <code>http://"
|
363 |
-
"youblog.com<strong>/my-single-post</strong></code> та страница кэшируется. "
|
364 |
-
"Запрос к <code>http://youblog.com<strong>/my-single-post-something</strong></"
|
365 |
-
"code> Кэшируется также."
|
366 |
|
367 |
-
#: options.php:
|
368 |
msgid "Cookies to bypass"
|
369 |
msgstr "Куки исключить"
|
370 |
|
371 |
-
#: options.php:
|
372 |
-
|
373 |
-
|
374 |
-
msgstr "По одному адресу в строке"
|
375 |
-
|
376 |
-
#: options.php:451
|
377 |
-
msgid ""
|
378 |
-
"If the visitor has a cookie named as one of the listed values, the cache is "
|
379 |
-
"bypassed."
|
380 |
-
msgstr ""
|
381 |
-
"Если указанная строка совпадает с одним из имен Cookies, кэш исключается."
|
382 |
|
383 |
-
#: options.php:
|
384 |
msgid "Devices (user agents) to bypass"
|
385 |
msgstr "Устройства(пользовательские) исключить"
|
386 |
|
387 |
-
#: options.php:
|
388 |
-
msgid ""
|
389 |
-
"
|
390 |
-
"values, the cache is bypassed."
|
391 |
-
msgstr ""
|
392 |
-
"Если посетитель имеет устройство с пользовательским агентом, названным как "
|
393 |
-
"одно из перечисленных значений, кэширование не происходит."
|
394 |
|
395 |
-
#: options.php:
|
396 |
msgid "Dont serve cached pages to comment authors"
|
397 |
msgstr "Не кешировать авторские комментарии"
|
398 |
|
399 |
-
#: options.php:
|
400 |
-
msgid ""
|
401 |
-
"Hyper Cache is able to work with users who left a comment and completes the "
|
402 |
-
"comment form with user data even on cached page (with a small JavaScript "
|
403 |
-
"added at the end of the pages). But the \"awaiting moderation\" message "
|
404 |
-
"cannot be shown. If you have few commentators, you can disable this feature "
|
405 |
-
"to get back the classical WordPress comment flow."
|
406 |
msgstr ""
|
407 |
-
"Hyper Cache способен работать с пользователями, которые оставили комментарий "
|
408 |
-
"
|
409 |
-
"страницы (с функцией JavaScript добавляется в конце страницы). Но сообщение "
|
410 |
-
"\"ожидает модерации\" не может быть показано. Если у вас не много "
|
411 |
-
"комментаторов, вы можете отключить эту функцию, чтобы вернуться классический "
|
412 |
-
"комментариев поток WordPress ."
|
413 |
-
|
414 |
-
#: options.php:466
|
415 |
-
msgid "days"
|
416 |
-
msgstr "дней"
|
417 |
|
418 |
-
#: options.php:
|
419 |
msgid "Reject posts older than"
|
420 |
msgstr "Не кешировать страницы старше"
|
421 |
|
422 |
-
#: options.php:
|
423 |
-
msgid ""
|
424 |
-
|
425 |
-
"Useful when older posts have low traffic."
|
426 |
-
msgstr ""
|
427 |
-
"Архивные страницы, кэшируется и сохранены приводят к экономии дискового "
|
428 |
-
"пространства. Полезно, когда старые страницы имеют низкий трафик."
|
429 |
|
430 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
431 |
msgid "Working mode"
|
432 |
msgstr "Режим работы"
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
#: options.php:484
|
435 |
msgid "[disabled] Do not detect mobile devices"
|
436 |
msgstr "[Отключено] Не обнаруживают мобильных устройств"
|
437 |
|
438 |
#: options.php:500
|
439 |
msgid "[enabled] Detect mobile devices and use a separate cache"
|
440 |
-
msgstr ""
|
441 |
-
"[Включено] Обнаружение мобильных устройства, используется отдельный кэш"
|
442 |
|
443 |
#: options.php:501
|
444 |
msgid "[enabled] Detect mobile devices and bypass the cache"
|
445 |
msgstr "[Включено] Обнаружение мобильных устройств и кэша"
|
446 |
|
447 |
#: options.php:504
|
448 |
-
msgid ""
|
449 |
-
"
|
450 |
-
"very low."
|
451 |
-
msgstr ""
|
452 |
-
"Имеет смысл отключить кэш для мобильных устройств, когда их трафик очень "
|
453 |
-
"низок."
|
454 |
|
455 |
-
#: options.php:509
|
456 |
msgid "Mobile theme"
|
457 |
msgstr "Мобильная тема"
|
458 |
|
459 |
-
#: options.php:499
|
460 |
msgid "Use the active blog theme"
|
461 |
msgstr "Использование активной темы сайта"
|
462 |
|
463 |
-
#: options.php:519
|
464 |
-
msgid ""
|
465 |
-
"
|
466 |
-
"devices, you should use a separate cache for mobile."
|
467 |
-
msgstr ""
|
468 |
-
"Если Вы имеете дополнения к программе, которые производят различное "
|
469 |
-
"содержание для стационарных и мобильных устройств, Вы должны использовать "
|
470 |
-
"отдельный кэш для мобильных устройств."
|
471 |
|
472 |
-
#: options.php:
|
473 |
-
msgid ""
|
474 |
-
"
|
475 |
-
"target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile "
|
476 |
-
"ads injection in posts."
|
477 |
-
msgstr ""
|
478 |
-
"Смотрите пример использования <a href=\"http://www.satollo.net/plugins/"
|
479 |
-
"header-footer\" target=\"_blank\">Header и Footer</a> расширений для "
|
480 |
-
"различных устройств."
|
481 |
|
482 |
-
#: options.php:525
|
483 |
msgid "Mobile user agents"
|
484 |
msgstr "Мобильные агенты пользователей"
|
485 |
|
486 |
-
#: options.php:528
|
487 |
msgid "Reset"
|
488 |
msgstr "Сброс"
|
489 |
|
490 |
#: options.php:531
|
491 |
#, php-format
|
492 |
-
msgid ""
|
493 |
-
"
|
494 |
-
"the site. For example and iPhone has <code>iphone</code> as user agent."
|
495 |
-
msgstr ""
|
496 |
-
"A \"пользовательский агент \" является текстом, которые идентифицируют вид "
|
497 |
-
"используемого устройства заниматься серфингом по сайтам. Например и iPhone "
|
498 |
-
"имеет <code>iphone</code> как пользовательский агент."
|
499 |
|
500 |
#: options.php:541
|
501 |
msgid "Save"
|
1 |
# SOME DESCRIPTIVE TITLE.
|
2 |
# This file is put in the public domain.
|
3 |
+
# FIRST AUTHOR <artnikov@ya.ru>, 2015.
|
4 |
#
|
5 |
msgid ""
|
6 |
msgstr ""
|
7 |
+
"Project-Id-Version: Hyper Cache 3.1.8\n"
|
8 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
|
9 |
"POT-Creation-Date: 2009-09-29 15:57+0000\n"
|
10 |
+
"PO-Revision-Date: 2015-01-18 14:32+0600\n"
|
11 |
"Last-Translator: artnikov <artnikov@ya.ru>\n"
|
12 |
"Language-Team: \n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
"Language: ru_RU\n"
|
17 |
+
"X-Generator: Poedit 1.7.3\n"
|
18 |
|
19 |
+
#: options.php:77
|
20 |
+
msgid "Options saved. If you changed any of the bypasses empty the cache."
|
21 |
+
msgstr "Настройки сохранены. Если вы изменяете страницы, то изменяютя и страницы в кеше"
|
|
|
|
|
22 |
|
23 |
+
#: options.php:83
|
24 |
#, php-format
|
25 |
+
msgid "Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions."
|
26 |
+
msgstr "Не удается создать файл <code>wp-content/advanced-cache.php</code> файл. Проверьте разрешение для создание папок и файлов."
|
|
|
|
|
|
|
27 |
|
28 |
+
#: options.php:90
|
29 |
msgid "The cache folder has been cleaned."
|
30 |
msgstr "Кэш папка была очищена."
|
31 |
|
32 |
+
#: options.php:95
|
33 |
msgid "Done!"
|
34 |
msgstr "Отлично!"
|
35 |
|
36 |
+
#: options.php:132
|
37 |
msgid "Options deleted"
|
38 |
msgstr "Настройки сброшены"
|
39 |
|
40 |
+
#: options.php:137
|
41 |
msgid "Cache size"
|
42 |
msgstr "Размер КЭШа"
|
43 |
|
44 |
+
#: options.php:148
|
45 |
msgid "Old Hyper Cache options are missing or not readable."
|
46 |
msgstr "Настройки ранней версии Hyper Cache отсутствуют или повреждены."
|
47 |
|
48 |
+
#: options.php:171
|
49 |
msgid "Old options imported, now review them and save."
|
50 |
msgstr "Прежние настройки импортированы, их можно просмотреть и сохранить."
|
51 |
|
52 |
+
#: options.php:220
|
53 |
#, php-format
|
54 |
+
msgid "You must add to the file wp-config.php (after the <code>define(\"WPLANG\", \"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
|
55 |
+
msgstr "Вы должны добавить в файле wp-config.php (после строки <code>define(\"WPLANG\", \"\");</code>) код: <code>define(\"WP_CACHE\", true);</code>."
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
#: options.php:228
|
58 |
msgid "You must save the options since some files must be updated."
|
59 |
msgstr "Вы должны сохранить настройки, так как файлы должны быть обновлены."
|
60 |
|
61 |
+
#: options.php:237
|
62 |
#, php-format
|
63 |
msgid "Hyper Cache was not able to create or find the"
|
64 |
msgstr "Hyper Cache не удалось создать или найти"
|
65 |
|
66 |
+
#: options.php:239
|
67 |
#, php-format
|
68 |
+
msgid "folder, please create it manually with list, write and read permissions (usually 777)."
|
|
|
|
|
69 |
msgstr "папку, пожалуйста создайте его вручную, с правами (обычно 777)."
|
70 |
|
71 |
+
#: options.php:249
|
72 |
#, php-format
|
73 |
+
msgid "You should choose a different <a href=\"options-permalink.php\" target=\"_blank\"> permalink structure under the Permalink panel</a> otherwise Hyper Cache cannot work properly."
|
74 |
+
msgstr "Вы должны выбрать другую папку <a href=\"options-permalink.php\" target=\"_blank\"> для постоянной ссылки</a> в противном случае Hyper Cache не может работать должным образом."
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
+
#: options.php:263
|
77 |
#, php-format
|
78 |
msgid ""
|
79 |
+
"Please, refer to the <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">official page</a> and the <a href=\"http://www.satollo.net/forums/forum/hyper-cache\" target=\"_blank\">official forum</a> for support. <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
|
80 |
+
"\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png\"></a> Even <b>2$</b> helps! (<a href=\"http://www.satollo.net/donations\" target=\"_blank\">read more</a>)"
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
msgstr ""
|
82 |
+
"Пожалуйста, обратитесь для поддержки <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">официальная страница</a> и <a href=\"http://www.satollo.net/forums/forum/hyper-cache\" target=\"_blank\">официальный форум</a> .<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img "
|
83 |
+
"style=\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png\"></a> Даже <b>2$</b> поддержка! (<a href=\"http://www.satollo.net/donations\" target=\"_blank\">читать далее</a>)"
|
84 |
+
|
85 |
+
#: options.php:266
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
#, php-format
|
87 |
+
msgid "Want a full mail marketing system in your blog? Try my free <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
|
88 |
+
msgstr "Хотите полную маркетинговую почтовую систему на вашем сайте? Пробуйте мой бесплатный плагин <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a>."
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
#: options.php:269
|
91 |
msgid "Clean the whole cache"
|
92 |
msgstr "Удалить весь кеш"
|
93 |
|
94 |
+
#: options.php:270
|
95 |
msgid "Clean home and archives"
|
96 |
msgstr "Очистка архивов и домашней"
|
97 |
|
98 |
+
#: options.php:271
|
99 |
msgid "Compute the cache size"
|
100 |
msgstr "Вычесление размера КЕШа"
|
101 |
|
102 |
+
#: options.php:272
|
103 |
msgid "Import old options"
|
104 |
msgstr "Импортировать настройки"
|
105 |
|
106 |
+
#: options.php:273
|
107 |
msgid "Sure? Your setting will be overwritten."
|
108 |
msgstr "Уверены? Ваши настройки будут записаны поверх!"
|
109 |
|
110 |
+
#: options.php:278
|
111 |
msgid "General"
|
112 |
msgstr "Главные"
|
113 |
|
114 |
+
#: options.php:279
|
115 |
msgid "Bypasses"
|
116 |
msgstr "Исключения"
|
117 |
|
118 |
+
#: options.php:280
|
119 |
msgid "Mobile"
|
120 |
msgstr "Мобильный"
|
121 |
|
122 |
+
#: options.php:282
|
123 |
+
msgid "CDN"
|
124 |
+
msgstr "CDN"
|
125 |
+
|
126 |
+
#: options.php:288
|
127 |
+
msgid "EXPERIEMTAL! It works only with images, css, scripts."
|
128 |
+
msgstr "ВНИМАНИЕ! Это работает только с изображениями, стилями css, файлами скриптов."
|
129 |
+
|
130 |
+
#: options.php:301
|
131 |
+
#, php-format
|
132 |
+
msgid "Write here the CDN URL. For example a MaxCDN URL is something like<code>http://foo.bar.netdna-cdn.com</code>. You should usually create a pull zone in your CDN panel and they will give your an URL."
|
133 |
+
msgstr "Напишите здесь URL CDN. Например URL MaxCDN - например <code>http://foo.bar.netdna-cdn.com</code>. Вы должны обычно создать перемещающуюся зону в вашей панели CDN, и они дадут вашему URL."
|
134 |
+
|
135 |
+
#: options.php:309
|
136 |
+
#, php-format
|
137 |
+
msgid "I`m actually testing it with <a href=\"http://www.satollo.net/affiliate/maxcdn\" target=\"_blank\">MaxCDN</a> and <a href=\"http://www.satollo.net/affiliate/keycdn\" target=\"_blank\">KeyCDN</a>."
|
138 |
+
msgstr "Я фактически проверял это с <href = \"http://www.satollo.net/affiliate/maxcdn\" target = \"_blank\"> MaxCDN </a> и <href = \"http://www.satollo.net/affiliate/keycdn\" target = \"_blank\"> KeyCDN </a>."
|
139 |
+
|
140 |
+
#: options.php:319
|
141 |
msgid "Disable translations"
|
142 |
msgstr "Отключить перевод"
|
143 |
|
144 |
+
#: options.php:321 options.php:275
|
145 |
msgid "Disable"
|
146 |
msgstr "Отключить"
|
147 |
|
148 |
+
#: options.php:324
|
149 |
+
msgid "If you want to see this panel with the original labels, you can disable the tranlsation."
|
|
|
|
|
150 |
msgstr "Если ВЫ хотите видеть настройки без перевода, можете его отключить."
|
151 |
|
152 |
+
#: options.php:330
|
153 |
msgid "Cached pages will be valid for"
|
154 |
msgstr "Кэшированные страницы, будут действительны в течение"
|
155 |
|
156 |
+
#: options.php:333
|
157 |
msgid "0 means forever."
|
158 |
msgstr "0 означает, что навсегда."
|
159 |
|
160 |
+
#: options.php:337
|
161 |
msgid "Enable compression"
|
162 |
msgstr "Включить сжатие"
|
163 |
|
164 |
+
#: options.php:342
|
165 |
+
msgid "If you note odd characters when enabled, disable it since your server is already compressing the pages."
|
166 |
+
msgstr "Если на сайте появились нечитаемые символы, отключаете сжатие, так как на вашем сервере - уже включено сжатие страниц."
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
#: options.php:348
|
169 |
msgid "When the home is refreshed, refresh even the"
|
170 |
msgstr "Когда обновлена домашняя страница, обновятся остальные."
|
171 |
|
172 |
+
#: options.php:350
|
173 |
msgid "latest post"
|
174 |
msgstr "последние записи"
|
175 |
|
176 |
+
#: options.php:352
|
177 |
msgid "The number of latest posts to invalidate when the home is invalidated."
|
178 |
msgstr "Число последних записей, изменятся, когда изменена главная."
|
179 |
|
180 |
+
#: options.php:357
|
181 |
+
msgid "When a post receives a comment"
|
182 |
+
msgstr "При написании комментария"
|
183 |
+
|
184 |
+
#: options.php:359 options.php:370
|
185 |
+
msgid "clean archives (categories, tags, ..., but not the home)"
|
186 |
+
msgstr "Очистить архивы(категории,теги..., но не главную)"
|
187 |
+
|
188 |
+
#: options.php:361 options.php:372
|
189 |
+
msgid "clean the home"
|
190 |
+
msgstr "Очистить домашнюю"
|
191 |
+
|
192 |
+
#: options.php:368
|
193 |
+
msgid "When a post is edited"
|
194 |
+
msgstr "Когда записи отредактированы"
|
195 |
+
|
196 |
+
#: options.php:380
|
197 |
msgid "Cache folder"
|
198 |
+
msgstr "Папка кэша"
|
199 |
|
200 |
+
#: options.php:313 options.php:382
|
201 |
msgid "path on disk"
|
202 |
msgstr "путь к папке"
|
203 |
|
204 |
+
#: options.php:384
|
205 |
#, php-format
|
206 |
+
msgid "Leave blank for default value. You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -> [your folder]</code>. Your blog is located on"
|
207 |
+
msgstr "Оставьте не заполненым, для значения по-умолчанию. Вы можете проверить, оставить не заполненым и создать символическую ссылку, типа:<code>wp-content/cache/hyper-cache -> [ВАША ПАПКА]</code>. Путь к вашему сайту:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
+
#: options.php:388
|
210 |
msgid "A wrong configuration can destroy your blog."
|
211 |
msgstr "Неправильная конфигурация может уничтожить ваш сайт."
|
212 |
|
213 |
+
#: options.php:393
|
214 |
msgid "Next autoclean will run in"
|
215 |
+
msgstr "Далее эта функция будет выполняться через"
|
216 |
+
|
217 |
+
#: options.php:396
|
218 |
+
msgid "(will run again in)"
|
219 |
+
msgstr "выполнится снова через"
|
220 |
|
221 |
+
#: options.php:397
|
222 |
msgid "minutes"
|
223 |
msgstr "минуты"
|
224 |
|
225 |
+
#: options.php:399
|
226 |
msgid "The autoclean process removes old files to save disk space."
|
227 |
+
msgstr "Автоочистка, удаляет устаревшие файлы, для оптимизации дискового пространства."
|
|
|
|
|
228 |
|
229 |
+
#: options.php:400
|
230 |
+
msgid "If you enable the \"serve expired pages to bots\", you should disable the auto clean."
|
231 |
+
msgstr "Если Вы допускаете \"выдачу страниц поисковым ботам с истиченным сроком существования\", Вы должны отключить автоочистку."
|
232 |
+
|
233 |
+
#: options.php:405
|
234 |
msgid "Allow browser caching"
|
235 |
msgstr "Разрешение кеширования браузерами"
|
236 |
|
237 |
+
#: options.php:407 options.php:395
|
238 |
msgid "enable it"
|
239 |
+
msgstr "Разрешить, "
|
240 |
|
241 |
+
#: options.php:409
|
242 |
msgid "with an expire time of"
|
243 |
msgstr "по истечению"
|
244 |
|
245 |
+
#: options.php:410 #: options.php:287 options.php:332
|
246 |
msgid "hours"
|
247 |
msgstr "часов"
|
248 |
|
249 |
+
#: options.php:412
|
250 |
msgid ""
|
251 |
+
"When enabled Hyper Cache sends a signal to the browser allowing it to NOT request a page more than once andto use the copy it has in the local cache. If you set an expire time greater than zero, the browser should keep the copy for that amount of hours, otherwise Hyper Cache will tell the browser to keep the copy until the page expire in the blog cache."
|
252 |
+
"<br>Usually I keep this feature disabled."
|
|
|
|
|
|
|
|
|
253 |
msgstr ""
|
254 |
+
"Когда включен, Hyper Cache посылает сигнал браузеру, позволяющий НЕ спрашивать, чтобы страница постоянно использовала копию, которая имеется в кэше. Если Вы устанавливаете время сохранения, больше чем ноль, браузер должен сохранить копию определенное время, иначе Hyper Cache заставит браузер сохранять копию, пока не истечет время сохранения в кэше сайта."
|
255 |
+
"<br>Обычно я оставляю эту настройку заблокированной."
|
|
|
|
|
|
|
|
|
256 |
|
257 |
+
#: options.php:430
|
258 |
+
msgid "HTTPS"
|
259 |
+
msgstr "HTTPS"
|
260 |
+
|
261 |
+
#: options.php:432 options.php:590
|
262 |
+
msgid "Bypass the cache"
|
263 |
+
msgstr "Не кэшировать страницу"
|
264 |
|
265 |
+
#: options.php:433 options.php:589
|
266 |
+
msgid "Cache separately"
|
267 |
+
msgstr "Кешировать отдельно"
|
268 |
+
|
269 |
+
#: options.php:434
|
270 |
+
msgid "Use the standard cache (I have HTTP/HTTPS aware pages)"
|
271 |
+
msgstr "Используйте стандартный кэш (я имею HTTP/HTTP, страницы), "
|
272 |
+
|
273 |
+
#: options.php:441
|
274 |
+
msgid "Use readfile"
|
275 |
+
msgstr "Используйте чтение файлов"
|
276 |
+
|
277 |
+
#: options.php:445
|
278 |
+
msgid "The PHP function readfile to send back a page should optimized but on some server it has less performances the a standard file_get_contents. Probably you wont notice the difference."
|
279 |
+
msgstr "Функция PHP чтение файлов, чтобы послать назад страницу, она должна быть оптимизированной, но на некотором сервере функция file_get_contents, имеет меньшее значение. Вероятно Все правильно, если видите различие."
|
280 |
+
|
281 |
+
#: options.php:452
|
282 |
+
msgid "Ignore no-cache header from bots"
|
283 |
+
msgstr "Игнорируйте заголовок без кэша для ботов"
|
284 |
+
|
285 |
+
#: options.php:463
|
286 |
+
msgid "Serve expired pages to bots"
|
287 |
+
msgstr "Служит ботам со страницами с закончевшимся сроком действия"
|
288 |
+
|
289 |
+
#: options.php:463
|
290 |
+
msgid "Serve a cache page even if expired when requested by bots."
|
291 |
+
msgstr "Служит странице кэша, даже если истек когда требуется ботами."
|
292 |
+
|
293 |
+
#: options.php:478
|
294 |
msgid "Do not cache the home page"
|
295 |
+
msgstr "Не кэшируйте домашнюю страницу"
|
296 |
|
297 |
+
#: options.php:482
|
298 |
+
msgid "When active, the home page and its subpages are not cached."
|
299 |
+
msgstr "Когда активно, домашняя страница и его подстраницы не кэшируются."
|
300 |
+
|
301 |
+
#: options.php:483
|
302 |
+
msgid "Works even with a static home page."
|
303 |
+
msgstr "Работы даже со статической домашней страницей."
|
304 |
|
305 |
+
#: options.php:488
|
306 |
msgid "Do not cache the \"404 - Not found\" page"
|
307 |
msgstr "Не кэшировать \"стр.404\" "
|
308 |
|
309 |
+
#: options.php:492
|
310 |
+
msgid "When active, Hyper Cache does not serve a cached \"404 not found\" page. Requests which lead to a 404 not found page overload you blog since WordPress must generate a full page. Caching it help in reduce that overload."
|
311 |
+
msgstr "Когда активно, Hyper Cache не работает с кэшируемым 404, страницей. Запросы, которые приводят к 404 перегружают сайт, так как WordPress должен выдать полную страницу... , включение параметра помогает уменьшить нагрузку"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
+
#: options.php:497
|
314 |
msgid "Do not cache the blog main feeds"
|
315 |
msgstr "Не кешировать ленту комментариев"
|
316 |
|
317 |
+
#: options.php:501
|
318 |
msgid "When active, the main blog feed %s is not cached."
|
319 |
msgstr "Когда активно, главная лента новостей RSS не кэшируется"
|
320 |
|
321 |
+
#: options.php:507
|
322 |
msgid "Do not cache single post comment feed"
|
323 |
msgstr "Не кешировать ленту RSS комментариев"
|
324 |
|
325 |
+
#: options.php:510
|
326 |
+
msgid "When active, the single post comment feeds are not cached. Usually I enable this bypass since it saves disk space and comment feed on single posts are not usually used."
|
327 |
+
msgstr "Когда активно, страница комментариев не кэшируется. Обычно включается, так как это оптимизирует использование дискового пространства."
|
|
|
|
|
|
|
|
|
|
|
328 |
|
329 |
+
#: options.php:516
|
330 |
msgid "Exact URIs to bypass"
|
331 |
+
msgstr "Точный адрес URI исключить"
|
332 |
|
333 |
+
#: options.php:293 options.php:420 options.php:443 options.php:454 options.php:465 options.php:518 options.php:529 options.php:540 options.php:551 options.php:563
|
|
|
334 |
msgid "Enable"
|
335 |
msgstr "Включить"
|
336 |
|
337 |
+
#: options.php:521 options.php:532 options.php:543 options.php:554
|
338 |
+
msgid "One per line."
|
339 |
+
msgstr "По одному в линию."
|
340 |
+
|
341 |
+
#: options.php:522
|
342 |
#, php-format
|
343 |
+
msgid "Those URIs are exactly matched. For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached. A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS cached."
|
344 |
+
msgstr "Адрес URIs точно соответствуют. Например, если Вы добавляете <code>/my-single-post </code>, URI и запрос получены для <code>http://youblog.com<strong>/my-single-post</strong></code>, что страница не кэшируется. Запрос о <code>http://youblog.com<strong>/my-single-post-something</strong></code> кэшируется."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
|
346 |
+
#: options.php:527
|
347 |
msgid "(Starting with) URIs to bypass"
|
348 |
+
msgstr "(Начиная с) адреса URI исключить"
|
349 |
|
350 |
+
#: options.php:533
|
351 |
#, php-format
|
352 |
+
msgid "Those URIs match if a requested URI starts with one of them. For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached. A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS NOT cached as well."
|
353 |
+
msgstr "То соответствие URIs - требуемые начала URI с одним из них. Например, если Вы добавляете<code>/my-single-post</code> URI кешируется так же <code>http://youblog.com<strong>/my-single-post</strong></code> та страница кэшируется. Запрос к <code>http://youblog.com<strong>/my-single-post-something</strong></code> Кэшируется также."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
|
355 |
+
#: options.php:538
|
356 |
msgid "Cookies to bypass"
|
357 |
msgstr "Куки исключить"
|
358 |
|
359 |
+
#: options.php:544
|
360 |
+
msgid "If the visitor has a cookie named as one of the listed values, the cache is bypassed."
|
361 |
+
msgstr "Если указанная строка совпадает с одним из имен Cookies, кэш исключается."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
|
363 |
+
#: options.php:549
|
364 |
msgid "Devices (user agents) to bypass"
|
365 |
msgstr "Устройства(пользовательские) исключить"
|
366 |
|
367 |
+
#: options.php:555
|
368 |
+
msgid "If the visitor has a device with a user agent named as one of the listed values, the cache is bypassed."
|
369 |
+
msgstr "Если посетитель имеет устройство с пользовательским агентом, названным как одно из перечисленных значений, кэширование не происходит."
|
|
|
|
|
|
|
|
|
370 |
|
371 |
+
#: options.php:561
|
372 |
msgid "Dont serve cached pages to comment authors"
|
373 |
msgstr "Не кешировать авторские комментарии"
|
374 |
|
375 |
+
#: options.php:566
|
376 |
+
msgid "Hyper Cache is able to work with users who left a comment and completes the comment form with user data even on cached page with a small JavaScript added at the end of the pages. But the \"awaiting moderation\" message cannot be shown. If you have few readers who comment you can disable this feature to get back the classical WordPress comment flow."
|
|
|
|
|
|
|
|
|
|
|
377 |
msgstr ""
|
378 |
+
"Hyper Cache способен работать с пользователями, которые оставили комментарий и завершает комментарий форму с пользовательских данных даже на кэшированной страницы (с функцией JavaScript добавляется в конце страницы). Но сообщение \"ожидает модерации\" не может быть показано. Если у вас не много комментаторов, вы можете отключить эту функцию, чтобы "
|
379 |
+
"вернуться классический комментариев поток WordPress ."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
|
381 |
+
#: options.php:571
|
382 |
msgid "Reject posts older than"
|
383 |
msgstr "Не кешировать страницы старше"
|
384 |
|
385 |
+
#: options.php:574
|
386 |
+
msgid "days"
|
387 |
+
msgstr "дней"
|
|
|
|
|
|
|
|
|
388 |
|
389 |
+
#: options.php:576
|
390 |
+
msgid "Older posts wont be cached and stored resulting in a lower disk space usage. Useful when older posts have low traffic."
|
391 |
+
msgstr "Архивные страницы, кэшируется и сохранены приводят к экономии дискового пространства. Полезно, когда старые страницы имеют низкий трафик."
|
392 |
+
|
393 |
+
#: options.php:480 options.php:497 options.php:586
|
394 |
msgid "Working mode"
|
395 |
msgstr "Режим работы"
|
396 |
|
397 |
+
#: options.php:588
|
398 |
+
msgid "Use the standard cache"
|
399 |
+
msgstr "Использовать стандартный КЕШ"
|
400 |
+
|
401 |
+
#: options.php:593
|
402 |
+
msgid "Choose \"cache separately\" if you produce different content for mobile devices"
|
403 |
+
msgstr "Выбирите кешировать отдельно, если используете мобильную тему"
|
404 |
+
|
405 |
#: options.php:484
|
406 |
msgid "[disabled] Do not detect mobile devices"
|
407 |
msgstr "[Отключено] Не обнаруживают мобильных устройств"
|
408 |
|
409 |
#: options.php:500
|
410 |
msgid "[enabled] Detect mobile devices and use a separate cache"
|
411 |
+
msgstr "[Включено] Обнаружение мобильных устройства, используется отдельный кэш"
|
|
|
412 |
|
413 |
#: options.php:501
|
414 |
msgid "[enabled] Detect mobile devices and bypass the cache"
|
415 |
msgstr "[Включено] Обнаружение мобильных устройств и кэша"
|
416 |
|
417 |
#: options.php:504
|
418 |
+
msgid "It make sense to disable the cache for mobile devices when their traffic is very low."
|
419 |
+
msgstr "Имеет смысл отключить кэш для мобильных устройств, когда их трафик очень низок."
|
|
|
|
|
|
|
|
|
420 |
|
421 |
+
#: options.php:509 options.php:599
|
422 |
msgid "Mobile theme"
|
423 |
msgstr "Мобильная тема"
|
424 |
|
425 |
+
#: options.php:499 options.php:604
|
426 |
msgid "Use the active blog theme"
|
427 |
msgstr "Использование активной темы сайта"
|
428 |
|
429 |
+
#: options.php:519 options.php:610
|
430 |
+
msgid "If you have plugins which produce different content for desktop and mobile devices, you should use a separate cache for mobile."
|
431 |
+
msgstr "Если Вы имеете дополнения к программе, которые производят различное содержание для стационарных и мобильных устройств, Вы должны использовать отдельный кэш для мобильных устройств."
|
|
|
|
|
|
|
|
|
|
|
432 |
|
433 |
+
#: options.php:594
|
434 |
+
msgid "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile ads injection in posts."
|
435 |
+
msgstr "Смотрите пример использования <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header и Footer</a> расширений для различных устройств."
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
+
#: options.php:525 options.php:615
|
438 |
msgid "Mobile user agents"
|
439 |
msgstr "Мобильные агенты пользователей"
|
440 |
|
441 |
+
#: options.php:528 options.php:618
|
442 |
msgid "Reset"
|
443 |
msgstr "Сброс"
|
444 |
|
445 |
#: options.php:531
|
446 |
#, php-format
|
447 |
+
msgid "A \"user agent\" is a text which identify the kind of device used to surf the site. For example and iPhone has <code>iphone</code> as user agent."
|
448 |
+
msgstr "\"пользовательский агент \" текстовый формат устройства, которые идентифицируют вид используемого устройства, для занятий серфингом в интернете. Например и iPhone имеет <code>iphone</code> как пользовательский агент."
|
|
|
|
|
|
|
|
|
|
|
449 |
|
450 |
#: options.php:541
|
451 |
msgid "Save"
|
languages/hyper-cache.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C) 2014
|
2 |
# This file is distributed under the same license as the package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
@@ -12,330 +12,559 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
|
16 |
-
|
|
|
17 |
msgstr ""
|
18 |
|
19 |
-
|
20 |
-
|
|
|
21 |
msgstr ""
|
22 |
|
23 |
-
|
24 |
-
|
|
|
25 |
msgstr ""
|
26 |
|
27 |
-
|
28 |
-
|
|
|
29 |
msgstr ""
|
30 |
|
31 |
-
|
32 |
-
|
|
|
33 |
msgstr ""
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
"
|
38 |
-
"777)."
|
39 |
msgstr ""
|
40 |
|
41 |
-
|
42 |
-
|
|
|
43 |
msgstr ""
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
"
|
48 |
-
"\">permalink panel</a> otherwise Hyper Cache cannot work properly."
|
49 |
msgstr ""
|
50 |
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
msgid "Clean home and archives"
|
57 |
msgstr ""
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
msgid "Compute the cache size"
|
61 |
msgstr ""
|
62 |
|
63 |
-
|
64 |
-
|
|
|
65 |
msgstr ""
|
66 |
|
67 |
-
|
68 |
-
|
|
|
69 |
msgstr ""
|
70 |
|
71 |
-
|
72 |
-
|
|
|
73 |
msgstr ""
|
74 |
|
75 |
-
|
76 |
-
|
|
|
77 |
msgstr ""
|
78 |
|
79 |
-
|
80 |
-
|
|
|
81 |
msgstr ""
|
82 |
|
83 |
-
|
84 |
-
|
|
|
85 |
msgstr ""
|
86 |
|
87 |
-
|
88 |
-
|
|
|
89 |
msgstr ""
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
"already\r\n"
|
95 |
-
" compressing the pages."
|
96 |
msgstr ""
|
97 |
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
msgstr ""
|
101 |
|
102 |
-
|
103 |
-
|
|
|
104 |
msgstr ""
|
105 |
|
106 |
-
|
107 |
-
|
|
|
108 |
msgstr ""
|
109 |
|
110 |
-
|
111 |
-
|
|
|
112 |
msgstr ""
|
113 |
|
114 |
-
|
115 |
-
|
|
|
116 |
msgstr ""
|
117 |
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
msgstr ""
|
121 |
|
122 |
-
|
|
|
123 |
msgid "HTTPS"
|
124 |
msgstr ""
|
125 |
|
126 |
-
|
127 |
-
|
|
|
|
|
128 |
msgstr ""
|
129 |
|
130 |
-
|
131 |
-
|
|
|
132 |
msgstr ""
|
133 |
|
134 |
-
|
135 |
-
|
|
|
136 |
msgstr ""
|
137 |
|
138 |
-
|
139 |
-
|
|
|
140 |
msgstr ""
|
141 |
|
142 |
-
|
143 |
-
|
|
|
144 |
msgstr ""
|
145 |
|
146 |
-
|
147 |
-
|
|
|
148 |
msgstr ""
|
149 |
|
150 |
-
|
151 |
-
|
|
|
152 |
msgstr ""
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
"
|
157 |
msgstr ""
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
"
|
162 |
-
"WordPress must generate a full page"
|
163 |
msgstr ""
|
164 |
|
165 |
-
|
166 |
-
|
|
|
167 |
msgstr ""
|
168 |
|
169 |
-
|
170 |
-
|
|
|
171 |
msgstr ""
|
172 |
|
173 |
-
|
174 |
-
|
|
|
175 |
msgstr ""
|
176 |
|
177 |
-
|
178 |
-
|
|
|
179 |
msgstr ""
|
180 |
|
181 |
-
|
182 |
-
|
|
|
183 |
msgstr ""
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
"single posts are not usually used."
|
189 |
msgstr ""
|
190 |
|
191 |
-
|
192 |
-
|
|
|
193 |
msgstr ""
|
194 |
|
195 |
-
|
196 |
-
#: options.php:
|
197 |
-
msgid "
|
198 |
msgstr ""
|
199 |
|
200 |
-
|
201 |
-
#: options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
msgid "One per line."
|
203 |
msgstr ""
|
204 |
|
205 |
-
|
206 |
-
|
|
|
207 |
msgstr ""
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
"
|
212 |
-
"received for <code>http://youblog.com<strong>/my-single-post</strong></code> "
|
213 |
-
"that page IS NOT cached."
|
214 |
msgstr ""
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
"
|
219 |
-
"strong></code> IS cached."
|
220 |
msgstr ""
|
221 |
|
222 |
-
|
223 |
-
|
|
|
224 |
msgstr ""
|
225 |
|
226 |
-
|
227 |
-
|
|
|
228 |
msgstr ""
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
"
|
233 |
-
"strong></code> IS NOT cached as well."
|
234 |
msgstr ""
|
235 |
|
236 |
-
|
237 |
-
|
|
|
238 |
msgstr ""
|
239 |
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
msgstr ""
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
#: options.php:470
|
247 |
-
msgid "
|
248 |
msgstr ""
|
249 |
|
250 |
-
|
251 |
-
|
252 |
-
"
|
253 |
-
"values, the cache is bypassed."
|
254 |
msgstr ""
|
255 |
|
256 |
-
|
257 |
-
|
|
|
258 |
msgstr ""
|
259 |
|
260 |
-
|
261 |
-
|
262 |
-
"
|
263 |
-
"comment form with\r\n"
|
264 |
-
" user data even on cached page"
|
265 |
msgstr ""
|
266 |
|
267 |
-
|
268 |
-
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
-
|
272 |
-
|
|
|
273 |
msgstr ""
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
"
|
278 |
-
"the classical WordPress comment flow."
|
279 |
msgstr ""
|
280 |
|
281 |
-
|
282 |
-
|
|
|
283 |
msgstr ""
|
284 |
|
285 |
-
|
286 |
-
|
287 |
-
"
|
288 |
msgstr ""
|
289 |
|
290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
msgid "Useful when older posts have low traffic."
|
292 |
msgstr ""
|
293 |
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
msgid "Working mode"
|
296 |
msgstr ""
|
297 |
|
298 |
-
|
299 |
-
|
|
|
300 |
msgstr ""
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
"devices"
|
306 |
msgstr ""
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
"
|
311 |
-
"target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile "
|
312 |
-
"ads injection in posts."
|
313 |
msgstr ""
|
314 |
|
315 |
-
|
316 |
-
|
|
|
317 |
msgstr ""
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
"
|
322 |
-
"devices, you should use a separate cache for mobile."
|
323 |
msgstr ""
|
324 |
|
325 |
-
|
326 |
-
|
|
|
327 |
msgstr ""
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
"the site."
|
333 |
msgstr ""
|
334 |
|
335 |
-
|
336 |
-
|
|
|
337 |
msgstr ""
|
338 |
|
339 |
-
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
msgstr ""
|
1 |
+
# Copyright (C) 2014
|
2 |
# This file is distributed under the same license as the package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#. Text in echo
|
16 |
+
#: options.php:539
|
17 |
+
msgid "(Starting with) URIs to bypass"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#. Text in echo
|
21 |
+
#: options.php:583
|
22 |
+
msgid "(with a small JavaScript added at the end of the pages)."
|
23 |
msgstr ""
|
24 |
|
25 |
+
#. Text in echo
|
26 |
+
#: options.php:339
|
27 |
+
msgid "0 means forever."
|
28 |
msgstr ""
|
29 |
|
30 |
+
#. Text in echo
|
31 |
+
#: options.php:641
|
32 |
+
msgid "A \"user agent\" is a text which identify the kind of device used to surf the site."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#. Text in echo
|
36 |
+
#: options.php:548
|
37 |
+
msgid "A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS NOT cached as well."
|
38 |
msgstr ""
|
39 |
|
40 |
+
#. Text in echo
|
41 |
+
#: options.php:534
|
42 |
+
msgid "A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS cached."
|
|
|
43 |
msgstr ""
|
44 |
|
45 |
+
#. Text in echo
|
46 |
+
#: options.php:394
|
47 |
+
msgid "A wrong configuration can destroy your blog."
|
48 |
msgstr ""
|
49 |
|
50 |
+
#. Text in echo
|
51 |
+
#: options.php:411
|
52 |
+
msgid "Allow browser caching"
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
+
#. Text in echo
|
56 |
+
#: options.php:418
|
57 |
+
msgid "Attention: the browser may not reload a page from the blog showing not updated content. "
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#. Text in function
|
61 |
+
#: options.php:438
|
62 |
+
msgid "Build a separated cache"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#. Text in echo
|
66 |
+
#: options.php:584
|
67 |
+
msgid "But the \"awaiting moderation\" message cannot be shown."
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#. Text in function
|
71 |
+
#: options.php:438
|
72 |
+
#: options.php:608
|
73 |
+
msgid "Bypass the cache"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#. Text in echo
|
77 |
+
#: options.php:286
|
78 |
+
msgid "Bypasses"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#. Text in echo
|
82 |
+
#: options.php:288
|
83 |
+
msgid "CDN"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#. Text in echo
|
87 |
+
#: options.php:388
|
88 |
+
msgid "Cache folder"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#. Text in function
|
92 |
+
#: options.php:608
|
93 |
+
msgid "Cache separately"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#. Text in function
|
97 |
+
#: options.php:663
|
98 |
+
msgid "Cache size"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#. Text in echo
|
102 |
+
#: options.php:336
|
103 |
+
msgid "Cached pages will be valid for"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#. Text in echo
|
107 |
+
#: options.php:501
|
108 |
+
msgid "Caching it help in reduce that overload."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#. Text in echo
|
112 |
+
#: options.php:249
|
113 |
+
msgid "Change it on the <a href=\"options-permalink.php\" target=\"_blank\">permalink panel</a> otherwise Hyper Cache cannot work properly."
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#. Text in echo
|
117 |
+
#: options.php:613
|
118 |
+
msgid "Choose \"cache separately\" if you produce different content for mobile devices"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#. Text in function
|
122 |
+
#: options.php:277
|
123 |
msgid "Clean home and archives"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#. Text in function
|
127 |
+
#: options.php:276
|
128 |
+
msgid "Clean the whole cache"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#. Text in function
|
132 |
+
#: options.php:278
|
133 |
msgid "Compute the cache size"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#. Text in echo
|
137 |
+
#: options.php:553
|
138 |
+
msgid "Cookies to bypass"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#. Text in echo
|
142 |
+
#: options.php:564
|
143 |
+
msgid "Devices (user agents) to bypass"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#. Text in echo
|
147 |
+
#: options.php:516
|
148 |
+
msgid "Do not cache single post comment feed"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#. Text in echo
|
152 |
+
#: options.php:495
|
153 |
+
msgid "Do not cache the \"404 - Not found\" page"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#. Text in echo
|
157 |
+
#: options.php:506
|
158 |
+
msgid "Do not cache the blog main feeds"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#. Text in echo
|
162 |
+
#: options.php:485
|
163 |
+
msgid "Do not cache the home page"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#. Text in echo
|
167 |
+
#: options.php:576
|
168 |
+
msgid "Don\\'t serve cached pages to comment authors"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#. Text in function
|
172 |
+
#: options.php:663
|
173 |
+
msgid "Done!"
|
|
|
|
|
174 |
msgstr ""
|
175 |
|
176 |
+
#. Text in function
|
177 |
+
#: options.php:297
|
178 |
+
#: options.php:413
|
179 |
+
#: options.php:426
|
180 |
+
#: options.php:450
|
181 |
+
#: options.php:461
|
182 |
+
#: options.php:472
|
183 |
+
#: options.php:528
|
184 |
+
#: options.php:541
|
185 |
+
#: options.php:555
|
186 |
+
#: options.php:566
|
187 |
+
#: options.php:578
|
188 |
+
msgid "Enable"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#. Text in echo
|
192 |
+
#: options.php:343
|
193 |
+
msgid "Enable compression"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#. Text in echo
|
197 |
+
#: options.php:526
|
198 |
+
msgid "Exact URIs to bypass"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#. Text in echo
|
202 |
+
#: options.php:306
|
203 |
+
msgid "For example a MaxCDN URL is something like"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#. Text in echo
|
207 |
+
#: options.php:642
|
208 |
+
msgid "For example and iPhone has <code>iphone</code> as user agent."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#. Text in echo
|
212 |
+
#: options.php:546
|
213 |
+
msgid "For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#. Text in echo
|
217 |
+
#: options.php:285
|
218 |
+
msgid "General"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#. Text in echo
|
222 |
+
#: options.php:436
|
223 |
msgid "HTTPS"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#. Text in echo
|
227 |
+
#: options.php:581
|
228 |
+
msgid "Hyper Cache is able to work with users who left a comment and completes the comment form with
|
229 |
+
user data even on cached page"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#. Text in function
|
233 |
+
#: options.php:236
|
234 |
+
msgid "Hyper Cache was not able to create or find the %s folder."
|
235 |
msgstr ""
|
236 |
|
237 |
+
#. Text in echo
|
238 |
+
#: options.php:559
|
239 |
+
msgid "If the visitor has a cookie named as one of the listed values, the cache is bypassed."
|
240 |
msgstr ""
|
241 |
|
242 |
+
#. Text in echo
|
243 |
+
#: options.php:570
|
244 |
+
msgid "If the visitor has a device with a user agent named as one of the listed values, the cache is bypassed."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#. Text in echo
|
248 |
+
#: options.php:406
|
249 |
+
msgid "If you enable the \"serve expired pages to bots\", you should disable the auto clean."
|
250 |
msgstr ""
|
251 |
|
252 |
+
#. Text in echo
|
253 |
+
#: options.php:585
|
254 |
+
msgid "If you have few readers who comment you can disable this feature to get back the classical WordPress comment flow."
|
255 |
msgstr ""
|
256 |
|
257 |
+
#. Text in echo
|
258 |
+
#: options.php:630
|
259 |
+
msgid "If you have plugins which produce different content for desktop and mobile devices, you should use a separate cache for mobile."
|
260 |
msgstr ""
|
261 |
|
262 |
+
#. Text in echo
|
263 |
+
#: options.php:348
|
264 |
+
msgid "If you note odd characters when enabled, disable it since your server is already compressing the pages."
|
265 |
msgstr ""
|
266 |
|
267 |
+
#. Text in echo
|
268 |
+
#: options.php:459
|
269 |
+
msgid "Ignore no-cache header from bots"
|
|
|
270 |
msgstr ""
|
271 |
|
272 |
+
#. Text in function
|
273 |
+
#: options.php:279
|
274 |
+
msgid "Import old options"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#. Text in echo
|
278 |
+
#: options.php:453
|
279 |
+
msgid "It should be better than the file_get_contents() actually used."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#. Text in echo
|
283 |
+
#: options.php:292
|
284 |
+
msgid "It works only with images, css, scripts."
|
285 |
msgstr ""
|
286 |
|
287 |
+
#. Text in echo
|
288 |
+
#: options.php:392
|
289 |
+
msgid "Leave blank for default value."
|
290 |
msgstr ""
|
291 |
|
292 |
+
#. Text in echo
|
293 |
+
#: options.php:417
|
294 |
+
msgid "Lets browser to use a local copy of the page if newer than specified."
|
295 |
msgstr ""
|
296 |
|
297 |
+
#. Text in echo
|
298 |
+
#: options.php:287
|
299 |
+
msgid "Mobile"
|
|
|
300 |
msgstr ""
|
301 |
|
302 |
+
#. Text in echo
|
303 |
+
#: options.php:619
|
304 |
+
msgid "Mobile theme"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#. Text in echo
|
308 |
+
#: options.php:635
|
309 |
+
msgid "Mobile user agents"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#. Text in echo
|
313 |
+
#: options.php:399
|
314 |
+
msgid "Next autoclean will run in"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#. Text in function
|
318 |
+
#: options.php:663
|
319 |
+
msgid "Old Hyper Cache options are missing or not readable"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#. Text in function
|
323 |
+
#: options.php:663
|
324 |
+
msgid "Old options imported, now review them and save."
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#. Text in echo
|
328 |
+
#: options.php:595
|
329 |
+
msgid "Older posts won\\'t be cached and stored resulting in a lower disk space usage."
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#. Text in echo
|
333 |
+
#: options.php:640
|
334 |
msgid "One per line."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#. Text in function
|
338 |
+
#: options.php:663
|
339 |
+
msgid "Options deleted"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#. Text in function
|
343 |
+
#: options.php:663
|
344 |
+
msgid "Options saved. If you changed any of the bypasses empty the cache."
|
|
|
|
|
345 |
msgstr ""
|
346 |
|
347 |
+
#. Text in echo
|
348 |
+
#: options.php:442
|
349 |
+
msgid "Pages are usually different when served in HTTP and HTTPS."
|
|
|
350 |
msgstr ""
|
351 |
|
352 |
+
#. Text in echo
|
353 |
+
#: options.php:236
|
354 |
+
msgid "Please create it manually with list, write and read permissions (usually 777)."
|
355 |
msgstr ""
|
356 |
|
357 |
+
#. Text in echo
|
358 |
+
#: options.php:590
|
359 |
+
msgid "Reject posts older than"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#. Text in echo
|
363 |
+
#: options.php:424
|
364 |
+
msgid "Remove HTTP/HTTPS"
|
|
|
365 |
msgstr ""
|
366 |
|
367 |
+
#. Text in echo
|
368 |
+
#: options.php:500
|
369 |
+
msgid "Requests which lead to a 404 not found page overload you blog since WordPress must generate a full page"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#. Text in function
|
373 |
+
#: options.php:638
|
374 |
+
msgid "Reset"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#. Text in function
|
378 |
+
#: options.php:652
|
379 |
+
msgid "Save"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#. Text in echo
|
383 |
+
#: options.php:614
|
384 |
+
msgid "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile ads injection in posts."
|
385 |
msgstr ""
|
386 |
|
387 |
+
#. Text in echo
|
388 |
+
#: options.php:474
|
389 |
+
msgid "Serve a cache page even if expired when requested by bots."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#. Text in echo
|
393 |
#: options.php:470
|
394 |
+
msgid "Serve expired pages to bots"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#. Text in function
|
398 |
+
#: options.php:279
|
399 |
+
msgid "Sure? Your setting will be overwritten."
|
|
|
400 |
msgstr ""
|
401 |
|
402 |
+
#. Text in echo
|
403 |
+
#: options.php:405
|
404 |
+
msgid "The autoclean process removes old files to save disk space."
|
405 |
msgstr ""
|
406 |
|
407 |
+
#. Text in function
|
408 |
+
#: options.php:663
|
409 |
+
msgid "The cache folder has been cleaned."
|
|
|
|
|
410 |
msgstr ""
|
411 |
|
412 |
+
#. Text in echo
|
413 |
+
#: options.php:358
|
414 |
+
msgid "The number of latest posts to invalidate when the home is invalidated."
|
415 |
msgstr ""
|
416 |
|
417 |
+
#. Text in echo
|
418 |
+
#: options.php:532
|
419 |
+
msgid "Those URIs are exactly matched."
|
420 |
msgstr ""
|
421 |
|
422 |
+
#. Text in echo
|
423 |
+
#: options.php:545
|
424 |
+
msgid "Those URIs match if a requested URI starts with one of them."
|
|
|
425 |
msgstr ""
|
426 |
|
427 |
+
#. Text in function
|
428 |
+
#: options.php:663
|
429 |
+
msgid "Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions."
|
430 |
msgstr ""
|
431 |
|
432 |
+
#. Text in echo
|
433 |
+
#: options.php:448
|
434 |
+
msgid "Use readfile()"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#. Text in echo
|
438 |
+
#: options.php:452
|
439 |
+
msgid "Use the PHP function readfile() to send back a page."
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#. Text in function
|
443 |
+
#: options.php:621
|
444 |
+
msgid "Use the active blog theme"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#. Text in function
|
448 |
+
#: options.php:608
|
449 |
+
msgid "Use the standard cache"
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#. Text in function
|
453 |
+
#: options.php:438
|
454 |
+
msgid "Use the standard cache (I have HTTP/HTTPS aware pages)"
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#. Text in echo
|
458 |
+
#: options.php:596
|
459 |
msgid "Useful when older posts have low traffic."
|
460 |
msgstr ""
|
461 |
|
462 |
+
#. Text in echo
|
463 |
+
#: options.php:521
|
464 |
+
msgid "Usually I enable this bypass since it saves disk space and comment feed on single posts are not usually used."
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#. Text in echo
|
468 |
+
#: options.php:273
|
469 |
+
msgid "Want a full mail marketing system in your blog? Try my free <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#. Text in echo
|
473 |
+
#: options.php:364
|
474 |
+
msgid "When a post is edited"
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#. Text in echo
|
478 |
+
#: options.php:376
|
479 |
+
msgid "When a post receives a comment"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#. Text in echo
|
483 |
+
#: options.php:499
|
484 |
+
msgid "When active, Hyper Cache does not serve a cached \"404 not found\" page."
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#. Text in echo
|
488 |
+
#: options.php:489
|
489 |
+
msgid "When active, the home page and its subpages are not cached."
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#. Text in function
|
493 |
+
#: options.php:510
|
494 |
+
msgid "When active, the main blog feed %s is not cached."
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#. Text in echo
|
498 |
+
#: options.php:520
|
499 |
+
msgid "When active, the single post comment feeds are not cached."
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#. Text in echo
|
503 |
+
#: options.php:354
|
504 |
+
msgid "When the home is refreshed, refresh even the"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#. Text in echo
|
508 |
+
#: options.php:606
|
509 |
msgid "Working mode"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#. Text in echo
|
513 |
+
#: options.php:490
|
514 |
+
msgid "Works even with a static home page."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#. Text in echo
|
518 |
+
#: options.php:305
|
519 |
+
msgid "Write here the CDN URL."
|
|
|
520 |
msgstr ""
|
521 |
|
522 |
+
#. Text in echo
|
523 |
+
#: options.php:393
|
524 |
+
msgid "You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -> [your folder]</code>."
|
|
|
|
|
525 |
msgstr ""
|
526 |
|
527 |
+
#. Text in echo
|
528 |
+
#: options.php:220
|
529 |
+
msgid "You must add to the file wp-config.php (after the <code>define(\"WPLANG\", \"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#. Text in echo
|
533 |
+
#: options.php:228
|
534 |
+
msgid "You must save the options since some files must be updated."
|
|
|
535 |
msgstr ""
|
536 |
|
537 |
+
#. Text in echo
|
538 |
+
#: options.php:249
|
539 |
+
msgid "You should choose a different permalink structure."
|
540 |
msgstr ""
|
541 |
|
542 |
+
#. Text in echo
|
543 |
+
#: options.php:308
|
544 |
+
msgid "You should usually create a pull zone in your CDN panel and they will give your an URL."
|
|
|
545 |
msgstr ""
|
546 |
|
547 |
+
#. Text in echo
|
548 |
+
#: options.php:593
|
549 |
+
msgid "days"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#. Text in echo
|
553 |
+
#: options.php:338
|
554 |
+
msgid "hours"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#. Text in echo
|
558 |
+
#: options.php:356
|
559 |
+
msgid "latest post"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#. Text in echo
|
563 |
+
#: options.php:403
|
564 |
+
msgid "minutes"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#. Text in echo
|
568 |
+
#: options.php:403
|
569 |
+
msgid "will run again in"
|
570 |
msgstr ""
|
options.php
CHANGED
@@ -80,19 +80,20 @@ if ($controls->is_action('save')) {
|
|
80 |
$r = $plugin->build_advanced_cache();
|
81 |
|
82 |
if ($r == false) {
|
83 |
-
$controls->errors = 'Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions.';
|
84 |
}
|
85 |
}
|
86 |
|
87 |
if ($controls->is_action('clean')) {
|
88 |
$folder = $plugin->get_folder();
|
89 |
$plugin->remove_dir($folder . '');
|
|
|
90 |
$controls->messages = __('The cache folder has been cleaned.', 'hyper-cache');
|
91 |
}
|
92 |
|
93 |
if ($controls->is_action('autoclean')) {
|
94 |
$plugin->hook_hyper_cache_clean();
|
95 |
-
$controls->messages = 'Done!';
|
96 |
}
|
97 |
|
98 |
if ($controls->is_action('clean-home')) {
|
@@ -128,8 +129,8 @@ if ($controls->is_action('clean-home')) {
|
|
128 |
}
|
129 |
|
130 |
if ($controls->is_action('delete')) {
|
131 |
-
delete_option('hyper-
|
132 |
-
$controls->messages = 'Options deleted';
|
133 |
}
|
134 |
|
135 |
if ($controls->is_action('size')) {
|
@@ -145,7 +146,7 @@ if ($controls->is_action('import')) {
|
|
145 |
$old_options = get_option('hyper');
|
146 |
|
147 |
if (!is_array($old_options)) {
|
148 |
-
$controls->errors = 'Old Hyper Cache options are missing or not readable';
|
149 |
} else {
|
150 |
|
151 |
$uris = $plugin->text_to_list($old_options['reject']);
|
@@ -168,7 +169,7 @@ if ($controls->is_action('import')) {
|
|
168 |
|
169 |
update_option('hyper-cache', $controls->options);
|
170 |
|
171 |
-
$controls->messages = 'Old options imported, now review them and save.';
|
172 |
}
|
173 |
}
|
174 |
|
@@ -217,8 +218,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
217 |
<?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
|
218 |
<div class="error">
|
219 |
<p>
|
220 |
-
You must add to the file wp-config.php (after the <code>
|
221 |
-
<code>define('WP_CACHE', true);</code>.
|
222 |
</p>
|
223 |
</div>
|
224 |
<?php } ?>
|
@@ -255,6 +255,16 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
255 |
</div>
|
256 |
<?php } ?>
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
<?php $controls->show(); ?>
|
260 |
|
@@ -270,14 +280,13 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
270 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/donate.png"></a>
|
271 |
Even <b>2$</b> helps! (<a href="http://www.satollo.net/donations" target="_blank">read more</a>)
|
272 |
</p>
|
273 |
-
|
274 |
-
Want a full mail marketing system in your blog? Try my free <a href="http://www.satollo.net/plugins/newsletter" target="_blank">Newsletter</a> plugin.
|
275 |
-
</p>
|
276 |
<p>
|
277 |
<?php $controls->button('clean', __('Clean the whole cache', 'hyper-cache')); ?>
|
278 |
<?php $controls->button('clean-home', __('Clean home and archives', 'hyper-cache')); ?>
|
279 |
<?php $controls->button('size', __('Compute the cache size', 'hyper-cache')); ?>
|
280 |
-
<?php $controls->button('import', __('Import old options', 'hyper-cache'),
|
|
|
281 |
</p>
|
282 |
|
283 |
<div id="tabs">
|
@@ -285,19 +294,16 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
285 |
<li><a href="#tabs-general"><?php _e('General', 'hyper-cache'); ?></a></li>
|
286 |
<li><a href="#tabs-rejects"><?php _e('Bypasses', 'hyper-cache'); ?></a></li>
|
287 |
<li><a href="#tabs-mobile"><?php _e('Mobile', 'hyper-cache'); ?></a></li>
|
288 |
-
<?php if (defined('HYPER_CACHE_BETA') && HYPER_CACHE_BETA) { ?>
|
289 |
<li><a href="#tabs-cdn"><?php _e('CDN', 'hyper-cache'); ?></a></li>
|
290 |
-
<?php } ?>
|
291 |
</ul>
|
292 |
|
293 |
-
<?php if (defined('HYPER_CACHE_BETA') && HYPER_CACHE_BETA) { ?>
|
294 |
<div id="tabs-cdn">
|
295 |
-
<p
|
296 |
<table class="form-table">
|
297 |
<tr>
|
298 |
<th> </th>
|
299 |
<td>
|
300 |
-
<?php $controls->checkbox('cdn_enabled', 'Enable'); ?>
|
301 |
</td>
|
302 |
</tr>
|
303 |
<tr>
|
@@ -305,9 +311,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
305 |
<td>
|
306 |
<?php $controls->text('cdn_url', 50); ?>
|
307 |
<p class="description">
|
308 |
-
Write here the CDN URL.
|
309 |
-
|
310 |
-
|
|
|
311 |
</p>
|
312 |
</td>
|
313 |
</tr>
|
@@ -317,26 +324,27 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
317 |
<a href="http://www.satollo.net/affiliate/keycdn" target="_blank">KeyCDN</a>.
|
318 |
</p>
|
319 |
</div>
|
320 |
-
<?php } ?>
|
321 |
|
322 |
<div id="tabs-general">
|
323 |
|
324 |
<table class="form-table">
|
|
|
325 |
<tr>
|
326 |
<th>Disable translations</th>
|
327 |
<td>
|
328 |
<?php $controls->checkbox('translation_disabled', 'Disable'); ?>
|
329 |
<p class="description">
|
330 |
-
|
331 |
If you want to see this panel with the original labels, you can disable the
|
332 |
tranlsation.
|
333 |
</p>
|
334 |
</td>
|
335 |
</tr>
|
|
|
336 |
<tr>
|
337 |
<th><?php _e('Cached pages will be valid for', 'hyper-cache'); ?></th>
|
338 |
<td>
|
339 |
-
<?php $controls->text('max_age');
|
340 |
<p class="description"><?php _e('0 means forever.', 'hyper-cache'); ?></p>
|
341 |
</td>
|
342 |
</tr>
|
@@ -346,37 +354,50 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
346 |
<?php $controls->checkbox('gzip'); ?>
|
347 |
|
348 |
<p class="description">
|
349 |
-
<?php _e('If you note odd characters when enabled, disable it since your server is already
|
350 |
-
|
351 |
</p>
|
352 |
</td>
|
353 |
</tr>
|
354 |
<tr>
|
355 |
-
<th
|
356 |
<td>
|
357 |
-
<?php $controls->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
<p class="description">
|
359 |
<?php _e('The number of latest posts to invalidate when the home is invalidated.', 'hyper-cache'); ?>
|
360 |
</p>
|
361 |
</td>
|
362 |
</tr>
|
|
|
363 |
<tr>
|
364 |
-
<th
|
365 |
<td>
|
366 |
-
<?php $controls->checkbox('
|
367 |
<br>
|
368 |
-
<?php $controls->checkbox('
|
369 |
<p class="description">
|
370 |
|
371 |
</p>
|
372 |
</td>
|
373 |
</tr>
|
|
|
374 |
<tr>
|
375 |
-
<th
|
376 |
<td>
|
377 |
-
<?php $controls->checkbox('
|
378 |
<br>
|
379 |
-
<?php $controls->checkbox('
|
380 |
<p class="description">
|
381 |
|
382 |
</p>
|
@@ -388,9 +409,9 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
388 |
<td>
|
389 |
<?php $controls->text('folder', 70); ?> path on disk
|
390 |
<p class="description">
|
391 |
-
Leave blank for default value.
|
392 |
-
this blank and create a symbolic link <code>wp-content/cache/hyper-cache -> [your folder]</code>.
|
393 |
-
|
394 |
</p>
|
395 |
</td>
|
396 |
</tr>
|
@@ -399,7 +420,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
399 |
<td>
|
400 |
<?php $controls->checkbox('autoclean', 'enable it'); ?>
|
401 |
|
402 |
-
(will run again in <?php echo (int)((wp_next_scheduled('hyper_cache_clean')-time())/60) ?> minutes)
|
403 |
<p class="description">
|
404 |
<?php _e('The autoclean process removes old files to save disk space.', 'hyper-cache'); ?>
|
405 |
<?php _e('If you enable the "serve expired pages to bots", you should disable the auto clean.', 'hyper-cache'); ?>
|
@@ -409,15 +430,12 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
409 |
<tr valign="top">
|
410 |
<th><?php _e('Allow browser caching', 'hyper-cache'); ?></th>
|
411 |
<td>
|
412 |
-
<?php $controls->checkbox('browser_cache', '
|
413 |
|
414 |
with an expire time of <?php $controls->text('browser_cache_hours', 5); ?> hours
|
415 |
<p class="description">
|
416 |
-
|
417 |
-
|
418 |
-
for that amount of hours, otherwise Hyper Cache will tell the browser to keep the copy until the page expire in the blog
|
419 |
-
cache.<br>
|
420 |
-
Usually I keep this feature disabled.
|
421 |
</p>
|
422 |
</td>
|
423 |
</tr>
|
@@ -425,7 +443,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
425 |
<tr>
|
426 |
<th><?php _e('Remove HTTP/HTTPS', 'hyper-cache'); ?></th>
|
427 |
<td>
|
428 |
-
<?php $controls->checkbox('remove_protocol', 'Enable'); ?>
|
429 |
<p class="description">
|
430 |
If your site uses both HTTP and HTTPS it's better to have page links as
|
431 |
<code>://www.domain.com/...</code> without the protocol.
|
@@ -438,9 +456,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
438 |
<th><?php _e('HTTPS', 'hyper-cache'); ?></th>
|
439 |
<td>
|
440 |
<?php $controls->select('https', array(0 => __('Bypass the cache', 'hyper-cache'),
|
441 |
-
1 => __('
|
442 |
2 => __('Use the standard cache (I have HTTP/HTTPS aware pages)', 'hyper-cache'))); ?>
|
443 |
<p class="description">
|
|
|
444 |
</p>
|
445 |
</td>
|
446 |
</tr>
|
@@ -448,11 +467,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
448 |
<tr>
|
449 |
<th><?php _e('Use readfile()', 'hyper-cache'); ?></th>
|
450 |
<td>
|
451 |
-
<?php $controls->checkbox('readfile', 'Enable'); ?>
|
452 |
<p class="description">
|
453 |
-
|
454 |
-
|
455 |
-
difference.
|
456 |
</p>
|
457 |
</td>
|
458 |
</tr>
|
@@ -460,7 +478,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
460 |
<tr>
|
461 |
<th><?php _e('Ignore no-cache header from bots', 'hyper-cache'); ?></th>
|
462 |
<td>
|
463 |
-
<?php $controls->checkbox('bots_ignore_nocache', 'Enable'); ?>
|
464 |
<p class="description">
|
465 |
Bots usually send a no-cache request to ask always fresh pages. This option force the cache to
|
466 |
ignore such request and serve a caches page if available.
|
@@ -471,9 +489,9 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
471 |
<tr>
|
472 |
<th><?php _e('Serve expired pages to bots', 'hyper-cache'); ?></th>
|
473 |
<td>
|
474 |
-
<?php $controls->checkbox('serve_expired_to_bots', 'Enable'); ?>
|
475 |
<p class="description">
|
476 |
-
Serve a cache page even if expired when requested by bots.
|
477 |
</p>
|
478 |
</td>
|
479 |
</tr>
|
@@ -591,7 +609,8 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
591 |
<tr>
|
592 |
<th><?php _e('Reject posts older than', 'hyper-cache'); ?></th>
|
593 |
<td>
|
594 |
-
<?php $controls->text('reject_old_posts', 5); ?>
|
|
|
595 |
<p class="description">
|
596 |
<?php _e('Older posts won\'t be cached and stored resulting in a lower disk space usage.', 'hyper-cache'); ?>
|
597 |
<?php _e('Useful when older posts have low traffic.', 'hyper-cache'); ?>
|
@@ -622,7 +641,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
622 |
<?php
|
623 |
$themes = wp_get_themes();
|
624 |
//var_dump($themes);
|
625 |
-
$list = array('' => 'Use the active blog theme');
|
626 |
foreach ($themes as $theme)
|
627 |
$list[$theme->stylesheet] = $theme->name;
|
628 |
?>
|
@@ -636,7 +655,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
|
|
636 |
<th><?php _e('Mobile user agents', 'hyper-cache'); ?></th>
|
637 |
<td>
|
638 |
<?php $controls->textarea('mobile_agents'); ?>
|
639 |
-
<?php $controls->button('reset_mobile_agents', 'Reset'); ?>
|
640 |
<p class="description">
|
641 |
<?php _e('One per line.', 'hyper-cache'); ?>
|
642 |
<?php _e('A "user agent" is a text which identify the kind of device used to surf the site.', 'hyper-cache'); ?>
|
80 |
$r = $plugin->build_advanced_cache();
|
81 |
|
82 |
if ($r == false) {
|
83 |
+
$controls->errors = __('Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions.', 'hyper-cache');
|
84 |
}
|
85 |
}
|
86 |
|
87 |
if ($controls->is_action('clean')) {
|
88 |
$folder = $plugin->get_folder();
|
89 |
$plugin->remove_dir($folder . '');
|
90 |
+
do_action('hyper_cache_flush_all');
|
91 |
$controls->messages = __('The cache folder has been cleaned.', 'hyper-cache');
|
92 |
}
|
93 |
|
94 |
if ($controls->is_action('autoclean')) {
|
95 |
$plugin->hook_hyper_cache_clean();
|
96 |
+
$controls->messages = __('Done!', 'hyper-cache');
|
97 |
}
|
98 |
|
99 |
if ($controls->is_action('clean-home')) {
|
129 |
}
|
130 |
|
131 |
if ($controls->is_action('delete')) {
|
132 |
+
delete_option('hyper-cache');
|
133 |
+
$controls->messages = __('Options deleted', 'hyper-cache');
|
134 |
}
|
135 |
|
136 |
if ($controls->is_action('size')) {
|
146 |
$old_options = get_option('hyper');
|
147 |
|
148 |
if (!is_array($old_options)) {
|
149 |
+
$controls->errors = __('Old Hyper Cache options are missing or not readable', 'hyper-cache');
|
150 |
} else {
|
151 |
|
152 |
$uris = $plugin->text_to_list($old_options['reject']);
|
169 |
|
170 |
update_option('hyper-cache', $controls->options);
|
171 |
|
172 |
+
$controls->messages = __('Old options imported, now review them and save.', 'hyper-cache');
|
173 |
}
|
174 |
}
|
175 |
|
218 |
<?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
|
219 |
<div class="error">
|
220 |
<p>
|
221 |
+
<?php _e('You must add to the file wp-config.php (after the <code><php</code> first line) the line of code: <code>define("WP_CACHE", true);</code>', 'hyper-cache'); ?>
|
|
|
222 |
</p>
|
223 |
</div>
|
224 |
<?php } ?>
|
255 |
</div>
|
256 |
<?php } ?>
|
257 |
|
258 |
+
<p>
|
259 |
+
Check out my other useful plugins:<br>
|
260 |
+
<a href="http://www.satollo.net/plugins/comment-plus?utm_source=hyper-cache&utm_medium=banner&utm_campaign=comment-plus" target="_blank"><img src="http://www.satollo.net/images/plugins/comment-plus-icon.png"></a>
|
261 |
+
<a href="http://www.satollo.net/plugins/header-footer?utm_source=hyper-cache&utm_medium=banner&utm_campaign=header-footer" target="_blank"><img src="http://www.satollo.net/images/plugins/header-footer-icon.png"></a>
|
262 |
+
<a href="http://www.satollo.net/plugins/include-me?utm_source=hyper-cache&utm_medium=banner&utm_campaign=include-me" target="_blank"><img src="http://www.satollo.net/images/plugins/include-me-icon.png"></a>
|
263 |
+
<a href="http://www.thenewsletterplugin.com/?utm_source=hyper-cache&utm_medium=banner&utm_campaign=newsletter" target="_blank"><img src="http://www.satollo.net/images/plugins/newsletter-icon.png"></a>
|
264 |
+
<a href="http://www.satollo.net/plugins/mailer?utm_source=hyper-cache&utm_medium=banner&utm_campaign=mailer" target="_blank"><img src="http://www.satollo.net/images/plugins/mailer-icon.png"></a>
|
265 |
+
<a href="http://www.satollo.net/plugins/php-text-widget?utm_source=hyper-cache&utm_medium=banner&utm_campaign=php-text-widget" target="_blank"><img src="http://www.satollo.net/images/plugins/php-text-widget-icon.png"></a>
|
266 |
+
</p>
|
267 |
+
|
268 |
|
269 |
<?php $controls->show(); ?>
|
270 |
|
280 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/donate.png"></a>
|
281 |
Even <b>2$</b> helps! (<a href="http://www.satollo.net/donations" target="_blank">read more</a>)
|
282 |
</p>
|
283 |
+
|
|
|
|
|
284 |
<p>
|
285 |
<?php $controls->button('clean', __('Clean the whole cache', 'hyper-cache')); ?>
|
286 |
<?php $controls->button('clean-home', __('Clean home and archives', 'hyper-cache')); ?>
|
287 |
<?php $controls->button('size', __('Compute the cache size', 'hyper-cache')); ?>
|
288 |
+
<?php $controls->button('import', __('Import old options', 'hyper-cache'),
|
289 |
+
__('Sure? Your setting will be overwritten.', 'hyper-cache')); ?>
|
290 |
</p>
|
291 |
|
292 |
<div id="tabs">
|
294 |
<li><a href="#tabs-general"><?php _e('General', 'hyper-cache'); ?></a></li>
|
295 |
<li><a href="#tabs-rejects"><?php _e('Bypasses', 'hyper-cache'); ?></a></li>
|
296 |
<li><a href="#tabs-mobile"><?php _e('Mobile', 'hyper-cache'); ?></a></li>
|
|
|
297 |
<li><a href="#tabs-cdn"><?php _e('CDN', 'hyper-cache'); ?></a></li>
|
|
|
298 |
</ul>
|
299 |
|
|
|
300 |
<div id="tabs-cdn">
|
301 |
+
<p><?php _e('It works only with images, css, scripts.', 'hyper-cache'); ?></p>
|
302 |
<table class="form-table">
|
303 |
<tr>
|
304 |
<th> </th>
|
305 |
<td>
|
306 |
+
<?php $controls->checkbox('cdn_enabled', __('Enable', 'hyper-cache')); ?>
|
307 |
</td>
|
308 |
</tr>
|
309 |
<tr>
|
311 |
<td>
|
312 |
<?php $controls->text('cdn_url', 50); ?>
|
313 |
<p class="description">
|
314 |
+
<?php _e('Write here the CDN URL.', 'hyper-cache'); ?>
|
315 |
+
<?php _e('For example a MaxCDN URL is something like', 'hyper-cache'); ?>
|
316 |
+
<code>http://foo.bar.netdna-cdn.com</code>.
|
317 |
+
<?php _e('You should usually create a pull zone in your CDN panel and they will give your an URL.', 'hyper-cache'); ?>
|
318 |
</p>
|
319 |
</td>
|
320 |
</tr>
|
324 |
<a href="http://www.satollo.net/affiliate/keycdn" target="_blank">KeyCDN</a>.
|
325 |
</p>
|
326 |
</div>
|
|
|
327 |
|
328 |
<div id="tabs-general">
|
329 |
|
330 |
<table class="form-table">
|
331 |
+
<!-- Do not translate that -->
|
332 |
<tr>
|
333 |
<th>Disable translations</th>
|
334 |
<td>
|
335 |
<?php $controls->checkbox('translation_disabled', 'Disable'); ?>
|
336 |
<p class="description">
|
337 |
+
|
338 |
If you want to see this panel with the original labels, you can disable the
|
339 |
tranlsation.
|
340 |
</p>
|
341 |
</td>
|
342 |
</tr>
|
343 |
+
<!-- /Do not translate that -->
|
344 |
<tr>
|
345 |
<th><?php _e('Cached pages will be valid for', 'hyper-cache'); ?></th>
|
346 |
<td>
|
347 |
+
<?php $controls->text('max_age'); ?><?php _e('hours', 'hyper-cache'); ?>
|
348 |
<p class="description"><?php _e('0 means forever.', 'hyper-cache'); ?></p>
|
349 |
</td>
|
350 |
</tr>
|
354 |
<?php $controls->checkbox('gzip'); ?>
|
355 |
|
356 |
<p class="description">
|
357 |
+
<?php _e('If you note odd characters when enabled, disable it since your server is already compressing the pages.', 'hyper-cache'); ?>
|
358 |
+
<?php _e('If your server has mod_pagespeed, leave the compression disabled otherwise the module cannot optimize the page.', 'hyper-cache'); ?>
|
359 |
</p>
|
360 |
</td>
|
361 |
</tr>
|
362 |
<tr>
|
363 |
+
<th><?php _e('Enable on-the-fly compression', 'hyper-cache'); ?></th>
|
364 |
<td>
|
365 |
+
<?php $controls->checkbox('gzip_on_the_fly'); ?>
|
366 |
+
|
367 |
+
<p class="description">
|
368 |
+
<?php _e('Enable on the fly compression for non cached pages.', 'hyper-cache'); ?>
|
369 |
+
</p>
|
370 |
+
</td>
|
371 |
+
</tr>
|
372 |
+
<tr>
|
373 |
+
|
374 |
+
<th><?php _e('When the home is refreshed, refresh even the', 'hyper-cache'); ?></th>
|
375 |
+
<td>
|
376 |
+
<?php $controls->text('clean_last_posts', 5); ?> <?php _e('latest post', 'hyper-cache'); ?>
|
377 |
<p class="description">
|
378 |
<?php _e('The number of latest posts to invalidate when the home is invalidated.', 'hyper-cache'); ?>
|
379 |
</p>
|
380 |
</td>
|
381 |
</tr>
|
382 |
+
|
383 |
<tr>
|
384 |
+
<th><?php _e('When a post is edited', 'hyper-cache'); ?></th>
|
385 |
<td>
|
386 |
+
<?php $controls->checkbox('clean_archives_on_post_edit'); ?> clean archives (categories, tags, ..., but not the home)
|
387 |
<br>
|
388 |
+
<?php $controls->checkbox('clean_home_on_post_edit'); ?> clean the home
|
389 |
<p class="description">
|
390 |
|
391 |
</p>
|
392 |
</td>
|
393 |
</tr>
|
394 |
+
|
395 |
<tr>
|
396 |
+
<th><?php _e('When a post receives a comment', 'hyper-cache'); ?></th>
|
397 |
<td>
|
398 |
+
<?php $controls->checkbox('clean_archives_on_comment'); ?> clean archives (categories, tags, ..., but not the home)
|
399 |
<br>
|
400 |
+
<?php $controls->checkbox('clean_home_on_comment'); ?> clean the home
|
401 |
<p class="description">
|
402 |
|
403 |
</p>
|
409 |
<td>
|
410 |
<?php $controls->text('folder', 70); ?> path on disk
|
411 |
<p class="description">
|
412 |
+
<?php _e('Leave blank for default value.', 'hyper-cache'); ?>
|
413 |
+
<?php _e('You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -> [your folder]</code>.', 'hyper-cache'); ?>
|
414 |
+
<?php _e('A wrong configuration can destroy your blog.', 'hyper-cache'); ?>
|
415 |
</p>
|
416 |
</td>
|
417 |
</tr>
|
420 |
<td>
|
421 |
<?php $controls->checkbox('autoclean', 'enable it'); ?>
|
422 |
|
423 |
+
(<?php _e('will run again in', 'hyper-cache'); ?> <?php echo (int)((wp_next_scheduled('hyper_cache_clean')-time())/60) ?> <?php _e('minutes', 'hyper-cache'); ?>)
|
424 |
<p class="description">
|
425 |
<?php _e('The autoclean process removes old files to save disk space.', 'hyper-cache'); ?>
|
426 |
<?php _e('If you enable the "serve expired pages to bots", you should disable the auto clean.', 'hyper-cache'); ?>
|
430 |
<tr valign="top">
|
431 |
<th><?php _e('Allow browser caching', 'hyper-cache'); ?></th>
|
432 |
<td>
|
433 |
+
<?php $controls->checkbox('browser_cache', __('Enable', 'hyper-cache')); ?>
|
434 |
|
435 |
with an expire time of <?php $controls->text('browser_cache_hours', 5); ?> hours
|
436 |
<p class="description">
|
437 |
+
<?php _e('Lets browser to use a local copy of the page if newer than specified.', 'hyper-cache'); ?>
|
438 |
+
<?php _e('Attention: the browser may not reload a page from the blog showing not updated content. ', 'hyper-cache'); ?>
|
|
|
|
|
|
|
439 |
</p>
|
440 |
</td>
|
441 |
</tr>
|
443 |
<tr>
|
444 |
<th><?php _e('Remove HTTP/HTTPS', 'hyper-cache'); ?></th>
|
445 |
<td>
|
446 |
+
<?php $controls->checkbox('remove_protocol', __('Enable', 'hyper-cache')); ?>
|
447 |
<p class="description">
|
448 |
If your site uses both HTTP and HTTPS it's better to have page links as
|
449 |
<code>://www.domain.com/...</code> without the protocol.
|
456 |
<th><?php _e('HTTPS', 'hyper-cache'); ?></th>
|
457 |
<td>
|
458 |
<?php $controls->select('https', array(0 => __('Bypass the cache', 'hyper-cache'),
|
459 |
+
1 => __('Build a separated cache', 'hyper-cache'),
|
460 |
2 => __('Use the standard cache (I have HTTP/HTTPS aware pages)', 'hyper-cache'))); ?>
|
461 |
<p class="description">
|
462 |
+
<?php _e('Pages are usually different when served in HTTP and HTTPS.', 'hyper-cache'); ?>
|
463 |
</p>
|
464 |
</td>
|
465 |
</tr>
|
467 |
<tr>
|
468 |
<th><?php _e('Use readfile()', 'hyper-cache'); ?></th>
|
469 |
<td>
|
470 |
+
<?php $controls->checkbox('readfile', __('Enable', 'hyper-cache')); ?>
|
471 |
<p class="description">
|
472 |
+
<?php _e('Use the PHP function readfile() to send back a page.', 'hyper-cache'); ?>
|
473 |
+
<?php _e('It should be better than the file_get_contents() actually used.', 'hyper-cache'); ?>
|
|
|
474 |
</p>
|
475 |
</td>
|
476 |
</tr>
|
478 |
<tr>
|
479 |
<th><?php _e('Ignore no-cache header from bots', 'hyper-cache'); ?></th>
|
480 |
<td>
|
481 |
+
<?php $controls->checkbox('bots_ignore_nocache', __('Enable', 'hyper-cache')); ?>
|
482 |
<p class="description">
|
483 |
Bots usually send a no-cache request to ask always fresh pages. This option force the cache to
|
484 |
ignore such request and serve a caches page if available.
|
489 |
<tr>
|
490 |
<th><?php _e('Serve expired pages to bots', 'hyper-cache'); ?></th>
|
491 |
<td>
|
492 |
+
<?php $controls->checkbox('serve_expired_to_bots', __('Enable', 'hyper-cache')); ?>
|
493 |
<p class="description">
|
494 |
+
<?php _e('Serve a cache page even if expired when requested by bots.', 'hyper-cache'); ?>
|
495 |
</p>
|
496 |
</td>
|
497 |
</tr>
|
609 |
<tr>
|
610 |
<th><?php _e('Reject posts older than', 'hyper-cache'); ?></th>
|
611 |
<td>
|
612 |
+
<?php $controls->text('reject_old_posts', 5); ?>
|
613 |
+
<?php _e('days', 'hyper-cache'); ?>
|
614 |
<p class="description">
|
615 |
<?php _e('Older posts won\'t be cached and stored resulting in a lower disk space usage.', 'hyper-cache'); ?>
|
616 |
<?php _e('Useful when older posts have low traffic.', 'hyper-cache'); ?>
|
641 |
<?php
|
642 |
$themes = wp_get_themes();
|
643 |
//var_dump($themes);
|
644 |
+
$list = array('' => __('Use the active blog theme', 'hyper-cache'));
|
645 |
foreach ($themes as $theme)
|
646 |
$list[$theme->stylesheet] = $theme->name;
|
647 |
?>
|
655 |
<th><?php _e('Mobile user agents', 'hyper-cache'); ?></th>
|
656 |
<td>
|
657 |
<?php $controls->textarea('mobile_agents'); ?>
|
658 |
+
<?php $controls->button('reset_mobile_agents', __('Reset', 'hyper-cache' )); ?>
|
659 |
<p class="description">
|
660 |
<?php _e('One per line.', 'hyper-cache'); ?>
|
661 |
<?php _e('A "user agent" is a text which identify the kind of device used to surf the site.', 'hyper-cache'); ?>
|
plugin.php
CHANGED
@@ -1,753 +1,678 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: Hyper Cache
|
5 |
-
Plugin URI: http://www.satollo.net/plugins/hyper-cache
|
6 |
-
Description: A easy to configure and efficient cache to increase the speed of your blog.
|
7 |
-
Version: 3.
|
8 |
-
Author: Stefano Lissa
|
9 |
-
Author URI: http://www.satollo.net
|
10 |
-
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
11 |
-
Contributors: satollo
|
12 |
-
*/
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
if (!
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
if (
|
87 |
-
$
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
if (!
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
if (
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
$
|
171 |
-
$
|
172 |
-
$
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
$
|
178 |
-
$
|
179 |
-
|
180 |
-
|
181 |
-
$
|
182 |
-
$
|
183 |
-
$
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
function
|
199 |
-
$
|
200 |
-
|
201 |
-
|
202 |
-
$
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
function
|
213 |
-
$
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
$
|
219 |
-
$
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
}
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
if ($
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
$
|
286 |
-
$
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
$
|
299 |
-
}
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
$
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
$
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
}
|
424 |
-
|
425 |
-
if (
|
426 |
-
$
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
}
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
if (
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
}
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
$
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
$
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
$
|
528 |
-
}
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
$
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
return '
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
$
|
643 |
-
$
|
644 |
-
$
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
}
|
680 |
-
return $buffer;
|
681 |
-
}
|
682 |
-
}
|
683 |
-
|
684 |
-
if (is_404()) {
|
685 |
-
$lc_file = HyperCache::$instance->get_folder() . '/' . strtolower($_SERVER['HTTP_HOST']) . '/404.html';
|
686 |
-
} else {
|
687 |
-
$lc_file = $lc_dir . '/index' . $hyper_cache_group . '.html';
|
688 |
-
|
689 |
-
if (!is_dir($lc_dir)) {
|
690 |
-
wp_mkdir_p($lc_dir);
|
691 |
-
}
|
692 |
-
}
|
693 |
-
|
694 |
-
if (!isset($options['reject_comment_authors']) && is_singular() && !is_feed() && !is_user_logged_in()) {
|
695 |
-
$script = '<script>';
|
696 |
-
$script .= 'function lc_get_cookie(name) {';
|
697 |
-
$script .= 'var c = document.cookie;';
|
698 |
-
$script .= 'if (c.indexOf(name) != -1) {';
|
699 |
-
$script .= 'var x = c.indexOf(name)+name.length+1;';
|
700 |
-
$script .= 'var y = c.indexOf(";",x);';
|
701 |
-
$script .= 'if (y < 0) y = c.length;';
|
702 |
-
$script .= 'return decodeURIComponent(c.substring(x,y));';
|
703 |
-
$script .= '} else return "";}';
|
704 |
-
$script .= 'if ((d = document.getElementById("commentform")) != null) { e = d.elements;';
|
705 |
-
$script .= 'var z = lc_get_cookie("comment_author_email_' . COOKIEHASH . '");';
|
706 |
-
$script .= 'if (z != "") e["email"].value = z;';
|
707 |
-
$script .= 'z = lc_get_cookie("comment_author_' . COOKIEHASH . '");';
|
708 |
-
$script .= 'if (z != "") e["author"].value = z.replace(/\+/g, " ");';
|
709 |
-
$script .= 'z = lc_get_cookie("comment_author_url_' . COOKIEHASH . '");';
|
710 |
-
$script .= 'if (z != "") e["url"].value = z;';
|
711 |
-
$script .= '}';
|
712 |
-
$script .= '</script>';
|
713 |
-
$x = strrpos($buffer, '</body>');
|
714 |
-
if ($x) {
|
715 |
-
$buffer = substr($buffer, 0, $x) . $script . '</body></html>';
|
716 |
-
} else {
|
717 |
-
$buffer .= $script;
|
718 |
-
}
|
719 |
-
}
|
720 |
-
|
721 |
-
file_put_contents($lc_file, $buffer . '<!-- hyper cache ' . date('Y-m-d h:i:s') . ' -->');
|
722 |
-
|
723 |
-
// Saves the gzipped version
|
724 |
-
if (isset($options['gzip'])) {
|
725 |
-
$gzf = gzopen($lc_file . '.gz', 'wb9');
|
726 |
-
gzwrite($gzf, $buffer . '<!-- hyper cache gzip ' . date('Y-m-d h:i:s') . ' -->');
|
727 |
-
gzclose($gzf);
|
728 |
-
}
|
729 |
-
return $buffer;
|
730 |
-
}
|
731 |
-
|
732 |
-
if (!function_exists('hyper_cache_sanitize_uri')) {
|
733 |
-
|
734 |
-
function hyper_cache_sanitize_uri($uri) {
|
735 |
-
if (HYPER_CACHE_LOG) {
|
736 |
-
$this->log('URI: ' . $uri);
|
737 |
-
}
|
738 |
-
$uri = preg_replace('/[^a-zA-Z0-9\/\-_]+/', '_', $uri);
|
739 |
-
$uri = preg_replace('/\/+/', '/', $uri);
|
740 |
-
//$uri = rtrim($uri, '.-_/');
|
741 |
-
if (empty($uri) || $uri[0] != '/') {
|
742 |
-
$uri = '/' . $uri;
|
743 |
-
}
|
744 |
-
if (strlen($uri) > 1 && substr($uri, -1, 1) == '/') {
|
745 |
-
$uri = rtrim($uri, '/') . '_';
|
746 |
-
}
|
747 |
-
if (HYPER_CACHE_LOG) {
|
748 |
-
$this->log('Sanitized URI: ' . $uri);
|
749 |
-
}
|
750 |
-
return $uri;
|
751 |
-
}
|
752 |
-
|
753 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Hyper Cache
|
5 |
+
Plugin URI: http://www.satollo.net/plugins/hyper-cache
|
6 |
+
Description: A easy to configure and efficient cache to increase the speed of your blog.
|
7 |
+
Version: 3.2.7
|
8 |
+
Author: Stefano Lissa
|
9 |
+
Author URI: http://www.satollo.net
|
10 |
+
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
11 |
+
Contributors: satollo
|
12 |
+
*/
|
13 |
+
|
14 |
+
global $cache_stop;
|
15 |
+
|
16 |
+
new HyperCache();
|
17 |
+
|
18 |
+
class HyperCache {
|
19 |
+
|
20 |
+
var $post_id;
|
21 |
+
var $options;
|
22 |
+
var $ob_started = false;
|
23 |
+
static $instance;
|
24 |
+
|
25 |
+
const MOBILE_AGENTS = 'android|iphone|iemobile|up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|ipod|xoom|blackberry';
|
26 |
+
|
27 |
+
function __construct() {
|
28 |
+
self::$instance = $this;
|
29 |
+
$this->options = get_option('hyper-cache', array());
|
30 |
+
|
31 |
+
register_activation_hook('hyper-cache/plugin.php', array($this, 'hook_activate'));
|
32 |
+
register_deactivation_hook('hyper-cache/plugin.php', array($this, 'hook_deactivate'));
|
33 |
+
|
34 |
+
add_action('edit_post', array($this, 'hook_edit_post'), 1);
|
35 |
+
add_action('save_post', array($this, 'hook_save_post'), 1);
|
36 |
+
add_action('comment_post', array($this, 'hook_comment_post'), 1, 2);
|
37 |
+
add_action('wp_update_comment_count', array($this, 'hook_wp_update_comment_count'), 1);
|
38 |
+
add_action('bbp_new_reply', array($this, 'hook_bbp_new_reply'));
|
39 |
+
add_action('bbp_new_topic', array($this, 'hook_bbp_new_topic'));
|
40 |
+
|
41 |
+
add_action('hyper_cache_clean', array($this, 'hook_hyper_cache_clean'));
|
42 |
+
|
43 |
+
add_action('autoptimize_action_cachepurged', array($this, 'hook_autoptimize_action_cachepurged'));
|
44 |
+
|
45 |
+
if (!is_admin()) {
|
46 |
+
|
47 |
+
// The function must exists or the advanced-cache.php has been removed
|
48 |
+
global $hyper_cache_is_mobile;
|
49 |
+
if ($hyper_cache_is_mobile && !empty($this->options['theme'])) {
|
50 |
+
add_filter('stylesheet', array($this, 'hook_get_stylesheet'));
|
51 |
+
add_filter('template', array($this, 'hook_get_template'));
|
52 |
+
}
|
53 |
+
add_action('template_redirect', array($this, 'hook_template_redirect'), 0);
|
54 |
+
} else {
|
55 |
+
add_action('admin_init', array($this, 'hook_admin_init'));
|
56 |
+
add_action('admin_head', array($this, 'hook_admin_head'));
|
57 |
+
add_action('admin_menu', array($this, 'hook_admin_menu'));
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
function hook_activate() {
|
62 |
+
|
63 |
+
if (!isset($this->options['mobile'])) {
|
64 |
+
$this->options['mobile'] = 0;
|
65 |
+
}
|
66 |
+
if (!isset($this->options['folder'])) {
|
67 |
+
$this->options['folder'] = '';
|
68 |
+
}
|
69 |
+
if (!isset($this->options['max_age'])) {
|
70 |
+
$this->options['max_age'] = 24;
|
71 |
+
}
|
72 |
+
if (!isset($this->options['clean_last_posts'])) {
|
73 |
+
$this->options['clean_last_posts'] = 0;
|
74 |
+
}
|
75 |
+
if (!isset($this->options['mobile_agents'])) {
|
76 |
+
$this->options['mobile_agents'] = explode('|', self::MOBILE_AGENTS);
|
77 |
+
}
|
78 |
+
if (!isset($this->options['reject_agents']))
|
79 |
+
$this->options['reject_agents'] = array();
|
80 |
+
if (!isset($this->options['reject_cookies']))
|
81 |
+
$this->options['reject_cookies'] = array();
|
82 |
+
if (!isset($this->options['reject_uris']))
|
83 |
+
$this->options['reject_uris'] = array();
|
84 |
+
if (!isset($this->options['reject_uris_exact']))
|
85 |
+
$this->options['reject_uris_exact'] = array();
|
86 |
+
if (!isset($this->options['clean_last_posts']))
|
87 |
+
$this->options['clean_last_posts'] = 0;
|
88 |
+
|
89 |
+
if (!isset($this->options['https']))
|
90 |
+
$this->options['https'] = 1;
|
91 |
+
|
92 |
+
if (!isset($this->options['theme']))
|
93 |
+
$this->options['theme'] = '';
|
94 |
+
|
95 |
+
if (!isset($this->options['browser_cache_hours']))
|
96 |
+
$this->options['browser_cache_hours'] = 24;
|
97 |
+
|
98 |
+
update_option('hyper-cache', $this->options);
|
99 |
+
|
100 |
+
@wp_mkdir_p(WP_CONTENT_DIR . '/cache/hyper-cache');
|
101 |
+
|
102 |
+
if (is_file(WP_CONTENT_DIR . '/advanced-cache.php')) {
|
103 |
+
$this->build_advanced_cache();
|
104 |
+
touch(WP_CONTENT_DIR . '/advanced-cache.php');
|
105 |
+
}
|
106 |
+
|
107 |
+
if (!wp_next_scheduled('hyper_cache_clean')) {
|
108 |
+
wp_schedule_event(time() + 300, 'hourly', 'hyper_cache_clean');
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
function hook_deactivate() {
|
113 |
+
// Reset the file without deleting it to avoid to lost manually assigned permissions
|
114 |
+
file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', '');
|
115 |
+
wp_clear_scheduled_hook('hyper_cache_clean');
|
116 |
+
}
|
117 |
+
|
118 |
+
function hook_admin_init() {
|
119 |
+
if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
|
120 |
+
wp_enqueue_script('jquery-ui-tabs');
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
function hook_admin_head() {
|
125 |
+
if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
|
126 |
+
echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('hyper-cache') . '/admin.css"/>';
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
function hook_admin_menu() {
|
131 |
+
add_options_page('Hyper Cache', 'Hyper Cache', 'manage_options', 'hyper-cache/options.php');
|
132 |
+
}
|
133 |
+
|
134 |
+
function build_advanced_cache() {
|
135 |
+
$advanced_cache = file_get_contents(dirname(__FILE__) . '/advanced-cache.php');
|
136 |
+
$advanced_cache = str_replace('HC_MOBILE_AGENTS', implode('|', array_map('preg_quote', $this->options['mobile_agents'])), $advanced_cache);
|
137 |
+
$advanced_cache = str_replace('HC_MOBILE', $this->options['mobile'], $advanced_cache);
|
138 |
+
|
139 |
+
$advanced_cache = str_replace('HC_REJECT_AGENTS_ENABLED', empty($this->options['reject_agents_enabled']) ? 0 : 1, $advanced_cache);
|
140 |
+
$advanced_cache = str_replace('HC_REJECT_AGENTS', implode('|', array_map('preg_quote', $this->options['reject_agents'])), $advanced_cache);
|
141 |
+
|
142 |
+
$advanced_cache = str_replace('HC_REJECT_COOKIES_ENABLED', empty($this->options['reject_cookies_enabled']) ? 0 : 1, $advanced_cache);
|
143 |
+
$advanced_cache = str_replace('HC_REJECT_COOKIES', implode('|', array_map('preg_quote', $this->options['reject_cookies'])), $advanced_cache);
|
144 |
+
|
145 |
+
|
146 |
+
$advanced_cache = str_replace('HC_GZIP', isset($this->options['gzip']) ? 1 : 0, $advanced_cache);
|
147 |
+
$advanced_cache = str_replace('HC_FOLDER', $this->get_folder(), $advanced_cache);
|
148 |
+
$advanced_cache = str_replace('HC_MAX_AGE', $this->options['max_age'], $advanced_cache);
|
149 |
+
$advanced_cache = str_replace('HC_REJECT_COMMENT_AUTHORS', isset($this->options['reject_comment_authors']) ? 1 : 0, $advanced_cache);
|
150 |
+
|
151 |
+
$advanced_cache = str_replace('HC_BROWSER_CACHE_HOURS', $this->options['browser_cache_hours'], $advanced_cache);
|
152 |
+
$advanced_cache = str_replace('HC_BROWSER_CACHE', isset($this->options['browser_cache']) ? 1 : 0, $advanced_cache);
|
153 |
+
|
154 |
+
$advanced_cache = str_replace('HC_HTTPS', (int) $this->options['https'], $advanced_cache);
|
155 |
+
$advanced_cache = str_replace('HC_READFILE', isset($this->options['readfile']) ? 1 : 0, $advanced_cache);
|
156 |
+
|
157 |
+
$advanced_cache = str_replace('HC_SERVE_EXPIRED_TO_BOT', isset($this->options['serve_expired_to_bots']) ? 1 : 0, $advanced_cache);
|
158 |
+
$advanced_cache = str_replace('HC_BOTS_IGNORE_NOCACHE', isset($this->options['bots_ignore_nocache']) ? 1 : 0, $advanced_cache);
|
159 |
+
|
160 |
+
return file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', $advanced_cache);
|
161 |
+
}
|
162 |
+
|
163 |
+
function hook_bbp_new_reply($reply_id) {
|
164 |
+
$topic_id = bbp_get_reply_topic_id($reply_id);
|
165 |
+
$topic_url = bbp_get_topic_permalink($topic_id);
|
166 |
+
$dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
|
167 |
+
$this->remove_dir($dir);
|
168 |
+
|
169 |
+
$forum_id = bbp_get_reply_forum_id($reply_id);
|
170 |
+
$forum_url = bbp_get_forum_permalink($forum_id);
|
171 |
+
$dir = $this->get_folder() . '/' . substr($forum_url, strpos($forum_url, '://') + 3) . '/';
|
172 |
+
$this->remove_dir($dir);
|
173 |
+
}
|
174 |
+
|
175 |
+
function hook_bbp_new_topic($topic_id) {
|
176 |
+
$topic_url = bbp_get_topic_permalink($topic_id);
|
177 |
+
$dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
|
178 |
+
$this->remove_dir($dir);
|
179 |
+
|
180 |
+
$forum_id = bbp_get_topic_forum_id($topic_id);
|
181 |
+
$forum_url = bbp_get_forum_permalink($forum_id);
|
182 |
+
$dir = $this->get_folder() . '/' . substr($forum_url, strpos($forum_url, '://') + 3) . '/';
|
183 |
+
$this->remove_dir($dir);
|
184 |
+
}
|
185 |
+
|
186 |
+
function hook_autoptimize_action_cachepurged()
|
187 |
+
{
|
188 |
+
$this->clean();
|
189 |
+
}
|
190 |
+
|
191 |
+
function hook_comment_post($comment_id, $status) {
|
192 |
+
if ($status === 1) {
|
193 |
+
$comment = get_comment($comment_id);
|
194 |
+
$this->clean_post($comment->comment_post_ID, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_home_on_comment']));
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
function hook_wp_update_comment_count($post_id) {
|
199 |
+
if ($this->post_id == $post_id) {
|
200 |
+
return;
|
201 |
+
}
|
202 |
+
$this->clean_post($post_id, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_home_on_comment']));
|
203 |
+
}
|
204 |
+
|
205 |
+
function hook_save_post($post_id) {
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* edit_post is called even when a comment is added, but the comment hook prevent the execution of
|
210 |
+
* edit_post like if the post has been modified.
|
211 |
+
*/
|
212 |
+
function hook_edit_post($post_id) {
|
213 |
+
$this->clean_post($post_id, isset($this->options['clean_archives_on_post_edit']), isset($this->options['clean_home_on_post_edit']));
|
214 |
+
}
|
215 |
+
|
216 |
+
function clean()
|
217 |
+
{
|
218 |
+
$folder = $this->get_folder();
|
219 |
+
$this->remove_dir($folder);
|
220 |
+
}
|
221 |
+
|
222 |
+
function clean_post($post_id, $clean_archives = true, $clean_home = true) {
|
223 |
+
|
224 |
+
// When someone deletes the advaced-cache.php file
|
225 |
+
if (!function_exists('hyper_cache_sanitize_uri')) {
|
226 |
+
return;
|
227 |
+
}
|
228 |
+
|
229 |
+
if ($this->post_id == $post_id) {
|
230 |
+
return;
|
231 |
+
}
|
232 |
+
|
233 |
+
$status = get_post_status($post_id);
|
234 |
+
if ($status != 'publish' && $status != 'trash') {
|
235 |
+
return;
|
236 |
+
}
|
237 |
+
|
238 |
+
if ($status == 'trash') {
|
239 |
+
$clean_archives = true;
|
240 |
+
$clean_home = true;
|
241 |
+
}
|
242 |
+
|
243 |
+
$this->post_id = $post_id;
|
244 |
+
$folder = trailingslashit($this->get_folder());
|
245 |
+
$dir = $folder . $this->post_folder($post_id);
|
246 |
+
$this->remove_dir($dir);
|
247 |
+
|
248 |
+
do_action('hyper_cache_flush', $post_id, get_permalink($post_id));
|
249 |
+
|
250 |
+
if ($this->options['clean_last_posts'] != 0) {
|
251 |
+
$posts = get_posts(array('numberposts' => $this->options['clean_last_posts']));
|
252 |
+
foreach ($posts as &$post) {
|
253 |
+
$dir = $folder . $this->post_folder($post_id);
|
254 |
+
$this->remove_dir($dir);
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
$dir = $folder . substr(get_option('home'), strpos(get_option('home'), '://') + 3);
|
259 |
+
|
260 |
+
if ($clean_home) {
|
261 |
+
|
262 |
+
@unlink($dir . '/index.html');
|
263 |
+
@unlink($dir . '/index.html.gz');
|
264 |
+
@unlink($dir . '/index-https.html');
|
265 |
+
@unlink($dir . '/index-https.html.gz');
|
266 |
+
@unlink($dir . '/index-mobile.html');
|
267 |
+
@unlink($dir . '/index-mobile.html.gz');
|
268 |
+
@unlink($dir . '/index-https-mobile.html');
|
269 |
+
@unlink($dir . '/index-https-mobile.html.gz');
|
270 |
+
|
271 |
+
$this->remove_dir($dir . '/feed/');
|
272 |
+
// Home subpages
|
273 |
+
$this->remove_dir($dir . '/page/');
|
274 |
+
}
|
275 |
+
|
276 |
+
//@unlink($dir . '/robots.txt');
|
277 |
+
if ($clean_archives) {
|
278 |
+
|
279 |
+
$base = get_option('category_base');
|
280 |
+
if (empty($base)) {
|
281 |
+
$base = 'category';
|
282 |
+
}
|
283 |
+
$this->remove_dir($dir . '/' . $base . '/');
|
284 |
+
|
285 |
+
$permalink_structure = get_option('permalink_structure');
|
286 |
+
//$this->log(substr($permalink_structure, 0, 11));
|
287 |
+
if (substr($permalink_structure, 0, 11) == '/%category%') {
|
288 |
+
$categories = get_categories();
|
289 |
+
//$this->log(print_r($categories, true));
|
290 |
+
foreach ($categories as &$category) {
|
291 |
+
//$this->log('Removing: ' . $dir . '/' . $category->slug . '/');
|
292 |
+
$this->remove_page($dir . '/' . $category->slug);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
$base = get_option('tag_base');
|
297 |
+
if (empty($base)) {
|
298 |
+
$base = 'tag';
|
299 |
+
}
|
300 |
+
$this->remove_dir($dir . '/' . $base . '/');
|
301 |
+
|
302 |
+
$this->remove_dir($dir . '/type/');
|
303 |
+
|
304 |
+
$this->remove_dir($dir . '/' . date('Y') . '/');
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
/*
|
309 |
+
* Runs only if $hyper_cache_is_mobile is true
|
310 |
+
*/
|
311 |
+
|
312 |
+
function hook_get_stylesheet($stylesheet = '') {
|
313 |
+
$theme = wp_get_theme($this->options['theme']);
|
314 |
+
if (!$theme->exists()) {
|
315 |
+
return $stylesheet;
|
316 |
+
}
|
317 |
+
return $theme->stylesheet;
|
318 |
+
}
|
319 |
+
|
320 |
+
/*
|
321 |
+
* Runs only if $hyper_cache_is_mobile is true
|
322 |
+
*
|
323 |
+
* var WP_Theme $theme
|
324 |
+
*/
|
325 |
+
|
326 |
+
function hook_get_template($template) {
|
327 |
+
$theme = wp_get_theme($this->options['theme']);
|
328 |
+
if (!$theme->exists()) {
|
329 |
+
return $template;
|
330 |
+
}
|
331 |
+
return $theme->template;
|
332 |
+
}
|
333 |
+
|
334 |
+
function hook_template_redirect() {
|
335 |
+
global $cache_stop, $hyper_cache_stop, $lite_cache_stop;
|
336 |
+
|
337 |
+
if ($this->ob_started) {
|
338 |
+
return;
|
339 |
+
}
|
340 |
+
|
341 |
+
$home_root = parse_url(get_option('home'), PHP_URL_PATH);
|
342 |
+
|
343 |
+
if ($cache_stop || $hyper_cache_stop || $lite_cache_stop) {
|
344 |
+
|
345 |
+
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
346 |
+
$cache_stop = true;
|
347 |
+
} else if (!empty($_SERVER['QUERY_STRING'])) {
|
348 |
+
$cache_stop = true;
|
349 |
+
} else if (is_user_logged_in()) {
|
350 |
+
$cache_stop = true;
|
351 |
+
} else if (is_trackback()) {
|
352 |
+
$cache_stop = true;
|
353 |
+
}
|
354 |
+
|
355 |
+
// Global feed and global comment feed
|
356 |
+
else if (isset($this->options['reject_feeds']) && is_feed()) {
|
357 |
+
$cache_stop = true;
|
358 |
+
}
|
359 |
+
|
360 |
+
// Single post/page feed
|
361 |
+
else if (isset($this->options['reject_comment_feeds']) && is_comment_feed()) {
|
362 |
+
$cache_stop = true;
|
363 |
+
} else if (isset($this->options['reject_home']) && is_front_page()) {
|
364 |
+
$cache_stop = true;
|
365 |
+
} else if (is_robots()) {
|
366 |
+
$cache_stop = true;
|
367 |
+
}
|
368 |
+
|
369 |
+
if (defined('SID') && SID != '') {
|
370 |
+
$cache_stop = true;
|
371 |
+
}
|
372 |
+
|
373 |
+
// Compatibility with XML Sitemap 4.x
|
374 |
+
else if (substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 8) == ($home_root . '/sitemap')) {
|
375 |
+
$cache_stop = true;
|
376 |
+
}
|
377 |
+
// Never cache pages generated for administrator (to be patched to see if the user is an administrator)
|
378 |
+
//if (get_current_user_id() == 1) return;
|
379 |
+
else if (is_404()) {
|
380 |
+
if (isset($this->options['reject_404'])) {
|
381 |
+
$cache_stop = true;
|
382 |
+
} else {
|
383 |
+
$file = $this->get_folder() . '/' . substr(get_option('home'), strpos(get_option('home'), '://') + 3) . '/404.html';
|
384 |
+
|
385 |
+
if (file_exists($file) && ($this->options['max_age'] == 0 || filemtime($file) > time() - $this->options['max_age'] * 3600)) {
|
386 |
+
header('Content-Type: text/html;charset=UTF-8');
|
387 |
+
// For some reason it seems more performant than readfile...
|
388 |
+
header('X-Hyper-Cache: hit,404');
|
389 |
+
echo file_get_contents($file);
|
390 |
+
die();
|
391 |
+
}
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
if (!$cache_stop && substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 4) == ($home_root . '/wp-')) {
|
396 |
+
$cache_stop = true;
|
397 |
+
}
|
398 |
+
|
399 |
+
|
400 |
+
|
401 |
+
// URLs to reject (exact)
|
402 |
+
if (!$cache_stop && isset($this->options['reject_uris_exact_enabled'])) {
|
403 |
+
if (is_array($this->options['reject_uris_exact'])) {
|
404 |
+
foreach ($this->options['reject_uris_exact'] as &$uri) {
|
405 |
+
if ($_SERVER['REQUEST_URI'] == $uri) {
|
406 |
+
$cache_stop = true;
|
407 |
+
break;
|
408 |
+
}
|
409 |
+
}
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
// URLs to reject
|
414 |
+
if (!$cache_stop && isset($this->options['reject_uris_enabled'])) {
|
415 |
+
if (is_array($this->options['reject_uris'])) {
|
416 |
+
foreach ($this->options['reject_uris'] as &$uri) {
|
417 |
+
if (strpos($_SERVER['REQUEST_URI'], $uri) === 0) {
|
418 |
+
$cache_stop = true;
|
419 |
+
break;
|
420 |
+
}
|
421 |
+
}
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
if (!$cache_stop && !empty($this->options['reject_old_posts']) && is_single()) {
|
426 |
+
global $post;
|
427 |
+
if (strtotime($post->post_date_gmt) < time() - 86400 * $this->options['reject_old_posts'])
|
428 |
+
return;
|
429 |
+
}
|
430 |
+
|
431 |
+
// If is not require to bypass the comment authors, remove the cookies so the page is generated without
|
432 |
+
// comment moderation noticies
|
433 |
+
if (!isset($this->options['reject_comment_authors'])) {
|
434 |
+
foreach ($_COOKIE as $n => $v) {
|
435 |
+
if (substr($n, 0, 14) == 'comment_author') {
|
436 |
+
unset($_COOKIE[$n]);
|
437 |
+
}
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
$this->ob_started = true;
|
442 |
+
ob_start('hyper_cache_callback');
|
443 |
+
}
|
444 |
+
|
445 |
+
function post_folder($post_id) {
|
446 |
+
$url = get_permalink($post_id);
|
447 |
+
$parts = parse_url($url);
|
448 |
+
return $parts['host'] . hyper_cache_sanitize_uri($parts['path']);
|
449 |
+
}
|
450 |
+
|
451 |
+
function remove_page($dir) {
|
452 |
+
$dir = untrailingslashit($dir);
|
453 |
+
@unlink($dir . '/index.html');
|
454 |
+
@unlink($dir . '/index.html.gz');
|
455 |
+
@unlink($dir . '/index-https.html');
|
456 |
+
@unlink($dir . '/index-https.html.gz');
|
457 |
+
@unlink($dir . '/index-mobile.html');
|
458 |
+
@unlink($dir . '/index-mobile.html.gz');
|
459 |
+
@unlink($dir . '/index-https-mobile.html');
|
460 |
+
@unlink($dir . '/index-https-mobile.html.gz');
|
461 |
+
|
462 |
+
$this->remove_dir($dir . '/feed/');
|
463 |
+
// Pagination
|
464 |
+
$this->remove_dir($dir . '/page/');
|
465 |
+
}
|
466 |
+
|
467 |
+
function remove_dir($dir) {
|
468 |
+
$dir = trailingslashit($dir);
|
469 |
+
$files = glob($dir . '*', GLOB_MARK);
|
470 |
+
if (!empty($files)) {
|
471 |
+
foreach ($files as &$file) {
|
472 |
+
if (substr($file, -1) == DIRECTORY_SEPARATOR)
|
473 |
+
$this->remove_dir($file);
|
474 |
+
else {
|
475 |
+
@unlink($file);
|
476 |
+
}
|
477 |
+
}
|
478 |
+
}
|
479 |
+
@rmdir($dir);
|
480 |
+
}
|
481 |
+
|
482 |
+
function hook_hyper_cache_clean() {
|
483 |
+
if (!isset($this->options['autoclean'])) {
|
484 |
+
return;
|
485 |
+
}
|
486 |
+
if ($this->options['max_age'] == 0) {
|
487 |
+
return;
|
488 |
+
}
|
489 |
+
$this->remove_older_than(time() - $this->options['max_age'] * 3600);
|
490 |
+
}
|
491 |
+
|
492 |
+
function remove_older_than($time) {
|
493 |
+
$this->_remove_older_than($time, $this->get_folder() . '/');
|
494 |
+
}
|
495 |
+
|
496 |
+
function _remove_older_than($time, $dir) {
|
497 |
+
$files = glob($dir . '*', GLOB_MARK);
|
498 |
+
if (!empty($files)) {
|
499 |
+
foreach ($files as &$file) {
|
500 |
+
if (substr($file, -1) == '/')
|
501 |
+
$this->_remove_older_than($time, $file);
|
502 |
+
else {
|
503 |
+
//$this->log($file . ' ' . ($time-filemtime($file)));
|
504 |
+
if (@filemtime($file) < $time) {
|
505 |
+
//$this->log('Removing ' . $file);
|
506 |
+
@unlink($file);
|
507 |
+
}
|
508 |
+
}
|
509 |
+
}
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
function get_folder() {
|
514 |
+
if (empty($this->options['folder']))
|
515 |
+
return WP_CONTENT_DIR . '/cache/hyper-cache';
|
516 |
+
else
|
517 |
+
return $this->options['folder'];
|
518 |
+
}
|
519 |
+
|
520 |
+
function text_to_list($text) {
|
521 |
+
$list = array();
|
522 |
+
$items = explode("\n", str_replace(array("\n", "\r"), "\n", $text));
|
523 |
+
foreach ($items as &$item) {
|
524 |
+
$item = trim($item);
|
525 |
+
if ($item == '')
|
526 |
+
continue;
|
527 |
+
$list[] = $item;
|
528 |
+
}
|
529 |
+
return $list;
|
530 |
+
}
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
+
/*
|
535 |
+
function hyper_cache_remove_protocol($buffer) {
|
536 |
+
|
537 |
+
$buffer = str_ireplace('"http://', '"//', $buffer);
|
538 |
+
$buffer = str_ireplace('\'http://', '\'//', $buffer);
|
539 |
+
return $buffer;
|
540 |
+
|
541 |
+
$parts = parse_url(get_home_url());
|
542 |
+
$buffer = str_ireplace('http://' . $parts['host'], '//' . $parts['host'], $buffer);
|
543 |
+
$buffer = str_ireplace('https://' . $parts['host'], '//' . $parts['host'], $buffer);
|
544 |
+
return $buffer;
|
545 |
+
|
546 |
+
}
|
547 |
+
|
548 |
+
*/
|
549 |
+
|
550 |
+
function hyper_cache_cdn_callback($matches) {
|
551 |
+
//error_log($matches[1]);
|
552 |
+
$parts = parse_url($matches[2]);
|
553 |
+
//$return = $parts['scheme'] . '://' . $parts['host'] . $parts['path'];
|
554 |
+
$return = HyperCache::$instance->options['cdn_url'] . $parts['path'];
|
555 |
+
|
556 |
+
if (!empty($parts['query'])) {
|
557 |
+
$return .= '?' . $parts['query'];
|
558 |
+
}
|
559 |
+
return $matches[1] . $return . $matches[3];
|
560 |
+
}
|
561 |
+
|
562 |
+
function hyper_cache_callback($buffer) {
|
563 |
+
global $cache_stop, $lite_cache, $hyper_cache_stop, $hyper_cache_group, $hyper_cache_is_mobile, $hyper_cache_gzip_accepted;
|
564 |
+
|
565 |
+
$buffer = trim($buffer);
|
566 |
+
|
567 |
+
if (strlen($buffer) == 0) {
|
568 |
+
return '';
|
569 |
+
}
|
570 |
+
|
571 |
+
$options = HyperCache::$instance->options;
|
572 |
+
|
573 |
+
// Replace the CDN Url
|
574 |
+
if (isset($options['cdn_enabled'])) {
|
575 |
+
$parts = parse_url(get_option('home'));
|
576 |
+
$base = quotemeta($parts['scheme'] . '://' . $parts['host']);
|
577 |
+
$base = quotemeta('http://' . $parts['host']);
|
578 |
+
|
579 |
+
$buffer = preg_replace_callback("#(<img.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
|
580 |
+
$buffer = preg_replace_callback("#(<script.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
|
581 |
+
$buffer = preg_replace_callback("#(<link.+href=[\"'])(" . $base . ".*\.css.*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
|
582 |
+
}
|
583 |
+
|
584 |
+
$buffer = apply_filters('cache_buffer', $buffer);
|
585 |
+
|
586 |
+
if ($cache_stop || $hyper_cache_stop) {
|
587 |
+
|
588 |
+
if (isset($options['gzip_on_the_fly']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
|
589 |
+
header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
|
590 |
+
header('Vary: Accept-Encoding,User-Agent');
|
591 |
+
header('Content-Encoding: gzip');
|
592 |
+
header('X-Hyper-Cache: gzip on the fly', false);
|
593 |
+
return gzencode($buffer, 9);
|
594 |
+
}
|
595 |
+
return $buffer;
|
596 |
+
}
|
597 |
+
|
598 |
+
$uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
|
599 |
+
$host = hyper_cache_sanitize_host($_SERVER['HTTP_HOST']);
|
600 |
+
$lc_dir = HyperCache::$instance->get_folder() . '/' . $host . $uri;
|
601 |
+
|
602 |
+
if ($hyper_cache_is_mobile) {
|
603 |
+
// Bypass (should no need since there is that control on advanced-cache.php)
|
604 |
+
if ($options['mobile'] == 2) {
|
605 |
+
if (isset($options['gzip_on_the_fly']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
|
606 |
+
header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
|
607 |
+
header('Vary: Accept-Encoding,User-Agent');
|
608 |
+
header('Content-Encoding: gzip');
|
609 |
+
header('X-Hyper-Cache: mobile, gzip on the fly', false);
|
610 |
+
return gzencode($buffer, 9);
|
611 |
+
}
|
612 |
+
return $buffer;
|
613 |
+
}
|
614 |
+
}
|
615 |
+
|
616 |
+
if (is_404()) {
|
617 |
+
$lc_file = HyperCache::$instance->get_folder() . '/' . strtolower($_SERVER['HTTP_HOST']) . '/404.html';
|
618 |
+
} else {
|
619 |
+
$lc_file = $lc_dir . '/index' . $hyper_cache_group . '.html';
|
620 |
+
|
621 |
+
if (!is_dir($lc_dir)) {
|
622 |
+
wp_mkdir_p($lc_dir);
|
623 |
+
}
|
624 |
+
}
|
625 |
+
|
626 |
+
if (!isset($options['reject_comment_authors']) && is_singular() && !is_feed() && !is_user_logged_in()) {
|
627 |
+
$script = '<script>';
|
628 |
+
$script .= 'function lc_get_cookie(name) {';
|
629 |
+
$script .= 'var c = document.cookie;';
|
630 |
+
$script .= 'if (c.indexOf(name) != -1) {';
|
631 |
+
$script .= 'var x = c.indexOf(name)+name.length+1;';
|
632 |
+
$script .= 'var y = c.indexOf(";",x);';
|
633 |
+
$script .= 'if (y < 0) y = c.length;';
|
634 |
+
$script .= 'return decodeURIComponent(c.substring(x,y));';
|
635 |
+
$script .= '} else return "";}';
|
636 |
+
$script .= 'if ((d = document.getElementById("commentform")) != null) { e = d.elements;';
|
637 |
+
$script .= 'var z = lc_get_cookie("comment_author_email_' . COOKIEHASH . '");';
|
638 |
+
$script .= 'if (z != "") e["email"].value = z;';
|
639 |
+
$script .= 'z = lc_get_cookie("comment_author_' . COOKIEHASH . '");';
|
640 |
+
$script .= 'if (z != "") e["author"].value = z.replace(/\+/g, " ");';
|
641 |
+
$script .= 'z = lc_get_cookie("comment_author_url_' . COOKIEHASH . '");';
|
642 |
+
$script .= 'if (z != "") e["url"].value = z;';
|
643 |
+
$script .= '}';
|
644 |
+
$script .= '</script>';
|
645 |
+
$x = strrpos($buffer, '</body>');
|
646 |
+
if ($x) {
|
647 |
+
$buffer = substr($buffer, 0, $x) . $script . '</body></html>';
|
648 |
+
} else {
|
649 |
+
$buffer .= $script;
|
650 |
+
}
|
651 |
+
}
|
652 |
+
hyper_cache_header($lc_file);
|
653 |
+
@file_put_contents($lc_file, $buffer . '<!-- hyper cache ' . date('Y-m-d h:i:s') . ' -->');
|
654 |
+
|
655 |
+
// Saves the gzipped version
|
656 |
+
if (isset($options['gzip'])) {
|
657 |
+
$gzf = gzopen($lc_file . '.gz', 'wb9');
|
658 |
+
if ($gzf !== false) {
|
659 |
+
gzwrite($gzf, $buffer . '<!-- hyper cache gzip ' . date('Y-m-d h:i:s') . ' -->');
|
660 |
+
gzclose($gzf);
|
661 |
+
}
|
662 |
+
}
|
663 |
+
return $buffer;
|
664 |
+
}
|
665 |
+
|
666 |
+
if (!function_exists('hyper_cache_sanitize_uri')) {
|
667 |
+
|
668 |
+
function hyper_cache_sanitize_uri($uri) {
|
669 |
+
$uri = preg_replace('|[^a-zA-Z0-9/\-_]+|', '_', $uri);
|
670 |
+
$uri = preg_replace('|/+|', '/', $uri);
|
671 |
+
$uri = rtrim($uri, '/');
|
672 |
+
if (empty($uri) || $uri[0] != '/') {
|
673 |
+
$uri = '/' . $uri;
|
674 |
+
}
|
675 |
+
return $uri;
|
676 |
+
}
|
677 |
+
|
678 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,156 +1,202 @@
|
|
1 |
-
=== Hyper Cache ===
|
2 |
-
Tags: cache,performance,staticizer,apache,htaccess,tuning,speed,bandwidth,optimization,tidy,gzip,compression,server load,boost
|
3 |
-
Requires at least: 2.5
|
4 |
-
Tested up to: 4.
|
5 |
-
Stable tag:
|
6 |
-
Donate link: http://www.satollo.net/donations
|
7 |
-
Contributors: satollo
|
8 |
-
|
9 |
-
Hyper Cache is a performant and easy to configure cache system for WordPress.
|
10 |
-
|
11 |
-
== Description ==
|
12 |
-
|
13 |
-
Hyper Cache is a cache plugin specifically written to get the maximum
|
14 |
-
speed for your WordPress blog. It can be used in low resources hosting as well
|
15 |
-
on high end servers.
|
16 |
-
|
17 |
-
Hyper Cache is purely PHP and works on every blog
|
18 |
-
and when you deactivate it no stale
|
19 |
-
|
20 |
-
Short list of features:
|
21 |
-
|
22 |
-
* Mobile aware: double cache for desktop and mobile site versions
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
-
*
|
27 |
-
*
|
28 |
-
|
29 |
-
|
30 |
-
*
|
31 |
-
*
|
32 |
-
*
|
33 |
-
*
|
34 |
-
*
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
the
|
55 |
-
|
56 |
-
==
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
*
|
74 |
-
*
|
75 |
-
|
76 |
-
= 3.
|
77 |
-
|
78 |
-
* Fixed the
|
79 |
-
|
80 |
-
= 3.
|
81 |
-
|
82 |
-
*
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
*
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
*
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
*
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
*
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
*
|
119 |
-
*
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
*
|
125 |
-
|
126 |
-
= 3.
|
127 |
-
|
128 |
-
*
|
129 |
-
|
130 |
-
= 3.
|
131 |
-
|
132 |
-
* Fixed
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
* Added the
|
138 |
-
*
|
139 |
-
* Fixed
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Hyper Cache ===
|
2 |
+
Tags: cache,performance,staticizer,apache,htaccess,tuning,speed,bandwidth,optimization,tidy,gzip,compression,server load,boost
|
3 |
+
Requires at least: 2.5
|
4 |
+
Tested up to: 4.7.5
|
5 |
+
Stable tag: 3.2.7
|
6 |
+
Donate link: http://www.satollo.net/donations
|
7 |
+
Contributors: satollo
|
8 |
+
|
9 |
+
Hyper Cache is a performant and easy to configure cache system for WordPress.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
Hyper Cache is a cache plugin specifically written to get the maximum
|
14 |
+
speed for your WordPress blog. It can be used in low resources hosting as well
|
15 |
+
on high end servers.
|
16 |
+
|
17 |
+
Hyper Cache is **purely PHP** and works on **every blog**: no complex configurations are needed
|
18 |
+
and when you deactivate it no stale settings are left around.
|
19 |
+
|
20 |
+
Short list of features:
|
21 |
+
|
22 |
+
* Mobile aware: double cache for desktop and mobile site versions
|
23 |
+
* HTTPS ready
|
24 |
+
* Mobile theme switch option: change the theme on mobile device detection
|
25 |
+
* Able to serve expired pages to bots to increase the perceived blog speed by bots
|
26 |
+
* Manages compression even on the fly for non cached pages
|
27 |
+
* Lots of configurable bypasses: matching cookies, matching urls, user agents, ...
|
28 |
+
* Comments aware: is able to serve cached pages even to visitors who commented the blog (perfect for
|
29 |
+
blog with great readers paritipation)
|
30 |
+
* Cache folder can be moved outside your blog space to exclude it from backups
|
31 |
+
* Controls over cache cleaning on blog events (post edited, comments, ...)
|
32 |
+
* Autoclean to controls the cache used disk space
|
33 |
+
* CDN support
|
34 |
+
* Other special options
|
35 |
+
* Response header signature to check the working status
|
36 |
+
* bbPress specific integration
|
37 |
+
|
38 |
+
More can be read on the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache).
|
39 |
+
|
40 |
+
You can further optimize the blog installing [Autoptimize](https://wordpress.org/plugins/autoptimize/)
|
41 |
+
which cleans up the HTML, minifies and concatenates CSS and JavaScript.
|
42 |
+
|
43 |
+
Other plugins by Stefano Lissa:
|
44 |
+
|
45 |
+
* [Newsletter](http://www.thenewsletterplugin.com)
|
46 |
+
* [Header and Footer](http://www.satollo.net/plugins/header-footer)
|
47 |
+
* [Include Me](http://www.satollo.net/plugins/include-me)
|
48 |
+
* [Comment Plus](http://www.satollo.net/plugins/comment-plus)
|
49 |
+
|
50 |
+
== Installation ==
|
51 |
+
|
52 |
+
1. Put the plugin folder into [wordpress_dir]/wp-content/plugins/
|
53 |
+
2. Go into the WordPress admin interface and activate the plugin
|
54 |
+
3. Optional: go to the options page and configure the plugin
|
55 |
+
|
56 |
+
== Frequently Asked Questions ==
|
57 |
+
|
58 |
+
See the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache) or
|
59 |
+
the [Hyper Cache official forum](http://www.satollo.net/forums/forum/hyper-cache-plugin).
|
60 |
+
|
61 |
+
== Screenshots ==
|
62 |
+
|
63 |
+
1. The main configuration panel
|
64 |
+
|
65 |
+
2. Configuration of bypasses (things you want/not want to be cached)
|
66 |
+
|
67 |
+
3. Mobile devices configuration
|
68 |
+
|
69 |
+
== Changelog ==
|
70 |
+
|
71 |
+
= 3.2.7 =
|
72 |
+
|
73 |
+
* Minor code review
|
74 |
+
* Removed cookie based cache disabling
|
75 |
+
|
76 |
+
= 3.2.6 =
|
77 |
+
|
78 |
+
* Fixed the cache invalidation for bbPress new topic
|
79 |
+
|
80 |
+
= 3.2.5 =
|
81 |
+
|
82 |
+
* Improved integration with [Autoptimize](https://wordpress.org/plugins/autoptimize/)
|
83 |
+
* Compatibility check with WP 4.4.2
|
84 |
+
|
85 |
+
= 3.2.4 =
|
86 |
+
|
87 |
+
* Cache headers changed
|
88 |
+
* URI sanitization changed
|
89 |
+
|
90 |
+
= 3.2.3 =
|
91 |
+
|
92 |
+
* Slash and non slash ending URLs are now treated in the same way since canonicals avoid the double indexing
|
93 |
+
|
94 |
+
= 3.2.2 =
|
95 |
+
|
96 |
+
* Added check for gz file write error
|
97 |
+
* Added the gzip on the fly option
|
98 |
+
|
99 |
+
= 3.2.1 =
|
100 |
+
|
101 |
+
* Fixed link rel canonica rewrite with the cdn active
|
102 |
+
|
103 |
+
= 3.2.0 =
|
104 |
+
|
105 |
+
* Fixed the options delete function
|
106 |
+
|
107 |
+
= 3.1.9 =
|
108 |
+
|
109 |
+
* Fixed translations
|
110 |
+
* Reviewed CDN options (now available to all)
|
111 |
+
|
112 |
+
= 3.1.8 =
|
113 |
+
|
114 |
+
* Fixed the comment awaiting notification cached
|
115 |
+
|
116 |
+
= 3.1.7 =
|
117 |
+
|
118 |
+
* Added experimental support for CDN
|
119 |
+
* Added on-the-fly compression
|
120 |
+
* Fixed some headers
|
121 |
+
|
122 |
+
= 3.1.6 =
|
123 |
+
|
124 |
+
* Fixed the post trashing detection
|
125 |
+
|
126 |
+
= 3.1.5 =
|
127 |
+
|
128 |
+
* Tidy option removed
|
129 |
+
|
130 |
+
= 3.1.4 =
|
131 |
+
|
132 |
+
* Fixed an error log always active
|
133 |
+
|
134 |
+
= 3.1.3 =
|
135 |
+
|
136 |
+
* Fixed the agents bypass
|
137 |
+
* Added the "serve expired pages to bots" options
|
138 |
+
* Added the readfile/file_get_contents switch
|
139 |
+
* Fixed the draft saving triggering a cache invalidation
|
140 |
+
* Added distinct cache clean for home and archives
|
141 |
+
* Added debug logging when HYPER_CACHE_LOG is true (define it on wp-config.php)
|
142 |
+
* Fixed the + sign on comment author
|
143 |
+
|
144 |
+
= 3.1.2 =
|
145 |
+
|
146 |
+
* Fixed comment author cookie clean
|
147 |
+
|
148 |
+
= 3.1.1 =
|
149 |
+
|
150 |
+
* fixed a PHP warning on options panel when clearing an empty cache
|
151 |
+
* pot file added
|
152 |
+
* possible fix for after update messages that saving is needed
|
153 |
+
|
154 |
+
= 3.1.0 =
|
155 |
+
|
156 |
+
* Fixed the cookie bypass
|
157 |
+
* Removed a debug notice
|
158 |
+
* Added HTTPS separated cache
|
159 |
+
* Improved code performance
|
160 |
+
|
161 |
+
= 3.0.6 =
|
162 |
+
|
163 |
+
* readme.txt fix
|
164 |
+
* WP 4.0 compatibility check
|
165 |
+
* Fixed invalidation on draft saving
|
166 |
+
|
167 |
+
= 3.0.5 =
|
168 |
+
|
169 |
+
* Fixed analysis of URL with commas and dots
|
170 |
+
* Improved the categories invalidation with /%category% permalink
|
171 |
+
|
172 |
+
= 3.0.4 =
|
173 |
+
|
174 |
+
* Help texts fixed
|
175 |
+
|
176 |
+
= 3.0.3 =
|
177 |
+
|
178 |
+
* Fixed the autoclean when max cached page age is set to 0
|
179 |
+
* Changed a little the mobile agent list
|
180 |
+
|
181 |
+
= 3.0.2 =
|
182 |
+
|
183 |
+
* Added the browser caching option
|
184 |
+
* Fixed a cache header
|
185 |
+
* Fixed warning on cache size if empty
|
186 |
+
|
187 |
+
= 3.0.1 =
|
188 |
+
|
189 |
+
* Short description fix on plugin.php
|
190 |
+
* Forum link fix on readme.txt
|
191 |
+
* More help on comment authors option
|
192 |
+
|
193 |
+
= 3.0.0 =
|
194 |
+
|
195 |
+
* Totally rewritten to include the Lite Cache features
|
196 |
+
|
197 |
+
= To Do =
|
198 |
+
|
199 |
+
* Register an action to clean the cache by other plugin
|
200 |
+
* Separated cache for https
|
201 |
+
* Invalidation of categories paths when /%category%/%postname% is used
|
202 |
+
|