PluginProbe ʕ •ᴥ•ʔ
WP Fastest Cache – WordPress Cache Plugin / 0.8.7.5
WP Fastest Cache – WordPress Cache Plugin v0.8.7.5
1.4.9 1.4.8 trunk 0.8.6.6 0.8.6.7 0.8.6.8 0.8.6.9 0.8.7.0 0.8.7.1 0.8.7.2 0.8.7.3 0.8.7.4 0.8.7.5 0.8.7.6 0.8.7.7 0.8.7.8 0.8.7.9 0.8.8.0 0.8.8.1 0.8.8.2 0.8.8.3 0.8.8.4 0.8.8.5 0.8.8.6 0.8.8.7 0.8.8.8 0.8.8.9 0.8.9.0 0.8.9.1 0.8.9.2 0.8.9.3 0.8.9.4 0.8.9.5 0.8.9.6 0.8.9.7 0.8.9.8 0.8.9.9 0.9.0.0 0.9.0.1 0.9.0.2 0.9.0.3 0.9.0.4 0.9.0.5 0.9.0.6 0.9.0.7 0.9.0.8 0.9.0.9 0.9.1.0 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 0.9.1.5 0.9.1.6 0.9.1.7 0.9.1.8 0.9.1.9 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7
wp-fastest-cache / templates / exclude.php
wp-fastest-cache / templates Last commit date
cdn 8 years ago buttons.html 11 years ago download.html 10 years ago exclude.php 8 years ago htaccess.html 9 years ago lazy_load.php 9 years ago newpost.php 9 years ago nginx_gzip.php 9 years ago permission_error.html 10 years ago preload.php 8 years ago timeout.php 8 years ago update_error.html 10 years ago update_now.php 9 years ago update_success.html 10 years ago update_success.php 10 years ago updatepost.php 9 years ago
exclude.php
508 lines
1 <style type="text/css">
2 .wpfc-exclude-item:hover{
3 background-color: #E5E5E5;
4 }
5 .wpfc-exclude-item{
6 float: left;
7 width: 330.5px;
8 margin-right: 7px;
9 -moz-border-radius:5px 5px 5px 5px;
10 -webkit-border-radius:5px 5px 5px 5px;
11 border-radius:5px 5px 5px 5px;
12 border:1px solid transparent;
13 cursor:pointer;
14 padding:9px;
15 outline:none !important;
16 list-style: outside none none;
17 }
18 .star{
19 float:left;
20 height:28px;
21 width:32px;
22 display: none;
23 }
24 .star img{
25 margin:9px 4px 4px;
26 }
27
28 .wpfc-exclude-item-form-title{
29 max-width:380px;
30 font-weight:bold;
31 white-space:nowrap;
32 max-width:615px;
33 margin-bottom:3px;
34 text-overflow:ellipsis;
35 -o-text-overflow:ellipsis;
36 -moz-text-overflow:ellipsis;
37 -webkit-text-overflow:ellipsis;
38 line-height:1em;
39 font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
40 }
41 .wpfc-exclude-item-details{
42 font-size:11px;
43 color:#888;
44 display:block;
45 white-space:nowrap;
46 font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
47 line-height:1.5em;
48 }
49 .wpfc-exclude-item-details b {
50 display:inline;
51 margin-left: 1px;
52
53 }
54 .wpfc-exclude-item-right{
55 margin-right: 0;
56 }
57 </style>
58 <div id="wpfc-modal-exclude" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
59 <div style="height: 100%; width: 100%; background: none repeat scroll 0% 0% rgb(0, 0, 0); position: absolute; top: 0px; left: 0px; z-index: -1; opacity: 0.5; border-radius: 8px;">
60 </div>
61 <div style="z-index: 600; border-radius: 3px;">
62 <div style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background: none repeat scroll 0px 0px rgb(255, 161, 0); z-index: 1000; position: relative; padding: 2px; border-bottom: 1px solid rgb(194, 122, 0); height: 35px; border-radius: 3px 3px 0px 0px;">
63 <table width="100%" height="100%">
64 <tbody>
65 <tr>
66 <td valign="middle" style="vertical-align: middle; font-weight: bold; color: rgb(255, 255, 255); text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5); padding-left: 10px; font-size: 13px; cursor: move;">Exclude Page Wizard</td>
67 <td width="20" align="center" style="vertical-align: middle;"></td>
68 <td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
69 <div title="Close Window" class="close-wiz"></div>
70 </td>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75 <div class="window-content-wrapper" style="padding: 8px;">
76 <div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
77
78
79 <div id="wpfc-wizard-exclude" class="wpfc-cdn-pages-container">
80 <div wpfc-cdn-page="1" class="wiz-cont" style="padding:0 0;min-height:37px;">
81
82 <table width="100%" cellspacing="0" cellpadding="0" border="0" height="100%" style="background-color:#FFFFFF;border:1px solid #ccc !important;border-radius:10px;">
83 <tbody>
84 <tr>
85 <td valign="top" id="cond-list">
86 <table width="100%" cellspacing="0" cellpadding="5" border="0" class="cond-line active-line">
87 <tbody>
88 <tr>
89 <td width="100" height="35" class="wpfc-condition-text" style="padding-left:10px;font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;font-size: 12px;">If REQUEST_URI</td>
90 <td class="" width="95">
91 <select name="wpfc-exclude-rule-prefix">
92 <option selected="" value=""></option>
93 <option value="homepage">Home Page</option>
94 <option value="category">Categories</option>
95 <option value="tag">Tags</option>
96 <option value="post">Posts</option>
97 <option value="page">Pages</option>
98 <option value="attachment">Attachments</option>
99 <option value="startwith">Starts With</option>
100 <option value="contain">Contains</option>
101 <option value="exact">Is Equal To</option>
102 </select>
103 </td>
104 <td width="300">
105 <div class="wpfc-exclude-rule-line-middle">
106 <input type="text" name="wpfc-exclude-rule-content" style="width:300px;">
107 <input type="hidden" name="wpfc-exclude-rule-type" style="width:300px;">
108 </div>
109 </td>
110 </tr>
111 </tbody>
112 </table>
113 </td>
114 </tr>
115 </tbody>
116 </table>
117 </div>
118 </div>
119 </div>
120 </div>
121 <div class="window-buttons-wrapper" style="padding: 0px; display: inline-block; width: 100%; border-top: 1px solid rgb(255, 255, 255); background: none repeat scroll 0px 0px rgb(222, 222, 222); z-index: 999; position: relative; text-align: right; border-radius: 0px 0px 3px 3px;">
122 <div style="padding: 12px; height: 23px;">
123 <button class="wpfc-dialog-buttons buttons-blood" type="button" action="remove">
124 <span>Remove Rule</span>
125 </button>
126 <button class="wpfc-dialog-buttons" type="button" action="back">
127 <span>Back</span>
128 </button>
129 <button class="wpfc-dialog-buttons" type="button" action="next">
130 <span>Next</span>
131 </button>
132 <button class="wpfc-dialog-buttons" type="button" action="close">
133 <span>Close</span>
134 </button>
135 <button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
136 <span>Save</span>
137 </button>
138 </div>
139 </div>
140 </div>
141 </div>
142 <script type="text/javascript">
143 var WpFcExcludePages = {
144 rules: [],
145 init: function(rules){
146 this.rules = rules;
147 this.insert_existing_rules();
148 this.click_event_for_add_button();
149 this.reorder();
150 },
151 remove_rule: function(clone_modal_id, number){
152 jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").remove();
153 jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").remove();
154 Wpfc_Dialog.remove(clone_modal_id, number);
155
156 this.save(function(){});
157 },
158 add_item: function(number, e){
159 var self = this;
160 var item = jQuery(".wpfc-exclude-item").first().clone();
161
162 if(jQuery(".wpfc-exclude-item").length%2 == 0){
163 console.log(item, jQuery(".wpfc-exclude-item").length)
164 item.addClass("wpfc-exclude-item-right");
165 }
166
167
168 item.attr("wpfc-exclude-item-number", number);
169 item.attr("prefix", e.prefix);
170 item.attr("content", e.content);
171 item.attr("type", e.type);
172
173 item.find(".wpfc-exclude-item-url").html(self.create_url_description(e.prefix, e.content, e.type));
174
175 item.find(".wpfc-exclude-item-form-title").html(self.create_title(e.prefix, e.content));
176
177 item.click(function(){
178 var clone_modal = jQuery("#wpfc-modal-exclude").clone();
179 var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
180
181 clone_modal.find("select").change(function(e){
182 if(jQuery(this).val().match(/^(homepage|category|tag|post|page|attachment)$/)){
183 clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
184 clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
185 }else{
186 clone_modal.find("input[name='wpfc-exclude-rule-content']").show();
187 clone_modal.find("input[name='wpfc-exclude-rule-content']").val("");
188 }
189 });
190
191 if(e.prefix.match(/^(homepage|category|tag|post|page|attachment)$/)){
192 clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
193 }
194
195 clone_modal.attr("id", clone_modal_id);
196 clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val(jQuery(this).attr("prefix"));
197 clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).attr("content"));
198 clone_modal.find("input[name='wpfc-exclude-rule-type']").val(jQuery(this).attr("type"));
199
200 if(e.type != "page"){
201 if(e.type == "useragent"){
202 clone_modal.find(".wpfc-condition-text").text("If User-Agent");
203 }else if(e.type == "css"){
204 clone_modal.find(".wpfc-condition-text").text("If CSS Url");
205 }else if(e.type == "js"){
206 clone_modal.find(".wpfc-condition-text").text("If JS Url");
207 }else if(e.type == "cookie"){
208 clone_modal.find(".wpfc-condition-text").text("If Cookie");
209 }
210
211 clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
212 if(this.value != "contain"){
213 jQuery(this).remove();
214 }
215 });
216 }
217
218
219
220 jQuery("#wpfc-modal-exclude").after(clone_modal);
221
222 if(typeof e.editable == "undefined"){
223 Wpfc_Dialog.dialog(clone_modal_id, {"close" :
224 function(){
225 },
226 "remove" :
227 function(){
228 self.remove_rule(clone_modal_id, number);
229 },
230 "finish" :
231 function(){
232 var prefix = clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val();
233 var content = clone_modal.find("input[name='wpfc-exclude-rule-content']").val();
234 var type = clone_modal.find("input[name='wpfc-exclude-rule-type']").val();
235
236 jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").find("select[name='wpfc-exclude-rule-prefix-" + number + "']").val(prefix);
237 jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").find("input[name='wpfc-exclude-rule-content-" + number + "']").val(content);
238
239 if(self.is_empty_values(prefix, content)){
240 Wpfc_Dialog.remove(clone_modal_id);
241
242 self.save(function(){
243 jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").attr("prefix", prefix);
244 jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").attr("content", content);
245
246 jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").find(".wpfc-exclude-item-url").html(self.create_url_description(prefix, content, type));
247
248 jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").find(".wpfc-exclude-item-form-title").html(self.create_title(prefix, content));
249 });
250 }
251 }
252 });
253 }else if(e.editable == false){
254 Wpfc_Dialog.dialog(clone_modal_id, {"close" : function(){}});
255 }
256 });
257
258 item.show();
259
260 jQuery(".wpfc-exclude-" + e.type + "-list").append(item);
261
262 this.reorder();
263 },
264 create_title: function(prefix, content){
265 var title = "";
266
267 if(prefix == "exact"){
268 title = "Is Equal To: " + content;
269 }else if(prefix == "startwith"){
270 title = "Start With: " + content;
271 }else if(prefix == "contain"){
272 title = "Contains: " + content;
273 }else if(prefix == "homepage"){
274 title = "Home Page";
275 }else if(prefix == "tag"){
276 title = "Tags";
277 }else if(prefix == "category"){
278 title = "Categories";
279 }else if(prefix == "post"){
280 title = "Posts";
281 }else if(prefix == "page"){
282 title = "Pages";
283 }else if(prefix == "attachment"){
284 title = "Attachments";
285 }
286
287 return title;
288 },
289 create_url_description: function(prefix, content, type){
290 var request_uri = content;
291 var b_start = "<b style='font-size:11px;color:#FFA100;'>";
292 var b_end = "</b>"
293
294 if(prefix == "exact"){
295 request_uri = b_start + content + b_end;
296 }else if(prefix == "startwith"){
297 request_uri = b_start + content + b_end + '(.*)';
298 }else if(prefix == "contain"){
299 request_uri = '(.*)' + b_start + content + b_end + '(.*)';
300 }else if(prefix == "homepage"){
301 request_uri = "";
302 }
303
304 if(type == "page" || type == "css" || type == "js"){
305 if(prefix.match(/^(homepage|category|tag|post|page|attachment)$/)){
306 if(prefix == "homepage"){
307 return "The " + b_start + "homepage" + b_end + " has been excluded";
308 }else{
309 return "All" + " " + b_start + this.create_title(prefix).toLowerCase() + b_end + " " + "have been excluded";
310 }
311 }else{
312 return "<?php echo home_url();?>" + "/" + request_uri;
313 }
314 }else if(type == "useragent"){
315 return "User-Agent: " + request_uri;
316 }else if(type == "cookie"){
317 return "Cookie: " + request_uri;
318 }
319
320 },
321 add_line: function(number, e){
322 var line = jQuery(".wpfc-exclude-rule-line").first().closest(".wpfc-exclude-rule-line").clone();
323
324 line.attr("wpfc-exclude-rule-number", number);
325
326 line.find(".wpfc-exclude-rule-line-add").remove();
327 line.find(".wpfc-exclude-rule-line-delete").show();
328 line.find("select[name^='wpfc-exclude-rule-prefix']").attr("name", "wpfc-exclude-rule-prefix-" + number).val(e.prefix);
329 line.find("input[name^='wpfc-exclude-rule-content']").attr("name", "wpfc-exclude-rule-content-" + number).val(e.content);
330 line.find("input[name^='wpfc-exclude-rule-type']").attr("name", "wpfc-exclude-rule-type-" + number).val(e.type);
331
332 jQuery(".wpfc-exclude-rule-container").append(line);
333 },
334 click_event_for_add_button: function(){
335 var self = this;
336
337 jQuery(".wpfc-add-new-exclude-button").click(function(e){
338 var clone_modal = jQuery("#wpfc-modal-exclude").clone();
339 //var number = jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number]").length;
340 var number = new Date().getTime();
341 var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
342 var clone_modal_type = jQuery(e.currentTarget).attr("data-type");
343
344 clone_modal.attr("id", clone_modal_id);
345 clone_modal.find("input[name='wpfc-exclude-rule-type']").val(clone_modal_type);
346
347 if(clone_modal_type != "page"){
348 clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
349 if(this.value != "contain"){
350 jQuery(this).remove();
351 }
352 });
353
354 if(clone_modal_type == "useragent"){
355 clone_modal.find(".wpfc-condition-text").text("If User-Agent");
356 }else if(clone_modal_type == "css"){
357 clone_modal.find(".wpfc-condition-text").text("If CSS Url");
358 }else if(clone_modal_type == "js"){
359 clone_modal.find(".wpfc-condition-text").text("If JS Url");
360 }else if(clone_modal_type == "cookie"){
361 clone_modal.find(".wpfc-condition-text").text("If Cookie");
362 }
363 }
364
365
366
367
368 clone_modal.find("select").change(function(){
369 if(jQuery(this).val().match(/^(homepage|category|tag|post|page|attachment)$/)){
370 clone_modal.find("input[name='wpfc-exclude-rule-content']").hide();
371 clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
372 }else{
373 clone_modal.find("input[name='wpfc-exclude-rule-content']").show();
374 clone_modal.find("input[name='wpfc-exclude-rule-content']").val("");
375 }
376 });
377
378 jQuery("#wpfc-modal-exclude").after(clone_modal);
379
380 Wpfc_Dialog.dialog(clone_modal_id, {"finish" :
381 function(){
382 var prefix = clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val();
383 var content = clone_modal.find("input[name='wpfc-exclude-rule-content']").val();
384 var type = clone_modal.find("input[name='wpfc-exclude-rule-type']").val();
385
386 content = self.remove_host_name(content);
387
388 content = content.replace(/^\/|\/$/g, '');
389
390 if(self.is_empty_values(prefix, content)){
391 self.add_line(number + 1, {"prefix" : prefix, "content" : content, "type" : type});
392
393 Wpfc_Dialog.remove(clone_modal_id);
394
395 self.save(function(){
396 self.add_item(number + 1, {"prefix" : prefix, "content" : content, "type" : type});
397 });
398 }
399 },
400 "close" :
401 function(){
402 }
403 });
404 });
405 },
406 save: function(callback){
407 var self = this, rule_number, prefix, content, rule, rules = [];
408
409 jQuery("form div.wpfc-exclude-rule-line").each(function(i, e){
410 rule_number = jQuery(e).attr("wpfc-exclude-rule-number");
411 prefix = jQuery(e).find("select[name^='wpfc-exclude-rule-prefix']").val();
412 type = jQuery(e).find("input[name^='wpfc-exclude-rule-type']").val();
413 content = jQuery(e).find("input[name^='wpfc-exclude-rule-content']").val();
414
415 content = self.remove_host_name(content);
416
417 rules.push({"prefix" : prefix, "content" : content, "type" : type});
418 });
419
420 jQuery("#revert-loader-toolbar").show();
421
422 jQuery.ajax({
423 type: 'POST',
424 dataType: "json",
425 url: ajaxurl,
426 data : {"action": "wpfc_save_exclude_pages", "rules" : rules, security: '<?php echo wp_create_nonce( "wpfc-save-exclude-ajax-nonce" ); ?>'},
427 success: function(res){
428 if(res.success){
429 jQuery("#revert-loader-toolbar").hide();
430 callback();
431 self.reorder();
432 }else{
433 alert("The rule cannot be added...");
434 }
435 },
436 error: function(e) {
437 alert("unknown error");
438 }
439 });
440 },
441 insert_existing_rules: function(){
442 var self = this;
443
444 self.add_item(new Date().getTime(), {"type" : "page", "prefix" : "exact", "content" : "wp-login.php", "editable" : false});
445 //self.add_item(new Date().getTime(), {"prefix" : "startwith", "content" : "wp-content", "editable" : false});
446 self.add_item(new Date().getTime(), {"type" : "page", "prefix" : "startwith", "content" : "wp-admin", "editable" : false});
447 self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "facebookexternalhit", "editable" : false});
448 self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "WhatsApp", "editable" : false});
449
450
451 if(typeof this.rules != "undefined" && this.rules && this.rules.length > 0){
452 jQuery.each(self.rules, function(i, e){
453 if(i > 0){
454 }
455 e.type = e.type ? e.type : "page";
456
457 self.add_line(i + 1, e);
458 self.add_item(i + 1, e);
459 });
460 }
461 },
462 is_empty_values: function(prefix, content){
463 if(prefix){
464 jQuery("#wpfc-wizard-exclude select[name='wpfc-exclude-rule-prefix']").css({'border-color': '#ddd'});
465 }else{
466 jQuery("#wpfc-wizard-exclude select[name='wpfc-exclude-rule-prefix']").css({'border-color': 'red'});
467 }
468
469 if(content){
470 jQuery("#wpfc-wizard-exclude input[name='wpfc-exclude-rule-content']").css({'border-color': '#ddd'});
471 }else{
472 jQuery("#wpfc-wizard-exclude input[name='wpfc-exclude-rule-content']").css({'border-color': 'red'});
473 }
474
475 if(prefix && content){
476 return true;
477 }
478
479 return false;
480 },
481 remove_host_name: function(content){
482 //to replace the urls which start with http:// or www. or with Host_Name
483 content = content.replace(new RegExp('.*' + location.hostname.replace(/www\./, "") + "\/", "gi"), "");
484 content = content.replace(/\/$/, "");
485
486 return content;
487 },
488 reorder: function(type){
489 jQuery("div.tab6 div[class^='wpfc-exclude'][class$='-list']").each(function(i,e){
490 var type = jQuery(e).attr("class").match(/wpfc-exclude-([^-]+)-list/);
491
492 if(typeof type[1] != "undefined"){
493 jQuery("div.wpfc-exclude-" + type[1] + "-list div.wpfc-exclude-item").each(function(i, e){
494 jQuery(e).removeClass("wpfc-exclude-item-right");
495
496 if(i%2 != 0){
497 jQuery(e).addClass("wpfc-exclude-item-right");
498 }
499 });
500 }
501 });
502 }
503 };
504 </script>
505
506
507
508