W3 Total Cache - Version 0.5

Version Description

Download this release

Release Info

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

Version 0.5

Files changed (182) hide show
  1. inc/css/options.css +87 -0
  2. inc/css/popup.css +142 -0
  3. inc/define.php +29 -0
  4. inc/images/logo.png +0 -0
  5. inc/js/options.js +213 -0
  6. inc/js/popup.js +246 -0
  7. inc/options/about.phtml +31 -0
  8. inc/options/cdn.phtml +143 -0
  9. inc/options/common/footer.phtml +1 -0
  10. inc/options/common/header.phtml +31 -0
  11. inc/options/dbcache.phtml +24 -0
  12. inc/options/faq.phtml +483 -0
  13. inc/options/general.phtml +123 -0
  14. inc/options/install.phtml +162 -0
  15. inc/options/minify.phtml +142 -0
  16. inc/options/pgcache.phtml +70 -0
  17. inc/popup/cdn_export_file.phtml +35 -0
  18. inc/popup/cdn_export_table.phtml +26 -0
  19. inc/popup/cdn_queue.phtml +60 -0
  20. inc/popup/common/footer.phtml +3 -0
  21. inc/popup/common/header.phtml +42 -0
  22. ini/apc.ini +17 -0
  23. ini/memcache.ini +6 -0
  24. ini/memcached.conf +7 -0
  25. ini/php.append.ini +4 -0
  26. lib/Minify/HISTORY.txt +75 -0
  27. lib/Minify/LICENSE.txt +26 -0
  28. lib/Minify/README.txt +53 -0
  29. lib/Minify/UPGRADING.txt +35 -0
  30. lib/Minify/min/.htaccess +4 -0
  31. lib/Minify/min/README.txt +132 -0
  32. lib/Minify/min/builder/_index.js +242 -0
  33. lib/Minify/min/builder/bm.js +36 -0
  34. lib/Minify/min/builder/index.php +182 -0
  35. lib/Minify/min/builder/ocCheck.php +36 -0
  36. lib/Minify/min/builder/rewriteTest.js +1 -0
  37. lib/Minify/min/config.php +156 -0
  38. lib/Minify/min/groupsConfig.php +34 -0
  39. lib/Minify/min/index.php +66 -0
  40. lib/Minify/min/lib/FirePHP.php +1370 -0
  41. lib/Minify/min/lib/HTTP/ConditionalGet.php +348 -0
  42. lib/Minify/min/lib/HTTP/Encoder.php +326 -0
  43. lib/Minify/min/lib/JSMin.php +314 -0
  44. lib/Minify/min/lib/JSMinPlus.php +1872 -0
  45. lib/Minify/min/lib/Minify.php +532 -0
  46. lib/Minify/min/lib/Minify/Build.php +103 -0
  47. lib/Minify/min/lib/Minify/CSS.php +83 -0
  48. lib/Minify/min/lib/Minify/CSS/Compressor.php +250 -0
  49. lib/Minify/min/lib/Minify/CSS/UriRewriter.php +270 -0
  50. lib/Minify/min/lib/Minify/Cache/APC.php +130 -0
  51. lib/Minify/min/lib/Minify/Cache/File.php +125 -0
  52. lib/Minify/min/lib/Minify/Cache/Memcache.php +137 -0
  53. lib/Minify/min/lib/Minify/CommentPreserver.php +90 -0
  54. lib/Minify/min/lib/Minify/Controller/Base.php +202 -0
  55. lib/Minify/min/lib/Minify/Controller/Files.php +78 -0
  56. lib/Minify/min/lib/Minify/Controller/Groups.php +94 -0
  57. lib/Minify/min/lib/Minify/Controller/MinApp.php +132 -0
  58. lib/Minify/min/lib/Minify/Controller/Page.php +82 -0
  59. lib/Minify/min/lib/Minify/Controller/Version1.php +118 -0
  60. lib/Minify/min/lib/Minify/HTML.php +245 -0
  61. lib/Minify/min/lib/Minify/ImportProcessor.php +157 -0
  62. lib/Minify/min/lib/Minify/Javascript.php +31 -0
  63. lib/Minify/min/lib/Minify/Lines.php +131 -0
  64. lib/Minify/min/lib/Minify/Logger.php +45 -0
  65. lib/Minify/min/lib/Minify/Packer.php +37 -0
  66. lib/Minify/min/lib/Minify/Source.php +187 -0
  67. lib/Minify/min/lib/Minify/YUICompressor.php +139 -0
  68. lib/Minify/min/lib/MyMin.php +289 -0
  69. lib/Minify/min/lib/Solar/Dir.php +199 -0
  70. lib/Minify/min/utils.php +90 -0
  71. lib/Minify/min_unit_tests/HTTP_ConditionalGet/2.php +44 -0
  72. lib/Minify/min_unit_tests/HTTP_ConditionalGet/3.php +40 -0
  73. lib/Minify/min_unit_tests/HTTP_ConditionalGet/4.php +49 -0
  74. lib/Minify/min_unit_tests/HTTP_ConditionalGet/5.php +27 -0
  75. lib/Minify/min_unit_tests/HTTP_ConditionalGet/_include.php +64 -0
  76. lib/Minify/min_unit_tests/HTTP_ConditionalGet/index.php +36 -0
  77. lib/Minify/min_unit_tests/HTTP_Encoder/green.png +0 -0
  78. lib/Minify/min_unit_tests/HTTP_Encoder/index.php +60 -0
  79. lib/Minify/min_unit_tests/_inc.php +50 -0
  80. lib/Minify/min_unit_tests/_test_files/css/comments.css +9 -0
  81. lib/Minify/min_unit_tests/_test_files/css/comments.min.css +3 -0
  82. lib/Minify/min_unit_tests/_test_files/css/hacks.css +66 -0
  83. lib/Minify/min_unit_tests/_test_files/css/hacks.min.css +4 -0
  84. lib/Minify/min_unit_tests/_test_files/css/issue62.css +890 -0
  85. lib/Minify/min_unit_tests/_test_files/css/issue62.min.css +25 -0
  86. lib/Minify/min_unit_tests/_test_files/css/paths_prepend.css +12 -0
  87. lib/Minify/min_unit_tests/_test_files/css/paths_prepend.min.css +1 -0
  88. lib/Minify/min_unit_tests/_test_files/css/paths_rewrite.css +14 -0
  89. lib/Minify/min_unit_tests/_test_files/css/paths_rewrite.min.css +1 -0
  90. lib/Minify/min_unit_tests/_test_files/css/readme.txt +1 -0
  91. lib/Minify/min_unit_tests/_test_files/css/selectors.css +42 -0
  92. lib/Minify/min_unit_tests/_test_files/css/selectors.min.css +37 -0
  93. lib/Minify/min_unit_tests/_test_files/css/styles.css +31 -0
  94. lib/Minify/min_unit_tests/_test_files/css/styles.min.css +3 -0
  95. lib/Minify/min_unit_tests/_test_files/css/subsilver.css +434 -0
  96. lib/Minify/min_unit_tests/_test_files/css/subsilver.min.css +18 -0
  97. lib/Minify/min_unit_tests/_test_files/css/unusual_strings.css +10 -0
  98. lib/Minify/min_unit_tests/_test_files/css/unusual_strings.min.css +2 -0
  99. lib/Minify/min_unit_tests/_test_files/css/vladmirated.css +658 -0
  100. lib/Minify/min_unit_tests/_test_files/css/vladmirated.min.css +79 -0
  101. lib/Minify/min_unit_tests/_test_files/css_uriRewriter/exp.css +14 -0
  102. lib/Minify/min_unit_tests/_test_files/css_uriRewriter/in.css +14 -0
  103. lib/Minify/min_unit_tests/_test_files/html/before.html +96 -0
  104. lib/Minify/min_unit_tests/_test_files/html/before.min.html +36 -0
  105. lib/Minify/min_unit_tests/_test_files/html/before2.html +95 -0
  106. lib/Minify/min_unit_tests/_test_files/html/before2.min.html +36 -0
  107. lib/Minify/min_unit_tests/_test_files/importProcessor/1/adjacent.css +3 -0
  108. lib/Minify/min_unit_tests/_test_files/importProcessor/1/tv.css +4 -0
  109. lib/Minify/min_unit_tests/_test_files/importProcessor/adjacent.css +4 -0
  110. lib/Minify/min_unit_tests/_test_files/importProcessor/input.css +4 -0
  111. lib/Minify/min_unit_tests/_test_files/importProcessor/output.css +48 -0
  112. lib/Minify/min_unit_tests/_test_files/js/before.js +57 -0
  113. lib/Minify/min_unit_tests/_test_files/js/before.min.js +22 -0
  114. lib/Minify/min_unit_tests/_test_files/js/before.min_plus.js +22 -0
  115. lib/Minify/min_unit_tests/_test_files/js/condcomm.js +14 -0
  116. lib/Minify/min_unit_tests/_test_files/js/condcomm.min_plus.js +13 -0
  117. lib/Minify/min_unit_tests/_test_files/js/issue74.js +4 -0
  118. lib/Minify/min_unit_tests/_test_files/js/issue74.min.js +1 -0
  119. lib/Minify/min_unit_tests/_test_files/js/issue74.min_plus.js +1 -0
  120. lib/Minify/min_unit_tests/_test_files/js/jquery-1.2.3.js +3408 -0
  121. lib/Minify/min_unit_tests/_test_files/minify/QueryString.js +168 -0
  122. lib/Minify/min_unit_tests/_test_files/minify/email.js +24 -0
  123. lib/Minify/min_unit_tests/_test_files/minify/issue73_1.js +2 -0
  124. lib/Minify/min_unit_tests/_test_files/minify/issue73_2.js +3 -0
  125. lib/Minify/min_unit_tests/_test_files/minify/issue89_1.css +7 -0
  126. lib/Minify/min_unit_tests/_test_files/minify/issue89_2.css +7 -0
  127. lib/Minify/min_unit_tests/_test_files/minify/issue89_out.min.css +1 -0
  128. lib/Minify/min_unit_tests/_test_files/minify/lines_bugs.js +2 -0
  129. lib/Minify/min_unit_tests/_test_files/minify/lines_output.js +280 -0
  130. lib/Minify/min_unit_tests/_test_files/minify/minified.css +5 -0
  131. lib/Minify/min_unit_tests/_test_files/minify/minified.js +12 -0
  132. lib/Minify/min_unit_tests/test_HTTP_ConditionalGet.php +137 -0
  133. lib/Minify/min_unit_tests/test_HTTP_Encoder.php +260 -0
  134. lib/Minify/min_unit_tests/test_JSMin.php +63 -0
  135. lib/Minify/min_unit_tests/test_JSMinPlus.php +80 -0
  136. lib/Minify/min_unit_tests/test_Minify.php +213 -0
  137. lib/Minify/min_unit_tests/test_Minify_Build.php +36 -0
  138. lib/Minify/min_unit_tests/test_Minify_CSS.php +53 -0
  139. lib/Minify/min_unit_tests/test_Minify_CSS_UriRewriter.php +56 -0
  140. lib/Minify/min_unit_tests/test_Minify_Cache_APC.php +33 -0
  141. lib/Minify/min_unit_tests/test_Minify_Cache_File.php +54 -0
  142. lib/Minify/min_unit_tests/test_Minify_Cache_Memcache.php +38 -0
  143. lib/Minify/min_unit_tests/test_Minify_CommentPreserver.php +37 -0
  144. lib/Minify/min_unit_tests/test_Minify_HTML.php +59 -0
  145. lib/Minify/min_unit_tests/test_Minify_ImportProcessor.php +48 -0
  146. lib/Minify/min_unit_tests/test_Minify_Javascript.php +35 -0
  147. lib/Minify/min_unit_tests/test_Minify_Lines.php +36 -0
  148. lib/Minify/min_unit_tests/test_MyMin.php +23 -0
  149. lib/Minify/min_unit_tests/test_all.php +17 -0
  150. lib/Minify/min_unit_tests/test_environment.php +100 -0
  151. lib/Minify/min_unit_tests/test_js_in_browser.html +4 -0
  152. lib/W3/Cache.php +56 -0
  153. lib/W3/Cache/Apc.php +91 -0
  154. lib/W3/Cache/Base.php +99 -0
  155. lib/W3/Cache/Memcached.php +64 -0
  156. lib/W3/Cache/Memcached/Base.php +62 -0
  157. lib/W3/Cache/Memcached/Client.php +151 -0
  158. lib/W3/Cache/Memcached/Native.php +143 -0
  159. lib/W3/Cache/Memcached/memcached-client.php +977 -0
  160. lib/W3/Cdn.php +62 -0
  161. lib/W3/Cdn/Base.php +123 -0
  162. lib/W3/Cdn/Cf.php +7 -0
  163. lib/W3/Cdn/Ftp.php +241 -0
  164. lib/W3/Cdn/S3.php +7 -0
  165. lib/W3/Config.php +299 -0
  166. lib/W3/Db.php +438 -0
  167. lib/W3/Minify.php +320 -0
  168. lib/W3/PgCache.php +643 -0
  169. lib/W3/Plugin.php +61 -0
  170. lib/W3/Plugin/Cdn.php +871 -0
  171. lib/W3/Plugin/DbCache.php +93 -0
  172. lib/W3/Plugin/Minify.php +444 -0
  173. lib/W3/Plugin/PgCache.php +227 -0
  174. lib/W3/Plugin/TotalCache.php +885 -0
  175. lib/W3/Request.php +122 -0
  176. readme.txt +118 -0
  177. w3-total-cache-config-default.php +152 -0
  178. w3-total-cache.php +43 -0
  179. wp-content/advanced-cache.php +19 -0
  180. wp-content/db.php +13 -0
  181. wp-content/uploads/w3tc-cache/.htaccess +8 -0
  182. wp-content/uploads/w3tc-cache/index.php +14 -0
inc/css/options.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #icon-w3tc-logo {
2
+ background:url(../images/logo.png) no-repeat;
3
+ float:left;
4
+ height:36px;
5
+ width:36px
6
+ }
7
+ .w3tc-options-menu-selected {
8
+ font-weight:bold
9
+ }
10
+ .w3tc-enabled {
11
+ color:#090;
12
+ font-weight:bold
13
+ }
14
+ .w3tc-disabled {
15
+ color:#f00;
16
+ font-weight:bold
17
+ }
18
+ .w3tc-empty {
19
+ font-weight:bold;
20
+ font-style:italic
21
+ }
22
+ .w3tc-success {
23
+ background:#bfb
24
+ }
25
+ .w3tc-error {
26
+ background:#f99
27
+ }
28
+ .w3tc-cdn-status {
29
+ padding:5px
30
+ }
31
+ #w3tc acronym {
32
+ border-bottom:1px dotted #666
33
+ }
34
+ #w3tc ul {
35
+ list-style-type:disc;
36
+ list-style-position:inside
37
+ }
38
+ /* FAQ BEGIN */
39
+ #w3tc blockquote {
40
+ font-style:italic;
41
+ width:700px
42
+ }
43
+ #w3tc blockquote cite {
44
+ font-style:normal
45
+ }
46
+ #w3tc h5 {
47
+ margin:0
48
+ }
49
+ #w3tc hr {
50
+ clear:both;
51
+ margin-top:10px
52
+ }
53
+ #w3tc ul {
54
+ list-style-position:inside
55
+ }
56
+ #w3tc #toc a, #qa a {
57
+ text-decoration:none
58
+ }
59
+ #w3tc #toc a:hover, #qa a:hover {
60
+ text-decoration:underline
61
+ }
62
+ #w3tc #toc ul {
63
+ margin:0;
64
+ padding:0
65
+ }
66
+ #w3tc #toc li {
67
+ margin:0;
68
+ padding:0
69
+ }
70
+ #w3tc #toc li.col {
71
+ float:left;
72
+ list-style:none;
73
+ margin:0 30px 0 0;
74
+ width:30%
75
+ }
76
+ #w3tc #toc li.col ul {
77
+ margin-left:20px
78
+ }
79
+ #w3tc #toc li.col ul li {
80
+ list-style:disc
81
+ }
82
+ #w3tc #qa {
83
+ clear:both;
84
+ padding:10px;
85
+ width:760px
86
+ }
87
+ /* FAQ END */
inc/css/popup.css ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ color: #464646;
5
+ }
6
+ html,body {
7
+ height: 100%;
8
+ }
9
+ body {
10
+ line-height: 1;
11
+ background: #f9f9f9;
12
+ }
13
+ body,td,textarea,input,select {
14
+ font-family: "Lucida Grande", Verdana, Arial;
15
+ font-size: 13px;
16
+ }
17
+ p {
18
+ margin: 1em 0;
19
+ }
20
+ h1 {
21
+ font-family: Georgia, "Times New Roman", "Bitstream Charter";
22
+ font-size: 24px;
23
+ font-style: italic;
24
+ font-weight: normal;
25
+ line-height: 35px;
26
+ margin-bottom: 0.8em 0;
27
+ text-shadow: 0 1px 0 #fff;
28
+ }
29
+ a {
30
+ color: #21759B;
31
+ }
32
+ a:hover {
33
+ color: #D54E21;
34
+ }
35
+ #content {
36
+ padding: 40px 50px;
37
+ }
38
+ .clear {
39
+ clear: both;
40
+ }
41
+ .button,input[type="button"],input[type="submit"] {
42
+ font-size: 11px;
43
+ line-height: 16px;
44
+ background: #F2F2F2 url(/wp-admin/images/white-grad.png) repeat-x scroll
45
+ left top;
46
+ border: 1px solid #bbb;
47
+ color: #464646;
48
+ text-shadow: 0 1px 0 #fff;
49
+ cursor: pointer;
50
+ padding: 2px 8px;
51
+ -moz-background-clip: border;
52
+ -moz-background-inline-policy: continuous;
53
+ -moz-background-origin: padding;
54
+ -moz-border-radius: 11px;
55
+ -moz-box-sizing: content-box;
56
+ }
57
+ .button:hover,input[type="button"]:hover,input[type="submit"]:hover {
58
+ border-color: #666;
59
+ color: #000;
60
+ }
61
+ .button:active,input[type="button"]:active,input[type="submit"]:active {
62
+ background: #F2F2F2 url(/wp-admin/images/white-grad-active.png) repeat-x
63
+ scroll left top;
64
+ }
65
+ .progress {
66
+ background: #fff;
67
+ border: 1px solid #464646;
68
+ padding: 1px;
69
+ margin: 1em 0;
70
+ position: relative;
71
+ }
72
+ .progress-value {
73
+ position: absolute;
74
+ line-height: 30px;
75
+ font-size: 16px;
76
+ font-weight: bold;
77
+ color: #000;
78
+ text-align: center;
79
+ width: 100%;
80
+ }
81
+ .progress-bar {
82
+ float: left;
83
+ width: 0;
84
+ height: 30px;
85
+ background: #fc2;
86
+ }
87
+ .log {
88
+ border: 1px solid #464646;
89
+ height: 298px;
90
+ overflow: auto;
91
+ }
92
+ .log div {
93
+ padding: 3px;
94
+ border-bottom: 1px solid #464646;
95
+ }
96
+ .log-success {
97
+ background: #bfb;
98
+ }
99
+ .log-error {
100
+ background: #f99;
101
+ }
102
+ .empty {
103
+ font-weight: bold;
104
+ font-style: italic;
105
+ }
106
+ .table {
107
+ width: 100%;
108
+ border-collapse: collapse;
109
+ }
110
+ .table td,th {
111
+ border: 1px solid #ccc;
112
+ padding: 3px 2px;
113
+ }
114
+ .table th {
115
+ background: #eee;
116
+ }
117
+ .updated,.error {
118
+ -moz-border-radius-bottomleft: 3px;
119
+ -moz-border-radius-bottomright: 3px;
120
+ -moz-border-radius-topleft: 3px;
121
+ -moz-border-radius-topright: 3px;
122
+ border-style: solid;
123
+ border-width: 1px;
124
+ padding: 0 0.6em;
125
+ margin: 0.5em 0;
126
+ }
127
+ .updated {
128
+ background: #FFFFE0;
129
+ border-color: #E6DB55;
130
+ }
131
+ .error {
132
+ background-color: #FFEBE8;
133
+ border-color: #CC0000;
134
+ }
135
+ .updated p,.error p {
136
+ line-height: 1;
137
+ margin: 0.5em 0;
138
+ padding: 2px;
139
+ }
140
+ .tab-selected {
141
+ font-weight: bold;
142
+ }
inc/define.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (! defined('W3_PLUGIN_POWERED_BY')) {
4
+ define('W3_PLUGIN_POWERED_BY', 'W3 Total Cache/0.5');
5
+ }
6
+
7
+ if (! defined('WP_CONTENT_DIR')) {
8
+ define('WP_CONTENT_DIR', dirname(__FILE__) . '/../../../');
9
+ }
10
+
11
+ if (! defined('W3_PLUGIN_DIR')) {
12
+ define('W3_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins/w3-total-cache');
13
+ }
14
+
15
+ if (! defined('W3_PLUGIN_CONTENT_DIR')) {
16
+ define('W3_PLUGIN_CONTENT_DIR', W3_PLUGIN_DIR . '/wp-content');
17
+ }
18
+
19
+ if (! defined('W3_PLUGIN_FILE')) {
20
+ define('W3_PLUGIN_FILE', 'w3-total-cache/w3-total-cache.php');
21
+ }
22
+
23
+ if (! defined('W3_CONFIG_PATH')) {
24
+ define('W3_CONFIG_PATH', WP_CONTENT_DIR . '/uploads/w3-total-cache-config.php');
25
+ }
26
+
27
+ if (! defined('W3_CONFIG_DEFAULT_PATH')) {
28
+ define('W3_CONFIG_DEFAULT_PATH', W3_PLUGIN_DIR . '/w3-total-cache-config-default.php');
29
+ }
inc/images/logo.png ADDED
Binary file
inc/js/options.js ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function w3tc_popup(url, name)
2
+ {
3
+ return window.open(url, name, 'width=800,height=600,status=no,toolbar=no,menubar=no,scrollbars=yes');
4
+ }
5
+
6
+ jQuery(function($) {
7
+ // general page
8
+ $('.enabled').click(function() {
9
+ var checked = false;
10
+ $('.enabled').each(function() {
11
+ if (this.checked) {
12
+ checked = true;
13
+ }
14
+ });
15
+ $('#enabled').each(function() {
16
+ this.checked = checked;
17
+ });
18
+ });
19
+
20
+ $('#enabled').click(function() {
21
+ var checked = this.checked;
22
+ $('.enabled').each(function() {
23
+ this.checked = checked;
24
+ });
25
+ });
26
+
27
+ // minify page
28
+ function input_enable(input, enabled)
29
+ {
30
+ $(input).each(function() {
31
+ this.disabled = ! enabled;
32
+ if (enabled) {
33
+ $(this).next(':hidden').remove();
34
+ } else {
35
+ var me = $(this);
36
+ me.after($('<input />').attr({
37
+ type: 'hidden',
38
+ name: me.attr('name'),
39
+ }).val(me.val()));
40
+ }
41
+ });
42
+ }
43
+
44
+ input_enable('.html_enabled', $('#html_enabled:checked').size());
45
+ input_enable('.js_enabled', $('#js_enabled:checked').size());
46
+ input_enable('.css_enabled', $('#css_enabled:checked').size());
47
+
48
+ $('#html_enabled').click(function() {
49
+ input_enable('.html_enabled', this.checked);
50
+ });
51
+
52
+ function js_enabled()
53
+ {
54
+ $('#js_enabled').click(function() {
55
+ input_enable('.js_enabled', this.checked);
56
+ });
57
+ }
58
+
59
+ js_enabled();
60
+
61
+ function css_enabled()
62
+ {
63
+ $('#css_enabled').click(function() {
64
+ input_enable('.css_enabled', this.checked);
65
+ });
66
+ }
67
+
68
+ css_enabled();
69
+
70
+ function js_file_delete()
71
+ {
72
+ $('.js_file_delete').click(function() {
73
+ if (confirm('Are you sure you want to delete JS file?')) {
74
+ $(this).parent().remove();
75
+ if (! $('#js_files li').size()) {
76
+ $('#js_files').after('<div id="js_files_empty" class="w3tc-empty">No JS files added<\/div>').remove();
77
+ }
78
+ }
79
+
80
+ return false;
81
+ });
82
+ }
83
+
84
+ js_file_delete();
85
+
86
+ function file_verify()
87
+ {
88
+ $('.js_file_verify,.css_file_verify').click(function() {
89
+ var file = $(this).parent().find(':text').val();
90
+ if (file == '') {
91
+ alert('Empty file');
92
+ } else {
93
+ var url = '';
94
+ if (/^https?:\/\//.test(file)) {
95
+ url = file;
96
+ } else {
97
+ url = '/' + file;
98
+ }
99
+ w3tc_popup(url, 'file_verify');
100
+ }
101
+ });
102
+ }
103
+
104
+ file_verify();
105
+
106
+ function js_file_location_change()
107
+ {
108
+ $('.js_file_location').change(function() {
109
+ $(this).parent().find(':text').attr('name', 'js_files_' + $(this).val() + '[]');
110
+ });
111
+ }
112
+
113
+ js_file_location_change();
114
+
115
+ $('#js_file_add').click(function() {
116
+ if ($('#js_files_empty').size()) {
117
+ $('#js_files_empty').after('<ol id="js_files"><\/ol>').remove();
118
+ }
119
+ $('#js_files').append('<li><input class="js_enabled" type="text" name="js_files_include[]" value="" size="100" \/>&nbsp;<select class="js_file_location js_enabled"><option value="include">Header</option><option value="include-nb">Header (non-blocking)</option><option value="include-footer">Footer</option><option value="include-footer-nb">Footer (non-blocking)</option></select>&nbsp;<input class="js_file_delete js_enabled button" type="button" value="Delete" />&nbsp;<input class="js_file_verify js_enabled button" type="button" value="Verify URI" /><\/li>');
120
+ js_file_delete();
121
+ file_verify();
122
+ js_enabled();
123
+ js_file_location_change();
124
+ });
125
+
126
+ function css_file_delete()
127
+ {
128
+ $('.css_file_delete').click(function() {
129
+ if (confirm('Are you sure you want to delete CSS file?')) {
130
+ $(this).parent().remove();
131
+ if (! $('#css_files li').size()) {
132
+ $('#css_files').after('<div id="css_files_empty" class="w3tc-empty">No CSS files added<\/div>').remove();
133
+ }
134
+ }
135
+
136
+ return false;
137
+ });
138
+ }
139
+
140
+ css_file_delete();
141
+
142
+ $('#css_file_add').click(function() {
143
+ if ($('#css_files_empty').size()) {
144
+ $('#css_files_empty').after('<ol id="css_files"><\/ol>').remove();
145
+ }
146
+ $('#css_files').append('<li><input class="css_enabled" type="text" name="css_files_include[]" value="" size="100" \/>&nbsp;<input class="css_file_delete css_enabled button" type="button" value="Delete" />&nbsp;<input class="css_file_verify css_enabled button" type="button" value="Verify URI" /><\/li>');
147
+ css_file_delete();
148
+ file_verify();
149
+ css_enabled();
150
+ });
151
+
152
+ $('#minify_form').submit(function() {
153
+ var invalid_js = [], invalid_css = [];
154
+ $('#js_files :text').each(function() {
155
+ var v = $(this).val();
156
+ if (v != '' && ! /\.js$/.test(v)) {
157
+ invalid_js.push(v);
158
+ }
159
+ });
160
+ $('#css_files :text').each(function() {
161
+ var v = $(this).val();
162
+ if (v != '' && ! /\.css$/.test(v)) {
163
+ invalid_css.push(v);
164
+ }
165
+ });
166
+
167
+ if (invalid_js.length && ! confirm('These files have invalid JS file extension:\r\n\r\n' + invalid_js.join('\r\n') + '\r\n\r\nAre you confident this files contain valid JS code?')) {
168
+ return false;
169
+ }
170
+
171
+ if (invalid_css.length && ! confirm('These files have invalid CSS file extension:\r\n\r\n' + invalid_css.join('\r\n') + '\r\n\r\nAre you confident this files contain valid CSS code?')) {
172
+ return false;
173
+ }
174
+
175
+ return true;
176
+ });
177
+
178
+ // CDN
179
+ $('.w3tc-tab').click(function() {
180
+ $('.w3tc-tab-content').hide();
181
+ $(this.rel).show();
182
+ });
183
+
184
+ $('#cdn_export_library').click(function() {
185
+ w3tc_popup('options-general.php?page=w3-total-cache/w3-total-cache.php&w3tc_action=cdn_export_library', 'cdn_export_library');
186
+ });
187
+
188
+ $('#cdn_queue').click(function() {
189
+ w3tc_popup('options-general.php?page=w3-total-cache/w3-total-cache.php&w3tc_action=cdn_queue', 'cdn_queue');
190
+ });
191
+
192
+ $('.cdn_export').click(function() {
193
+ w3tc_popup('options-general.php?page=w3-total-cache/w3-total-cache.php&w3tc_action=cdn_export&cdn_export_type=' + this.name, 'cdn_export_' + this.name);
194
+ });
195
+
196
+ $('#test_ftp').click(function() {
197
+ var status = $('#test_ftp_status');
198
+ status.removeClass('w3tc-error');
199
+ status.addClass('w3tc-process');
200
+ status.html('Testing...');
201
+ $.post('options-general.php', {
202
+ page: 'w3-total-cache/w3-total-cache.php',
203
+ w3tc_action: 'cdn_test_ftp',
204
+ host: $('#cdn_ftp_host').val(),
205
+ user: $('#cdn_ftp_user').val(),
206
+ path: $('#cdn_ftp_path').val(),
207
+ pass: $('#cdn_ftp_pass').val()
208
+ }, function(data) {
209
+ status.addClass(data.result ? 'w3tc-success' : 'w3tc-error');
210
+ status.html(data.error);
211
+ }, 'json');
212
+ });
213
+ });
inc/js/popup.js ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var Cdn_Export_File = {
2
+ paused: 0,
3
+ limit: 25,
4
+ offset: 0,
5
+ files: [],
6
+ upload_files: [],
7
+
8
+ set_progress: function(percent)
9
+ {
10
+ jQuery('#cdn_export_file_progress .progress-bar').width(percent + '%');
11
+ jQuery('#cdn_export_file_progress .progress-value').html(percent + '%');
12
+ },
13
+
14
+ set_status: function(status)
15
+ {
16
+ jQuery('#cdn_export_file_status').html(status);
17
+ },
18
+
19
+ set_processed: function(processed)
20
+ {
21
+ jQuery('#cdn_export_file_processed').html(processed);
22
+ },
23
+
24
+ set_button_text: function(text)
25
+ {
26
+ jQuery('#cdn_export_file_start').val(text);
27
+ },
28
+
29
+ log: function(path, result, error)
30
+ {
31
+ jQuery('#cdn_export_file_log').prepend('<div class="log-' + (result == 1 ? 'success' : 'error') + '">' + path + ' <strong>' + error + '</strong></div>');
32
+ },
33
+
34
+ process: function()
35
+ {
36
+ if (this.paused) {
37
+ return;
38
+ }
39
+
40
+ this.upload_files = [];
41
+
42
+ for (var i = this.offset, l = this.files.length, j = 0; i < l && j < this.limit; i++, j++) {
43
+ this.upload_files.push(this.files[i]);
44
+ }
45
+
46
+ var me = this;
47
+ if (this.upload_files.length) {
48
+ jQuery.post('options-general.php', {
49
+ page: 'w3-total-cache/w3-total-cache.php',
50
+ w3tc_action: 'cdn_export_process',
51
+ 'files[]': this.upload_files
52
+ }, function(data) {
53
+ me.process_callback(data);
54
+ }, 'json');
55
+ }
56
+ },
57
+
58
+ process_callback: function(data)
59
+ {
60
+ var failed = false;
61
+ for (var i = 0; i < data.results.length; i++) {
62
+ this.log(data.results[i].remote_path, data.results[i].result, data.results[i].error);
63
+ if (data.results[i].result == -1) {
64
+ failed = true;
65
+ break;
66
+ }
67
+ }
68
+
69
+ if (failed) {
70
+ this.offset = 0;
71
+ this.set_progress(0);
72
+ this.set_processed(1);
73
+ this.set_status('failed');
74
+ this.set_button_text('Start');
75
+ } else {
76
+ this.offset += this.upload_files.length;
77
+ this.set_progress((this.offset * 100 / files.length).toFixed(0));
78
+ this.set_processed(this.offset);
79
+
80
+ if (this.offset < this.files.length) {
81
+ this.process();
82
+ } else {
83
+ this.offset = 0;
84
+ this.set_status('done');
85
+ this.set_button_text('Start');
86
+ }
87
+ }
88
+ },
89
+
90
+ init: function(files) {
91
+ if (files === undefined) {
92
+ files = [];
93
+ }
94
+
95
+ this.files = files;
96
+
97
+ var me = this;
98
+ jQuery('#cdn_export_file_start').click(function() {
99
+ if (this.value == 'Pause') {
100
+ me.paused = 1;
101
+ me.set_button_text('Resume');
102
+ me.set_status('paused');
103
+ } else {
104
+ me.paused = 0;
105
+ me.set_button_text('Pause');
106
+ me.set_status('processing');
107
+ }
108
+
109
+ me.process();
110
+ });
111
+ }
112
+ }
113
+
114
+ var Cdn_Export_Table = {
115
+ action: '',
116
+ paused: 0,
117
+ limit: 25,
118
+ offset: 0,
119
+
120
+ set_progress: function(percent)
121
+ {
122
+ jQuery('#cdn_export_table_progress .progress-bar').width(percent + '%');
123
+ jQuery('#cdn_export_table_progress .progress-value').html(percent + '%');
124
+ },
125
+
126
+ set_status: function(status)
127
+ {
128
+ jQuery('#cdn_export_table_status').html(status);
129
+ },
130
+
131
+ set_processed: function(processed)
132
+ {
133
+ jQuery('#cdn_export_table_processed').html(processed);
134
+ },
135
+
136
+ set_total: function(total)
137
+ {
138
+ jQuery('#cdn_export_table_total').html(total);
139
+ },
140
+
141
+ set_button_text: function(text)
142
+ {
143
+ jQuery('#cdn_export_table_start').val(text);
144
+ },
145
+
146
+ log: function(path, result, error)
147
+ {
148
+ jQuery('#cdn_export_table_log').prepend('<div class="log-' + (result == 1 ? 'success' : 'error') + '">' + path + ' <strong>' + error + '</strong></div>');
149
+ },
150
+
151
+ process: function()
152
+ {
153
+ if (this.paused) {
154
+ return;
155
+ }
156
+
157
+ var me = this;
158
+ jQuery.post('options-general.php', {
159
+ page: 'w3-total-cache/w3-total-cache.php',
160
+ w3tc_action: this.action,
161
+ limit: this.limit,
162
+ offset: this.offset
163
+ }, function(data) {
164
+ me.process_callback(data);
165
+ }, 'json');
166
+ },
167
+
168
+ process_callback: function(data)
169
+ {
170
+ this.offset += data.count;
171
+
172
+ this.set_total(data.total);
173
+ this.set_processed(this.offset);
174
+ this.set_progress((this.offset * 100 / data.total).toFixed(0));
175
+
176
+ var failed = false;
177
+ for (var i = 0; i < data.results.length; i++) {
178
+ this.log(data.results[i].remote_path, data.results[i].result, data.results[i].error);
179
+ if (data.results[i].result == -1) {
180
+ failed = true;
181
+ break;
182
+ }
183
+ }
184
+
185
+ if (failed) {
186
+ this.offset = 0;
187
+ this.set_progress(0);
188
+ this.set_processed(1);
189
+ this.set_status('failed');
190
+ this.set_button_text('Start');
191
+ } else {
192
+ if (this.offset < data.total) {
193
+ this.process();
194
+ } else {
195
+ this.offset = 0;
196
+ this.set_status('done');
197
+ this.set_button_text('Start');
198
+ }
199
+ }
200
+ },
201
+
202
+ init: function(action) {
203
+ if (action === undefined) {
204
+ action = 'cdn_export_table';
205
+ }
206
+
207
+ this.action = action;
208
+
209
+ var me = this;
210
+ jQuery('#cdn_export_table_start').click(function() {
211
+ if (this.value == 'Pause') {
212
+ me.paused = 1;
213
+ me.set_button_text('Resume');
214
+ me.set_status('paused');
215
+ } else {
216
+ me.paused = 0;
217
+ me.set_button_text('Pause');
218
+ me.set_status('processing');
219
+ }
220
+
221
+ me.process();
222
+ });
223
+ }
224
+ }
225
+
226
+ jQuery(function($) {
227
+ $('.tab').click(function() {
228
+ $('.tab').removeClass('tab-selected');
229
+ $('.tab-content').hide();
230
+ $(this).addClass('tab-selected');
231
+ $(this.rel).show();
232
+ });
233
+
234
+ $('.cdn_queue_delete').click(function() {
235
+ return confirm('Are you sure you want to delete this file from the queue?');
236
+ });
237
+
238
+ $('.cdn_queue_empty').click(function() {
239
+ return confirm('Are you sure you want to empty the queue?');
240
+ });
241
+
242
+ Cdn_Export_Table.init('cdn_export_library_process');
243
+ if (typeof files !== 'undefined') {
244
+ Cdn_Export_File.init(files);
245
+ }
246
+ });
inc/options/about.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3 id="about">About</h3>
2
+ <div id="about" class="w3tc">
3
+ <p>User experience is an important aspect of every web site and all web sites can benefit from effective caching and file size reduction. We have applied web site optimization methods typically used with high traffic sites and simplified their implementation. Coupling these methods either <a href="http://www.danga.com/memcached/" target="_blank">memcached</a> and/or <a href="http://pecl.php.net/package/APC" target="_blank"><acronym title="Alternative PHP Cache">APC</acronym></a> and the <acronym title="Content Delivery Network">CDN</acronym> of your choosing to provide the following benefits:</p>
4
+ <ul>
5
+ <li>Improved progressive render (non-blocking <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> embedding)</li>
6
+ <li>Transparent content delivery network (<acronym title="Content Delivery Network">CDN</acronym>) support with automated media library import</li>
7
+ <li>Bandwidth savings via Minify and <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression (<acronym title="GNU zip">gzip</acronym> / deflate) for <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym></li>
8
+ <li>Minification (concatenation, white space removal) of inline, external or 3rd party <acronym title="JavaScript">JS</acronym> and <acronym title="Cascading Style Sheet">CSS</acronym> with scheduled updates</li>
9
+ <li>Caching of <acronym title="Really Simple Syndication">RSS</acronym>/Atom Feeds (comments, page and site), <acronym title="Uniform Resource Identifier">URI</acronym>s with query string variables (like search result pages), database objects, pages, posts, <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> in memory via <a href="http://pecl.php.net/apc">APC</a> or <a href="http://www.danga.com/memcached/">memcached</a> or both</li>
10
+ <li>Increased web server concurrency and reduced resource consumption, increased scale</li>
11
+ <li>Reduced <acronym title="Hypertext Transfer Protocol">HTTP</acronym> Transactions, <acronym title="Domain Name System">DNS</acronym> lookups, reduced document load time</li>
12
+ <li>Complete header management including <a href="http://en.wikipedia.org/wiki/HTTP_ETag">Etags</a></li>
13
+ <li>Optional embedding of <acronym title="JavaScript">JS</acronym> just above &lt;/body&gt;</li>
14
+ </ul>
15
+ <p>Your users have less data to download, you can now handle more requests with your existing equipment and you don't have to change how you do anything; just set it and forget it.</p>
16
+ <p><strong>Who do I thank for all of this?</strong><br />
17
+ It's quite difficult to recall all of the innovators that have shared their thoughts, code and experiences in the blogosphere over the years, but here are some names to get you started:</p>
18
+ <ul>
19
+ <li><a href="http://mrclay.org/" target="_blank">Steve Clay</a></li>
20
+ <li><a href="http://wonko.com/" target="_blank">Ryan Grove</a></li>
21
+ <li><a href="http://www.nczonline.net/blog/2009/06/23/loading-javascript-without-blocking/" target="_blank">Nicholas Zakas</a> </li>
22
+ <li><a href="http://stevesouders.com/" target="_blank">Steve Souders</a></li>
23
+ <li><a href="http://rtdean.livejournal.com/" target="_blank">Ryan Dean</a></li>
24
+ <li><a href="http://gravitonic.com/" target="_blank">Andrei Zmievski</a></li>
25
+ <li>George Schlossnagle</li>
26
+ <li>Daniel Cowgill</li>
27
+ <li><a href="http://toys.lerdorf.com/" target="_blank">Rasmus Lerdorf</a></li>
28
+ <li><a href="http://t3.dotgnu.info/" target="_blank">Gopal Vijayaraghavan</a></li>
29
+ </ul>
30
+ <p>Please reach out to all of these people and support their projects if you're so inclined.</p>
31
+ </div>
inc/options/cdn.phtml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3><acronym title="Content Delivery Network">CDN</acronym> Settings</h3>
2
+ <div id="w3tc">
3
+ <p><acronym title="Content Delivery Network">CDN</acronym> support is currently <span class="w3tc-<?php if ($config->get_boolean('cdn.enabled')): ?>enabled">enabled<?php else: ?>disabled">disabled<?php endif; ?></span>.</p>
4
+
5
+ <p>
6
+ You can
7
+ <input id="cdn_export_library" class="button" type="button" value="export media library to CDN" /> or
8
+ <!--<input id="cdn_import_library" class="button" type="button" value="emport post files to media library &amp; CDN" /> or -->
9
+ <input id="cdn_queue" class="button" type="button" value="view unsuccessfullt transfers" /> now.
10
+ </p>
11
+
12
+ <form action="options-general.php?page=<?php echo urldecode(W3_PLUGIN_FILE); ?>&amp;tab=<?php echo $tab; ?>" method="post">
13
+ <!-- <p>
14
+ <a href="#cdn_ftp" class="w3tc-tab" rel="#cdn_ftp"><acronym title="File Transfer Protocol">FTP</acronym> settings</a> |
15
+ <a href="#cdn_cf" class="w3tc-tab" rel="#cdn_cf">Amazon CloudFront settings</a> |
16
+ <a href="#cdn_s3" class="w3tc-tab" rel="#cdn_s3">Amazon S3 settings</a>
17
+ </p> -->
18
+
19
+ <div id="cdn_ftp" class="w3tc-tab-content">
20
+ <table class="form-table">
21
+ <tr>
22
+ <th><label for="cdn_ftp_host"><acronym title="File Transfer Protocol">FTP</acronym> Hostname:</label></th>
23
+ <td>
24
+ <input id="cdn_ftp_host" type="text" name="cdn.ftp.host" value="<?php echo htmlspecialchars($config->get_string('cdn.ftp.host')); ?>" size="30" />
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th><label for="cdn_ftp_user"><acronym title="File Transfer Protocol">FTP</acronym> Username:</label></th>
29
+ <td>
30
+ <input id="cdn_ftp_user" type="text" name="cdn.ftp.user" value="<?php echo htmlspecialchars($config->get_string('cdn.ftp.user')); ?>" size="30" />
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <th><label for="cdn_ftp_pass"><acronym title="File Transfer Protocol">FTP</acronym> Password:</label></th>
35
+ <td>
36
+ <input id="cdn_ftp_pass" type="text" name="cdn.ftp.pass" value="<?php echo htmlspecialchars($config->get_string('cdn.ftp.pass')); ?>" size="30" />
37
+ </td>
38
+ </tr>
39
+ <tr>
40
+ <th><label for="cdn_ftp_path"><acronym title="File Transfer Protocol">FTP</acronym> Path:</label></th>
41
+ <td>
42
+ <input id="cdn_ftp_path" type="text" name="cdn.ftp.path" value="<?php echo htmlspecialchars($config->get_string('cdn.ftp.path')); ?>" size="30" />
43
+ </td>
44
+ </tr>
45
+ <tr>
46
+ <th colspan="2">
47
+ <input type="hidden" name="cdn.ftp.pasv" value="0" />
48
+ <label><input type="checkbox" name="cdn.ftp.pasv" value="1"<?php checked($config->get_boolean('cdn.ftp.pasv')); ?> /> Use Passive <acronym title="File Transfer Protocol">FTP</acronym> Mode</label>
49
+ </th>
50
+ </tr>
51
+ </table>
52
+ <p>
53
+ <input id="test_ftp" class="button" type="button" value="Test FTP server" /> <span id="test_ftp_status" class="w3tc-cdn-status w3tc-process"></span>
54
+ </p>
55
+ </div>
56
+ <div id="cdn_cf" class="w3tc-tab-content" style="display: none;">
57
+ to do...
58
+ <p>
59
+ <input class="button" type="button" value="Test CloudFront server" />
60
+ </p>
61
+ </div>
62
+ <div id="cdn_s3" class="w3tc-tab-content" style="display: none;">
63
+ to do...
64
+ <p>
65
+ <input class="button" type="button" value="Test S3 server" />
66
+ </p>
67
+ </div>
68
+
69
+ <table class="form-table">
70
+ <tr>
71
+ <th style="width: 300px;"><label for="cdn_domain">Replace domain in <acronym title="Uniform Resource Locator">URL</acronym> with:</label></th>
72
+ <td>
73
+ <input id="cdn_domain" type="text" name="cdn.domain" value="<?php echo htmlspecialchars($config->get_string('cdn.domain')); ?>" size="40" />
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <th><label for="cdn_limit_queue">Re-transfer cycle limit:</label></th>
78
+ <td>
79
+ <input id="cdn_limit_queue" type="text" name="cdn.limit.queue" value="<?php echo htmlspecialchars($config->get_integer('cdn.limit.queue')); ?>" size="10" /><br />
80
+ <span class="description">Number of files processed per cycle.</span>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>
85
+ <input type="hidden" name="cdn.process.includes" value="0" />
86
+ <label><input type="checkbox" name="cdn.process.includes" value="1"<?php checked($config->get_boolean('cdn.process.includes')); ?> /> Host wp-includes/ files</label>
87
+ </th>
88
+ <td>
89
+ <input class="button cdn_export" type="button" name="includes" value="Upload includes files" />
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <th>
94
+ <input type="hidden" name="cdn.process.theme" value="0" />
95
+ <label><input type="checkbox" name="cdn.process.theme" value="1"<?php checked($config->get_boolean('cdn.process.theme')); ?> /> Host active theme files</label>
96
+ </th>
97
+ <td>
98
+ <input class="button cdn_export" type="button" name="theme" value="Upload theme files" />
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th>
103
+ <input type="hidden" name="cdn.process.minify" value="0" />
104
+ <label><input type="checkbox" name="cdn.process.minify" value="1"<?php checked($config->get_boolean('cdn.process.minify')); ?> /> Host minified <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files</label>
105
+ </th>
106
+ <td>
107
+ <input class="button cdn_export" type="button" name="minify" value="Upload minify files" />
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <th>
112
+ <input type="hidden" name="cdn.process.custom" value="0" />
113
+ <label><input type="checkbox" name="cdn.process.custom" value="1"<?php checked($config->get_boolean('cdn.process.custom')); ?> /> Host custom files</label>
114
+ </th>
115
+ <td>
116
+ <input class="button cdn_export" type="button" name="custom" value="Upload custom files" />
117
+ </td>
118
+ </tr>
119
+ <tr>
120
+ <th><label for="cdn_files_includes">Search wp-includes/ directory for files:</label></th>
121
+ <td>
122
+ <input id="cdn_files_includes" type="text" name="cdn.files.includes" value="<?php echo htmlspecialchars($config->get_string('cdn.files.includes')); ?>" size="40" />
123
+ </td>
124
+ </tr>
125
+ <tr>
126
+ <th><label for="cdn_files_theme">Search current theme directory for files:</label></th>
127
+ <td>
128
+ <input id="cdn_files_theme" type="text" name="cdn.files.theme" value="<?php echo htmlspecialchars($config->get_string('cdn.files.theme')); ?>" size="40" />
129
+ </td>
130
+ </tr>
131
+ <tr>
132
+ <th valign="top"><label for="cdn_files_custom">Custom file list:</label></th>
133
+ <td>
134
+ <textarea id="cdn_files_custom" name="cdn.files.custom" cols="30" rows="5"><?php echo htmlspecialchars(implode("\r\n", $config->get_array('cdn.files.custom'))); ?></textarea>
135
+ </td>
136
+ </tr>
137
+ </table>
138
+
139
+ <p class="submit">
140
+ <input type="submit" name="Submit" class="button-primary" value="Save changes" />
141
+ </p>
142
+ </form>
143
+ </div>
inc/options/common/footer.phtml ADDED
@@ -0,0 +1 @@
 
1
+ </div>
inc/options/common/header.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php screen_icon('w3tc-logo'); ?>
3
+
4
+ <h2>W3 Total Cache</h2>
5
+
6
+ <?php if (count($errors)): ?>
7
+ <div id="message" class="error">
8
+ <?php foreach ($errors as $error): ?>
9
+ <p><?php echo $error; ?></p>
10
+ <?php endforeach; ?>
11
+ </div>
12
+ <?php endif; ?>
13
+
14
+ <?php if (count($notes)): ?>
15
+ <div id="message" class="updated fade">
16
+ <?php foreach ($notes as $note): ?>
17
+ <p><?php echo $note; ?></p>
18
+ <?php endforeach; ?>
19
+ </div>
20
+ <?php endif; ?>
21
+
22
+ <p id="w3tc-options-menu">
23
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=general"<?php if ($tab == 'general'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>General Settings</a> |
24
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=pgcache"<?php if ($tab == 'pgcache'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>Page Cache Settings</a> |
25
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=minify"<?php if ($tab == 'minify'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>Minify Settings</a> |
26
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=dbcache"<?php if ($tab == 'dbcache'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>Database Cache Settings</a> |
27
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=cdn"<?php if ($tab == 'cdn'): ?> class="w3tc-options-menu-selected"<?php endif; ?>><acronym title="Content Delivery Network">CDN</acronym> Settings</a> |
28
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=faq"<?php if ($tab == 'faq'): ?> class="w3tc-options-menu-selected"<?php endif; ?>><acronym title="Frequently Asked Questions">FAQ</acronym></a> |
29
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=install"<?php if ($tab == 'install'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>Installation</a> |
30
+ <a href="?page=<?php echo W3_PLUGIN_FILE; ?>&amp;tab=about"<?php if ($tab == 'about'): ?> class="w3tc-options-menu-selected"<?php endif; ?>>About</a>
31
+ </p>
inc/options/dbcache.phtml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3>Database Caching Settings</h3>
2
+ <div id="w3tc">
3
+ <p>Database caching is currently <span class="w3tc-<?php if ($config->get_boolean('dbcache.enabled')): ?>enabled">enabled<?php else: ?>disabled">disabled<?php endif; ?></span>.</p>
4
+
5
+ <form action="options-general.php?page=<?php echo urldecode(W3_PLUGIN_FILE); ?>&amp;tab=<?php echo $tab; ?>" method="post">
6
+ <table class="form-table">
7
+ <tr>
8
+ <th style="width: 250px;"><label for="dbcache_memcached_servers">Memcached Hostname:Port / IP:Port:</label></th>
9
+ <td>
10
+ <input id="dbcache_memcached_servers" type="text" name="dbcache.memcached.servers" value="<?php echo htmlspecialchars(implode(',', $config->get_array('dbcache.memcached.servers'))); ?>" size="100" /><br />
11
+ <span class="description">Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122</span>
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <th><label for="dbcache_lifetime_default">Maximum lifetime of cache objects:</label></th>
16
+ <td><input id="dbcache_lifetime_default" type="text" name="dbcache.lifetime.default" value="<?php echo $config->get_integer('dbcache.lifetime.default'); ?>" size="8" /> seconds</td>
17
+ </tr>
18
+ </table>
19
+
20
+ <p class="submit">
21
+ <input type="submit" name="Submit" class="button-primary" value="Save changes" />
22
+ </p>
23
+ </form>
24
+ </div>
inc/options/faq.phtml ADDED
@@ -0,0 +1,483 @@