W3 Total Cache - Version 0.8.5.1

Version Description

  • Added option to CDN Settings to skip specified directories
  • Added option to allow for full control of HTTP compression options for page cache (some WordPress installations have issues with deflate)
  • Added sql_calc_found_rows to default auto reject SQL list
  • Added more notification cases identified and configured
  • Added new mobile user agents for Japanese market
  • Page cache performance improvements for disk enhanced mode
  • Improved FAQ and option descriptions
  • Improved apache directives for minify headers
  • Improved handling of redirects
  • Improved name space to avoid issues with other plugins
  • Improved handling of incomplete installations, caching runs with default options if custom settings file does not exist
  • Fixed anomalies with memcached-client.php in some environments
  • Fixed another interface bug with management of minify files
  • Fixed minor bug with table column length for some MySQL versions
  • Fixed minify bug with CRLF
  • Fixed minify bug with handling of zlib compression enabled
  • Fixed handling of pages with CDN Media Library import
Download this release

Release Info

Developer fredericktownes
Plugin Icon 128x128 W3 Total Cache
Version 0.8.5.1
Comparing to
See all releases

Code changes from version 0.8.5 to 0.8.5.1

inc/css/error.css ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ color: #464646;
5
+ }
6
+
7
+ html,body {
8
+ height: 100%;
9
+ }
10
+
11
+ body {
12
+ line-height: 1.4em;
13
+ }
14
+
15
+ body,input {
16
+ font-family: "Lucida Grande", Verdana, Arial;
17
+ font-size: 13px;
18
+ }
19
+
20
+ a {
21
+ color: #21759B;
22
+ }
23
+
24
+ a:hover {
25
+ color: #D54E21;
26
+ }
27
+
28
+ .button,input[type="button"],input[type="submit"] {
29
+ font-size: 11px;
30
+ line-height: 16px;
31
+ background: #f2f2f2 url(../../../../../wp-admin/images/white-grad.png) repeat-x scroll left top;
32
+ border: 1px solid #bbb;
33
+ color: #464646;
34
+ text-shadow: 0 1px 0 #fff;
35
+ cursor: pointer;
36
+ padding: 2px 8px;
37
+ border-radius: 11px;
38
+ -webkit-border-radius: 11px;
39
+ -moz-border-radius: 11px;
40
+ }
41
+
42
+ .button:hover,input[type="button"]:hover,input[type="submit"]:hover {
43
+ border-color: #666;
44
+ color: #000;
45
+ }
46
+
47
+ .button:active,input[type="button"]:active,input[type="submit"]:active {
48
+ background: #F2F2F2 url(../../../../../images/white-grad-active.png) repeat-x scroll left top;
49
+ }
inc/css/popup.css CHANGED
@@ -1,175 +1,175 @@
1
  * {
2
- margin:0;
3
- padding:0;
4
- color:#464646;
5
  }
6
 
7
  html,body {
8
- height:100%;
9
  }
10
 
11
  body {
12
- line-height:1;
13
- background:#f9f9f9;
14
  }
15
 
16
  body,td,textarea,input,select {
17
- font-family:"Lucida Grande", Verdana, Arial;
18
- font-size:13px;
19
  }
20
 
21
  p {
22
- margin:1em 0;
23
  }
24
 
25
  h1 {
26
- font-family:Georgia, "Times New Roman", "Bitstream Charter";
27
- font-size:24px;
28
- font-style:italic;
29
- font-weight:400;
30
- line-height:35px;
31
- margin-bottom:0.8em 0;
32
- text-shadow:0 1px 0 #fff;
33
  }
34
 
35
  a {
36
- color:#21759B;
37
  }
38
 
39
  a:hover {
40
- color:#D54E21;
41
  }
42
 
43
  #content {
44
- padding:40px 50px;
45
  }
46
 
47
  .clear {
48
- clear:both;
49
  }
50
 
51
  .button,input[type="button"],input[type="submit"] {
52
- font-size:11px;
53
- line-height:16px;
54
- background:#f2f2f2 url(/wp-admin/images/white-grad.png) repeat-x scroll left top;
55
- border:1px solid #bbb;
56
- color:#464646;
57
- text-shadow:0 1px 0 #fff;
58
- cursor:pointer;
59
- padding:2px 8px;
60
- border-radius:11px;
61
- -webkit-border-radius:11px;
62
- -moz-border-radius:11px;
63
  }
64
 
65
  .button:hover,input[type="button"]:hover,input[type="submit"]:hover {
66
- border-color:#666;
67
- color:#000;
68
  }
69
 
70
  .button:active,input[type="button"]:active,input[type="submit"]:active {
71
- background:#F2F2F2 url(/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
72
  }
73
 
74
  .progress {
75
- background:#fff;
76
- border:1px solid #464646;
77
- padding:1px;
78
- margin:1em 0;
79
- position:relative;
80
  }
81
 
82
  .progress-value {
83
- position:absolute;
84
- line-height:30px;
85
- font-size:16px;
86
- font-weight:700;
87
- color:#000;
88
- text-align:center;
89
- width:100%;
90
  }
91
 
92
  .progress-bar {
93
- float:left;
94
- width:0;
95
- height:30px;
96
- background:#fc2;
97
  }
98
 
99
  .log {
100
- border:1px solid #464646;
101
- height:279px;
102
- overflow:auto;
103
  }
104
 
105
  .log div {
106
- padding:3px;
107
- border-bottom:1px solid #464646;
108
  }
109
 
110
  .log-success {
111
- background:#bfb;
112
  }
113
 
114
  .log-error {
115
- background:#f99;
116
  }
117
 
118
  .empty {
119
- font-weight:700;
120
- font-style:italic;
121
  }
122
 
123
  .table {
124
- width:100%;
125
- border-collapse:collapse;
126
  }
127
 
128
  .table td,th {
129
- border:1px solid #ccc;
130
- padding:3px 2px;
131
  }
132
 
133
  .table th {
134
- background:#eee;
135
  }
136
 
137
  .queue td {
138
- font-size:10px;
139
  }
140
 
141
  .updated,.error {
142
- -moz-border-radius-bottomleft:3px;
143
- -moz-border-radius-bottomright:3px;
144
- -moz-border-radius-topleft:3px;
145
- -moz-border-radius-topright:3px;
146
- border-style:solid;
147
- border-width:1px;
148
- padding:0 0.6em;
149
- margin:0.5em 0;
150
  }
151
 
152
  .updated {
153
- background:#ffffe0;
154
- border-color:#e6db55;
155
  }
156
 
157
  .error {
158
- background-color:#ffebe8;
159
- border-color:#cc0000;
160
  }
161
 
162
  .updated p,.error p {
163
- line-height:1;
164
- margin:0.5em 0;
165
- padding:2px;
166
  }
167
 
168
  .tab-selected {
169
- font-weight:700;
170
  }
171
 
172
  .rules {
173
- width:100%;
174
- font-size:9px;
175
  }
1
  * {
2
+ margin: 0;
3
+ padding: 0;
4
+ color: #464646;
5
  }
6
 
7
  html,body {
8
+ height: 100%;
9
  }
10
 
11
  body {
12
+ line-height: 1em;
13
+ background: #f9f9f9;
14
  }
15
 
16
  body,td,textarea,input,select {
17
+ font-family: "Lucida Grande", Verdana, Arial;
18
+ font-size: 13px;
19
  }
20
 
21
  p {
22
+ margin: 1em 0;
23
  }
24
 
25
  h1 {
26
+ font-family: Georgia, "Times New Roman", "Bitstream Charter";
27
+ font-size: 24px;
28
+ font-style: italic;
29
+ font-weight: 400;
30
+ line-height: 35px;
31
+ margin-bottom: 0.8em 0;
32
+ text-shadow: 0 1px 0 #fff;
33
  }
34
 
35
  a {
36
+ color: #21759B;
37
  }
38
 
39
  a:hover {
40
+ color: #D54E21;
41
  }
42
 
43
  #content {
44
+ padding: 40px 50px;
45
  }
46
 
47
  .clear {
48
+ clear: both;
49
  }
50
 
51
  .button,input[type="button"],input[type="submit"] {
52
+ font-size: 11px;
53
+ line-height: 16px;
54
+ background: #f2f2f2 url(../../../../../wp-admin/images/white-grad.png) repeat-x scroll left top;
55
+ border: 1px solid #bbb;
56
+ color: #464646;
57
+ text-shadow: 0 1px 0 #fff;
58
+ cursor: pointer;
59
+ padding: 2px 8px;
60
+ border-radius: 11px;
61
+ -webkit-border-radius: 11px;
62
+ -moz-border-radius: 11px;
63
  }
64
 
65
  .button:hover,input[type="button"]:hover,input[type="submit"]:hover {
66
+ border-color: #666;
67
+ color: #000;
68
  }
69
 
70
  .button:active,input[type="button"]:active,input[type="submit"]:active {
71
+ background: #F2F2F2 url(../../../../../wp-admin/images/white-grad-active.png) repeat-x scroll left top;
72
  }
73
 
74
  .progress {
75
+ background: #fff;
76
+ border: 1px solid #464646;
77
+ padding: 1px;
78
+ margin: 1em 0;
79
+ position: relative;
80
  }
81
 
82
  .progress-value {
83
+ position: absolute;
84
+ line-height: 30px;
85
+ font-size: 16px;
86
+ font-weight: 700;
87
+ color: #000;
88
+ text-align: center;
89
+ width: 100%;
90
  }
91
 
92
  .progress-bar {
93
+ float: left;
94
+ width: 0;
95
+ height: 30px;
96
+ background: #fc2;
97
  }
98
 
99
  .log {
100
+ border: 1px solid #464646;
101
+ height: 279px;
102
+ overflow: auto;
103
  }
104
 
105
  .log div {
106
+ padding: 3px;
107
+ border-bottom: 1px solid #464646;
108
  }
109
 
110
  .log-success {
111
+ background: #bfb;
112
  }
113
 
114
  .log-error {
115
+ background: #f99;
116
  }
117
 
118
  .empty {
119
+ font-weight: 700;
120
+ font-style: italic;
121
  }
122
 
123
  .table {
124
+ width: 100%;
125
+ border-collapse: collapse;
126
  }
127
 
128
  .table td,th {
129
+ border: 1px solid #ccc;
130
+ padding: 3px 2px;
131
  }
132
 
133
  .table th {
134
+ background: #eee;
135
  }
136
 
137
  .queue td {
138
+ font-size: 10px;
139
  }
140
 
141
  .updated,.error {
142
+ -moz-border-radius-bottomleft: 3px;
143
+ -moz-border-radius-bottomright: 3px;
144
+ -moz-border-radius-topleft: 3px;
145
+ -moz-border-radius-topright: 3px;
146
+ border-style: solid;
147
+ border-width: 1px;
148
+ padding: 0 0.6em;
149
+ margin: 0.5em 0;
150
  }
151
 
152
  .updated {
153
+ background: #ffffe0;
154
+ border-color: #e6db55;
155
  }
156
 
157
  .error {
158
+ background-color: #ffebe8;
159
+ border-color: #cc0000;
160
  }
161
 
162
  .updated p,.error p {
163
+ line-height: 1;
164
+ margin: 0.5em 0;
165
+ padding: 2px;
166
  }
167
 
168
  .tab-selected {
169
+ font-weight: 700;
170
  }
171
 
172
  .rules {
173
+ width: 100%;
174
+ font-size: 9px;
175
  }
inc/define.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- define('W3TC_VERSION', '0.8.5');
4
  define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
5
  define('W3TC_LINK_URL', 'http://www.w3-edge.com/wordpress-plugins/');
6
  define('W3TC_LINK_NAME', 'WordPress Plugins');
@@ -34,7 +34,6 @@ define('W3TC_LOG_DIR', W3TC_CONTENT_DIR . '/log');
34
  define('W3TC_TMP_DIR', W3TC_CONTENT_DIR . '/tmp');
35
 
36
  define('W3TC_CONFIG_PATH', WP_CONTENT_DIR . '/w3-total-cache-config' . (($w3_blog_id = w3_get_blog_id()) != '' ? '-' . $w3_blog_id : '') . '.php');
37
- define('W3TC_CONFIG_EXAMPLE_PATH', W3TC_DIR . '/w3-total-cache-config-example.php');
38
 
39
  define('W3TC_MINIFY_LOG_FILE', W3TC_LOG_DIR . '/minify.log');
40
 
@@ -50,29 +49,60 @@ define('W3TC_FEED_URL', 'http://feeds.feedburner.com/W3TOTALCACHE');
50
  define('W3TC_FEED_ITEMS', 3);
51
  define('W3TC_README_URL', 'http://plugins.trac.wordpress.org/browser/w3-total-cache/trunk/readme.txt?format=txt');
52
 
53
- define('W3TC_TWITTER_STATUS', 'I just optimized my #wordpress blog\'s performance using the W3 Total Cache #plugin by @w3edge. Check it out! http://j.mp/A69xX');
54
  define('W3TC_SUPPORT_US_TIMEOUT', 2592000);
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * W3 writable error
58
  *
59
  * @param string $path
60
- * @param boolean $die
61
  * @return string
62
  */
63
- function w3_writable_error($path, $die = true)
64
  {
 
 
 
65
  if (w3_check_open_basedir($path)) {
66
- $error = sprintf('<strong>%s</strong> could not be created, please run following command:<br /><strong style="color: #f00;">chmod 777 %s</strong><br />then re-activate plugin.', $path, dirname($path));
 
 
 
 
67
  } else {
68
- $error = sprintf('<strong>%s</strong> could not be created, <strong>open_basedir</strong> restriction in effect, please check your php.ini settings:<br /><strong style="color: #f00;">open_basedir = "%s"</strong></br />then re-activate plugin.', $path, ini_get('open_basedir'));
69
  }
70
 
71
- if ($die) {
72
- die($error);
73
- }
74
-
75
- return $error;
76
  }
77
 
78
  /**
@@ -297,27 +327,6 @@ function w3_get_blog_id()
297
  return $id;
298
  }
299
 
300
- /**
301
- * Returns domain from host
302
- *
303
- * @param string $host
304
- * @return string
305
- */
306
- function w3_get_domain($host)
307
- {
308
- $host = strtolower($host);
309
-
310
- if (strpos($host, 'www.') === 0) {
311
- $host = str_replace('www.', '', $host);
312
- }
313
-
314
- if (($pos = strpos($host, ':'))) {
315
- $host = substr($host, 0, $pos);
316
- }
317
-
318
- return $host;
319
- }
320
-
321
  /**
322
  * Returns site url [fast]
323
  *
@@ -328,8 +337,23 @@ function w3_get_site_url()
328
  static $site_url = null;
329
 
330
  if ($site_url === null) {
331
- $site_url = get_option('siteurl');
332
- $site_url = rtrim($site_url, '/') . '/';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  }
334
 
335
  return $site_url;
@@ -364,6 +388,51 @@ function w3_get_site_url_regexp()
364
  return $regexp;
365
  }
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  /**
368
  * Get domain URL
369
  *
@@ -399,30 +468,6 @@ function w3_get_domain_url_regexp()
399
  return $regexp;
400
  }
401
 
402
- /**
403
- * Returns blog path
404
- *
405
- * @return string
406
- */
407
- function w3_get_site_path()
408
- {
409
- static $site_path = null;
410
-
411
- if ($site_path === null) {
412
- $site_url = w3_get_site_url();
413
- $domain_url = w3_get_domain_url();
414
-
415
- $site_path = str_replace($domain_url, '', $site_url);
416
- $site_path = rtrim($site_path, '/');
417
-
418
- if ($site_path != '') {
419
- $site_path .= '/';
420
- }
421
- }
422
-
423
- return $site_path;
424
- }
425
-
426
  /**
427
  * Returns upload info
428
  *
@@ -538,7 +583,7 @@ function w3_get_engine_name($engine)
538
  break;
539
 
540
  case 'file_pgcache':
541
- $engine_name = 'disk (enchanced)';
542
  break;
543
 
544
  default:
@@ -980,6 +1025,48 @@ function w3_preg_quote($string, $delimiter = null)
980
  return $string;
981
  }
982
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
983
  /**
984
  * Send powered by header
985
  */
1
  <?php
2
 
3
+ define('W3TC_VERSION', '0.8.5.1');
4
  define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
5
  define('W3TC_LINK_URL', 'http://www.w3-edge.com/wordpress-plugins/');
6
  define('W3TC_LINK_NAME', 'WordPress Plugins');
34
  define('W3TC_TMP_DIR', W3TC_CONTENT_DIR . '/tmp');
35
 
36
  define('W3TC_CONFIG_PATH', WP_CONTENT_DIR . '/w3-total-cache-config' . (($w3_blog_id = w3_get_blog_id()) != '' ? '-' . $w3_blog_id : '') . '.php');
 
37
 
38
  define('W3TC_MINIFY_LOG_FILE', W3TC_LOG_DIR . '/minify.log');
39
 
49
  define('W3TC_FEED_ITEMS', 3);
50
  define('W3TC_README_URL', 'http://plugins.trac.wordpress.org/browser/w3-total-cache/trunk/readme.txt?format=txt');
51
 
52
+ define('W3TC_TWITTER_STATUS', 'I just optimized my #wordpress blog\'s #performance using the W3 Total Cache #plugin by @w3edge. Check it out! http://j.mp/A69xX');
53
  define('W3TC_SUPPORT_US_TIMEOUT', 2592000);
54
 
55
+ /**
56
+ * W3 activate error
57
+ *
58
+ * @param string $error
59
+ * @return void
60
+ */
61
+ function w3_activate_error($error)
62
+ {
63
+ $active_plugins = (array) get_option('active_plugins');
64
+
65
+ $key = array_search(W3TC_FILE, $active_plugins);
66
+
67
+ if ($key !== false) {
68
+ do_action('deactivate_plugin', W3TC_FILE);
69
+
70
+ array_splice($active_plugins, $key, 1);
71
+
72
+ do_action('deactivate_' . W3TC_FILE);
73
+ do_action('deactivated_plugin', W3TC_FILE);
74
+
75
+ update_option('active_plugins', $active_plugins);
76
+ } else {
77
+ do_action('deactivate_' . W3TC_FILE);
78
+ }
79
+
80
+ include W3TC_DIR . '/inc/error.phtml';
81
+ exit();
82
+ }
83
+
84
  /**
85
  * W3 writable error
86
  *
87
  * @param string $path
 
88
  * @return string
89
  */
90
+ function w3_writable_error($path)
91
  {
92
+ $activate_url = wp_nonce_url('plugins.php?action=activate&plugin=' . W3TC_FILE, 'activate-plugin_' . W3TC_FILE);
93
+ $reactivate_button = sprintf('<input type="button" value="re-activate plugin" onclick="top.location.href = \'%s\'" />', addslashes($activate_url));
94
+
95
  if (w3_check_open_basedir($path)) {
96
+ if (file_exists($path)) {
97
+ $error = sprintf('<strong>%s</strong> is not write-able, please run following command:<br /><strong style="color: #f00;">chmod 777 %s</strong><br />then %s.', $path, $path, $reactivate_button);
98
+ } else {
99
+ $error = sprintf('<strong>%s</strong> could not be created, please run following command:<br /><strong style="color: #f00;">chmod 777 %s</strong><br />then %s.', $path, dirname($path), $reactivate_button);
100
+ }
101
  } else {
102
+ $error = sprintf('<strong>%s</strong> could not be created, <strong>open_basedir</strong> restriction in effect, please check your php.ini settings:<br /><strong style="color: #f00;">open_basedir = "%s"</strong></br />then %s.', $path, ini_get('open_basedir'), $reactivate_button);
103
  }
104
 
105
+ w3_activate_error($error);
 
 
 
 
106
  }
107
 
108
  /**
327
  return $id;
328
  }
329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  /**
331
  * Returns site url [fast]
332
  *
337
  static $site_url = null;
338
 
339
  if ($site_url === null) {
340
+ if (function_exists('get_option')) {
341
+ $site_url = get_option('siteurl');
342
+ $site_url = rtrim($site_url, '/') . '/';
343
+ } else {
344
+ $site_url = sprintf('http://%s/', $_SERVER['HTTP_HOST']);
345
+
346
+ if (! empty($_SERVER['DOCUMENT_ROOT'])) {
347
+ $document_root = realpath($_SERVER['DOCUMENT_ROOT']);
348
+ $abspath = realpath(ABSPATH);
349
+ $path = str_replace($abspath, '', $document_root);
350
+ $path = trim($path, '/\\');
351
+
352
+ if ($path != '') {
353
+ $site_url .= $path . '/';
354
+ }
355
+ }
356
+ }
357
  }
358
 
359
  return $site_url;
388
  return $regexp;
389
  }
390
 
391
+ /**
392
+ * Returns blog path
393
+ *
394
+ * @return string
395
+ */
396
+ function w3_get_site_path()
397
+ {
398
+ static $site_path = null;
399
+
400
+ if ($site_path === null) {
401
+ $site_url = w3_get_site_url();
402
+ $domain_url = w3_get_domain_url();
403
+
404
+ $site_path = str_replace($domain_url, '', $site_url);
405
+ $site_path = rtrim($site_path, '/');
406
+
407
+ if ($site_path != '') {
408
+ $site_path .= '/';
409
+ }
410
+ }
411
+
412
+ return $site_path;
413
+ }
414
+
415
+ /**
416
+ * Returns domain from host
417
+ *
418
+ * @param string $host
419
+ * @return string
420
+ */
421
+ function w3_get_domain($host)
422
+ {
423
+ $host = strtolower($host);
424
+
425
+ if (strpos($host, 'www.') === 0) {
426
+ $host = str_replace('www.', '', $host);
427
+ }
428
+
429
+ if (($pos = strpos($host, ':'))) {
430
+ $host = substr($host, 0, $pos);
431
+ }
432
+
433
+ return $host;
434
+ }
435
+
436
  /**
437
  * Get domain URL
438
  *
468
  return $regexp;
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  /**
472
  * Returns upload info
473
  *
583
  break;
584
 
585
  case 'file_pgcache':
586
+ $engine_name = 'disk (enhanced)';
587
  break;
588
 
589
  default:
1025
  return $string;
1026
  }
1027
 
1028
+ /**
1029
+ * Normalize file path
1030
+ *
1031
+ * @param string $file
1032
+ * @return string
1033
+ */
1034
+ function w3_normalize_file($file)
1035
+ {
1036
+ $site_url_regexp = '~' . w3_get_site_url_regexp() . '~i';
1037
+ $file = preg_replace($site_url_regexp, '', $file);
1038
+ $file = ltrim($file, '/\\');
1039
+
1040
+ return $file;
1041
+ }
1042
+
1043
+ /**
1044
+ * Returns true if zlib output compression is enabled otherwise false
1045
+ *
1046
+ * @return boolean
1047
+ */
1048
+ function w3_zlib_output_compression()
1049
+ {
1050
+ return w3_to_boolean(ini_get('zlib.output_compression'));
1051
+ }
1052
+
1053
+ /**
1054
+ * Recursive strips slahes from the var
1055
+ *
1056
+ * @param mixed $var
1057
+ * @return mixed
1058
+ */
1059
+ function w3_stripslashes($var)
1060
+ {
1061
+ if (is_string($var)) {
1062
+ return stripslashes($var);
1063
+ } elseif (is_array($var)) {
1064
+ $var = array_map('w3_stripslashes', $var);
1065
+ }
1066
+
1067
+ return $var;
1068
+ }
1069
+
1070
  /**
1071
  * Send powered by header
1072
  */
inc/error.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
3
+ <head>
4
+ <link rel="stylesheet" type="text/css" href="<?php echo WP_PLUGIN_URL; ?>/w3-total-cache/inc/css/error.css"></link>
5
+ <title>Error</title>
6
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
7
+ </head>
8
+ <body>
9
+ <p>
10
+ <?php echo $error; ?>
11
+ </p>
12
+ </body>
13
+ </html>
inc/options/cdn.phtml CHANGED
@@ -12,7 +12,7 @@
12
  <p>
13
  You can <input id="cdn_export_library" class="button" type="button" value="export media library to CDN" />,
14
  use the <input id="cdn_rename_domain" class="button" type="button" value="domain rename tool" />,
15
- <input id="cdn_import_library" class="button" type="button" value="import attachments into the Media Library &amp; CDN" /> or
16
  <input id="cdn_queue" class="button" type="button" value="view unsuccessful file transfers" /> now.
17
  </p>
18
  <?php endif; ?>
@@ -41,7 +41,8 @@
41
  <tr>
42
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
43
  <input type="hidden" name="cdn.includes.enable" value="0" />
44
- <label><input type="checkbox" name="cdn.includes.enable" value="1"<?php checked($this->_config->get_boolean('cdn.includes.enable'), true); ?> /> Host wp-includes/ files</label>
 
45
  </th>
46
  <?php if (! $cdn_mirror): ?>
47
  <td>
@@ -52,7 +53,8 @@
52
  <tr>
53
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
54
  <input type="hidden" name="cdn.theme.enable" value="0" />
55
- <label><input type="checkbox" name="cdn.theme.enable" value="1"<?php checked($this->_config->get_boolean('cdn.theme.enable'), true); ?> /> Host active theme files</label>
 
56
  </th>
57
  <?php if (! $cdn_mirror): ?>
58
  <td>
@@ -62,19 +64,21 @@
62
  </tr>
63
  <tr>
64
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
65
- <input type="hidden" name="cdn.minify.enable" value="0" />
66
- <label><input type="checkbox" name="cdn.minify.enable" value="1"<?php if (! W3TC_PHP5): ?> disabled="disabled"<?php endif; ?><?php checked($this->_config->get_boolean('cdn.minify.enable'), true); ?> /> Host minified <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files</label>
 
67
  </th>
68
  <?php if (! $cdn_mirror): ?>
69
  <td>
70
- <input class="button cdn_export" type="button" name="minify" value="Upload minify files"<?php if (! W3TC_PHP5): ?> disabled="disabled"<?php endif; ?> />
71
  </td>
72
  <?php endif; ?>
73
  </tr>
74
  <tr>
75
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
76
  <input type="hidden" name="cdn.custom.enable" value="0" />
77
- <label><input type="checkbox" name="cdn.custom.enable" value="1"<?php checked($this->_config->get_boolean('cdn.custom.enable'), true); ?> /> Host custom files</label>
 
78
  </th>
79
  <?php if (! $cdn_mirror): ?>
80
  <td>
@@ -83,7 +87,7 @@
83
  <?php endif; ?>
84
  </tr>
85
  <tr>
86
- <th style="width: 300px;"><label for="cdn_includes_files">wp-includes/ file types to upload:</label></th>
87
  <td>
88
  <input id="cdn_includes_files" type="text" name="cdn.includes.files" value="<?php echo htmlspecialchars($this->_config->get_string('cdn.includes.files')); ?>" size="40" /><br />
89
  <span class="description">Specify the file types within the WordPress core to host with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
@@ -99,17 +103,24 @@
99
  <tr>
100
  <th valign="top"><label for="cdn_custom_files">Custom file list:</label></th>
101
  <td>
102
- <textarea id="cdn_custom_files" name="cdn.custom.files" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('cdn.custom.files'))); ?></textarea><br />
103
  <span class="description">Specify any files outside of theme or other common directories to host with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
104
  </td>
105
  </tr>
106
  <tr>
107
  <th valign="top"><label for="cdn_reject_ua">Rejected user agents:</label></th>
108
  <td>
109
- <textarea id="cdn_reject_ua" name="cdn.reject.ua" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('cdn.reject.ua'))); ?></textarea><br />
110
  <span class="description">Specify user agents that should not access files hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
111
  </td>
112
  </tr>
 
 
 
 
 
 
 
113
  <?php if (! $cdn_mirror): ?>
114
  <tr>
115
  <th colspan="2">
12
  <p>
13
  You can <input id="cdn_export_library" class="button" type="button" value="export media library to CDN" />,
14
  use the <input id="cdn_rename_domain" class="button" type="button" value="domain rename tool" />,
15
+ <input id="cdn_import_library" class="button" type="button" value="import attachments into the Media Library" /> or
16
  <input id="cdn_queue" class="button" type="button" value="view unsuccessful file transfers" /> now.
17
  </p>
18
  <?php endif; ?>
41
  <tr>
42
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
43
  <input type="hidden" name="cdn.includes.enable" value="0" />
44
+ <label><input type="checkbox" name="cdn.includes.enable" value="1"<?php checked($this->_config->get_boolean('cdn.includes.enable'), true); ?> /> Host wp-includes/ files</label><br />
45
+ <span class="description">If checked, WordPress static core file types specified in the "wp-includes file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
46
  </th>
47
  <?php if (! $cdn_mirror): ?>
48
  <td>
53
  <tr>
54
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
55
  <input type="hidden" name="cdn.theme.enable" value="0" />
56
+ <label><input type="checkbox" name="cdn.theme.enable" value="1"<?php checked($this->_config->get_boolean('cdn.theme.enable'), true); ?> /> Host active theme files</label><br />
57
+ <span class="description">If checked, all active theme file types specified in the "theme file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
58
  </th>
59
  <?php if (! $cdn_mirror): ?>
60
  <td>
64
  </tr>
65
  <tr>
66
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
67
+ <input type="hidden" name="cdn.minify.enable" value="0"<?php if (! W3TC_PHP5 || ! $minify_enabled): ?> disabled="disabled"<?php endif; ?> />
68
+ <label><input type="checkbox" name="cdn.minify.enable" value="1"<?php checked($this->_config->get_boolean('cdn.minify.enable'), true); ?><?php if (! W3TC_PHP5 || ! $minify_enabled): ?> disabled="disabled"<?php endif; ?> /> Host minified <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files</label><br />
69
+ <span class="description">If checked, minified <acronym>CSS</acronym> and <acronym>JS</acronym> files will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
70
  </th>
71
  <?php if (! $cdn_mirror): ?>
72
  <td>
73
+ <input class="button cdn_export" type="button" name="minify" value="Upload minify files"<?php if (! W3TC_PHP5 || ! $minify_enabled): ?> disabled="disabled"<?php endif; ?> />
74
  </td>
75
  <?php endif; ?>
76
  </tr>
77
  <tr>
78
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
79
  <input type="hidden" name="cdn.custom.enable" value="0" />
80
+ <label><input type="checkbox" name="cdn.custom.enable" value="1"<?php checked($this->_config->get_boolean('cdn.custom.enable'), true); ?> /> Host custom files</label><br />
81
+ <span class="description">If checked, any file names or paths specified in the "custom file list" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
82
  </th>
83
  <?php if (! $cdn_mirror): ?>
84
  <td>
87
  <?php endif; ?>
88
  </tr>
89
  <tr>
90
+ <th style="width: 300px;"><label for="cdn_includes_files">wp-includes file types to upload:</label></th>
91
  <td>
92
  <input id="cdn_includes_files" type="text" name="cdn.includes.files" value="<?php echo htmlspecialchars($this->_config->get_string('cdn.includes.files')); ?>" size="40" /><br />
93
  <span class="description">Specify the file types within the WordPress core to host with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
103
  <tr>
104
  <th valign="top"><label for="cdn_custom_files">Custom file list:</label></th>
105
  <td>
106
+ <textarea id="cdn_custom_files" name="cdn.custom.files" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('cdn.custom.files'))); ?></textarea><br />
107
  <span class="description">Specify any files outside of theme or other common directories to host with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
108
  </td>
109
  </tr>
110
  <tr>
111
  <th valign="top"><label for="cdn_reject_ua">Rejected user agents:</label></th>
112
  <td>
113
+ <textarea id="cdn_reject_ua" name="cdn.reject.ua" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('cdn.reject.ua'))); ?></textarea><br />
114
  <span class="description">Specify user agents that should not access files hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
115
  </td>
116
  </tr>
117
+ <tr>
118
+ <th valign="top"><label for="cdn_reject_files">Rejected files:</label></th>
119
+ <td>
120
+ <textarea id="cdn_reject_files" name="cdn.reject.files" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('cdn.reject.files'))); ?></textarea><br />
121
+ <span class="description">Specify the path of files that should not use the <acronym title="Content Delivery Network">CDN</acronym>.</span>
122
+ </td>
123
+ </tr>
124
  <?php if (! $cdn_mirror): ?>
125
  <tr>
126
  <th colspan="2">
inc/options/common/header.phtml CHANGED
@@ -14,13 +14,13 @@ jQuery(function($) {
14
  <h2>W3 Total Cache</h2>
15
 
16
  <?php foreach ($this->_errors as $error): ?>
17
- <div id="message" class="error">
18
  <p><?php echo $error; ?></p>
19
  </div>
20
  <?php endforeach; ?>
21
 
22
  <?php foreach ($this->_notes as $note): ?>
23
- <div id="message" class="updated fade">
24
  <p><?php echo $note; ?></p>
25
  </div>
26
  <?php endforeach; ?>
14
  <h2>W3 Total Cache</h2>
15
 
16
  <?php foreach ($this->_errors as $error): ?>
17
+ <div class="error">
18
  <p><?php echo $error; ?></p>
19
  </div>
20
  <?php endforeach; ?>
21
 
22
  <?php foreach ($this->_notes as $note): ?>
23
+ <div class="updated fade">
24
  <p><?php echo $note; ?></p>
25
  </div>
26
  <?php endforeach; ?>
inc/options/dbcache.phtml CHANGED
@@ -46,7 +46,7 @@
46
  <tr>
47
  <th valign="top"><label for="dbcache_reject_sql">Ignored query stems:</label></th>
48
  <td>
49
- <textarea id="dbcache_reject_sql" name="dbcache.reject.sql" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('dbcache.reject.sql'))); ?></textarea><br />
50
  <span class="description">Do not cache queries that contain these input contents. The entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_).</span>
51
  </td>
52
  </tr>
46
  <tr>
47
  <th valign="top"><label for="dbcache_reject_sql">Ignored query stems:</label></th>
48
  <td>
49
+ <textarea id="dbcache_reject_sql" name="dbcache.reject.sql" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('dbcache.reject.sql'))); ?></textarea><br />
50
  <span class="description">Do not cache queries that contain these input contents. The entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_).</span>
51
  </td>
52
  </tr>
inc/options/faq.phtml CHANGED
@@ -94,7 +94,7 @@
94
  <li><a href="#q76">Hang on, don't I need to modify my <acronym title="Cascading Style Sheet">CSS</acronym> files so they'll work on the <acronym title="Content Delivery Network">CDN</acronym>?</a></li>
95
  <li><a href="#q77">I don't have time to deal with this, but I know I need it. Will you help me?</a></li>
96
  <li><a href="#q92">What about query string variables on <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym>, do they matter?</a></li>
97
- <li><a href="#q95">Is this plugin comptatible with GD Star Rating?</li>
98
  <li><a href="#q96">How do I cache only the home page?</a></li>
99
  <li><a href="#q97">I see garbage characters instead of the normal web site, what's going on here?</a></li>
100
  <li><a href="#q98">What is the purpose of the "Media Library Import" tool and how do I use it?</a></li>
@@ -189,13 +189,15 @@
189
  <li><a href="http://www.mozilla.com/firefox/" target="_blank">Mozilla Firefox</a> + <a href="http://getfirebug.com/" target="_blank">Firebug</a> + <a href="http://stevesouders.com/hammerhead/" target="_blank">Hammerhead</a></li>
190
  <li><a href="http://www.google.com/chrome" target="_blank">Google Chrome</a> + <a href="http://code.google.com/webtoolkit/speedtracer/" target="_blank">Google Speed Tracer</a></li>
191
  </ul>
 
 
 
 
 
192
  <ul>
193
- <li><a href="http://tools.pingdom.com/" target="_blank">Pingdom</a></li>
194
- <li><a href="http://www.webpagetest.org/test" target="_blank">WebPagetest</a></li>
195
- <li><a href="http://www.gomez.com/instant-test-pro/" target="_blank">Gomez Instant Test Pro</a></li>
196
- </ul>
197
- <ul>
198
- <li><a href="http://www.port80software.com/tools/compresscheck.asp" target="_blank">Port80 Compression Check</a> (requires <acronym title="Microsoft Internet Explorer">MSIE</acronym>6 support to be enabled)</li>
199
  <li><a href="http://www.gidnetwork.com/tools/gzip-test.php" target="_blank">A simple online web page compression / deflate / <acronym title="GNU zip">gzip</acronym> test tool</a></li>
200
  <li><a href="http://www.websiteoptimization.com/services/analyze/" target="_blank">Web Page Analyzer</a></li>
201
  </ul>
@@ -428,7 +430,7 @@ No, you can drag and drop them into the desired order on the minify settings pag
428
  Yes, you can specify which file types you would like served by <acronym title="Content Delivery Network">CDN</acronym> and they will be uploaded and always downloaded from that location. This includes the smilies, JavaScript files et al. By default we take care of them all.</p>
429
  <p align="right"><a href="#toc">back to top</a></p>
430
  <p id="q73"><strong>What if I don't want to work with a <acronym title="Content Delivery Network">CDN</acronym> right now, is there any other use for this feature?</strong><br />
431
- Yes! You can take advantage of the <a href="http://www.mozilla.org/projects/netlib/http/pipelining-faq.html">pipelining</a> support in some browsers by creating a sub-domain for the static content for your site. So you could create static.domain.com on your server (and update your <acronym title="Domain Name System">DNS</acronym> zone) and then specify the <acronym title="File Transfer Protocol">FTP</acronym> details for it in the plugin configuration panel and you're done. If you disable the scripting options on your server you'll find that your server will actually respond slightly faster from that sub-domain because it's just sending files and not processing them.</p>
432
  <p align="right"><a href="#toc">back to top</a></p>
433
  <p id="q74"><strong>Are minified files uploaded to my <acronym title="Content Delivery Network">CDN</acronym> provider?</strong><br />
434
  Yes, any <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> you manage with the plugin are minified before being uploaded to your <acronym title="Content Delivery Network">CDN</acronym>. You don't have to make any special changes to your theme. We encourage you to make sure that your provider supports <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression as the benefit of having your static assets available from more than one <acronym title="Point of Presence">POP</acronym> alone is not enough.</p>
@@ -437,6 +439,7 @@ No, you can drag and drop them into the desired order on the minify settings pag
437
  That depends on how you use your blog and where most of your readers read your blog (regionally). Here's a short list:</p>
438
  <ul>
439
  <li><a href="http://www.maxcdn.com/" target="_blank">MaxCDN</a></li>
 
440
  <li><a href="http://www.cotendo.com/" target="_blank">Cotendo</a></li>
441
  <li><a href="https://vps.net/cdn-signup" target="_blank">VPS NET</a></li>
442
  <li><a href="http://aws.amazon.com/s3/" target="_blank">Amazon S3</a> / <a href="http://aws.amazon.com/cloudfront/" target="_blank">Cloudfront</a></li>
94
  <li><a href="#q76">Hang on, don't I need to modify my <acronym title="Cascading Style Sheet">CSS</acronym> files so they'll work on the <acronym title="Content Delivery Network">CDN</acronym>?</a></li>
95
  <li><a href="#q77">I don't have time to deal with this, but I know I need it. Will you help me?</a></li>
96
  <li><a href="#q92">What about query string variables on <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym>, do they matter?</a></li>
97
+ <li><a href="#q95">Is this plugin comptatible with GD Star Rating?</a></li>
98
  <li><a href="#q96">How do I cache only the home page?</a></li>
99
  <li><a href="#q97">I see garbage characters instead of the normal web site, what's going on here?</a></li>
100
  <li><a href="#q98">What is the purpose of the "Media Library Import" tool and how do I use it?</a></li>
189
  <li><a href="http://www.mozilla.com/firefox/" target="_blank">Mozilla Firefox</a> + <a href="http://getfirebug.com/" target="_blank">Firebug</a> + <a href="http://stevesouders.com/hammerhead/" target="_blank">Hammerhead</a></li>
190
  <li><a href="http://www.google.com/chrome" target="_blank">Google Chrome</a> + <a href="http://code.google.com/webtoolkit/speedtracer/" target="_blank">Google Speed Tracer</a></li>
191
  </ul>
192
+ <ul>
193
+ <li><a href="http://tools.pingdom.com/" target="_blank">Pingdom</a></li>
194
+ <li><a href="http://www.webpagetest.org/test" target="_blank">WebPagetest</a></li>
195
+ <li><a href="http://www.gomez.com/instant-test-pro/" target="_blank">Gomez Instant Test Pro</a></li>
196
+ </ul>
197
  <ul>
198
+ <li><a href="http://redbot.org/" target="_blank">Resource Expert Droid</a></li>
199
+ <li><a href="http://www.procata.com/cachetest/" target="_blank">Web Caching Tests</a></li>
200
+ <li><a href="http://www.port80software.com/tools/compresscheck.asp" target="_blank">Port80 Compression Check</a> (minify requires <acronym title="Microsoft Internet Explorer">MSIE</acronym>6 support to be enabled)</li>
 
 
 
201
  <li><a href="http://www.gidnetwork.com/tools/gzip-test.php" target="_blank">A simple online web page compression / deflate / <acronym title="GNU zip">gzip</acronym> test tool</a></li>
202
  <li><a href="http://www.websiteoptimization.com/services/analyze/" target="_blank">Web Page Analyzer</a></li>
203
  </ul>
430
  Yes, you can specify which file types you would like served by <acronym title="Content Delivery Network">CDN</acronym> and they will be uploaded and always downloaded from that location. This includes the smilies, JavaScript files et al. By default we take care of them all.</p>
431
  <p align="right"><a href="#toc">back to top</a></p>
432
  <p id="q73"><strong>What if I don't want to work with a <acronym title="Content Delivery Network">CDN</acronym> right now, is there any other use for this feature?</strong><br />
433
+ Yes! You can take advantage of the <a href="http://www.mozilla.org/projects/netlib/http/pipelining-faq.html">pipelining</a> support in some browsers by creating a sub-domain for the static content for your site. So you could select the "Origin Push / Self-hosted" method of the General Settings tab. Create static.domain.com on your server (and update your <acronym title="Domain Name System">DNS</acronym> zone) and then specify the <acronym title="File Transfer Protocol">FTP</acronym> details for it in the plugin configuration panel and you're done. If you disable the scripting options on your server you'll find that your server will actually respond slightly faster from that sub-domain because it's just sending files and not processing them.</p>
434
  <p align="right"><a href="#toc">back to top</a></p>
435
  <p id="q74"><strong>Are minified files uploaded to my <acronym title="Content Delivery Network">CDN</acronym> provider?</strong><br />
436
  Yes, any <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> you manage with the plugin are minified before being uploaded to your <acronym title="Content Delivery Network">CDN</acronym>. You don't have to make any special changes to your theme. We encourage you to make sure that your provider supports <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression as the benefit of having your static assets available from more than one <acronym title="Point of Presence">POP</acronym> alone is not enough.</p>
439
  That depends on how you use your blog and where most of your readers read your blog (regionally). Here's a short list:</p>
440
  <ul>
441
  <li><a href="http://www.maxcdn.com/" target="_blank">MaxCDN</a></li>
442
+ <li><a href="http://www.rackspacecloud.com/cloud_hosting_products/files" target="_blank">Rackspace Cloud Files</a></li>
443
  <li><a href="http://www.cotendo.com/" target="_blank">Cotendo</a></li>
444
  <li><a href="https://vps.net/cdn-signup" target="_blank">VPS NET</a></li>
445
  <li><a href="http://aws.amazon.com/s3/" target="_blank">Amazon S3</a> / <a href="http://aws.amazon.com/cloudfront/" target="_blank">Cloudfront</a></li>
inc/options/general.phtml CHANGED
@@ -42,15 +42,15 @@
42
  </tr>
43
  </table>
44
 
45
- <p>Enable minify to combine, remove white space / comments and compress (<acronym title="GNU zip">gzip</acronym> / deflate) your (theme's / plugin's / external) <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files.</p>
46
 
47
  <table class="form-table">
48
  <tr>
49
  <th valign="top">Minify:</th>
50
  <td>
51
- <input type="hidden" name="minify.enabled" value="0" />
52
  <label><input class="enabled" type="checkbox" name="minify.enabled" value="1"<?php checked($minify_enabled, true); ?><?php if (! W3TC_PHP5): ?> disabled="disabled"<?php endif; ?> />&nbsp;<strong>Enable</strong></label><br />
53
- <span class="description">Minification can decrease file size of <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, <acronym title="JavaScript">JS</acronym> and feeds respectively by ~10% on average.</span>
54
  </td>
55
  </tr>
56
  <tr>
@@ -73,7 +73,7 @@
73
  <td>
74
  <input type="hidden" name="dbcache.enabled" value="0" />
75
  <label><input class="enabled" type="checkbox" name="dbcache.enabled" value="1"<?php checked($dbcache_enabled, true); ?> />&nbsp;<strong>Enable</strong></label><br />
76
- <span class="description">Caching database objects may decrease the response time of your blog by at least an order of magnitude.</span>
77
  </td>
78
  </tr>
79
  <tr>
@@ -88,7 +88,7 @@
88
  </tr>
89
  </table>
90
 
91
- <p>Host your wp-includes/ (WordPress' core files), media library, theme images / <acronym title="Cascading Style Sheets">CSS</acronym> / <acronym title="JavaScript">JS</acronym> with your <acronym title="Content Delivery Network">CDN</acronym> provider.</p>
92
 
93
  <table class="form-table">
94
  <tr>
@@ -103,9 +103,9 @@
103
  <td>
104
  <select name="cdn.engine">
105
  <option value="mirror"<?php selected($this->_config->get_string('cdn.engine'), 'mirror'); ?>>Origin Pull (Mirror)</option>
 
106
  <option value="cf"<?php selected($this->_config->get_string('cdn.engine'), 'cf'); ?><?php if (! W3TC_PHP5 || ! $check_curl): ?> disabled="disabled"<?php endif; ?>>Amazon CloudFront</option>
107
- <option value="s3"<?php selected($this->_config->get_string('cdn.engine'), 's3'); ?><?php if (! W3TC_PHP5 || ! $check_curl): ?> disabled="disabled"<?php endif; ?>>Amazon Simple Storage Service (Amazon S3)</option>
108
- <option value="ftp"<?php selected($this->_config->get_string('cdn.engine'), 'ftp'); ?>>Self-hosted (File Transfer Protocol)</option>
109
  </select><br />
110
  <span class="description">Select the <acronym title="Content Delivery Network">CDN</acronym> type you wish to use.</span>
111
  </td>
@@ -119,14 +119,15 @@
119
  <th valign="top">Debug Mode:</th>
120
  <td>
121
  <input type="hidden" name="debug" value="0" />
122
- <label><input type="checkbox" name="debug" value="1"<?php checked($debug, true); ?> />&nbsp;<strong>Enable</strong></label>
 
123
  </td>
124
  </tr>
125
  </table>
126
 
127
  <h3>Support Us</h3>
128
 
129
- <p>We're working to make WordPress better. Please support us!</p>
130
 
131
  <p>
132
  <label>Link to us:
@@ -136,7 +137,7 @@
136
  <option value="<?php echo $support_id; ?>"<?php selected($support, $support_id); ?>><?php echo htmlspecialchars($support_name); ?></option>
137
  <?php endforeach; ?>
138
  </select>
139
- </label> (easy) or tell your friends with a <a href="#" class="link-tweet">tweet</a> (easiest).
140
  </p>
141
 
142
  <p>If you want to place the link manually here is the code:</p>
42
  </tr>
43
  </table>
44
 
45
+ <p>Enable minify to combine, remove white space / comments and compress (<acronym title="GNU zip">gzip</acronym> / deflate) your (theme's / plugin's / external) <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files.</p>
46
 
47
  <table class="form-table">
48
  <tr>
49
  <th valign="top">Minify:</th>
50
  <td>
51
+ <input type="hidden" name="minify.enabled" value="0"<?php if (! W3TC_PHP5): ?> disabled="disabled"<?php endif; ?> />
52
  <label><input class="enabled" type="checkbox" name="minify.enabled" value="1"<?php checked($minify_enabled, true); ?><?php if (! W3TC_PHP5): ?> disabled="disabled"<?php endif; ?> />&nbsp;<strong>Enable</strong></label><br />
53
+ <span class="description">Minification can decrease file size of <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheet">CSS</acronym>, <acronym title="JavaScript">JS</acronym> and feeds respectively by ~10% on average.</span>
54
  </td>
55
  </tr>
56
  <tr>
73
  <td>
74
  <input type="hidden" name="dbcache.enabled" value="0" />
75
  <label><input class="enabled" type="checkbox" name="dbcache.enabled" value="1"<?php checked($dbcache_enabled, true); ?> />&nbsp;<strong>Enable</strong></label><br />
76
+ <span class="description">Caching database objects may decrease the response time of your blog by up to 100x.</span>
77
  </td>
78
  </tr>
79
  <tr>
88
  </tr>
89
  </table>
90
 
91
+ <p>Host your wp-includes (WordPress' core files), media library, theme images / <acronym title="Cascading Style Sheet">CSS</acronym> / <acronym title="JavaScript">JS</acronym> with your <acronym title="Content Delivery Network">CDN</acronym> provider.</p>
92
 
93
  <table class="form-table">
94
  <tr>
103
  <td>
104
  <select name="cdn.engine">
105
  <option value="mirror"<?php selected($this->_config->get_string('cdn.engine'), 'mirror'); ?>>Origin Pull (Mirror)</option>
106
+ <option value="ftp"<?php selected($this->_config->get_string('cdn.engine'), 'ftp'); ?>>Origin Push / Self-hosted (File Transfer Protocol Upload)</option>
107
  <option value="cf"<?php selected($this->_config->get_string('cdn.engine'), 'cf'); ?><?php if (! W3TC_PHP5 || ! $check_curl): ?> disabled="disabled"<?php endif; ?>>Amazon CloudFront</option>
108
+ <option value="s3"<?php selected($this->_config->get_string('cdn.engine'), 's3'); ?><?php if (! W3TC_PHP5 || ! $check_curl): ?> disabled="disabled"<?php endif; ?>>Amazon Simple Storage Service (S3)</option>
 
109
  </select><br />
110
  <span class="description">Select the <acronym title="Content Delivery Network">CDN</acronym> type you wish to use.</span>
111
  </td>
119
  <th valign="top">Debug Mode:</th>
120
  <td>
121
  <input type="hidden" name="debug" value="0" />
122
+ <label><input type="checkbox" name="debug" value="1"<?php checked($debug, true); ?> />&nbsp;<strong>Enable</strong></label><br />
123
+ <span class="description">If selected, detailed caching information will be appear at the end of each page in a <acronym title="Hypertext Markup Language">HTML</acronym> comment. View a page's source code to review.</span>
124
  </td>
125
  </tr>
126
  </table>
127
 
128
  <h3>Support Us</h3>
129
 
130
+ <p>We're working to make WordPress better. Please support us, here's how:</p>
131
 
132
  <p>
133
  <label>Link to us:
137
  <option value="<?php echo $support_id; ?>"<?php selected($support, $support_id); ?>><?php echo htmlspecialchars($support_name); ?></option>
138
  <?php endforeach; ?>
139
  </select>
140
+ </label> (easy) or tell your friends with a <input type="button" class="button button-tweet" value="tweet" /> (easiest).
141
  </p>
142
 
143
  <p>If you want to place the link manually here is the code:</p>
inc/options/install.phtml CHANGED
@@ -4,12 +4,12 @@
4
  <h3>Installation</h3>
5
 
6
  <ol>
7
- <li>Disable and remove any other caching plugin you may be using &mdash; most plugins have uninstall procedures you can follow. Make sure wp-content/ has 777 permissions before proceeding, e.g.: # chmod 777 /var/www/vhosts/domain.com/httpdocs/wp-content/</li>
8
- <li>Ensure that wp-config.php contains the statement below; if you previously used a caching plugin, this statement is likely to exist already: define('WP_CACHE', true);</li>
9
- <li>Locate and activate the plugin on the Plugins page, then click the Settings link to proceed to the <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=general">General Settings</a> tab. Set the permisions of wp-content back to 755, e.g.: `# chmod 755 /var/www/vhosts/domain.com/httpdocs/wp-content/.</li>
10
- <li>Select your caching preferences for page, database and minify. If memcached is used this will require you to confirm or modify the default settings and add any additional memcached servers you wish to use. To utilize <a href="#APC"><acronym title="Alternative PHP Cache">APC</acronym></a> and <a href="#memcached">memcached</a> + <a href="#memcache">memcache</a> installation guides have been provided under the Installation tab. For those in shared hosting environments, contact your provider to see if either of these are supported.</li>
11
- <li>If you already have a content delivery network provider, proceed to the <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=cdn"><acronym title="Content Delivery Network">CDN</acronym> Settings</a> tab and populate the fields and set your preferences. If you're not running a version of WordPress with the Media Library feature, use the Media Library Import Tool to migrate your post images etc to appropriate locations. If you do not have a <acronym title="Content Delivery Network">CDN</acronym> provider, you can still improve your site's performance using this feature. Create and use a subdomain on your own server; e.g. static.domain.com and configure options on the <acronym title="Content Delivery Network">CDN</acronym> tab accordingly.</li>
12
- <li>On the <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=minify">Minify Settings</a> tab all of the recommended settings are preset. Specify any <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files in the respective sections, view your site's <acronym title="Hypertext Markup Language">HTML</acronym> source and search for .<acronym title="Cascading Style Sheet">css</acronym> and .<acronym title="JavaScript">js</acronym> files. In the case of <acronym title="JavaScript">JS</acronym> files you can specify the type and location of the embedding using the drop down menu.</li>
13
  <li>You're done! Get back to blogging!</li>
14
  </ol>
15
  Check out the <acronym title="Frequently Asked Questions">FAQ</acronym> for more details on <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=faq">usage</a>.
@@ -25,6 +25,10 @@
25
  # yum install php-devel</li>
26
  <li>Install apxs with the following command:<br />
27
  # yum install httpd-devel</li>
 
 
 
 
28
  </ol>
29
  <hr />
30
  <p id="memcached"><strong>Memcached (Daemon) Installation:</strong><br />
@@ -34,10 +38,7 @@
34
  # yum install libevent<br />
35
  <br />
36
  If this succeeds skip to #5. If this fails, then let's compile. Download and extract the <a href="http://www.monkey.org/~provos/libevent/" target="_blank">latest stable version</a>:<br />
37
- # cd /usr/local/src<br />
38
- # wget <a href="http://monkey.org/~provos/libevent-1.4.12-stable.tar.gz">http://monkey.org/~provos/libevent-1.4.12-stable.tar.gz</a><br />
39
- # gunzip -c libevent-1.4.12-stable.tar.gz | tar xf -<br />
40
- # cd libevent-1.4.12-stable</li>
41
  <li>Let's compile:<br />
42
  # ./configure &amp;&amp; make &amp;&amp; make install</li>
43
  <li>In the output you should see:<br />
@@ -50,18 +51,15 @@
50
  <li>Configure your server for the new install:<br />
51
  # ldconfig -v</li>
52
  <li>Now find the <a href="http://www.danga.com/memcached/download.bml" target="_blank">latest stable memcached</a>, download and extract:<br />
53
- # cd /usr/local/src<br />
54
- # wget <a href="http://memcached.googlecode.com/files/memcached-1.4.3.tar.gz" target="_blank">http://memcached.googlecode.com/files/memcached-1.4.3.tar.gz</a><br />
55
- # gunzip -c memcached-1.4.3.tar.gz | tar xf -<br />
56
- # cd memcached-1.4.3</li>
57
  <li>Let's compile:<br />
58
  # ./configure &amp;&amp; make &amp;&amp; make install</li>
59
  <li>Make sure memcached is starts automatically on server boot:<br />
60
  # touch /etc/init.d/memcached<br />
61
- # echo '#!/bin/sh -e' >> /etc/init.d/memcached<br />
62
- # echo '/usr/local/bin/memcached -d -m 128 -p 11211 -u nobody -l localhost' >> /etc/init.d/memcached<br />
63
  # chmod u+x /etc/init.d/memcached<br />
64
- # echo '/etc/init.d/memcached' >> /etc/rc.local</li>
65
  <li>And finally, let's start memcached:<br />
66
  # /etc/init.d/memcached</li>
67
  </ol>
@@ -70,44 +68,42 @@
70
  <li><a href="http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/" target="_blank">Installing memcache on Windows for <acronym title="Hypertext Preprocessor">PHP</acronym></a></li>
71
  <li><a href="http://pecl4win.php.net/ext.php/php_memcache.dll" target="_blank"><acronym title="PHP Extension Community Library">PECL</acronym> memcached Extensions</a> </li>
72
  </ul>
73
- <hr />
74
- <p id="memcache"><strong><acronym title="PHP Extension Community Library">PECL</acronym> Memcache Module Installation:</strong><br />
75
- <em>Time required: 2 minutes</em></p>
76
  <ol>
77
  <li>Either use <acronym title="PHP Extension Community Library">PECL</acronym> (and skip to #4 if successful):<br />
78
  # pecl install memcache</li>
79
  <li>Or via compilation. Download the <a href="http://pecl.php.net/package/memcache" target="_blank">latest stable version</a> and extract:<br />
80
- # cd /usr/local/src/<br />
81
- # wget <a href="http://pecl.php.net/get/memcache-2.2.5.tgz">http://pecl.php.net/get/memcache-2.2.5.tgz</a><br />
82
- # gunzip -c memcache-2.2.5.tgz | tar xf -<br />
83
- # cd memcache-2.2.5</li>
84
- <li>Now we start to compile (and copy the module to your <acronym title="PHP Extension Community Library">PECL</acronym> modules directory if necessary):<br />
85
- # phpize &amp;&amp; ./configure &amp;&amp; make &amp;&amp; make install<br />
86
- # cp -p /usr/local/src/memcache-2.2.5/modules/memcache.so /usr/lib/php/modules/</li>
87
- <li>Make sure the module is loaded:<br />
88
- # echo "extension=memcache.so" &gt; /etc/php.d/memcache.ini<br />
89
- <br />
90
- or you can also use the memcache.ini file we prepared for you:<br />
91
- # cp -p /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/</li>
92
  <li>Finally restart apache:<br />
93
  # /etc/init.d/httpd restart</li>
94
  <li>You're done! Memcache should now be available. If the following command retuns anything, you're all set:<br />
95
  # php -r 'phpinfo();' | grep 'memcache'</li>
96
  </ol>
97
- <hr />
98
- <p id="APC"><strong><acronym title="Alternative PHP Cache">APC</acronym> Installation via <acronym title="PHP Extension Community Library">PECL</acronym>: </strong><br />
99
- <em>Time required: 1 minute</em></p>
100
  <ol>
101
- <li>Install <acronym title="Alternative PHP Cache">APC</acronym> using the <acronym title="PHP Extension Community Library">PECL</acronym> command:<br />
102
  # pecl install apc</li>
103
- <li>Make sure the module is loaded:<br />
104
- # echo "extension=apc.so" &gt; /etc/php.d/apc.ini<br />
105
- <br />
106
- or customize /etc/php.d/apc.ini using our included sample config file:<br />
107
- # cp -p /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/</li>
108
- <li>When ready, restart apache:<br />
109
- # /etc/init.d/httpd restart</li>
110
- <li>You're done! <acronym title="Alternative PHP Cache">APC</acronym> should now be available. If the following command retuns anything, you're all set:<br />
 
 
 
 
 
111
  # php -r 'phpinfo();' | grep 'apc'</li>
112
  </ol>
113
  <p>For windows users we recommend checking the following sites for more installation tips:</p>
@@ -115,34 +111,49 @@
115
  <li><a href="http://www.sitebuddy.com/PHP/Accelerators/apc_windows_binaries_builds" target="_blank"><acronym title="Alternative PHP Cache">APC</acronym> binaries for <acronym title="Hypertext Preprocessor">PHP</acronym> 5.x (windows builds)</a> </li>
116
  <li><a href="http://pecl4win.php.net/ext.php/php_apc.dll" target="_blank"><acronym title="PHP Extension Community Library">PECL</acronym> <acronym title="Alternative PHP Cache">APC</acronym> Extensions</a> </li>
117
  </ul>
118
- <hr />
119
- <p><strong><acronym title="Alternative PHP Cache">APC</acronym> Installation via Compilation: </strong><br />
120
- <em>Time required: 2 minutes</em></p>
121
- <ol>
122
- <li>Download the <a href="http://pecl.php.net/package/APC">latest stable version</a> and extract:<br />
123
- # cd /usr/local/src<br />
124
- # wget <a href="http://pecl.php.net/get/APC-3.0.19.tgz">http://pecl.php.net/get/APC-3.0.19.tgz</a><br />
125
- # gunzip -c APC-3.0.19.tgz | tar xf -<br />
126
- # cd APC-3.0.19</li>
127
- <li>Note the paths returned for the following commands:<br />
128
- # whereis phpize<br />
129
- # whereis php-config</li>
130
- <li>Use the output from #2 to modify the --with-apxs and --with-php-config flags in the following compile command:<br />
131
- # phpize &amp;&amp; ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/bin/phpize --with-php-config=/usr/bin/php-config &amp;&amp; make &amp;&amp; make install<br />
132
- <br />The result should be similar to:<br />
133
- Installing shared extensions: /usr/lib/php/modules/</li>
134
- <li>Use our customed <acronym title="Alternative PHP Cache">APC</acronym> settings by overwriting apc.ini in /etc/php.d/:<br />
135
- # cp -p /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/</li>
136
- <li>Restart apache when ready:<br />
137
- # /etc/init.d/httpd restart</li>
138
- <li>You're done! <acronym title="Alternative PHP Cache">APC</acronym> should now be available. If the following command retuns anything, you're all set:<br />
139
- # php -r 'phpinfo();' | grep 'apc'</li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  </ol>
141
  <hr />
142
  <p><strong>Note(s):</strong></p>
143
  <ul>
144
- <li>The provided instructions are for CentOS, however we can provide others based on <a href="mailto:wordpressexperts@w3-edge.com">your requests</a>.</li>
145
- <li>In the case where the "Rewrite <acronym>URL</acronym> Structure" (in <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=minify">Minify Settings</a> tab) is desired, and apache is not used, the file located in wp-content/plugins/w3-total-cache/wp-content/w3tc/.htaccess contains directives that must be created for the directory: wp-content/w3tc/.</li>
146
  <li>Restarting the web server will empty your <acronym title="Alternative PHP Cache">APC</acronym> cache, which means it will have to be rebuilt over time and your site's performance will suffer during this period. Still, <acronym title="Alternative PHP Cache">APC</acronym> should be installed in any case to maximize WordPress performance.</li>
147
  <li>Consider using memcached for objects that must persist across web server restarts or that you wish to share amongst your pool of servers (or cluster), e.g.: database objects or page cache.</li>
148
  <li>Some yum or mirrors may not have the necessary packages, in such cases you may have to do a manual installation.</li>
4
  <h3>Installation</h3>
5
 
6
  <ol>
7
+ <li>Disable and remove any other caching plugin you may be using &mdash; most plugins have uninstall procedures you can follow. Make sure wp-content/ has 777 permissions before proceeding, e.g.: # chmod 777 /var/www/vhosts/domain.com/httpdocs/wp-content/ using your web hosting control panel or your <acronym title="Secure Shell">SSH</acronym> account.</li>
8
+ <li>Ensure that wp-config.php (typically found in the root directory) contains the statement: define('WP_CACHE', true); If you previously used a caching plugin, this statement is likely to exist already.</li>
9
+ <li>Set the permissions of wp-content back to 755, e.g.: # chmod 755 /var/www/vhosts/domain.com/httpdocs/wp-content/</li>
10
+ <li>On the "<a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=general">General Settings</a>" tab and select your caching methods for page, database and minify. In most cases, "disk enhanced" mode for page cache, "disk" mode for minify and "disk" mode for database caching are "good" settings.</li>
11
+ <li>Optional: On the "<a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=minify">Minify Settings</a>" tab all of the recommended settings are preset. View your site's <acronym title="Hypertext Markup Language">HTML</acronym> source and search for .css and .js files and then specify any <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files in the respective section. In the case of <acronym title="JavaScript">JS</acronym> files you can (optionally) specify the type and location of the embedding using the drop down menu. See the plugin's <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=faq">FAQ</a> for more information on usage.</li>
12
+ <li>Optional: If you already have a content delivery network (<acronym title="Content Delivery Network">CDN</acronym>) provider, proceed to the "<a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=cdn"><acronym title="Content Delivery Network">CDN</acronym> Settings</a>" tab and populate the fields and set your preferences. If you do not use the Media Library, you will need to import your images etc into the default locations. Use the Media Library Import Tool on the <acronym title="Content Delivery Network">CDN</acronym> Setting tab to perform this task. If you do not have a <acronym title="Content Delivery Network">CDN</acronym> provider, you can still improve your site's performance using the "Self-hosted" method. On your own server, create a subdomain and matching <acronym title="Domain Name System">DNS</acronym> Zone record; e.g. static.domain.com and configure <acronym title="File Transfer Protocol">FTP</acronym> options on the <acronym title="Content Delivery Network">CDN</acronym> tab accordingly. Be sure to <acronym title="File Transfer Protocol">FTP</acronym> upload the appropriate files, using the available upload buttons.</li>
13
  <li>You're done! Get back to blogging!</li>
14
  </ol>
15
  Check out the <acronym title="Frequently Asked Questions">FAQ</acronym> for more details on <a href="options-general.php?page=w3-total-cache/w3-total-cache.php&amp;tab=faq">usage</a>.
25
  # yum install php-devel</li>
26
  <li>Install apxs with the following command:<br />
27
  # yum install httpd-devel</li>
28
+ <li>Make sure GCC is up-to-date:<br />
29
+ # yum install gcc make</li>
30
+ <li>Make sure ZLIB is fully installed:<br />
31
+ # yum install zlib-devel</li>
32
  </ol>
33
  <hr />
34
  <p id="memcached"><strong>Memcached (Daemon) Installation:</strong><br />
38
  # yum install libevent<br />
39
  <br />
40
  If this succeeds skip to #5. If this fails, then let's compile. Download and extract the <a href="http://www.monkey.org/~provos/libevent/" target="_blank">latest stable version</a>:<br />
41
+ # cd /usr/local/src &amp;&amp; wget <a href="http://monkey.org/~provos/libevent-1.4.12-stable.tar.gz" target="_blank">http://monkey.org/~provos/libevent-1.4.12-stable.tar.gz</a> &amp;&amp; tar -xzf libevent-1.4.12-stable.tar.gz &amp;&amp; cd libevent-1.4.12-stable</li>
 
 
 
42
  <li>Let's compile:<br />
43
  # ./configure &amp;&amp; make &amp;&amp; make install</li>
44
  <li>In the output you should see:<br />
51
  <li>Configure your server for the new install:<br />
52
  # ldconfig -v</li>
53
  <li>Now find the <a href="http://www.danga.com/memcached/download.bml" target="_blank">latest stable memcached</a>, download and extract:<br />
54
+ # cd /usr/local/src &amp;&amp; wget <a href="http://memcached.googlecode.com/files/memcached-1.4.3.tar.gz" target="_blank">http://memcached.googlecode.com/files/memcached-1.4.3.tar.gz</a> &amp;&amp; tar -xzf memcached-1.4.3.tar.gz &amp;&amp; cd memcached-1.4.3</li>
 
 
 
55
  <li>Let's compile:<br />
56
  # ./configure &amp;&amp; make &amp;&amp; make install</li>
57
  <li>Make sure memcached is starts automatically on server boot:<br />
58
  # touch /etc/init.d/memcached<br />
59
+ # echo '#!/bin/sh -e' &gt;&gt; /etc/init.d/memcached<br />
60
+ # echo '/usr/local/bin/memcached -d -m 128 -p 11211 -u nobody -l localhost' &gt;&gt; /etc/init.d/memcached<br />
61
  # chmod u+x /etc/init.d/memcached<br />
62
+ # echo '/etc/init.d/memcached' &gt;&gt; /etc/rc.local</li>
63
  <li>And finally, let's start memcached:<br />
64
  # /etc/init.d/memcached</li>
65
  </ol>
68
  <li><a href="http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/" target="_blank">Installing memcache on Windows for <acronym title="Hypertext Preprocessor">PHP</acronym></a></li>
69
  <li><a href="http://pecl4win.php.net/ext.php/php_memcache.dll" target="_blank"><acronym title="PHP Extension Community Library">PECL</acronym> memcached Extensions</a> </li>
70
  </ul>
71
+ <hr />
72
+ <p id="memcache"><strong><acronym title="PHP Extension Community Library">PECL</acronym> Memcache Module Installation:</strong><br />
73
+ <em>Time required: 1 minute</em></p>
74
  <ol>
75
  <li>Either use <acronym title="PHP Extension Community Library">PECL</acronym> (and skip to #4 if successful):<br />
76
  # pecl install memcache</li>
77
  <li>Or via compilation. Download the <a href="http://pecl.php.net/package/memcache" target="_blank">latest stable version</a> and extract:<br />
78
+ # cd /usr/local/src/ &amp;&amp; wget <a href="http://pecl.php.net/get/memcache-2.2.5.tgz" target="_blank">http://pecl.php.net/get/memcache-2.2.5.tgz</a> &amp;&amp; tar -xzf memcache-2.2.5.tgz &amp;&amp; cd memcache-2.2.5</li>
79
+ <li>Now we start to compile:<br />
80
+ # phpize &amp;&amp; ./configure &amp;&amp; make &amp;&amp; make install</li>
81
+ <li>You can also use the memcache.ini file we prepared for you:<br />
82
+ # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/</li>
 
 
 
 
 
 
 
83
  <li>Finally restart apache:<br />
84
  # /etc/init.d/httpd restart</li>
85
  <li>You're done! Memcache should now be available. If the following command retuns anything, you're all set:<br />
86
  # php -r 'phpinfo();' | grep 'memcache'</li>
87
  </ol>
88
+ <hr />
89
+ <p id="APC"><strong><acronym title="PHP Extension Community Library">PECL</acronym> <acronym title="Alternative PHP Cache">APC</acronym> Installation:</strong><br />
90
+ <em>Time required: 1 minute</em></p>
91
  <ol>
92
+ <li>Install <acronym title="Alternative PHP Cache">APC</acronym> using the <acronym title="PHP Extension Community Library">PECL</acronym> command (and skip to #5 if successful):<br />
93
  # pecl install apc</li>
94
+ <li>Or via compilation. Download the <a href="http://pecl.php.net/package/APC" target="_blank">latest stable version</a> and extract:<br />
95
+ # cd /usr/local/src &amp;&amp; wget <a href="http://pecl.php.net/get/APC-3.0.19.tgz" target="_blank">http://pecl.php.net/get/APC-3.0.19.tgz</a> &amp;&amp; tar -xzf APC-3.0.19.tgz &amp;&amp; cd APC-3.0.19</li>
96
+ <li>Note the path returned for the following command:<br />
97
+ # whereis php-config</li>
98
+ <li>Use the output from #2 to modify the --with-apxs and --with-php-config flags in the following compile command:<br />
99
+ # phpize &amp;&amp; ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/bin/phpize --with-php-config=/usr/bin/php-config &amp;&amp; make &amp;&amp; make install<br />
100
+ <br />The result should be similar to:<br />
101
+ Installing shared extensions: /usr/lib/php/modules/</li>
102
+ <li>You can also use the apc.ini file we prepared for you:<br />
103
+ # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/</li>
104
+ <li>Restart apache when ready:<br />
105
+ # /etc/init.d/httpd restart</li>
106
+ <li>You're done! <acronym title="Alternative PHP Cache">APC</acronym> should now be available. If the following command retuns anything, you're all set:<br />
107
  # php -r 'phpinfo();' | grep 'apc'</li>
108
  </ol>
109
  <p>For windows users we recommend checking the following sites for more installation tips:</p>
111
  <li><a href="http://www.sitebuddy.com/PHP/Accelerators/apc_windows_binaries_builds" target="_blank"><acronym title="Alternative PHP Cache">APC</acronym> binaries for <acronym title="Hypertext Preprocessor">PHP</acronym> 5.x (windows builds)</a> </li>
112
  <li><a href="http://pecl4win.php.net/ext.php/php_apc.dll" target="_blank"><acronym title="PHP Extension Community Library">PECL</acronym> <acronym title="Alternative PHP Cache">APC</acronym> Extensions</a> </li>
113
  </ul>
114
+ <hr />
115
+ <p id="eAccelerator"><strong>eAccelerator Installation:</strong><br />
116
+ <em>Time required: 1 minute</em></p>
117
+ <ol>
118
+ <li>If using <acronym title="Hypertext Preprocessor">PHP</acronym> v5.2+, download the <a href="http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2" target="_blank">latest compatible version</a> and extract:<br />
119
+ # cd /usr/local/src &amp;&amp; wget <a href="http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2" target="_blank">http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2</a> &amp;&amp; tar -xjf eaccelerator-0.9.6-rc1.tar.bz2 &amp;&amp; cd eaccelerator-0.9.6-rc1</li>
120
+ <li>Note the path returned for the following command:<br />
121
+ # whereis php-config</li>
122
+ <li>Use the output from #2 to modify the --with-php-config flag in the following compile command:<br />
123
+ # phpize &amp;&amp; ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config &amp;&amp; make &amp;&amp; make install<br />
124
+ <br />The result should be similar to:<br />
125
+ Installing shared extensions: /usr/lib/php/modules/</li>
126
+ <li>You can also use the eaccelerator.ini file we prepared for you:<br />
127
+ # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/eaccelerator.ini /etc/php.d/</li>
128
+ <li>Restart apache when ready:<br />
129
+ # /etc/init.d/httpd restart</li>
130
+ <li>You're done! eAccelerator should now be available. If the following command retuns anything, you're all set:<br />
131
+ # php -r 'phpinfo();' | grep 'eaccelerator'</li>
132
+ </ol>
133
+ <hr />
134
+ <p id="XCache"><strong>XCache Installation:</strong><br />
135
+ <em>Time required: 1 minute</em></p>
136
+ <ol>
137
+ <li>Download the <a href="http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz" target="_blank">latest compatible version</a> and extract:<br />
138
+ # cd /usr/local/src &amp;&amp; wget <a href="http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz" target="_blank">http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz</a> &amp;&amp; tar -xzf xcache-1.3.0.tar.gz &amp;&amp; cd xcache-1.3.0</li>
139
+ <li>Note the path returned for the following command:<br />
140
+ # whereis php-config</li>
141
+ <li>Use the output from #2 to modify the --with-php-config flag in the following compile command:<br />
142
+ # phpize &amp;&amp; ./configure --with-php-config=/usr/bin/php-config --enable-xcache --enable-xcache-optimizer --enable-xcache-coverager &amp;&amp; make &amp;&amp; make install<br />
143
+ <br />The result should be similar to:<br />
144
+ Installing shared extensions: /usr/lib/php/modules/</li>
145
+ <li>You can also use the eaccelerator.ini file we prepared for you:<br />
146
+ # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/xcache.ini /etc/php.d/</li>
147
+ <li>Restart apache when ready:<br />
148
+ # /etc/init.d/httpd restart</li>
149
+ <li>You're done! eAccelerator should now be available. If the following command retuns anything, you're all set:<br />
150
+ # php -r 'phpinfo();' | grep 'xcache'</li>
151
  </ol>
152
  <hr />
153
  <p><strong>Note(s):</strong></p>
154
  <ul>
155
+ <li>The provided instructions are for 32-bit CentOS, however we can provide others based on <a href="mailto:wordpressexperts@w3-edge.com">your requests</a>.</li>
156
+ <li>In the case where Apache is not used, the .htaccess file located in the root directory of the WordPress installation, wp-content/w3tc/pgcache/.htaccess and wp-content/w3tc/min/.htaccess contain directives that must be re-created for your web server software.</li>
157
  <li>Restarting the web server will empty your <acronym title="Alternative PHP Cache">APC</acronym> cache, which means it will have to be rebuilt over time and your site's performance will suffer during this period. Still, <acronym title="Alternative PHP Cache">APC</acronym> should be installed in any case to maximize WordPress performance.</li>
158
  <li>Consider using memcached for objects that must persist across web server restarts or that you wish to share amongst your pool of servers (or cluster), e.g.: database objects or page cache.</li>
159
  <li>Some yum or mirrors may not have the necessary packages, in such cases you may have to do a manual installation.</li>
inc/options/minify.phtml CHANGED
@@ -42,14 +42,14 @@
42
  <th colspan="2">
43
  <input type="hidden" name="minify.rewrite" value="0" />
44
  <label><input type="checkbox" name="minify.rewrite" value="1"<?php checked($this->_config->get_boolean('minify.rewrite'), true); ?> /> Rewrite <acronym title="Uniform Resource Locator">URL</acronym> structure</label><br />
45
- <span class="description">If disabled, <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="JavaScript">JS</acronym> embeddings will use GET variables instead of "fancy links."</span>
46
  </th>
47
  </tr>
48
  <tr>
49
  <th colspan="2">
50
  <input type="hidden" name="minify.upload" value="0" />
51
  <label><input type="checkbox" name="minify.upload" value="1"<?php checked($this->_config->get_boolean('minify.upload'), true); ?> /> Automatically upload modified files</label><br />
52
- <span class="description">If CDN is enabled (and not using the origin pull method), your minified files will be automatically uploaded.</span>
53
  </th>
54
  </tr>
55
  <tr>
@@ -65,7 +65,7 @@
65
  </tr>
66
  <tr>
67
  <th><label for="minify_file_gc">Garbage collection interval:</label></th>
68
- <td><input id="minify_file_gc" type="text" name="minify.file.gc" value="<?php echo $this->_config->get_integer('minify.file.gc'); ?>" size="8"<?php if ($this->_config->get_string('minify.engine') != 'file' && $this->_config->get_string('minify.engine') != 'file'): ?> disabled="disabled"<?php endif; ?> /> seconds
69
  <br /><span class="description">If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.</span>
70
  </td>
71
  </tr>
@@ -79,7 +79,7 @@
79
  <input type="hidden" name="minify.html.strip.crlf" value="0" />
80
  <label><input id="html_enabled" type="checkbox" name="minify.html.enable" value="1"<?php checked($this->_config->get_boolean('minify.html.enable'), true); ?> /> Minify</label><br />
81
  <label><input class="html_enabled" type="checkbox" name="minify.html.reject.admin" value="1"<?php checked($this->_config->get_boolean('minify.html.reject.admin'), true); ?> /> Don't Minify <acronym title="Hypertext Markup Language">HTML</acronym> for logged in administrators</label><br />
82
- <label><input class="html_enabled" type="checkbox" name="minify.html.inline.css" value="1"<?php checked($this->_config->get_boolean('minify.html.inline.css'), true); ?> /> Inline <acronym title="Cascading Style Sheets">CSS</acronym> Minification</label><br />
83
  <label><input class="html_enabled" type="checkbox" name="minify.html.inline.js" value="1"<?php checked($this->_config->get_boolean('minify.html.inline.js'), true); ?> /> Inline <acronym title="JavaScript">JS</acronym> Minification</label><br />
84
  <label><input class="html_enabled" type="checkbox" name="minify.html.strip.crlf" value="1"<?php checked($this->_config->get_boolean('minify.html.strip.crlf'), true); ?> /> Line break removal</label><br />
85
  </td>
@@ -100,7 +100,7 @@
100
  </td>
101
  </tr>
102
  <tr>
103
- <th valign="top"><acronym title="Cascading Style Sheets">CSS</acronym> minify settings:</th>
104
  <td>
105
  <input type="hidden" name="minify.css.enable" value="0" />
106
  <input type="hidden" name="minify.css.strip.comments" value="0" />
@@ -113,7 +113,7 @@
113
  <tr>
114
  <th valign="top"><label for="minify_reject_ua">Rejected user agents:</label></th>
115
  <td>
116
- <textarea id="minify_reject_ua" name="minify.reject.ua" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('minify.reject.ua'))); ?></textarea><br />
117
  <span class="description">Specify user agents that will never receive minified content.</span>
118
  </td>
119
  </tr>
@@ -122,13 +122,14 @@
122
  <td>
123
  <p>
124
  <label>
125
- <select id="js_groups" class="js_enabled">
126
- <?php foreach ($groups as $groupKey => $groupText): ?>
127
- <option value="<?php echo $groupKey; ?>"><?php echo $groupText; ?></option>
128
  <?php endforeach; ?>
129
  </select>
130
  Group:
131
- </label>
 
132
  </p>
133
  <ol id="js_files">
134
  <?php foreach ($js_groups as $js_group => $js_locations): ?>
@@ -146,17 +147,18 @@
146
  </td>
147
  </tr>
148
  <tr>
149
- <th valign="top"><acronym title="Cascading Style Sheets">CSS</acronym> file management:</th>
150
  <td>
151
  <p>
152
  <label>
153
- <select id="css_groups" class="css_enabled">
154
- <?php foreach ($groups as $groupKey => $groupText): ?>
155
- <option value="<?php echo $groupKey; ?>"><?php echo $groupText; ?></option>
156
  <?php endforeach; ?>
157
  </select>
158
  Group:
159
- </label>
 
160
  </p>
161
  <ol id="css_files">
162
  <?php foreach ($css_groups as $css_group => $css_locations): ?>
@@ -169,7 +171,7 @@
169
  <?php endforeach; ?>
170
  <?php endforeach; ?>
171
  </ol>
172
- <div id="css_files_empty" class="w3tc-empty" style="display: none;">No <acronym title="Cascading Style Sheets">CSS</acronym> files added</div>
173
  <input id="css_file_add" class="css_enabled button" type="button" value="Add a style sheet" />
174
  </td>
175
  </tr>
42
  <th colspan="2">
43
  <input type="hidden" name="minify.rewrite" value="0" />
44
  <label><input type="checkbox" name="minify.rewrite" value="1"<?php checked($this->_config->get_boolean('minify.rewrite'), true); ?> /> Rewrite <acronym title="Uniform Resource Locator">URL</acronym> structure</label><br />
45
+ <span class="description">If disabled, <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> embeddings will use GET variables instead of "fancy links."</span>
46
  </th>
47
  </tr>
48
  <tr>
49
  <th colspan="2">
50
  <input type="hidden" name="minify.upload" value="0" />
51
  <label><input type="checkbox" name="minify.upload" value="1"<?php checked($this->_config->get_boolean('minify.upload'), true); ?> /> Automatically upload modified files</label><br />
52
+ <span class="description">If <acronym title="Content Delivery Network">CDN</acronym> is enabled (and not using the origin pull method), your minified files will be automatically uploaded.</span>
53
  </th>
54
  </tr>
55
  <tr>
65
  </tr>
66
  <tr>
67
  <th><label for="minify_file_gc">Garbage collection interval:</label></th>
68
+ <td><input id="minify_file_gc" type="text" name="minify.file.gc" value="<?php echo $this->_config->get_integer('minify.file.gc'); ?>" size="8"<?php if ($this->_config->get_string('minify.engine') != 'file'): ?> disabled="disabled"<?php endif; ?> /> seconds
69
  <br /><span class="description">If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.</span>
70
  </td>
71
  </tr>
79
  <input type="hidden" name="minify.html.strip.crlf" value="0" />
80
  <label><input id="html_enabled" type="checkbox" name="minify.html.enable" value="1"<?php checked($this->_config->get_boolean('minify.html.enable'), true); ?> /> Minify</label><br />
81
  <label><input class="html_enabled" type="checkbox" name="minify.html.reject.admin" value="1"<?php checked($this->_config->get_boolean('minify.html.reject.admin'), true); ?> /> Don't Minify <acronym title="Hypertext Markup Language">HTML</acronym> for logged in administrators</label><br />
82
+ <label><input class="html_enabled" type="checkbox" name="minify.html.inline.css" value="1"<?php checked($this->_config->get_boolean('minify.html.inline.css'), true); ?> /> Inline <acronym title="Cascading Style Sheet">CSS</acronym> Minification</label><br />
83
  <label><input class="html_enabled" type="checkbox" name="minify.html.inline.js" value="1"<?php checked($this->_config->get_boolean('minify.html.inline.js'), true); ?> /> Inline <acronym title="JavaScript">JS</acronym> Minification</label><br />
84
  <label><input class="html_enabled" type="checkbox" name="minify.html.strip.crlf" value="1"<?php checked($this->_config->get_boolean('minify.html.strip.crlf'), true); ?> /> Line break removal</label><br />
85
  </td>
100
  </td>
101
  </tr>
102
  <tr>
103
+ <th valign="top"><acronym title="Cascading Style Sheet">CSS</acronym> minify settings:</th>
104
  <td>
105
  <input type="hidden" name="minify.css.enable" value="0" />
106
  <input type="hidden" name="minify.css.strip.comments" value="0" />
113
  <tr>
114
  <th valign="top"><label for="minify_reject_ua">Rejected user agents:</label></th>
115
  <td>
116
+ <textarea id="minify_reject_ua" name="minify.reject.ua" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('minify.reject.ua'))); ?></textarea><br />
117
  <span class="description">Specify user agents that will never receive minified content.</span>
118
  </td>
119
  </tr>
122
  <td>
123
  <p>
124
  <label>
125
+ <select id="js_groups" class="js_enabled" name="js_group">
126
+ <?php foreach ($groups as $group_key => $group_text): ?>
127
+ <option value="<?php echo $group_key; ?>"<?php selected($group_key, $js_group); ?>><?php echo htmlspecialchars($group_text); ?></option>
128
  <?php endforeach; ?>
129
  </select>
130
  Group:
131
+ </label><br />
132
+ <span class="description">Add scripts used in all templates to the default group. Use the menu above to manage scripts unique to a specific template.</span>
133
  </p>
134
  <ol id="js_files">
135
  <?php foreach ($js_groups as $js_group => $js_locations): ?>
147
  </td>
148
  </tr>
149
  <tr>
150
+ <th valign="top"><acronym title="Cascading Style Sheet">CSS</acronym> file management:</th>
151
  <td>
152
  <p>
153
  <label>
154
+ <select id="css_groups" class="css_enabled" name="css_group">
155
+ <?php foreach ($groups as $group_key => $group_text): ?>
156
+ <option value="<?php echo $group_key; ?>"<?php selected($group_key, $css_group); ?>><?php echo htmlspecialchars($group_text); ?></option>
157
  <?php endforeach; ?>
158
  </select>
159
  Group:
160
+ </label><br />
161
+ <span class="description">Add style sheets used in all templates to the default group. Use the menu above to manage style sheets unique to a specific template.</span>
162
  </p>
163
  <ol id="css_files">
164
  <?php foreach ($css_groups as $css_group => $css_locations): ?>
171
  <?php endforeach; ?>
172
  <?php endforeach; ?>
173
  </ol>
174
+ <div id="css_files_empty" class="w3tc-empty" style="display: none;">No <acronym title="Cascading Style Sheet">CSS</acronym> files added</div>
175
  <input id="css_file_add" class="css_enabled button" type="button" value="Add a style sheet" />
176
  </td>
177
  </tr>
inc/options/pgcache.phtml CHANGED
@@ -71,7 +71,7 @@
71
  </tr>
72
  <tr>
73
  <th colspan="2">
74
- <input type="hidden" name="pgcache.cache.query" value="0" />
75
  <label><input type="checkbox" name="pgcache.cache.query" value="1"<?php checked($this->_config->get_boolean('pgcache.cache.query'), true); ?><?php if ($this->_config->get_string('pgcache.engine') == 'file_pgcache'): ?> disabled="disabled"<?php endif; ?> /> Cache <acronym title="Uniform Resource Identifier">URI</acronym>s with query string variables</label><br />
76
  <span class="description">Search result (and similar) pages will be cached if enabled.</span>
77
  </th>
@@ -79,42 +79,42 @@
79
  <tr>
80
  <th valign="top"><label for="pgcache_reject_ua">Rejected User Agents:</label></th>
81
  <td>
82
- <textarea id="pgcache_reject_ua" name="pgcache.reject.ua" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.ua'))); ?></textarea><br />
83
  <span class="description">Never send cached pages to these user agents.</span>
84
  </td>
85
  </tr>
86
  <tr>
87
  <th valign="top"><label for="pgcache_reject_cookie">Rejected Cookies:</label></th>
88
  <td>
89
- <textarea id="pgcache_reject_cookie" name="pgcache.reject.cookie" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.cookie'))); ?></textarea><br />
90
  <span class="description">Never cache pages that use the specified cookies.</span>
91
  </td>
92
  </tr>
93
  <tr>
94
  <th valign="top"><label for="pgcache_reject_uri">Never cache the following pages:</label></th>
95
  <td>
96
- <textarea id="pgcache_reject_uri" name="pgcache.reject.uri" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.uri'))); ?></textarea><br />
97
  <span class="description">Always ignore the specified pages / directories.</span>
98
  </td>
99
  </tr>
100
  <tr>
101
  <th valign="top"><label for="pgcache_accept_files">Caching exception list:</label></th>
102
  <td>
103
- <textarea id="pgcache_accept_files" name="pgcache.accept.files" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.accept.files'))); ?></textarea><br />
104
  <span class="description">Cache the specified pages / directories even if listed in the "never cache the following pages" field.</span>
105
  </td>
106
  </tr>
107
  <tr>
108
  <th valign="top"><label for="pgcache_cache_headers">Specify page headers:</label></th>
109
  <td>
110
- <textarea id="pgcache_cache_headers" name="pgcache.cache.headers" cols="30" rows="5"<?php if (! W3TC_PHP5 || $this->_config->get_string('pgcache.engine') == 'file_pgcache'): ?> disabled="disabled"<?php endif; ?>><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.cache.headers'))); ?></textarea><br />
111
  <span class="description">Specify additional page headers to cache.</span>
112
  </td>
113
  </tr>
114
  <tr>
115
  <th valign="top"><label for="pgcache_mobile_agents">Mobile user agents:</label></th>
116
  <td>
117
- <textarea id="pgcache_mobile_agents" name="pgcache.mobile.agents" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.mobile.agents'))); ?></textarea><br />
118
  <span class="description">Specify which mobile devices to detect.</span>
119
  </td>
120
  </tr>
71
  </tr>
72
  <tr>
73
  <th colspan="2">
74
+ <input type="hidden" name="pgcache.cache.query" value="0"<?php if ($this->_config->get_string('pgcache.engine') == 'file_pgcache'): ?> disabled="disabled"<?php endif; ?> />
75
  <label><input type="checkbox" name="pgcache.cache.query" value="1"<?php checked($this->_config->get_boolean('pgcache.cache.query'), true); ?><?php if ($this->_config->get_string('pgcache.engine') == 'file_pgcache'): ?> disabled="disabled"<?php endif; ?> /> Cache <acronym title="Uniform Resource Identifier">URI</acronym>s with query string variables</label><br />
76
  <span class="description">Search result (and similar) pages will be cached if enabled.</span>
77
  </th>
79
  <tr>
80
  <th valign="top"><label for="pgcache_reject_ua">Rejected User Agents:</label></th>
81
  <td>
82
+ <textarea id="pgcache_reject_ua" name="pgcache.reject.ua" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.ua'))); ?></textarea><br />
83
  <span class="description">Never send cached pages to these user agents.</span>
84
  </td>
85
  </tr>
86
  <tr>
87
  <th valign="top"><label for="pgcache_reject_cookie">Rejected Cookies:</label></th>
88
  <td>
89
+ <textarea id="pgcache_reject_cookie" name="pgcache.reject.cookie" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.cookie'))); ?></textarea><br />
90
  <span class="description">Never cache pages that use the specified cookies.</span>
91
  </td>
92
  </tr>
93
  <tr>
94
  <th valign="top"><label for="pgcache_reject_uri">Never cache the following pages:</label></th>
95
  <td>
96
+ <textarea id="pgcache_reject_uri" name="pgcache.reject.uri" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.reject.uri'))); ?></textarea><br />
97
  <span class="description">Always ignore the specified pages / directories.</span>
98
  </td>
99
  </tr>
100
  <tr>
101
  <th valign="top"><label for="pgcache_accept_files">Caching exception list:</label></th>
102
  <td>
103
+ <textarea id="pgcache_accept_files" name="pgcache.accept.files" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.accept.files'))); ?></textarea><br />
104
  <span class="description">Cache the specified pages / directories even if listed in the "never cache the following pages" field.</span>
105
  </td>
106
  </tr>
107
  <tr>
108
  <th valign="top"><label for="pgcache_cache_headers">Specify page headers:</label></th>
109
  <td>
110
+ <textarea id="pgcache_cache_headers" name="pgcache.cache.headers" cols="40" rows="5"<?php if (! W3TC_PHP5 || $this->_config->get_string('pgcache.engine') == 'file_pgcache'): ?> disabled="disabled"<?php endif; ?>><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.cache.headers'))); ?></textarea><br />
111
  <span class="description">Specify additional page headers to cache.</span>
112
  </td>
113
  </tr>
114
  <tr>
115
  <th valign="top"><label for="pgcache_mobile_agents">Mobile user agents:</label></th>
116
  <td>
117
+ <textarea id="pgcache_mobile_agents" name="pgcache.mobile.agents" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.mobile.agents'))); ?></textarea><br />
118
  <span class="description">Specify which mobile devices to detect.</span>
119
  </td>
120
  </tr>
inc/popup/cdn_rename_domain.phtml CHANGED
@@ -32,7 +32,7 @@ jQuery(function() {
32
  <tr>
33
  <td>Domains to rename:</td>
34
  <td>
35
- <textarea cols="30" rows="3" id="cdn_rename_domain_names"></textarea><br />
36
  e.g.: domain.com
37
  </td>
38
  </tr>
32
  <tr>
33
  <td>Domains to rename:</td>
34
  <td>
35
+ <textarea cols="40" rows="3" id="cdn_rename_domain_names"></textarea><br />
36
  e.g.: domain.com
37
  </td>
38
  </tr>
inc/popup/common/header.phtml CHANGED
@@ -12,20 +12,20 @@
12
  }
13
  ?>
14
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
15
- <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
16
  <head>
17
  <link rel="stylesheet" type="text/css" href="<?php echo WP_PLUGIN_URL; ?>/w3-total-cache/inc/css/popup.css"></link>
18
  <script type="text/javascript" src="<?php echo w3_get_site_url(); ?>/<?php echo WPINC; ?>/js/jquery/jquery.js"></script>
19
  <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/w3-total-cache/inc/js/popup.js"></script>
20
  <title><?php echo htmlspecialchars($title); ?> - W3 Total Cache</title>
21
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
22
  </head>
23
  <body>
24
  <div id="content">
25
  <h1><?php echo htmlspecialchars($title); ?></h1>
26
 
27
  <?php if (count($errors)): ?>
28
- <div id="message" class="error">
29
  <?php foreach ($errors as $error): ?>
30
  <p><?php echo $error; ?></p>
31
  <?php endforeach; ?>
@@ -33,10 +33,9 @@
33
  <?php endif; ?>
34
 
35
  <?php if (count($notes)): ?>
36
- <div id="message" class="updated fade">
37
  <?php foreach ($notes as $note): ?>
38
  <p><?php echo $note; ?></p>
39
  <?php endforeach; ?>
40
  </div>
41
  <?php endif; ?>
42
-
12
  }
13
  ?>
14
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
15
+ <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
16
  <head>
17
  <link rel="stylesheet" type="text/css" href="<?php echo WP_PLUGIN_URL; ?>/w3-total-cache/inc/css/popup.css"></link>
18
  <script type="text/javascript" src="<?php echo w3_get_site_url(); ?>/<?php echo WPINC; ?>/js/jquery/jquery.js"></script>
19
  <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/w3-total-cache/inc/js/popup.js"></script>
20
  <title><?php echo htmlspecialchars($title); ?> - W3 Total Cache</title>
21
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
22
  </head>
23
  <body>
24
  <div id="content">
25
  <h1><?php echo htmlspecialchars($title); ?></h1>
26
 
27
  <?php if (count($errors)): ?>
28
+ <div class="error">
29
  <?php foreach ($errors as $error): ?>
30
  <p><?php echo $error; ?></p>
31
  <?php endforeach; ?>
33
  <?php endif; ?>
34
 
35
  <?php if (count($notes)): ?>
36
+ <div class="updated fade">
37
  <?php foreach ($notes as $note): ?>
38
  <p><?php echo $note; ?></p>
39
  <?php endforeach; ?>
40
  </div>
41
  <?php endif; ?>
 
ini/_htaccess CHANGED
@@ -81,14 +81,12 @@ ExpiresByType text/xsd A259200
81
  ExpiresByType text/xsl A259200
82
  </IfModule>
83
 
84
- <FilesMatch "\.(bmp|ico|html?|tiff?|gif|jpe?g|png|svgz?|swf|txt|xsd|xsl|xml)$">
85
  <IfModule mod_headers.c>
86
  # Set Pragma header
87
  Header set Pragma "public"
88
  # Set Cache-Control header
89
- Header set Cache-Control "max-age=259200, public"
90
- # For optimal performance remove cookies
91
- #Header unset Set-Cookie
92
  </IfModule>
93
 
94
  # Set Entity Tag header
81
  ExpiresByType text/xsl A259200
82
  </IfModule>
83
 
84
+ <FilesMatch "\.(bmp|css|ico|html?|js|tiff?|gif|jpe?g|png|svgz?|swf|txt|xsd|xsl|xml)$">
85
  <IfModule mod_headers.c>
86
  # Set Pragma header
87
  Header set Pragma "public"
88
  # Set Cache-Control header
89
+ Header append Cache-Control "public, must-revalidate, proxy-revalidate"
 
 
90
  </IfModule>
91
 
92
  # Set Entity Tag header
ini/apc.ini CHANGED
@@ -1,14 +1,32 @@
1
  ; /etc/php.d/apc.ini
2
 
3
  extension = apc.so
 
4
  apc.enabled = 1
5
  apc.shm_segments = 1
 
6
  apc.optimization = 0
7
- apc.shm_size = 128
 
8
  apc.ttl = 7200
9
  apc.user_ttl = 7200
10
- apc.num_files_hint = 1024
11
- apc.mmap_file_mask = /tmp/apc.XXXXXX
12
- apc.enable_cli = 1
13
  apc.cache_by_default = 1
14
- apc.apc.stat = 0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ; /etc/php.d/apc.ini
2
 
3
  extension = apc.so
4
+
5
  apc.enabled = 1
6
  apc.shm_segments = 1
7
+ apc.shm_size = 32
8
  apc.optimization = 0
9
+ apc.max_file_size = 1000
10
+ apc.num_files_hint = 4096
11
  apc.ttl = 7200
12
  apc.user_ttl = 7200
13
+ apc.gc_ttl = 0
 
 
14
  apc.cache_by_default = 1
15
+ apc.filters = ""
16
+ apc.mmap_file_mask = "/tmp/apc.XXXXXX"
17
+ apc.slam_defense = 0
18
+ apc.file_update_protection = 2
19
+ apc.enable_cli = 0
20
+ apc.max_file_size = 1M
21
+ apc.stat = 1
22
+ apc.write_lock = 1
23
+ apc.report_autofilter = 0
24
+ apc.include_once_override = 0
25
+ ;apc.rfc1867 = 0
26
+ ;apc.rfc1867_prefix = "upload_"
27
+ ;apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
28
+ ;apc.rfc1867_freq = 0
29
+ apc.localcache = 0
30
+ apc.localcache.size = 512
31
+ apc.coredump_unmap = 0
32
+ apc.stat_ctime = 0
ini/eaccelerator.ini ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ; /etc/php.d/eaccelerator.ini
2
+
3
+ ;extension = eaccelerator.so
4
+ zend_extension = "/usr/lib/php/modules/eaccelerator.so"
5
+ zend_extension_ts = "/usr/lib/php/modules/eaccelerator.so"
6
+
7
+ eaccelerator.shm_size = 32
8
+ ;eaccelerator.cache_dir = "/tmp/eaccelerator"
9
+ eaccelerator.enable = 1
10
+ eaccelerator.optimizer = 0
11
+ eaccelerator.debug = 0
12
+ eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
13
+ eaccelerator.name_space = ""
14
+ eaccelerator.check_mtime = 1
15
+ eaccelerator.filter = ""
16
+ eaccelerator.shm_max = 0
17
+ eaccelerator.shm_ttl = 7200
18
+ eaccelerator.shm_prune_period = 7200
19
+ eaccelerator.shm_only = 1
20
+ eaccelerator.compress = 0
21
+ eaccelerator.compress_level = 9
22
+ eaccelerator.keys = shm
23
+ eaccelerator.sessions = shm
24
+ eaccelerator.content = shm
25
+ eaccelerator.allowed_admin_path = "/var/www/html/controlpanel"
ini/memcache.ini CHANGED
@@ -1,6 +1,7 @@
1
  ; /etc/php.d/memcache.ini
2
 
3
  extension = memcache.so
 
4
  memcache.allow_failover = 1
5
  memcache.redundancy = 1
6
  memcache.session_redundancy = 2
1
  ; /etc/php.d/memcache.ini
2
 
3
  extension = memcache.so
4
+
5
  memcache.allow_failover = 1
6
  memcache.redundancy = 1
7
  memcache.session_redundancy = 2
ini/xcache.ini ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ; /etc/php.d/xcache.ini
2
+
3
+ ;extension = xcache.so
4
+ zend_extension = "/usr/lib/php/modules/xcache.so"
5
+ zend_extension_ts = "/usr/lib/php/modules/xcache.so"
6
+
7
+ ;xcache.admin.user = "admin"
8
+ ;xcache.admin.pass = ""
9
+ ;xcache.admin.enable_auth = On
10
+ xcache.test = Off
11
+ xcache.coredump_directory = ""
12
+
13
+ xcache.shm_scheme = mmap
14
+
15
+ xcache.cacher = On
16
+ xcache.size = 32M
17
+ xcache.count = 8
18
+ xcache.slots = 8K
19
+ xcache.ttl = 0
20
+ xcache.gc_interval = 0
21
+ xcache.var_size = 16M
22
+ xcache.var_count = 1
23
+ xcache.var_slots = 8K
24
+ xcache.var_ttl = 0
25
+ xcache.var_maxttl = 0
26
+ xcache.var_gc_interval = 300
27
+ xcache.readonly_protection = Off
28
+ xcache.mmap_path = "/dev/zero"
29
+
30
+ xcache.optimizer = Off
31
+
32
+ xcache.coverager = Off
33
+ xcache.coveragedump_directory = ""
34
+
35
+ xcache.stat = Off
36
+ ;xcache.readonly_protection = On
lib/Minify/HTTP/Encoder.php CHANGED
@@ -195,6 +195,8 @@ class HTTP_Encoder {
195
  // @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
196
 
197
  if (! isset($_SERVER['HTTP_ACCEPT_ENCODING'])
 
 
198
  || self::_isBuggyIe())
199
  {
200
  return array('', '');
195
  // @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
196
 
197
  if (! isset($_SERVER['HTTP_ACCEPT_ENCODING'])
198
+ || w3_zlib_output_compression()
199
+ || headers_sent()
200
  || self::_isBuggyIe())
201
  {
202
  return array('', '');
lib/Minify/Minify/CSS/UriRewriter.php CHANGED
@@ -172,12 +172,12 @@ class Minify_CSS_UriRewriter {
172
  $path = (! empty($parse_url['path']) ? $parse_url['path'] : '/');
173
  $dir_css = preg_replace('~[^/]+$~', '', $path);
174
  $dir_obj = preg_replace('~[^/]+$~', '', $uri);
175
- $dir = ltrim((strpos($dir_obj, '/') === 0 ? w3_realpath($dir_obj) : w3_realpath($dir_css . $dir_obj)), '/');
176
  $file = basename($uri);
177
 
178
  $uri = sprintf('%s://%s%s/%s%s', $scheme, $host, $port, $dir, $file);
179
  }
180
- } else {
181
  $uri = self::$_prependPath . $uri;
182
  }
183
  } else {
172
  $path = (! empty($parse_url['path']) ? $parse_url['path'] : '/');
173
  $dir_css = preg_replace('~[^/]+$~', '', $path);
174
  $dir_obj = preg_replace('~[^/]+$~', '', $uri);
175
+ $dir = (ltrim((strpos($dir_obj, '/') === 0 ? w3_realpath($dir_obj) : w3_realpath($dir_css . $dir_obj)), '/'));
176
  $file = basename($uri);
177
 
178
  $uri = sprintf('%s://%s%s/%s%s', $scheme, $host, $port, $dir, $file);
179
  }
180
+ } else {
181
  $uri = self::$_prependPath . $uri;
182
  }
183
  } else {
lib/W3/Config.php CHANGED
@@ -125,6 +125,7 @@ class W3_Config
125
  'cdn.cf.cname' => 'string',
126
  'cdn.reject.ua' => 'array',
127
  'cdn.reject.uri' => 'array',
 
128
 
129
  'common.support' => 'string',
130
  'common.install' => 'integer',
@@ -134,7 +135,6 @@ class W3_Config
134
  'notes.defaults' => 'boolean',
135
  'notes.wp_content_perms' => 'boolean',
136
  'notes.cdn_first_time' => 'boolean',
137
- 'notes.no_memcached_nor_apc' => 'boolean',
138
  'notes.php_is_old' => 'boolean',
139
  'notes.theme_changed' => 'boolean',
140
  'notes.wp_upgraded' => 'boolean',
@@ -146,7 +146,9 @@ class W3_Config
146
  'notes.pgcache_rules_cache' => 'boolean',
147
  'notes.minify_rules' => 'boolean',
148
  'notes.support_us' => 'boolean',
149
- 'notes.no_curl' => 'boolean'
 
 
150
  );
151
 
152
  var $_defaults = array(
@@ -161,7 +163,9 @@ class W3_Config
161
  'dbcache.reject.logged' => true,
162
  'dbcache.reject.uri' => array(),
163
  'dbcache.reject.cookie' => array(),
164
- 'dbcache.reject.sql' => array(),
 
 
165
  'dbcache.lifetime' => 180,
166
 
167
  'pgcache.enabled' => true,
@@ -204,103 +208,107 @@ class W3_Config
204
  'pgcache.reject.cookie' => array(),
205
  'pgcache.mobile.redirect' => '',
206
  'pgcache.mobile.agents' => array(
207
- 'Android',
208
  '2.0 MMP',
209
  '240x320',
 
 
 
 
 
 
210
  'AvantGo',
 
 
211
  'BlackBerry',
212
  'Blazer',
 
213
  'Cellphone',
 
214
  'Danger',
215
  'DoCoMo',
216
  'Elaine/3.0',
 
217
  'EudoraWeb',
218
- 'hiptop',
 
 
 
219
  'IEMobile',
220
- 'iPhone',
221
- 'iPod',
 
 
222
  'KYOCERA/WX310K',
 
223
  'LG/U990',
 
224
  'MIDP-2.0',
225
  'MMEF20',
226
  'MOT-V',
 
 
 
227
  'NetFront',
228
  'Newt',
229
  'Nintendo Wii',
230
  'Nitro',
231
  'Nokia',
 
 
232
  'Opera Mini',
 
 
 
 
 
 
233
  'Palm',
 
 
234
  'Playstation Portable',
235
- 'portalmmm',
236
- 'Proxinet',
237
  'ProxiNet',
 
 
 
 
 
238
  'SHARP-TQ-GX10',
 
 
 
 
 
 
 
239
  'Small',
 
 
240
  'SonyEricsson',
 
241
  'Symbian OS',
242
  'SymbianOS',
243
  'TS21i-10',
 
 
244
  'UP.Browser',
245
  'UP.Link',
246
- 'Windows CE',
 
 
247
  'WinWAP',
248
- 'Ericsson',
249
- 'htc',
250
- 'Huawei',
251
- 'MobilePhone',
252
- 'Motorola',
253
- 'nokia',
254
- 'Novarra',
255
- 'O2',
256
- 'Samsung',
257
- 'Sanyo',
258
- 'Smartphone',
259
- 'Symbian',
260
- 'Toshiba',
261
- 'Treo',
262
- 'vodafone',
263
  'Xda',
264
- 'Alcatel',
265
- 'Amoi',
266
- 'ASUS',
267
- 'Audiovox',
268
- 'AU-MIC',
269
- 'BenQ',
270
- 'Bird',
271
- 'CDM',
272
  'dopod',
273
- 'Fly',
274
- 'Haier',
275
- 'HP.iPAQ',
276
  'i-mobile',
277
- 'KDDI',
278
- 'KONKA',
279
- 'KWC',
280
- 'Lenovo',
281
- 'LG',
282
- 'NEWGEN',
283
- 'Panasonic',
284
- 'PANTECH',
285
- 'PG',
286
- 'Philips',
287
- 'PPC',
288
- 'PT',
289
- 'Qtek',
290
- 'Sagem',
291
- 'SCH',
292
- 'SEC',
293
- 'Sendo',
294
- 'SGH',
295
- 'Sharp',
296
- 'SIE',
297
- 'SoftBank',
298
- 'SPH',
299
- 'UTS',
300
- 'Vertu',
301
- 'Opera.Mobi',
302
- 'Windows.CE',
303
- 'ZTE'
304
  ),
305
 
306
  'minify.enabled' => true,
@@ -349,7 +357,7 @@ class W3_Config
349
  'cdn.debug' => false,
350
  'cdn.engine' => 'ftp',
351
  'cdn.includes.enable' => true,
352
- 'cdn.includes.files' => '*.css;*.js;*.gif;*.png;*.jpg',
353
  'cdn.theme.enable' => true,
354
  'cdn.theme.files' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico',
355
  'cdn.minify.enable' => true,
@@ -377,6 +385,9 @@ class W3_Config
377
  'cdn.cf.cname' => '',
378
  'cdn.reject.ua' => array(),
379
  'cdn.reject.uri' => array(),
 
 
 
380
 
381
  'common.support' => '',
382
  'common.install' => 0,
@@ -386,7 +397,6 @@ class W3_Config
386
  'notes.defaults' => true,
387
  'notes.wp_content_perms' => true,
388
  'notes.cdn_first_time' => true,
389
- 'notes.no_memcached_nor_apc' => true,
390
  'notes.php_is_old' => true,
391
  'notes.theme_changed' => false,
392
  'notes.wp_upgraded' => false,
@@ -398,29 +408,27 @@ class W3_Config
398
  'notes.pgcache_rules_cache' => true,
399
  'notes.minify_rules' => true,
400
  'notes.support_us' => true,
401
- 'notes.no_curl' => true
 
 
402
  );
403
 
404
  /**
405
  * PHP5 Constructor
406
- * @param boolean $check_config
407
  */
408
- function __construct($check_config = true)
409
  {
410
  $this->load_defaults();
411
-
412
- if (! $this->load() && $check_config) {
413
- die(sprintf('<strong>W3 Total Cache Error:</strong> Unable to read config file or it is broken. Please create <strong>%s</strong> from <strong>%s</strong>.', W3TC_CONFIG_PATH, W3TC_CONFIG_EXAMPLE_PATH));
414
- }
415
  }
416
 
417
  /**
418
  * PHP4 Constructor
419
  * @param booleab $check_config
420
  */
421
- function W3_Config($check_config = true)
422
  {
423
- $this->__construct($check_config);
424
  }
425
 
426
  /**
@@ -444,25 +452,27 @@ class W3_Config
444
 
445
  switch ($key) {
446
  /**
447
- * Disable compression if compression functions don't exist
448
  */
449
- case 'pgcache.compression':
450
- if ((stristr($value, 'gzip') && ! function_exists('gzencode')) || (stristr($value, 'deflate') && ! function_exists('gzdeflate'))) {
451
- return '';
 
 
452
  }
453
  break;
454
 
455
  /**
456
- * Don't support additional headers caching when PHP5 is not installed
457
  */
458
- case 'pgcache.cache.headers':
459
- if (! W3TC_PHP5) {
460
- return array();
461
  }
462
  break;
463
 
464
  /**
465
- * Disabled some page cache options when enchanced mode enabled
466
  */
467
  case 'pgcache.cache.query':
468
  if ($this->get_boolean('pgcache.enabled') && $this->get_string('pgcache.engine') == 'file_pgcache') {
@@ -470,8 +480,11 @@ class W3_Config
470
  }