fix
This commit is contained in:
27
wp-content/plugins/wp-fastest-cache/templates/buttons.html
Normal file
27
wp-content/plugins/wp-fastest-cache/templates/buttons.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;">
|
||||
<button class="wpfc-dialog-buttons buttons-blood" type="button" action="remove">
|
||||
<span>Remove</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-orange" type="button" action="pause">
|
||||
<span>Pause</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-start" type="button" action="start">
|
||||
<span>Start</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="back">
|
||||
<img align="left" class="icon-left" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYFJREFUeNrEkzFLw0AUx1/SpE02C0UXF6EgLXQxxc3BSUWsm1N1qVBwkIyOrgoFwY+gW0E36SQ4OIhmMIN+ACelWi1terlcLr5rTTE2oNDBB/+85HL/X+7du0hBEMA4IcOYMTZACW9y+7eQ1DRI6Xo/K8lkGYcXsMSqeP/RbA5NAedwv1eIAr4HmsqMUjN8Jo7z9xKE2XNdc2tt2qCEgNPpAPO830sIzWgydzYLRqvFwO31xPBdzEcsTNUIgHO+jAZztzJv2HYbdD0BpcWsIbrMeQAiCymKBPULe3QFpNsdZOIDYz44LgfH49B1CBCXAvVYH5RKqcO50RX4fsOjNHN41DBLlSXDevXg6ezSiqtbkiRrBNC+OQF5MncK6SzUj8/Nme0Nw8XdV1S1KMnRvWbPD3hdHcDCo4zUAXEqD4n8elnOzPbbSK8Oiv7LY1yrYwE6Ki2UMCoroE3M+de1WuhBdVBvqHf0sTiAitK+QD8PmZhIUaK3BH08Avi3n+lTgAEAiza4dOMU/9wAAAAASUVORK5CYII="/>
|
||||
<span>Back</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="next">
|
||||
<span>Next</span>
|
||||
<img align="absmiddle" class="icon-right" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYdJREFUeNrEUz9IAmEUf6dlpqAQUksNDQ1NQR/NEdSSU1uEW0OrW2tjo0OLQbQcBNFik1C0tGpgglI0SpCcmXZ/v7vvu953nZWnQeDQgx/vce+93/vzvZNc14VRJAQjysgEYz1j6bAKUuibL5lKeVqSpDyqW4dSmZomWIYBQtcPVvoJgqJ1OhCNxYRJBPxdyX8ewbFt0FXVq5ZJzxLbsrJIkvl1BHTmgXPy08k4B4ZErZYNO+l5cnpRywY7+SLA2cju9jJRVQdEjAgUmnMXFMWERoPB1voCObusZDFcQRT7CExNA8viQCn3kqnDQbds0AwT2l0d3jULujThxQ0dATsoHx1fDd1HcnONxGckuC7clPFVcuORSHHYDvY4Y32JLu4Al1nqRuPQlM+9ZGg/yUazjt6Nz2funTI6ByqHpxchsrpfEjZXHnKsVpCdl1qv4MAdhBEJxJSvQwwr0efqI5hvd6x8co/f5hCvCF1wBDsQNzGBmPR1sCUxn4kwELbrJ0r//jd+CDAARWTMh3/g7aIAAAAASUVORK5CYII="/>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="close">
|
||||
<span>Close</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span>Finish</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
151
wp-content/plugins/wp-fastest-cache/templates/cache_path.php
Normal file
151
wp-content/plugins/wp-fastest-cache/templates/cache_path.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<div template-id="wpfc-modal-cachepath" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 9995;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;">Cache Path Customization</td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<?php
|
||||
$wpfc_cache_path = get_option("WpFastestCachePathSettings");
|
||||
|
||||
if(!is_array($wpfc_cache_path)){
|
||||
$wpfc_cache_path = array(
|
||||
"cachepath" => "cache",
|
||||
"optimizedpath" => "wpfc-minified"
|
||||
);
|
||||
}
|
||||
?>
|
||||
<div wpfc-cdn-page="1" class="wiz-cont">
|
||||
<h1>Cache Folder</h1>
|
||||
<p>Hi!, You can specify a custom location for the <strong>cache path</strong> via this part. Please choose a folder and continue...</p>
|
||||
<div class="wiz-input-cont" style="text-align:center;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;">
|
||||
<select disabled style="width:30%;" name="wpcontentpath">
|
||||
<option value="wp-content">wp-content</option>
|
||||
</select>
|
||||
<select style="width:65%;" name="cachepath">
|
||||
<?php
|
||||
echo '<option value="cache">cache</option>';
|
||||
|
||||
foreach(glob($this->getWpContentDir()."/*", GLOB_ONLYDIR) as $f_key => $f_value){
|
||||
if(basename($f_value) == "cache"){
|
||||
continue;
|
||||
}
|
||||
|
||||
if($wpfc_cache_path["cachepath"] == basename($f_value)){
|
||||
echo '<option selected="" value="'.basename($f_value).'">'.basename($f_value).'</option>';
|
||||
}else{
|
||||
echo '<option value="'.basename($f_value).'">'.basename($f_value).'</option>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://www.maxcdn.com/one/tutorial/implementing-cdn-on-wordpress-with-wp-fastest-cache/">Note: Please read How to Integrate StackPath into WP Fastest Cache</a></p>
|
||||
</div>
|
||||
|
||||
<div wpfc-cdn-page="2" class="wiz-cont" style="display:none">
|
||||
<h1>Optimized Sources Folder</h1>
|
||||
<p>You can specify a custom location path for the <strong>optimized JS/CSS sources</strong> via this part.</p>
|
||||
<div class="wiz-input-cont" style="text-align:center;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;">
|
||||
<select disabled name="disabled-cachepath" style="width:65%;"></select>
|
||||
<input type="text" name="optimizedpath" style="width: 30%;" value="<?php echo $wpfc_cache_path["optimizedpath"]; ?>">
|
||||
</label>
|
||||
</div>
|
||||
<p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://www.maxcdn.com/one/tutorial/implementing-cdn-on-wordpress-with-wp-fastest-cache/">Note: Please read How to Integrate StackPath into WP Fastest Cache</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var WPFC_CACHE_PATH = {
|
||||
ajax_url: false,
|
||||
init: function(){
|
||||
jQuery("form.delete-line div.questionCon.right").click(function(){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-cachepath", {
|
||||
close: function(){
|
||||
|
||||
},
|
||||
next: "default",
|
||||
back: "default",
|
||||
finish: function(){
|
||||
let wpfc_dialog = jQuery("#" + Wpfc_New_Dialog.id);
|
||||
let cachepath = wpfc_dialog.find("select[name='cachepath']").val();
|
||||
let optimizedpath = wpfc_dialog.find("input[name='optimizedpath']").val();
|
||||
|
||||
Wpfc_New_Dialog.disable_button("finish");
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {"action" : "wpfc_cache_path_save_settings", "cachepath" : cachepath, "optimizedpath" : optimizedpath},
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
success: function(data){
|
||||
jQuery("div[template-id='wpfc-modal-cachepath']").find("select[name='cachepath'] option[value='" + cachepath + "']").attr("selected", true);
|
||||
jQuery("div[template-id='wpfc-modal-cachepath']").find("input[name='optimizedpath']").val(optimizedpath);
|
||||
|
||||
Wpfc_New_Dialog.enable_button("finish");
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
},
|
||||
error: function(error){
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
|
||||
console.log(cachepath, optimizedpath, wpcontent);
|
||||
|
||||
}
|
||||
}, function(dialog){
|
||||
var wpfc_dialog = jQuery("#" + Wpfc_New_Dialog.id);
|
||||
var wpcontent = wpfc_dialog.find("select[name='wpcontentpath']").val();
|
||||
|
||||
wpfc_dialog.find("select[name='disabled-cachepath']").append("<option>" + (wpfc_dialog.find("select[name='cachepath']").val() == "cache" ? wpcontent + "/cache" : wpcontent + "/" + wpfc_dialog.find("select[name='cachepath']").val() + "/cache") + "</option>");
|
||||
|
||||
wpfc_dialog.find("select[name='cachepath']").change(function(e){
|
||||
wpfc_dialog.find("select[name='disabled-cachepath']").find("option").remove();
|
||||
wpfc_dialog.find("select[name='disabled-cachepath']").append("<option>" + (this.value == "cache" ? wpcontent + "/cache" : wpcontent + "/" + this.value + "/cache") + "</option>");
|
||||
});
|
||||
|
||||
wpfc_dialog.find("input[name='optimizedpath']").keypress(function(event){
|
||||
var keyChar = String.fromCharCode(event.which || event.keyCode);
|
||||
|
||||
if(!keyChar.match(/[A-Za-z0-9]/)){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Wpfc_New_Dialog.show_page(1);
|
||||
Wpfc_New_Dialog.show_button("next");
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('load', function(){
|
||||
jQuery(document).ready(function(){
|
||||
WPFC_CACHE_PATH.init();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
<h1>Exclude Sources</h1>
|
||||
<p>If you want some of the sources NOT to be served via CDN, you can specify the sources. If a source url contains any keyword below, it is NOT served via CDN.</p>
|
||||
<div class="wiz-input-cont" style="padding:8px 18px;border-radius:0;text-align:center; background: #fff none repeat scroll 0 0;">
|
||||
|
||||
<style type="text/css">
|
||||
.keyword-item-exclude{width:auto;float:left;line-height:22px;position:relative;background:rgba(0,0,0,0.15);margin:0 5px 5px 0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
.keyword-item-exclude a.keyword-label{
|
||||
background-color: #ffa100;
|
||||
color:#ffffff;
|
||||
text-decoration:none;
|
||||
padding:7px 15px;
|
||||
display:block;
|
||||
text-shadow:none;
|
||||
-webkit-transition:all .1s linear;
|
||||
-moz-transition:all .1s linear;
|
||||
-o-transition:all .1s linear;
|
||||
transition:all .1s linear;
|
||||
cursor: pointer;
|
||||
}
|
||||
.keyword-item-exclude a.keyword-label:hover{
|
||||
padding-left: 4px;
|
||||
padding-right: 26px;
|
||||
}
|
||||
.keyword-item-exclude a.keyword-label:hover:after{
|
||||
width:16px;
|
||||
height:16px;
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAAIAAAACAAc9WmjcAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAA4klEQVQokWXOMSuFcRQH4EcZZFB3w0BZfIC7mLl3MaGu2cAtqyLJwMQiRuObidFG4hNQJrlFJBlMFgzKMfi/vPe9/ZbT+T11jvAbq2nI8k3aB1MymStPTrTcyWTmi2BDdCQrgprtjjQKIJgw15aZth+Co9KB6zLYL4GLMthqq7/slcFKoVzTa1ClHTT/wKwxt0I4N/wPGqk+NuTNqQ/PLt3oyUEtgQWbQl3NqHVhOgfVBCYdCC3dhnwKSzkYSWDXslDVNG5RqOegksCDPg/ufXv34kxXAkF/SpcBh1492tEbwg+6YscxiN7TegAAAABJRU5ErkJggg==');
|
||||
content:"";
|
||||
position:absolute;
|
||||
top:10px;
|
||||
right:4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<ul class="keyword-item-list">
|
||||
<li class="keyword-item-exclude">
|
||||
<a class="wpfc-add-new-keyword">Add Keyword</a>
|
||||
<div class="wpfc-textbox-con" style="display:none;">
|
||||
<div class="fixed-search"><input type="text" placeholder="Add Keyword"></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="wpfc-checkbox-list">
|
||||
<?php
|
||||
$types = array("aac",
|
||||
"avif",
|
||||
"css",
|
||||
"eot",
|
||||
"gif",
|
||||
"jpeg",
|
||||
"js",
|
||||
"jpg",
|
||||
"less",
|
||||
"mp3",
|
||||
"mp4",
|
||||
"ogg",
|
||||
"otf",
|
||||
"pdf",
|
||||
"png",
|
||||
"svg",
|
||||
"swf",
|
||||
"ttf",
|
||||
"webm",
|
||||
"webp",
|
||||
"woff",
|
||||
"woff2"
|
||||
);
|
||||
|
||||
foreach ($types as $key => $value) {
|
||||
?>
|
||||
<label for="file-type-<?php echo $value; ?>">
|
||||
<input id="file-type-<?php echo $value; ?>" type="checkbox" value="<?php echo $value; ?>" checked=""><span class="">*.<?php echo $value; ?></span>
|
||||
</label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
80
wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php
Normal file
80
wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<div id="wpfc-modal-maxcdn" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;">BunnyCDN Settings</td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div id="wpfc-wizard-maxcdn" class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont">
|
||||
<h1>Let's Get Started</h1>
|
||||
<p>Hi! If you don't have a <strong>BunnyCDN</strong> account, you can create one. If you already have, please continue...</p>
|
||||
<div class="wiz-input-cont" style="text-align:center;">
|
||||
<a href="https://bunny.net?ref=2wbch39a6k" target="_blank">
|
||||
<button class="wpfc-green-button">Create a BunnyCDN Account</button>
|
||||
</a>
|
||||
</div>
|
||||
<!--
|
||||
<p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://support.stackpath.com/hc/en-us/articles/360001058243-WordPress-with-WP-Fastest-Cache-StackPath-CDN-Setup-Guide">Note: Please read How to Integrate StackPath into WP Fastest Cache</a></p>
|
||||
-->
|
||||
</div>
|
||||
<div wpfc-cdn-page="2" class="wiz-cont" style="display:none">
|
||||
<h1>Enter CDN Url</h1>
|
||||
<p>Please enter your <strong>CDN Url</strong> below to deliver your contents via BunnyCDN.</p>
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" for="cdn-url" style="padding-right: 12px;">CDN Url:</label><input type="text" name="" value="" class="api-key" id="cdn-url">
|
||||
<div id="cdn-url-loading"></div>
|
||||
<label class="wiz-error-msg"></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" for="origin-url">Origin Url:</label><input type="text" name="" value="" class="api-key" id="origin-url">
|
||||
</div>
|
||||
</div>
|
||||
<div wpfc-cdn-page="3" class="wiz-cont" style="display:none">
|
||||
<h1>File Types</h1>
|
||||
<p>Specify the file types within the to host with the CDN.</p>
|
||||
|
||||
<?php include WPFC_MAIN_PATH."templates/cdn/file_types.php"; ?>
|
||||
</div>
|
||||
<div wpfc-cdn-page="4" class="wiz-cont" style="display:none">
|
||||
<?php include WPFC_MAIN_PATH."templates/cdn/specify_sources.php"; ?>
|
||||
</div>
|
||||
|
||||
<div wpfc-cdn-page="5" class="wiz-cont" style="display:none">
|
||||
<?php include WPFC_MAIN_PATH."templates/cdn/exclude_sources.php"; ?>
|
||||
</div>
|
||||
|
||||
<div wpfc-cdn-page="6" class="wiz-cont" style="display:none">
|
||||
<h1>Ready to Go!</h1>
|
||||
<p>You're all set! Click the finish button below and that's it.</p>
|
||||
</div>
|
||||
<div wpfc-cdn-page="7" class="wiz-cont" style="display:none">
|
||||
<h1>Integration Ready!</h1>
|
||||
<p>Your static contents will be delivered via MaxCDN.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<img style="border-radius:100%;" class="wiz-bg-img" src="<?php echo plugins_url("wp-fastest-cache/images/bunny-cdn-icon-256x256.png"); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
77
wp-content/plugins/wp-fastest-cache/templates/cdn/other.php
Normal file
77
wp-content/plugins/wp-fastest-cache/templates/cdn/other.php
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,64 @@
|
||||
<h1>Specify Sources</h1>
|
||||
<p>If you want some of the sources instead of all the sources to be served via CDN, you can specify the sources. If a source url contains any keyword below, it is served via CDN.</p>
|
||||
<div class="wiz-input-cont" style="padding:8px 18px;border-radius:0;text-align:center; background: #fff none repeat scroll 0 0;">
|
||||
|
||||
<style type="text/css">
|
||||
.wiz-input-cont{
|
||||
box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.15) !important;
|
||||
|
||||
}
|
||||
|
||||
.wpfc-textbox-con{position:absolute;left:0;top:0;-webkit-border-radius:3px;-moz-border-radius:3px;background:#fff;-webkit-box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);float:left;z-index:444;width:150px;border:1px solid #adadad;}
|
||||
.keyword-item-list:after{box-shodow:0 2px 6px 0 rgba(0, 0, 0, 0.15);content:'';clear:both;height:0;visibility:hidden;display:block}
|
||||
.fixed-search input{width:100%;padding:6px 9px;line-height:20px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-bottom:1px solid #ccc;-webkit-box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);-moz-box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;font-weight:bold}.fixed-search input:focus{outline:0}
|
||||
.keyword-item{width:auto;float:left;line-height:22px;position:relative;background:rgba(0,0,0,0.15);margin:0 5px 5px 0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
.wpfc-add-new-keyword, .keyword-item a.keyword-label{
|
||||
background-color: #ffa100;
|
||||
color:#ffffff;
|
||||
text-decoration:none;
|
||||
padding:7px 15px;
|
||||
display:block;
|
||||
text-shadow:none;
|
||||
-webkit-transition:all .1s linear;
|
||||
-moz-transition:all .1s linear;
|
||||
-o-transition:all .1s linear;
|
||||
transition:all .1s linear;
|
||||
cursor: pointer;
|
||||
}
|
||||
.keyword-item a.keyword-label:hover{
|
||||
padding-left: 4px;
|
||||
padding-right: 26px;
|
||||
}
|
||||
.keyword-item a.keyword-label:hover:after{
|
||||
width:16px;
|
||||
height:16px;
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAAIAAAACAAc9WmjcAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAA4klEQVQokWXOMSuFcRQH4EcZZFB3w0BZfIC7mLl3MaGu2cAtqyLJwMQiRuObidFG4hNQJrlFJBlMFgzKMfi/vPe9/ZbT+T11jvAbq2nI8k3aB1MymStPTrTcyWTmi2BDdCQrgprtjjQKIJgw15aZth+Co9KB6zLYL4GLMthqq7/slcFKoVzTa1ClHTT/wKwxt0I4N/wPGqk+NuTNqQ/PLt3oyUEtgQWbQl3NqHVhOgfVBCYdCC3dhnwKSzkYSWDXslDVNG5RqOegksCDPg/ufXv34kxXAkF/SpcBh1492tEbwg+6YscxiN7TegAAAABJRU5ErkJggg==');
|
||||
content:"";
|
||||
position:absolute;
|
||||
top:10px;
|
||||
right:4px;
|
||||
}
|
||||
|
||||
.wpfc-add-new-keyword{
|
||||
cursor:pointer;
|
||||
text-decoration:none;
|
||||
background-color:#fff !important;
|
||||
color:#ccc !important;
|
||||
padding:5px 12px !important;
|
||||
border:2px dashed #ccc;
|
||||
line-height:21px;
|
||||
}
|
||||
.wpfc-add-new-keyword:before{display:inline-block;content:"+";margin:-1px 4px 0 -6px;}
|
||||
.wpfc-add-new-keyword:hover{color:#589b43 !important;border-color:#589b43;}
|
||||
|
||||
</style>
|
||||
|
||||
<ul class="keyword-item-list">
|
||||
<li class="keyword-item">
|
||||
<a class="wpfc-add-new-keyword">Add Keyword</a>
|
||||
<div class="wpfc-textbox-con" style="display:none;">
|
||||
<div class="fixed-search"><input type="text" placeholder="Add Keyword"></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,293 @@
|
||||
<style type="text/css">
|
||||
.wpfc-csp-item:hover{
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
.wpfc-csp-item{
|
||||
float: left;
|
||||
width: 330.5px;
|
||||
margin-right: 7px;
|
||||
margin-left: 20px;
|
||||
-moz-border-radius:5px 5px 5px 5px;
|
||||
-webkit-border-radius:5px 5px 5px 5px;
|
||||
border-radius:5px 5px 5px 5px;
|
||||
border:1px solid transparent;
|
||||
cursor:pointer;
|
||||
padding:9px;
|
||||
outline:none !important;
|
||||
list-style: outside none none;
|
||||
}
|
||||
|
||||
.wpfc-csp-item-form-title{
|
||||
max-width:380px;
|
||||
font-weight:bold;
|
||||
white-space:nowrap;
|
||||
max-width:615px;
|
||||
margin-bottom:3px;
|
||||
text-overflow:ellipsis;
|
||||
-o-text-overflow:ellipsis;
|
||||
-moz-text-overflow:ellipsis;
|
||||
-webkit-text-overflow:ellipsis;
|
||||
line-height:1em;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
}
|
||||
.wpfc-csp-item-details{
|
||||
font-size:11px;
|
||||
color:#888;
|
||||
display:block;
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
line-height:1.5em;
|
||||
}
|
||||
.wpfc-csp-item-details b {
|
||||
display:inline;
|
||||
margin-left: 1px;
|
||||
|
||||
}
|
||||
.wpfc-csp-item-right{
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- item sample -->
|
||||
<div class="wpfc-csp-item" tabindex="1" style="position: relative;display:none;">
|
||||
<div class="app">
|
||||
<div class="wpfc-csp-item-form-title">Specific Page - <span style="color: green;">When Updating or Posting</span></div>
|
||||
<span class="wpfc-csp-item-details wpfc-csp-item-url"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- samples end -->
|
||||
|
||||
|
||||
<div template-id="wpfc-modal-csp" style="display:none; top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;">Clearing Specific Pages Settings</td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div id="wpfc-wizard-csp" class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont">
|
||||
|
||||
<h1>Enter a Url</h1>
|
||||
<p>Please enter a url which you want cleared from cache whenever a post is created or updated.</p>
|
||||
<div class="wiz-input-cont">
|
||||
<input placeholder="<?php echo get_site_url('', 'sample-page'); ?>" type="text" name="url" class="api-key" style="width: 100%;">
|
||||
<label class="wiz-error-msg"></label>
|
||||
</div>
|
||||
|
||||
<p class="wpfc-bottom-note" style="margin-bottom:-10px;"><a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-of-specific-urls-when-updating-or-posting/">Note: Please read this article to learn about this feature.</a></p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var WpFcCsp = {
|
||||
init: function(){
|
||||
this.click_event_for_add_button();
|
||||
this.show_list();
|
||||
},
|
||||
show_list: function(){
|
||||
var self = this;
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
url: ajaxurl,
|
||||
data : {"action": "wpfc_get_list_csp", security: '<?php echo wp_create_nonce( "wpfc-save-csp-ajax-nonce" ); ?>'},
|
||||
success: function(res){
|
||||
if(typeof res.success != "undefined" && res.success){
|
||||
|
||||
jQuery.each(res.data, function( index, value ) {
|
||||
self.add_item(value);
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
add_item: function(data){
|
||||
var self = this;
|
||||
var existing_item = jQuery("div.wpfc-csp-item[order='" + data.order + "']");
|
||||
|
||||
if(existing_item.length == 1){
|
||||
existing_item.find("span.wpfc-csp-item-url").text(data.url);
|
||||
}else{
|
||||
var item = jQuery(".wpfc-csp-item").first().clone();
|
||||
|
||||
item.find(".wpfc-csp-item-url").html(data.url);
|
||||
|
||||
item.attr("url", data.url);
|
||||
item.attr("order", data.order);
|
||||
|
||||
item.click(function(){
|
||||
self.open_modal(this);
|
||||
});
|
||||
|
||||
item.show();
|
||||
|
||||
if(jQuery(".wpfc-csp-list > div").length%2){
|
||||
item.addClass("wpfc-csp-item-right");
|
||||
}
|
||||
|
||||
jQuery(".wpfc-csp-list").append(item);
|
||||
|
||||
self.reorder();
|
||||
}
|
||||
|
||||
},
|
||||
reorder: function(type){
|
||||
jQuery(".wpfc-csp-list > div").each(function(i, e){
|
||||
if(i%2 == 0){
|
||||
jQuery(e).removeClass("wpfc-csp-item-right");
|
||||
}else{
|
||||
jQuery(e).addClass("wpfc-csp-item-right");
|
||||
}
|
||||
});
|
||||
},
|
||||
open_modal: function(item){
|
||||
var self = this;
|
||||
|
||||
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-csp", {
|
||||
close: function(){
|
||||
|
||||
},
|
||||
remove: function(e){
|
||||
let modal = jQuery(e).closest("div[id^='wpfc-modal-csp']");
|
||||
let modal_id = modal.attr("id");
|
||||
let order = modal.find("input[name='order']").val();
|
||||
|
||||
Wpfc_New_Dialog.id = modal_id;
|
||||
Wpfc_New_Dialog.disable_button("remove");
|
||||
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
url: ajaxurl,
|
||||
data : {"action": "wpfc_remove_csp", "order" : order, security: '<?php echo wp_create_nonce( "wpfc-save-csp-ajax-nonce" ); ?>'},
|
||||
success: function(res){
|
||||
if(res.success === true){
|
||||
console.log(res);
|
||||
|
||||
Wpfc_New_Dialog.id = modal_id;
|
||||
Wpfc_New_Dialog.enable_button("remove");
|
||||
|
||||
jQuery(".wpfc-csp-list > .wpfc-csp-item[order='" + order + "']").remove();
|
||||
|
||||
self.reorder();
|
||||
|
||||
modal.remove();
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
finish: function(e){
|
||||
let modal = jQuery(e).closest("div[id^='wpfc-modal-csp']");
|
||||
let modal_id = modal.attr("id");
|
||||
let url = modal.find("input[name='url']").val();
|
||||
let order = modal.find("input[name='order']").val();
|
||||
let error_label = modal.find("label.wiz-error-msg");
|
||||
|
||||
if(typeof order == "undefined"){
|
||||
if(jQuery(".wpfc-csp-list > .wpfc-csp-item:last-child").length == 1){
|
||||
order = parseInt(jQuery(".wpfc-csp-list > .wpfc-csp-item:last-child").attr("order"))+1;
|
||||
}else{
|
||||
order = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(url.length == 0){
|
||||
error_label.text("Please enter a url");
|
||||
return;
|
||||
}
|
||||
|
||||
error_label.text("");
|
||||
|
||||
Wpfc_New_Dialog.id = modal_id;
|
||||
Wpfc_New_Dialog.disable_button("finish");
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
url: ajaxurl,
|
||||
data : {"action": "wpfc_save_csp", "url" : url, "order" : order, security: '<?php echo wp_create_nonce( "wpfc-save-csp-ajax-nonce" ); ?>'},
|
||||
success: function(res){
|
||||
Wpfc_New_Dialog.id = modal_id;
|
||||
Wpfc_New_Dialog.enable_button("finish");
|
||||
|
||||
if(res.success === true){
|
||||
self.add_item({"url" : url, "order" : order});
|
||||
|
||||
modal.remove();
|
||||
}else{
|
||||
error_label.text(res.data);
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}, function(dialog){
|
||||
let url = jQuery(item).attr("url");
|
||||
let order = jQuery(item).attr("order");
|
||||
|
||||
if(typeof url != "undefined" && typeof order != "undefined"){
|
||||
Wpfc_New_Dialog.show_button("remove");
|
||||
jQuery("#" + dialog.id).find("input[name='url']").val(url);
|
||||
|
||||
jQuery("<input type='hidden' name='order' value='" + order + "' > ").insertAfter(jQuery("#" + dialog.id).find("input[name='url']"));
|
||||
}
|
||||
|
||||
Wpfc_New_Dialog.show_button("finish");
|
||||
|
||||
});
|
||||
},
|
||||
click_event_for_add_button: function(){
|
||||
let self = this;
|
||||
|
||||
jQuery(".wpfc-add-new-csp-button").click(function(){
|
||||
self.open_modal();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
WpFcCsp.init();
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<div template-id="wpfc-modal-cloudflarewarning" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 360px; z-index: 10001;display:none;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Enable Cloudflare Integration", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div class="wiz-cont" style="">
|
||||
<h1><?php _e("Cloudflare Integration", "wp-fastest-cache"); ?></h1>
|
||||
<p>You are using Cloudflare so you need to enable Cloudflare Integration via <b>CDN tab.</b> Please take a look at the following tutorial.</p>
|
||||
<div class="wiz-input-cont" style="margin-top:10px !important;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;">
|
||||
<a href="https://www.wpfastestcache.com/tutorial/wp-fastest-cache-cloudflare/" target="_blank">https://www.wpfastestcache.com/tutorial/wp-fastest-cache-cloudflare/</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span>OK</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('load', function(){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-cloudflarewarning", {close: function(){
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}});
|
||||
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,48 @@
|
||||
<style type="text/css">
|
||||
div[id^="wpfc-modal-disablewpcron"] .wiz-input-cont{
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 5px !important;
|
||||
float: left !important;
|
||||
width: 40% !important;
|
||||
}
|
||||
.wiz-input-cont label{
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div template-id="wpfc-modal-disablewpcron" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 300px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Warning", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div class="wiz-cont" style="padding: 10px !important">
|
||||
<h1>Disabled Cron</h1>
|
||||
<p>The Cron has been disabled entirely by setting <b><a href="https://codex.wordpress.org/Editing_wp-config.php#Disable_Cron_and_Cron_Timeout" target="_blank">DISABLE_WP_CRON</a></b> to true.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span>OK</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
42
wp-content/plugins/wp-fastest-cache/templates/download.html
Normal file
42
wp-content/plugins/wp-fastest-cache/templates/download.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div template-id="wpfc-modal-downloaderror" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Download", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont">
|
||||
<h1>Manually Activation</h1>
|
||||
<p>If you have already paid, you can download the premium version via following button. You need to activate the premium plugin manually. Please don't forget read the following article.</p>
|
||||
<div class="wiz-input-cont" style="text-align:center;">
|
||||
<a class="wpfc-download-now" target="_blank" href="">
|
||||
<button class="wpfc-green-button" style="padding: 6px 60px;">
|
||||
<span>Download Now!</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<p class="wpfc-bottom-note"><a target="_blank" href="http://www.wpfastestcache.com/warnings/how-to-activate-premium-version-manually/">Note: Please read How to Activate the Premium Version Manually</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
596
wp-content/plugins/wp-fastest-cache/templates/exclude.php
Normal file
596
wp-content/plugins/wp-fastest-cache/templates/exclude.php
Normal file
@@ -0,0 +1,596 @@
|
||||
<style type="text/css">
|
||||
.wpfc-exclude-item:hover{
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
.wpfc-exclude-item{
|
||||
float: left;
|
||||
width: 330.5px;
|
||||
margin-right: 7px;
|
||||
-moz-border-radius:5px 5px 5px 5px;
|
||||
-webkit-border-radius:5px 5px 5px 5px;
|
||||
border-radius:5px 5px 5px 5px;
|
||||
border:1px solid transparent;
|
||||
cursor:pointer;
|
||||
padding:9px;
|
||||
outline:none !important;
|
||||
list-style: outside none none;
|
||||
}
|
||||
.star{
|
||||
float:left;
|
||||
height:28px;
|
||||
width:32px;
|
||||
display: none;
|
||||
}
|
||||
.star img{
|
||||
margin:9px 4px 4px;
|
||||
}
|
||||
|
||||
.wpfc-exclude-item-form-title{
|
||||
max-width:380px;
|
||||
font-weight:bold;
|
||||
white-space:nowrap;
|
||||
max-width:615px;
|
||||
margin-bottom:3px;
|
||||
text-overflow:ellipsis;
|
||||
-o-text-overflow:ellipsis;
|
||||
-moz-text-overflow:ellipsis;
|
||||
-webkit-text-overflow:ellipsis;
|
||||
line-height:1em;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
}
|
||||
.wpfc-exclude-item-details{
|
||||
font-size:11px;
|
||||
color:#888;
|
||||
display:block;
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
line-height:1.5em;
|
||||
}
|
||||
.wpfc-exclude-item-details b {
|
||||
display:inline;
|
||||
margin-left: 1px;
|
||||
|
||||
}
|
||||
.wpfc-exclude-item-right{
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="wpfc-modal-exclude" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Exclude Page Wizard", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div id="wpfc-wizard-exclude" class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont" style="padding:0 0;min-height:37px;">
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" height="100%" style="background-color:#FFFFFF;border:1px solid #ccc !important;border-radius:10px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" id="cond-list">
|
||||
<table width="100%" cellspacing="0" cellpadding="5" border="0" class="cond-line active-line">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="100" height="35" class="wpfc-condition-text" style="padding-left:10px;font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;font-size: 12px;"><?php _e("If REQUEST_URI", "wp-fastest-cache"); ?></td>
|
||||
<td class="" width="95">
|
||||
<select name="wpfc-exclude-rule-prefix" style="width: 98px !important;">
|
||||
<option selected="" value=""></option>
|
||||
|
||||
<optgroup label="Content Types">
|
||||
<option value="homepage"><?php _e("Home Page", "wp-fastest-cache"); ?></option>
|
||||
<option value="category"><?php _e("Categories", "wp-fastest-cache"); ?></option>
|
||||
<option value="tag"><?php _e("Tags", "wp-fastest-cache"); ?></option>
|
||||
<option value="post"><?php _e("Posts", "wp-fastest-cache"); ?></option>
|
||||
<option value="page"><?php _e("Pages", "wp-fastest-cache"); ?></option>
|
||||
<option value="archive"><?php _e("Archives", "wp-fastest-cache"); ?></option>
|
||||
<option value="attachment"><?php _e("Attachments", "wp-fastest-cache"); ?></option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="Methods">
|
||||
<option value="startwith"><?php _e("Starts With", "wp-fastest-cache"); ?></option>
|
||||
<option value="contain"><?php _e("Contains", "wp-fastest-cache"); ?></option>
|
||||
<option value="exact"><?php _e("Is Equal To", "wp-fastest-cache"); ?></option>
|
||||
|
||||
<option value="regex">Regular Expression</option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="Special">
|
||||
<option value="googleanalytics"><?php _e("has Google Analytics Parameters", "wp-fastest-cache"); ?></option>
|
||||
<option value="yandexclickid"><?php _e("has Yandex Click ID Parameters", "wp-fastest-cache"); ?></option>
|
||||
<option value="woocommerce_items_in_cart"><?php _e("has Woocommerce Items in Cart", "wp-fastest-cache"); ?></option>
|
||||
</optgroup>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td width="300">
|
||||
<div class="wpfc-exclude-rule-line-middle">
|
||||
<input type="text" name="wpfc-exclude-rule-content" style="width:289px;">
|
||||
<input type="hidden" name="wpfc-exclude-rule-type" style="width:289px;">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;">
|
||||
<button class="wpfc-dialog-buttons buttons-blood" type="button" action="remove">
|
||||
<span>Remove Rule</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="back">
|
||||
<span>Back</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="next">
|
||||
<span>Next</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="close">
|
||||
<span>Close</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var WpFcExcludePages = {
|
||||
rules: [],
|
||||
init: function(rules){
|
||||
this.rules = rules;
|
||||
this.insert_existing_rules();
|
||||
this.click_event_for_add_button();
|
||||
this.reorder();
|
||||
},
|
||||
remove_rule: function(clone_modal_id, number){
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").remove();
|
||||
jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").remove();
|
||||
Wpfc_Dialog.remove(clone_modal_id, number);
|
||||
|
||||
this.save(function(){});
|
||||
},
|
||||
add_item: function(number, e){
|
||||
var self = this;
|
||||
var item = jQuery(".wpfc-exclude-item").first().clone();
|
||||
|
||||
if(jQuery(".wpfc-exclude-item").length%2 == 0){
|
||||
console.log(item, jQuery(".wpfc-exclude-item").length)
|
||||
item.addClass("wpfc-exclude-item-right");
|
||||
}
|
||||
|
||||
|
||||
item.attr("wpfc-exclude-item-number", number);
|
||||
item.attr("prefix", e.prefix);
|
||||
item.attr("content", e.content);
|
||||
item.attr("type", e.type);
|
||||
|
||||
item.find(".wpfc-exclude-item-url").html(self.create_url_description(e.prefix, e.content, e.type));
|
||||
item.find(".wpfc-exclude-item-url").find("b").text(self.update_text(e.content));
|
||||
|
||||
item.find(".wpfc-exclude-item-form-title").text(self.create_title(e.prefix, e.content));
|
||||
|
||||
item.click(function(){
|
||||
var clone_modal = jQuery("#wpfc-modal-exclude").clone();
|
||||
var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
|
||||
|
||||
clone_modal.find("select").change(function(e){
|
||||
if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|woocommerce_items_in_cart)$/)){
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
|
||||
|
||||
jQuery(this).closest("td").width(395);
|
||||
jQuery(this).width(395);
|
||||
}else{
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").show();
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").val("");
|
||||
|
||||
jQuery(this).closest("td").width(95);
|
||||
jQuery(this).width(95);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(e.prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|woocommerce_items_in_cart)$/)){
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();
|
||||
|
||||
clone_modal.find("select").closest("td").width(395);
|
||||
clone_modal.find("select").width(395);
|
||||
}
|
||||
|
||||
clone_modal.attr("id", clone_modal_id);
|
||||
clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val(jQuery(this).attr("prefix"));
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).attr("content"));
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-type']").val(jQuery(this).attr("type"));
|
||||
|
||||
self.modify_select(clone_modal, e.type);
|
||||
|
||||
|
||||
if(e.type != "page"){
|
||||
if(e.type == "useragent"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If User-Agent");
|
||||
}else if(e.type == "css"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If CSS Url");
|
||||
}else if(e.type == "js"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If JS Url");
|
||||
}else if(e.type == "cookie"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If Cookie");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
jQuery("#wpfc-modal-exclude").after(clone_modal);
|
||||
|
||||
if(typeof e.editable == "undefined"){
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"close" :
|
||||
function(){
|
||||
},
|
||||
"remove" :
|
||||
function(){
|
||||
self.remove_rule(clone_modal_id, number);
|
||||
},
|
||||
"finish" :
|
||||
function(){
|
||||
var prefix = clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val();
|
||||
var content = clone_modal.find("input[name='wpfc-exclude-rule-content']").val();
|
||||
var type = clone_modal.find("input[name='wpfc-exclude-rule-type']").val();
|
||||
|
||||
jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").find("select[name='wpfc-exclude-rule-prefix-" + number + "']").val(prefix);
|
||||
jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number='" + number + "']").find("input[name='wpfc-exclude-rule-content-" + number + "']").val(content);
|
||||
|
||||
if(self.is_empty_values(prefix, content)){
|
||||
Wpfc_Dialog.remove(clone_modal_id);
|
||||
|
||||
self.save(function(){
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").attr("prefix", prefix);
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").attr("content", content);
|
||||
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").find(".wpfc-exclude-item-url").html(self.create_url_description(prefix, content, type));
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").find(".wpfc-exclude-item-url").find("b").text(self.update_text(e.content));
|
||||
|
||||
jQuery("div.wpfc-exclude-item[wpfc-exclude-item-number='" + number + "']").find(".wpfc-exclude-item-form-title").text(self.create_title(prefix, content));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if(e.editable == false){
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"close" : function(){}});
|
||||
}
|
||||
});
|
||||
|
||||
item.show();
|
||||
|
||||
jQuery(".wpfc-exclude-" + e.type + "-list").append(item);
|
||||
|
||||
this.reorder();
|
||||
},
|
||||
modify_select: function(clone_modal, type){
|
||||
clone_modal.find("select[name='wpfc-exclude-rule-prefix'] option").each(function(){
|
||||
|
||||
if(this.value == "woocommerce_items_in_cart"){
|
||||
if(type == "cookie"){
|
||||
return;
|
||||
}else{
|
||||
jQuery(this).remove();
|
||||
}
|
||||
}else{
|
||||
if(type != "page"){
|
||||
if(this.value != "contain"){
|
||||
jQuery(this).remove();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
clone_modal.find("select[name='wpfc-exclude-rule-prefix'] optgroup").each(function(){
|
||||
if(jQuery(this).find("option").length == 0){
|
||||
jQuery(this).remove();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
update_text: function(text){
|
||||
|
||||
if(text == "homepage"){
|
||||
return "Home Page";
|
||||
}else if(text == "tag"){
|
||||
return "Tags";
|
||||
}else if(text == "archive"){
|
||||
return "Archives";
|
||||
}else if(text == "category"){
|
||||
return "Categories";
|
||||
}else if(text == "post"){
|
||||
return "Posts";
|
||||
}else if(text == "page"){
|
||||
return "Pages";
|
||||
}else if(text == "attachment"){
|
||||
return "Attachments";
|
||||
}else if(text == "googleanalytics"){
|
||||
return "Google Analytics Parameters";
|
||||
}else if(text == "yandexclickid"){
|
||||
return "Yandex Click ID";
|
||||
}else if(text == "woocommerce_items_in_cart"){
|
||||
return "Woocommerce Items in Cart";
|
||||
}
|
||||
|
||||
return text;
|
||||
},
|
||||
create_title: function(prefix, content){
|
||||
var title = "";
|
||||
|
||||
if(prefix == "exact"){
|
||||
title = "Is Equal To: " + content;
|
||||
}else if(prefix == "startwith"){
|
||||
title = "Start With: " + content;
|
||||
}else if(prefix == "contain"){
|
||||
title = "Contains: " + content;
|
||||
}else if(prefix == "regex"){
|
||||
title = "Regex: /" + content + "/i";
|
||||
}else{
|
||||
title = this.update_text(content);
|
||||
}
|
||||
|
||||
return title;
|
||||
},
|
||||
create_url_description: function(prefix, content, type){
|
||||
var request_uri = content;
|
||||
var b_start = "<b style='font-size:11px;color:#FFA100;'>";
|
||||
var b_end = "</b>"
|
||||
|
||||
if(prefix == "exact" || prefix == "regex"){
|
||||
request_uri = b_start + b_end;
|
||||
}else if(prefix == "startwith"){
|
||||
request_uri = b_start + b_end + '(.*)';
|
||||
}else if(prefix == "contain"){
|
||||
request_uri = '(.*)' + b_start + b_end + '(.*)';
|
||||
}else if(prefix == "homepage"){
|
||||
request_uri = "";
|
||||
}
|
||||
|
||||
if(type == "page" || type == "css" || type == "js"){
|
||||
if(prefix.match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|woocommerce_items_in_cart)$/)){
|
||||
if(prefix == "homepage"){
|
||||
return "The " + b_start + "homepage" + b_end + " has been excluded";
|
||||
}else{
|
||||
return "All" + " " + b_start + b_end + " " + "have been excluded";
|
||||
}
|
||||
}else{
|
||||
if(content == "wp-login.php" || content == "wp-admin"){
|
||||
return "<?php echo home_url(); ?>" + "/" + request_uri;
|
||||
}
|
||||
|
||||
return "<?php echo preg_replace("/(https?\:\/\/[^\/]+).*/", "$1", site_url());?>" + "/" + request_uri;
|
||||
}
|
||||
}else if(type == "useragent"){
|
||||
return "User-Agent: " + request_uri;
|
||||
}else if(type == "cookie"){
|
||||
if(content == "Admin"){
|
||||
return "Caching has been disabled for " + b_start + "Admin" + b_end + " users";
|
||||
}else{
|
||||
return "Cookie: " + request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
add_line: function(number, e){
|
||||
var line = jQuery(".wpfc-exclude-rule-line").first().closest(".wpfc-exclude-rule-line").clone();
|
||||
|
||||
line.attr("wpfc-exclude-rule-number", number);
|
||||
|
||||
line.find(".wpfc-exclude-rule-line-add").remove();
|
||||
line.find(".wpfc-exclude-rule-line-delete").show();
|
||||
line.find("select[name^='wpfc-exclude-rule-prefix']").attr("name", "wpfc-exclude-rule-prefix-" + number).val(e.prefix);
|
||||
line.find("input[name^='wpfc-exclude-rule-content']").attr("name", "wpfc-exclude-rule-content-" + number).val(e.content);
|
||||
line.find("input[name^='wpfc-exclude-rule-type']").attr("name", "wpfc-exclude-rule-type-" + number).val(e.type);
|
||||
|
||||
jQuery(".wpfc-exclude-rule-container").append(line);
|
||||
},
|
||||
click_event_for_add_button: function(){
|
||||
var self = this;
|
||||
|
||||
jQuery(".wpfc-add-new-exclude-button").click(function(e){
|
||||
var clone_modal = jQuery("#wpfc-modal-exclude").clone();
|
||||
//var number = jQuery("div.wpfc-exclude-rule-line[wpfc-exclude-rule-number]").length;
|
||||
var number = new Date().getTime();
|
||||
var clone_modal_id = "wpfc-modal-exclude-" + new Date().getTime();
|
||||
var clone_modal_type = jQuery(e.currentTarget).attr("data-type");
|
||||
|
||||
clone_modal.attr("id", clone_modal_id);
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-type']").val(clone_modal_type);
|
||||
|
||||
|
||||
self.modify_select(clone_modal, clone_modal_type);
|
||||
|
||||
|
||||
if(clone_modal_type != "page"){
|
||||
if(clone_modal_type == "useragent"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If User-Agent");
|
||||
}else if(clone_modal_type == "css"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If CSS Url");
|
||||
}else if(clone_modal_type == "js"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If JS Url");
|
||||
}else if(clone_modal_type == "cookie"){
|
||||
clone_modal.find(".wpfc-condition-text").text("If Cookie");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
clone_modal.find("select").change(function(){
|
||||
if(jQuery(this).val().match(/^(homepage|category|tag|archive|post|page|attachment|googleanalytics|yandexclickid|woocommerce_items_in_cart)$/)){
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").hide();
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").val(jQuery(this).val());
|
||||
|
||||
jQuery(this).closest("td").width(395);
|
||||
jQuery(this).width(395);
|
||||
}else{
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").closest("td").show();
|
||||
clone_modal.find("input[name='wpfc-exclude-rule-content']").val("");
|
||||
|
||||
jQuery(this).closest("td").width(95);
|
||||
jQuery(this).width(95);
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#wpfc-modal-exclude").after(clone_modal);
|
||||
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"finish" :
|
||||
function(){
|
||||
var prefix = clone_modal.find("select[name='wpfc-exclude-rule-prefix']").val();
|
||||
var content = clone_modal.find("input[name='wpfc-exclude-rule-content']").val();
|
||||
var type = clone_modal.find("input[name='wpfc-exclude-rule-type']").val();
|
||||
|
||||
content = self.remove_host_name(content);
|
||||
|
||||
//content = content.replace(/^\/|\/$/g, '');
|
||||
|
||||
if(self.is_empty_values(prefix, content)){
|
||||
self.add_line(number + 1, {"prefix" : prefix, "content" : content, "type" : type});
|
||||
|
||||
Wpfc_Dialog.remove(clone_modal_id);
|
||||
|
||||
self.save(function(){
|
||||
self.add_item(number + 1, {"prefix" : prefix, "content" : content, "type" : type});
|
||||
});
|
||||
}
|
||||
},
|
||||
"close" :
|
||||
function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
save: function(callback){
|
||||
var self = this, rule_number, prefix, content, rule, rules = [];
|
||||
|
||||
jQuery("form div.wpfc-exclude-rule-line").each(function(i, e){
|
||||
rule_number = jQuery(e).attr("wpfc-exclude-rule-number");
|
||||
prefix = jQuery(e).find("select[name^='wpfc-exclude-rule-prefix']").val();
|
||||
type = jQuery(e).find("input[name^='wpfc-exclude-rule-type']").val();
|
||||
content = jQuery(e).find("input[name^='wpfc-exclude-rule-content']").val();
|
||||
|
||||
content = self.remove_host_name(content);
|
||||
|
||||
rules.push({"prefix" : prefix, "content" : content, "type" : type});
|
||||
});
|
||||
|
||||
jQuery("#revert-loader-toolbar").show();
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
url: ajaxurl,
|
||||
data : {"action": "wpfc_save_exclude_pages", "rules" : rules, security: '<?php echo wp_create_nonce( "wpfc-save-exclude-ajax-nonce" ); ?>'},
|
||||
success: function(res){
|
||||
if(res.success){
|
||||
jQuery("#revert-loader-toolbar").hide();
|
||||
callback();
|
||||
self.reorder();
|
||||
}else{
|
||||
alert("The rule cannot be added...");
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
},
|
||||
insert_existing_rules: function(){
|
||||
var self = this;
|
||||
|
||||
self.add_item(new Date().getTime(), {"type" : "page", "prefix" : "exact", "content" : "wp-login.php", "editable" : false});
|
||||
//self.add_item(new Date().getTime(), {"prefix" : "startwith", "content" : "wp-content", "editable" : false});
|
||||
self.add_item(new Date().getTime(), {"type" : "page", "prefix" : "startwith", "content" : "wp-admin", "editable" : false});
|
||||
|
||||
self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "facebookexternalhit", "editable" : false});
|
||||
self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "LinkedInBot", "editable" : false});
|
||||
self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "WhatsApp", "editable" : false});
|
||||
self.add_item(new Date().getTime(), {"type" : "useragent", "prefix" : "contain", "content" : "Twitterbot", "editable" : false});
|
||||
|
||||
self.add_item(new Date().getTime(), {"type" : "cookie", "prefix" : "contain", "content" : "Admin", "editable" : false});
|
||||
|
||||
|
||||
if(typeof this.rules != "undefined" && this.rules && this.rules.length > 0){
|
||||
jQuery.each(self.rules, function(i, e){
|
||||
if(i > 0){
|
||||
}
|
||||
e.type = e.type ? e.type : "page";
|
||||
|
||||
self.add_line(i + 1, e);
|
||||
self.add_item(i + 1, e);
|
||||
});
|
||||
}
|
||||
},
|
||||
is_empty_values: function(prefix, content){
|
||||
if(prefix){
|
||||
jQuery("#wpfc-wizard-exclude select[name='wpfc-exclude-rule-prefix']").css({'border-color': '#ddd'});
|
||||
}else{
|
||||
jQuery("#wpfc-wizard-exclude select[name='wpfc-exclude-rule-prefix']").css({'border-color': 'red'});
|
||||
}
|
||||
|
||||
if(content){
|
||||
jQuery("#wpfc-wizard-exclude input[name='wpfc-exclude-rule-content']").css({'border-color': '#ddd'});
|
||||
}else{
|
||||
jQuery("#wpfc-wizard-exclude input[name='wpfc-exclude-rule-content']").css({'border-color': 'red'});
|
||||
}
|
||||
|
||||
if(prefix && content){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
remove_host_name: function(content){
|
||||
//to replace the urls which start with http:// or www. or with Host_Name
|
||||
content = content.replace(new RegExp('.*' + location.hostname.replace(/www\./, "") + "\/", "gi"), "");
|
||||
//content = content.replace(/\/$/, "");
|
||||
|
||||
return content;
|
||||
},
|
||||
reorder: function(type){
|
||||
jQuery("div.tab6 div[class^='wpfc-exclude'][class$='-list']").each(function(i,e){
|
||||
var type = jQuery(e).attr("class").match(/wpfc-exclude-([^-]+)-list/);
|
||||
|
||||
if(typeof type[1] != "undefined"){
|
||||
jQuery("div.wpfc-exclude-" + type[1] + "-list div.wpfc-exclude-item").each(function(i, e){
|
||||
jQuery(e).removeClass("wpfc-exclude-item-right");
|
||||
|
||||
if(i%2 != 0){
|
||||
jQuery(e).addClass("wpfc-exclude-item-right");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
43
wp-content/plugins/wp-fastest-cache/templates/htaccess.html
Normal file
43
wp-content/plugins/wp-fastest-cache/templates/htaccess.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div template-id="wpfc-modal-htaccess" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Manually Modify .htaccess", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
<div>
|
||||
|
||||
|
||||
<div style="" wpfc-cdn-page="1" class="wiz-cont">
|
||||
<h1>.htaccess is not writeable</h1>
|
||||
<p>1. Copy the rules from the textarea below</p>
|
||||
<p>2. Remove everything from .htaccess</p>
|
||||
<p>3. Paste the rules</p>
|
||||
<div class="wiz-input-cont">
|
||||
<div style="padding-bottom:5px;">
|
||||
<label class="mm-input-label wiz-inp-label"></label>
|
||||
</div>
|
||||
<div>
|
||||
<textarea onclick="this.focus();this.select()" class="wiz-inp-readonly-textarea" readonly="readonly" rows="10" cols="54" style="overflow-x: hidden;">ff</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
88
wp-content/plugins/wp-fastest-cache/templates/lazy_load.php
Normal file
88
wp-content/plugins/wp-fastest-cache/templates/lazy_load.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<div template-id="wpfc-modal-lazyload" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;display:none;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Lazy Load Settings", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
<?php
|
||||
$wpFastestCacheLazyLoad_type_exceptcontent = "";
|
||||
$wpFastestCacheLazyLoad_type_all = "";
|
||||
|
||||
if(isset($this->options->wpFastestCacheLazyLoad_type)){
|
||||
if($this->options->wpFastestCacheLazyLoad_type == "exceptcontent"){
|
||||
$wpFastestCacheLazyLoad_type_exceptcontent = 'checked="checked"';
|
||||
}else if($this->options->wpFastestCacheLazyLoad_type == "all"){
|
||||
$wpFastestCacheLazyLoad_type_all = 'checked="checked"';
|
||||
}
|
||||
}else{
|
||||
$wpFastestCacheLazyLoad_type_exceptcontent = 'checked="checked"';
|
||||
}
|
||||
?>
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont" style="">
|
||||
<h1>Choose Images</h1>
|
||||
<p>Please choose which images are loaded via Lazy Load.</p>
|
||||
|
||||
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheLazyLoad_type_all; ?> action-id="wpFastestCacheLazyLoad_type_all" id="wpFastestCacheLazyLoad_type_all" name="wpFastestCacheLazyLoad_type" value="all"></label>
|
||||
<label for="wpFastestCacheLazyLoad_type_all">All Images</label>
|
||||
</div>
|
||||
|
||||
<div class="wiz-input-cont" style="margin-top:10px !important;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheLazyLoad_type_exceptcontent; ?> action-id="wpFastestCacheLazyLoad_type_exceptcontent" id="wpFastestCacheLazyLoad_type_exceptcontent" name="wpFastestCacheLazyLoad_type" value="exceptcontent"></label>
|
||||
<label for="wpFastestCacheLazyLoad_type_exceptcontent">All Images except images in content</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery("#wpFastestCacheLazyLoad").click(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
if(jQuery("div[id^='wpfc-modal-lazyload-']").length === 0){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-lazyload", {close: function(){
|
||||
Wpfc_New_Dialog.clone.find("div.window-content input").each(function(){
|
||||
if(jQuery(this).attr("checked")){
|
||||
var id = jQuery(this).attr("action-id");
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-lazyload'] div.window-content input#" + id).attr("checked", true);
|
||||
}
|
||||
|
||||
//.attr("checked"
|
||||
});
|
||||
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}});
|
||||
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
95
wp-content/plugins/wp-fastest-cache/templates/newpost.php
Normal file
95
wp-content/plugins/wp-fastest-cache/templates/newpost.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<style type="text/css">
|
||||
div[id^="wpfc-modal-newpost"] .wiz-input-cont{
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
.wiz-input-cont label{
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div template-id="wpfc-modal-newpost" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 330px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("New Post", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<p style="color:#666;margin-top:0 !important;"><?php _e("What do you want to happen after publishing the new post?", "wp-fastest-cache"); ?></p>
|
||||
|
||||
<?php
|
||||
$wpFastestCacheNewPost_type_all = "";
|
||||
$wpFastestCacheNewPost_type_homepage = "";
|
||||
|
||||
if(isset($this->options->wpFastestCacheNewPost_type)){
|
||||
if($this->options->wpFastestCacheNewPost_type == "all"){
|
||||
$wpFastestCacheNewPost_type_all = 'checked="checked"';
|
||||
}else if($this->options->wpFastestCacheNewPost_type == "homepage"){
|
||||
$wpFastestCacheNewPost_type_homepage = 'checked="checked"';
|
||||
}else{
|
||||
$wpFastestCacheNewPost_type_all = 'checked="checked"';
|
||||
}
|
||||
}else{
|
||||
$wpFastestCacheNewPost_type_all = 'checked="checked"';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheNewPost_type_all; ?> action-id="wpFastestCacheNewPost_type_all" id="wpFastestCacheNewPost_type_all" name="wpFastestCacheNewPost_type" value="all"></label>
|
||||
<label for="wpFastestCacheNewPost_type_all"><?php _e("Clear All Cache", "wp-fastest-cache"); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheNewPost_type_homepage; ?> action-id="wpFastestCacheNewPost_type_homepage" id="wpFastestCacheNewPost_type_homepage" name="wpFastestCacheNewPost_type" value="homepage"></label>
|
||||
<label for="wpFastestCacheNewPost_type_homepage"><?php _e("Clear Cache of Home page", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheNewPost_type_homepage"><?php _e("Clear Cache of Post Categories", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheNewPost_type_homepage"><?php _e("Clear Cache of Post Tags", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheNewPost_type_homepage"><?php _e("Clear Cache of Pagination", "wp-fastest-cache"); ?></label><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span><?php _e("OK", "wp-fastest-cache"); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery("#wpFastestCacheNewPost").click(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
if(jQuery("div[id^='wpfc-modal-newpost-']").length === 0){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-newpost", {close: function(){
|
||||
Wpfc_New_Dialog.clone.find("div.window-content input").each(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
var id = jQuery(this).attr("action-id");
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-newpost'] div.window-content input#" + id).attr("checked", true);
|
||||
}
|
||||
|
||||
//.attr("checked"
|
||||
});
|
||||
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}});
|
||||
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
55
wp-content/plugins/wp-fastest-cache/templates/nginx_gzip.php
Normal file
55
wp-content/plugins/wp-fastest-cache/templates/nginx_gzip.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<div template-id="wpfc-modal-nginxgzip" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 360px; z-index: 10001;display:none;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Enable Gzip", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div class="wiz-cont" style="">
|
||||
<h1>How to Enable Gzip?</h1>
|
||||
<p>Nginx is used in the server so you need to enable the Gzip manually. Please take a look at the following tutorial.</p>
|
||||
|
||||
<div class="wiz-input-cont" style="margin-top:10px !important;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;">
|
||||
<a href="http://www.wpfastestcache.com/tutorial/how-to-enable-gzip-on-nginx/" target="_blank">http://www.wpfastestcache.com/tutorial/how-to-enable-gzip-on-nginx/</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span>OK</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery("#wpFastestCacheGzip").click(function(){
|
||||
if(jQuery("#wpFastestCacheGzip").is(':checked')){
|
||||
if(jQuery("div[id^='wpfc-modal-nginxgzip-']").length === 0){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-nginxgzip", {close: function(){
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}});
|
||||
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,31 @@
|
||||
<div template-id="wpfc-modal-permission" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 300px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Warning", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<center style="color: black;">The cache has <u>NOT</u> been deleted because of permissions problem please <a href='http://www.wpfastestcache.com/warnings/delete-cache-problem-related-to-permission/' target='_blank'>Read More</a></center>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span>OK</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
523
wp-content/plugins/wp-fastest-cache/templates/preload.php
Normal file
523
wp-content/plugins/wp-fastest-cache/templates/preload.php
Normal file
@@ -0,0 +1,523 @@
|
||||
<div template-id="wpfc-modal-preload" style="display:none; top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
|
||||
<style type="text/css">
|
||||
div[wpfc-cdn-page="sitemap"] .wpfc-textbox-con{position:absolute;left:0;top:0;-webkit-border-radius:3px;-moz-border-radius:3px;background:#fff;-webkit-box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 2px 6px 2px rgba(0,0,0,0.3);float:left;z-index:444;width:150px;border:1px solid #adadad;}
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item-list:after{box-shodow:0 2px 6px 0 rgba(0, 0, 0, 0.15);content:'';clear:both;height:0;visibility:hidden;display:block}
|
||||
div[wpfc-cdn-page="sitemap"] .fixed-search input{width:100%;padding:6px 9px;line-height:20px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-bottom:1px solid #ccc;-webkit-box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);-moz-box-shadow:0 2px 6px 0 rgba(0,0,0,0.1);-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;font-weight:bold}.fixed-search input:focus{outline:0}
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item{width:auto;float:left;line-height:22px;position:relative;background:rgba(0,0,0,0.15);margin:0 5px 5px 0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
div[wpfc-cdn-page="sitemap"] .wpfc-add-new-keyword, div[wpfc-cdn-page="sitemap"] .keyword-item a.keyword-label{
|
||||
background-color: #ffa100;
|
||||
color:#ffffff;
|
||||
text-decoration:none;
|
||||
padding:7px 15px;
|
||||
display:block;
|
||||
text-shadow:none;
|
||||
-webkit-transition:all .1s linear;
|
||||
-moz-transition:all .1s linear;
|
||||
-o-transition:all .1s linear;
|
||||
transition:all .1s linear;
|
||||
cursor: pointer;
|
||||
}
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item a.keyword-label:hover{
|
||||
padding-left: 4px;
|
||||
padding-right: 26px;
|
||||
}
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item a.keyword-label:hover:after{
|
||||
width:16px;
|
||||
height:16px;
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAAIAAAACAAc9WmjcAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAA4klEQVQokWXOMSuFcRQH4EcZZFB3w0BZfIC7mLl3MaGu2cAtqyLJwMQiRuObidFG4hNQJrlFJBlMFgzKMfi/vPe9/ZbT+T11jvAbq2nI8k3aB1MymStPTrTcyWTmi2BDdCQrgprtjjQKIJgw15aZth+Co9KB6zLYL4GLMthqq7/slcFKoVzTa1ClHTT/wKwxt0I4N/wPGqk+NuTNqQ/PLt3oyUEtgQWbQl3NqHVhOgfVBCYdCC3dhnwKSzkYSWDXslDVNG5RqOegksCDPg/ufXv34kxXAkF/SpcBh1492tEbwg+6YscxiN7TegAAAABJRU5ErkJggg==');
|
||||
content:"";
|
||||
position:absolute;
|
||||
top:10px;
|
||||
right:4px;
|
||||
}
|
||||
|
||||
div[wpfc-cdn-page="sitemap"] .wpfc-add-new-keyword{
|
||||
cursor:pointer;
|
||||
text-decoration:none;
|
||||
background-color:#fff !important;
|
||||
color:#ccc !important;
|
||||
padding:5px 12px !important;
|
||||
border:2px dashed #ccc;
|
||||
line-height:21px;
|
||||
}
|
||||
div[wpfc-cdn-page="sitemap"] .wpfc-add-new-keyword:before{display:inline-block;content:"+";margin:-1px 4px 0 -6px;}
|
||||
div[wpfc-cdn-page="sitemap"] .wpfc-add-new-keyword:hover{color:#589b43 !important;border-color:#589b43;}
|
||||
|
||||
</style>
|
||||
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e('Preload Settings', 'wp-fastest-cache'); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="start" class="wiz-cont">
|
||||
|
||||
<h1><?php _e('Choose a Method', 'wp-fastest-cache'); ?></h1>
|
||||
<p><?php _e('You can specify the method you want the preload feature to use through this section.', 'wp-fastest-cache'); ?></p>
|
||||
<div class="wiz-input-cont">
|
||||
<select id="wpFastestCachePreload_method" style="width: 100%; max-width: unset;">
|
||||
<option value="default">Default (Contents from Newest to Oldest)</option>
|
||||
<option value="sitemap">Sitemap</option>
|
||||
</select>
|
||||
<label class="wiz-error-msg"></label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div wpfc-cdn-page="default" class="wiz-cont" style="display: none;">
|
||||
<h1><?php _e('Content Types', 'wp-fastest-cache'); ?></h1>
|
||||
<p><?php _e('You can specify the contents to be used for preloading and you can sort them as well.', 'wp-fastest-cache'); ?></p>
|
||||
|
||||
<label class="wiz-error-msg" style="padding-left: 0;"></label>
|
||||
|
||||
<div class="preload_sortable_area">
|
||||
|
||||
<style type="text/css">
|
||||
.preload_sortable_area div {
|
||||
cursor: move;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wiz-input-cont" style="" data-type="homepage">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_homepage; ?> id="wpFastestCachePreload_homepage" name="wpFastestCachePreload_homepage"></label>
|
||||
<label for="wpFastestCachePreload_homepage"><?php _e('Homepage'); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont" style="" data-type="post">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_post; ?> id="wpFastestCachePreload_post" name="wpFastestCachePreload_post"></label>
|
||||
<label for="wpFastestCachePreload_post"><?php _e('Posts'); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont" style="" data-type="category">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_category; ?> id="wpFastestCachePreload_category" name="wpFastestCachePreload_category"></label>
|
||||
<label for="wpFastestCachePreload_category"><?php _e('Categories'); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont" style="" data-type="page">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_page; ?> id="wpFastestCachePreload_page" name="wpFastestCachePreload_page"></label>
|
||||
<label for="wpFastestCachePreload_page"><?php _e('Pages'); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont" style="" data-type="tag">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_tag; ?> id="wpFastestCachePreload_tag" name="wpFastestCachePreload_tag"></label>
|
||||
<label for="wpFastestCachePreload_tag"><?php _e('Tags'); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont" style="" data-type="attachment">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_attachment; ?> id="wpFastestCachePreload_attachment" name="wpFastestCachePreload_attachment"></label>
|
||||
<label for="wpFastestCachePreload_attachment"><?php _e('Attachments', 'wp-fastest-cache'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="wiz-input-cont custom-half" style="" data-type="customposttypes">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_customposttypes; ?> id="wpFastestCachePreload_customposttypes" name="wpFastestCachePreload_customposttypes"></label>
|
||||
<label for="wpFastestCachePreload_customposttypes"><?php _e('Custom Post Types', 'wp-fastest-cache'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="wiz-input-cont custom-half" style="" data-type="customTaxonomies">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_customTaxonomies; ?> id="wpFastestCachePreload_customTaxonomies" name="wpFastestCachePreload_customTaxonomies"></label>
|
||||
<label for="wpFastestCachePreload_customposttypes"><?php _e('Custom Taxonomies', 'wp-fastest-cache'); ?></label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" value="<?php echo $wpFastestCachePreload_order; ?>" id="wpFastestCachePreload_order" name="wpFastestCachePreload_order">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div wpfc-cdn-page="sitemap" class="wiz-cont" style="display: none;">
|
||||
|
||||
<h1><?php _e('Sitemaps', 'wp-fastest-cache'); ?></h1>
|
||||
<p><?php _e('You can specify sitemaps to be used for preloading.', 'wp-fastest-cache'); ?></p>
|
||||
|
||||
|
||||
<div class="wiz-input-cont" style="padding:8px 18px;border-radius:0;text-align:center; background: #fff none repeat scroll 0 0;">
|
||||
|
||||
<style type="text/css">
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div[wpfc-cdn-page="sitemap"] .keyword-item .wpfc-textbox-con {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<label class="wiz-error-msg" style="padding-left: 0;"></label>
|
||||
|
||||
<ul class="keyword-item-list">
|
||||
<li class="keyword-item">
|
||||
<a class="wpfc-add-new-keyword">Add Sitemap URL</a>
|
||||
<div class="wpfc-textbox-con" style="display:none;">
|
||||
<div class="fixed-search"><input type="text" placeholder="Add Sitemap URL"></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<input type="hidden" value="<?php echo $wpFastestCachePreload_sitemap; ?>" id="wpFastestCachePreload_sitemap" name="wpFastestCachePreload_sitemap">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div wpfc-cdn-page="details" class="wiz-cont" style="display: none;">
|
||||
|
||||
<h1><?php _e('Advanced Settings', 'wp-fastest-cache'); ?></h1>
|
||||
<p><?php _e('You can customize the advanced settings through this section.', 'wp-fastest-cache'); ?></p>
|
||||
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="display: inline-block;">
|
||||
<table id="wpfc-form-spinner-preload" class="wpfc-form-spinner" cellpadding="0" cellspacing="0" border="0" height="20" width="70" style="border: 1px solid rgb(204, 204, 204); border-collapse: collapse; background: rgb(255, 255, 255);">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="wpfc-form-spinner-input-td" rowspan="2" style="padding-right: 2px;height: 100%;">
|
||||
<div class="wpfc-form-spinner-number" style="height: 100%; width: 100%; border: none; padding: 0px; font-size: 14px; text-align: center; outline: none;padding-top:7px;"><?php echo $wpFastestCachePreload_number; ?></div>
|
||||
<input type="hidden" class="wpfc-form-spinner-input" name="wpFastestCachePreload_number" value="<?php echo $wpFastestCachePreload_number; ?>" />
|
||||
</td>
|
||||
<td class="wpfc-form-spinner-up" style="height: 15px; cursor: default; text-align: center; width: 12px; font-size: 9px; padding-left: 4px; padding-right: 8px; border: 1px solid rgb(204, 204, 204); background: rgb(245, 245, 245);">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAQAAAAjkz5TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAANjr9RwUqgAAACBjSFJNAABtmAAAc44AAPfgAACDwQAAbsQAAOKFAAAxZAAAGGNUHM53AAAAVklEQVR42gTBIQqAMACG0f8YSwPvZRIMxtVlESwWk8EyUJSFIR7Eg1h1xs/3hNBp4h0sQkLJrF9kzL1FiiY8GwcTPrtC87uQ2Al01JcGWjyOhooy/wMANWktnmvt+MQAAAAASUVORK5CYII=" align="right">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="wpfc-form-spinner-down" style="height: 15px; cursor: default; text-align: center; width: 12px; font-size: 9px; padding-left: 4px; padding-right: 8px; border: 1px solid rgb(204, 204, 204); background: rgb(245, 245, 245);">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAFCAQAAAAjkz5TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAANjr9RwUqgAAACBjSFJNAABtmAAAc44AAPfgAACDwQAAbsQAAOKFAAAxZAAAGGNUHM53AAAAWElEQVR42gBLALT/AMD/uv+z/6v/ov+Y/472ALf1uv+//7n/s/+c/3/PAKsYovSo/7H/mf969nEhAP8AkxiJ95T/dvZtHv8AAP8A/wB6GHHraR7/AP8AAwCoUy51Bie9nwAAAABJRU5ErkJggg==" align="right">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</label>
|
||||
<label style="margin-left:8px;padding-top:4px;"><?php _e('pages per minute', 'wp-fastest-cache'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="wiz-input-cont" style="margin-top: 10px;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" <?php echo $wpFastestCachePreload_restart; ?> id="wpFastestCachePreload_restart" name="wpFastestCachePreload_restart"></label>
|
||||
<label for="wpFastestCachePreload_restart"><?php _e('Restart After Completed', 'wp-fastest-cache'); ?></label>
|
||||
<a style="margin-left:5px;" target="_blank" href="http://www.wpfastestcache.com/features/restart-preload-after-completed/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<img style="border-radius:100px;" class="wiz-bg-img" src="<?php echo plugins_url("wp-fastest-cache/images/fast-foward.png"); ?>"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include WPFC_MAIN_PATH."templates/buttons.html"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var WPFC_SPINNER = {
|
||||
id: false,
|
||||
number: false,
|
||||
init: function(id, number){
|
||||
this.id = id;
|
||||
//this.number = number;
|
||||
this.set_number();
|
||||
this.click_event();
|
||||
},
|
||||
set_number: function(){
|
||||
this.number = jQuery("#" + this.id + " input.wpfc-form-spinner-input").val();
|
||||
this.number = parseInt(this.number);
|
||||
},
|
||||
click_event: function(){
|
||||
var id = this.id;
|
||||
var number = this.number;
|
||||
|
||||
jQuery("#" + this.id + " .wpfc-form-spinner-up, #" + this.id + " .wpfc-form-spinner-down").click(function(e){
|
||||
if(jQuery(this).attr('class').match(/up$/)){
|
||||
number = number + 2;
|
||||
}else if(jQuery(this).attr('class').match(/down$/)){
|
||||
number = number - 2;
|
||||
}
|
||||
|
||||
number = number < 2 ? 2 : number;
|
||||
number = number > 12 ? 12 : number;
|
||||
|
||||
jQuery("#" + id + " .wpfc-form-spinner-number").text(number);
|
||||
jQuery("#" + id + " input.wpfc-form-spinner-input").val(number);
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var WpFcPreload = {
|
||||
pre_id: "wpfc-modal-preload",
|
||||
method: "",
|
||||
init: function(){
|
||||
this.click_event_for_checkbox();
|
||||
},
|
||||
get_modal_id: function(e){
|
||||
let self = this;
|
||||
|
||||
let modal = jQuery(e).closest("div[id^='" + self.pre_id + "']");
|
||||
let modal_id = modal.attr("id");
|
||||
|
||||
return modal_id;
|
||||
},
|
||||
update_style: function(modal_id){
|
||||
jQuery("#" + modal_id).find("div[wpfc-cdn-page='default'] div.preload_sortable_area > div").each(function(i, div){
|
||||
|
||||
jQuery(div).removeAttr("style");
|
||||
jQuery(div).css({"float" : "left", "width" : "26%", "height" : "35px"});
|
||||
|
||||
if((i+2)%3 == 0){
|
||||
jQuery(div).css({"margin-left" : "10px", "margin-right" : "10px"});
|
||||
}
|
||||
|
||||
if(i > 2 && i < 6){
|
||||
jQuery(div).css({"margin-top" : "10px"});
|
||||
}else if(i >= 6){
|
||||
jQuery(div).css({"margin-top" : "10px", "margin-bottom" : "23px"});
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
insert_sitemap_urls: function(modal_id){
|
||||
let sitemap = jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_sitemap']").val().trim();
|
||||
|
||||
if(sitemap.length > 0){
|
||||
Wpfc_New_Dialog.insert_keywords(modal_id, sitemap);
|
||||
|
||||
jQuery("#" + modal_id).find("select#wpFastestCachePreload_method").val("sitemap");
|
||||
}
|
||||
|
||||
},
|
||||
sort: function(){
|
||||
var self = this;
|
||||
|
||||
let order_string = jQuery("#wpFastestCachePreload_order").val();
|
||||
let order_arr = [];
|
||||
let clone_div;
|
||||
|
||||
if(order_string.length > 0){
|
||||
order_arr = order_string.split(",");
|
||||
|
||||
jQuery.each(order_arr, function(i, value){
|
||||
|
||||
jQuery("div[id^='wpfc-modal-preload-'] div.window-content div[wpfc-cdn-page='default'] div.preload_sortable_area > div").each(function(i, div){
|
||||
if(jQuery(div).attr("data-type") == value){
|
||||
clone_div = jQuery(div).clone();
|
||||
|
||||
div.remove();
|
||||
|
||||
jQuery("div[id^='wpfc-modal-preload-'] div.window-content div[wpfc-cdn-page='default'] div.preload_sortable_area").append(clone_div);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
self.update_style();
|
||||
},
|
||||
open_modal: function(item){
|
||||
let self = this;
|
||||
|
||||
Wpfc_New_Dialog.dialog(self.pre_id, {
|
||||
close: function(e){
|
||||
},
|
||||
finish: function(){
|
||||
|
||||
if(Wpfc_New_Dialog.clone.find("input[name='wpFastestCachePreload_restart']").prop("checked")){
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_restart']").prop("checked", true);
|
||||
}else{
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_restart']").prop("checked", false);
|
||||
}
|
||||
|
||||
if(self.method == "default"){
|
||||
let order_arr = [];
|
||||
|
||||
Wpfc_New_Dialog.clone.find("div.window-content div.preload_sortable_area input[name]").each(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content div.preload_sortable_area input[name='" + jQuery(this).attr("name") + "']").attr("checked", true);
|
||||
}else{
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content div.preload_sortable_area input[name='" + jQuery(this).attr("name") + "']").attr("checked", false);
|
||||
}
|
||||
|
||||
order_arr.push(jQuery(this).attr("name").replace(/wpFastestCachePreload_/, ""));
|
||||
});
|
||||
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_sitemap']").val("");
|
||||
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_order']").val(order_arr.join(","));
|
||||
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}else if(self.method == "sitemap"){
|
||||
let urls = [];
|
||||
let sitemaps = Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] ul.keyword-item-list li.keyword-item a.keyword-label");
|
||||
|
||||
if(sitemaps.length > 0){
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] label.wiz-error-msg").text("");
|
||||
|
||||
}else{
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] label.wiz-error-msg").text("<?php _e('At least one sitemap must be added', 'wp-fastest-cache'); ?>");
|
||||
|
||||
}
|
||||
|
||||
console.log(sitemaps);
|
||||
|
||||
jQuery(sitemaps).each(function(i, e){
|
||||
console.log(jQuery(e).text());
|
||||
urls.push(jQuery(e).text());
|
||||
});
|
||||
|
||||
if(urls.length > 0){
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content div.preload_sortable_area input").prop( "checked", false);
|
||||
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-preload'] div.window-content input[name='wpFastestCachePreload_sitemap']").val(urls.join(","));
|
||||
}
|
||||
|
||||
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
back: function(e){
|
||||
let modal_id = self.get_modal_id(e);
|
||||
let current_page = jQuery("#" + modal_id).find(".wpfc-cdn-pages-container div.wiz-cont:visible").attr("wpfc-cdn-page");
|
||||
|
||||
if(current_page == "default" || current_page == "sitemap"){
|
||||
Wpfc_New_Dialog.show_page("start");
|
||||
|
||||
Wpfc_New_Dialog.show_button("next");
|
||||
Wpfc_New_Dialog.hide_button("back");
|
||||
|
||||
}else if(current_page == "details"){
|
||||
|
||||
if(self.method == "default"){
|
||||
Wpfc_New_Dialog.show_page("default");
|
||||
self.update_style(modal_id);
|
||||
}
|
||||
|
||||
if(self.method == "sitemap"){
|
||||
Wpfc_New_Dialog.show_page("sitemap");
|
||||
}
|
||||
|
||||
Wpfc_New_Dialog.show_button("next");
|
||||
Wpfc_New_Dialog.show_button("back");
|
||||
Wpfc_New_Dialog.hide_button("finish");
|
||||
|
||||
}
|
||||
},
|
||||
next: function(e){
|
||||
let modal_id = self.get_modal_id(e);
|
||||
let current_page = jQuery("#" + modal_id).find(".wpfc-cdn-pages-container div.wiz-cont:visible").attr("wpfc-cdn-page");
|
||||
|
||||
if(current_page == "start"){
|
||||
self.method = jQuery("#" + modal_id).find("select#wpFastestCachePreload_method").val();
|
||||
|
||||
if(self.method == "default"){
|
||||
Wpfc_New_Dialog.show_page("default");
|
||||
self.update_style(modal_id);
|
||||
}
|
||||
|
||||
if(self.method == "sitemap"){
|
||||
Wpfc_New_Dialog.show_page("sitemap");
|
||||
}
|
||||
|
||||
|
||||
Wpfc_New_Dialog.show_button("next");
|
||||
Wpfc_New_Dialog.show_button("back");
|
||||
}else if(current_page == "default"){
|
||||
|
||||
if(Wpfc_New_Dialog.clone.find("div.window-content div.preload_sortable_area input[name]:checked").length > 0){
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] label.wiz-error-msg").text("");
|
||||
|
||||
Wpfc_New_Dialog.show_page("details");
|
||||
|
||||
Wpfc_New_Dialog.hide_button("next");
|
||||
|
||||
Wpfc_New_Dialog.show_button("back");
|
||||
Wpfc_New_Dialog.show_button("finish");
|
||||
|
||||
}else{
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='default'] label.wiz-error-msg").text("<?php _e('At least one sitemap must be added', 'wp-fastest-cache'); ?>");
|
||||
}
|
||||
|
||||
}else if(current_page == "sitemap"){
|
||||
let sitemaps = Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] ul.keyword-item-list li.keyword-item a.keyword-label");
|
||||
|
||||
if(sitemaps.length > 0){
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] label.wiz-error-msg").text("");
|
||||
|
||||
Wpfc_New_Dialog.show_page("details");
|
||||
|
||||
Wpfc_New_Dialog.hide_button("next");
|
||||
|
||||
Wpfc_New_Dialog.show_button("back");
|
||||
Wpfc_New_Dialog.show_button("finish");
|
||||
|
||||
}else{
|
||||
Wpfc_New_Dialog.clone.find("div[wpfc-cdn-page='sitemap'] label.wiz-error-msg").text("<?php _e('At least one sitemap must be added', 'wp-fastest-cache'); ?>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}, function(dialog){
|
||||
Wpfc_New_Dialog.show_button("next");
|
||||
// Wpfc_New_Dialog.show_button("back");
|
||||
// Wpfc_New_Dialog.show_button("finish");
|
||||
|
||||
self.sort();
|
||||
self.insert_sitemap_urls(dialog.id);
|
||||
|
||||
jQuery("#" + dialog.id).find("div[wpfc-cdn-page='default'] div.preload_sortable_area").sortable({
|
||||
update: function(event,ui){
|
||||
self.update_style(dialog.id);
|
||||
}
|
||||
});
|
||||
|
||||
WPFC_SPINNER.init("wpfc-form-spinner-preload", 6);
|
||||
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
click_event_for_checkbox: function(){
|
||||
let self = this;
|
||||
|
||||
jQuery("#wpFastestCachePreload").click(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
if(jQuery("div[id^='wpfc-modal-preload-']").length === 0){
|
||||
self.open_modal();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
WpFcPreload.init();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
<div style="z-index:9999;width: 160px; height: 60px; position: absolute; margin-left: 254px; margin-top: 74px; color: white;">
|
||||
<div style="font-family:sans-serif;font-size:13px;text-align: center; border-radius: 5px; float: left; background-color: rgb(51, 51, 51); color: white; width: 147px; padding: 20px 50px;">
|
||||
<label><?php _e("Only available in Premium version", "wp-fastest-cache"); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<h2 style="opacity: 0.3;padding-left:20px;padding-bottom:10px;"><?php _e("Optimize Image Tool", "wp-fastest-cache"); ?></h2>
|
||||
<div id="container-show-hide-image-list" style="opacity: 0.3;float: right; padding-right: 20px; cursor: pointer;">
|
||||
<span id="show-image-list">Show Images</span>
|
||||
<span id="hide-image-list" style="display:none;">Hide Images</span>
|
||||
</div>
|
||||
<div style="opacity: 0.3;width:100%;float:left;" id="wpfc-image-static-panel">
|
||||
<div style="float: left; width: 100%;">
|
||||
<div style="float:left;padding-left: 22px;padding-right:15px;">
|
||||
<div style="display: inline-block;">
|
||||
<div style="width: 150px; height: 150px; position: relative; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; background-color: #ffcc00;">
|
||||
|
||||
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; clip: rect(0px 150px 150px 75px);">
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-radius: 150px; clip: rect(0px, 75px, 150px, 0px); transform: rotate(109.62deg); background-color: rgb(255, 165, 0); border-spacing: 109.62px;" id="wpfc-pie-chart-little"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="display:none;position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; clip: rect(0px 150px 150px 25px); -webkit-transform: rotate(0deg); transform: rotate(0deg);" id="wpfc-pie-chart-big-container-first">
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; clip: rect(0px 75px 150px 0px); -webkit-transform: rotate(180deg); transform: rotate(180deg); background-color: #FFA500;"></div>
|
||||
</div>
|
||||
<div style="display:none;position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; clip: rect(0px 150px 150px 75px); -webkit-transform: rotate(180deg); transform: rotate(180deg);" id="wpfc-pie-chart-big-container-second-right">
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 150px; height: 150px; border-top-left-radius: 150px; border-top-right-radius: 150px; border-bottom-right-radius: 150px; border-bottom-left-radius: 150px; clip: rect(0px 75px 150px 0px); -webkit-transform: rotate(90deg); transform: rotate(90deg); background-color: #FFA500;" id="wpfc-pie-chart-big-container-second-left"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width: 114px;height: 114px;margin-top: -133px;background-color: white;margin-left: 18px;position: absolute;border-radius: 150px;">
|
||||
<p style="text-align:center;margin:27px 0 0 0;color: black;">Succeed</p>
|
||||
<p style="text-align: center; font-size: 18px; font-weight: bold; font-family: verdana; margin: -2px 0px 0px; color: black;" id="wpfc-optimized-statics-percent" class="">30.45</p>
|
||||
<p style="text-align:center;margin:0;color: black;">%</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;padding-left:12px;" id="wpfc-statics-right">
|
||||
<ul style="list-style: none outside none;float: left;">
|
||||
<li>
|
||||
<div style="background-color: rgb(29, 107, 157);width:15px;height:15px;float:left;margin-top:4px;border-radius:5px;"></div>
|
||||
<div style="float:left;padding-left:6px;">All</div>
|
||||
<div style="font-size: 14px; font-weight: bold; color: black; float: left; width: 65%; margin-left: 5px;" id="wpfc-optimized-statics-total_image_number" class="">7196</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="background-color: rgb(29, 107, 157);width:15px;height:15px;float:left;margin-top:4px;border-radius:5px;"></div>
|
||||
<div style="float:left;padding-left:6px;">Pending</div>
|
||||
<div style="font-size: 14px; font-weight: bold; color: black; float: left; width: 65%; margin-left: 5px;" id="wpfc-optimized-statics-pending" class="">5002</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="background-color: #FF0000;width:15px;height:15px;float:left;margin-top:4px;border-radius:5px;"></div>
|
||||
<div style="float:left;padding-left:6px;">Errors</div>
|
||||
<div style="font-size: 14px; font-weight: bold; color: black; float: left; width: 65%; margin-left: 5px;" id="wpfc-optimized-statics-error" class="">3</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul style="list-style: none outside none;float: left;">
|
||||
<li>
|
||||
<div style="background-color: rgb(61, 207, 60);width:15px;height:15px;float:left;margin-top:4px;border-radius:5px;"></div>
|
||||
<div style="float:left;padding-left:6px;"><span>Optimized Images</span></div>
|
||||
<div style="font-size: 14px; font-weight: bold; color: black; float: left; width: 65%; margin-left: 5px;" id="wpfc-optimized-statics-optimized" class="">2191</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div style="background-color: rgb(61, 207, 60);width:15px;height:15px;float:left;margin-top:4px;border-radius:5px;"></div>
|
||||
<div style="float:left;padding-left:6px;"><span>Total Reduction</span></div>
|
||||
<div style="font-size: 14px; font-weight: bold; color: black; float: left; width: 80%; margin-left: 5px;" id="wpfc-optimized-statics-reduction" class="">78400.897</div>
|
||||
</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style: none outside none;float: left;">
|
||||
<li>
|
||||
<h1 style="margin-top:0;float:left;">Credit: <span style="display: inline-block; height: 16px; width: auto;min-width:25px;" id="wpfc-optimized-statics-credit" class="">9910</span></h1>
|
||||
<span id="buy-image-credit">More</span>
|
||||
</li>
|
||||
<li>
|
||||
<input type="submit" class="button-primary" value="Optimize All" id="wpfc-optimize-images-button" style="width:100%;height:110px;">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
613
wp-content/plugins/wp-fastest-cache/templates/timeout.php
Normal file
613
wp-content/plugins/wp-fastest-cache/templates/timeout.php
Normal file
@@ -0,0 +1,613 @@
|
||||
<style type="text/css">
|
||||
.wpfc-timeout-item:hover{
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
.wpfc-timeout-item{
|
||||
float: left;
|
||||
width: 330.5px;
|
||||
margin-right: 7px;
|
||||
margin-left: 20px;
|
||||
-moz-border-radius:5px 5px 5px 5px;
|
||||
-webkit-border-radius:5px 5px 5px 5px;
|
||||
border-radius:5px 5px 5px 5px;
|
||||
border:1px solid transparent;
|
||||
cursor:pointer;
|
||||
padding:9px;
|
||||
outline:none !important;
|
||||
list-style: outside none none;
|
||||
}
|
||||
.star{
|
||||
float:left;
|
||||
height:28px;
|
||||
width:32px;
|
||||
display: none;
|
||||
}
|
||||
.star img{
|
||||
margin:9px 4px 4px;
|
||||
}
|
||||
|
||||
.wpfc-timeout-item-form-title{
|
||||
max-width:380px;
|
||||
font-weight:bold;
|
||||
white-space:nowrap;
|
||||
max-width:615px;
|
||||
margin-bottom:3px;
|
||||
text-overflow:ellipsis;
|
||||
-o-text-overflow:ellipsis;
|
||||
-moz-text-overflow:ellipsis;
|
||||
-webkit-text-overflow:ellipsis;
|
||||
line-height:1em;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
}
|
||||
.wpfc-timeout-item-details{
|
||||
font-size:11px;
|
||||
color:#888;
|
||||
display:block;
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;
|
||||
line-height:1.5em;
|
||||
}
|
||||
.wpfc-timeout-item-details b {
|
||||
display:inline;
|
||||
margin-left: 1px;
|
||||
|
||||
}
|
||||
.wpfc-timeout-item-right{
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="wpfc-modal-timeout" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Cache Timeout Wizard", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div id="wpfc-wizard-timeout" class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont" style="padding:0 0;min-height:37px;">
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" height="100%" style="background-color:#FFFFFF;border:1px solid #ccc !important;border-radius:10px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" id="cond-list">
|
||||
<table width="100%" cellspacing="0" cellpadding="5" border="0" class="cond-line active-line">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="100" height="30" class="" style="padding-left:10px;font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;font-size: 12px;"><?php _e("If REQUEST_URI", "wp-fastest-cache"); ?></td>
|
||||
<td class="" width="95">
|
||||
<select name="wpfc-timeout-rule-prefix">
|
||||
<option selected="" value=""></option>
|
||||
<option value="all"><?php _e("All", "wp-fastest-cache"); ?></option>
|
||||
<option value="homepage"><?php _e("Home Page", "wp-fastest-cache"); ?></option>
|
||||
<option value="startwith"><?php _e("Starts With", "wp-fastest-cache"); ?></option>
|
||||
<option value="exact"><?php _e("Is Equal To", "wp-fastest-cache"); ?></option>
|
||||
<!-- <option value="contain"><?php _e("Contains", "wp-fastest-cache"); ?></option> -->
|
||||
</select>
|
||||
</td>
|
||||
<td width="300">
|
||||
<div class="wpfc-timeout-rule-line-middle">
|
||||
<input type="text" name="wpfc-timeout-rule-content" style="width:300px;">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="cond-single" style="border-top:1px solid #ccc; margin:10px 0px 5px 0px;"></div>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" height="100%" style="background-color:#FFFFFF;border:1px solid #ccc !important;border-radius:10px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="100%" cellspacing="0" cellpadding="5" border="0" class="cond-line active-line">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="10"><?php _e("Then", "wp-fastest-cache"); ?></td>
|
||||
<td class="" width="95">
|
||||
<select name="wpfc-timeout-rule-schedule">
|
||||
<?php
|
||||
$schedules = wp_get_schedules();
|
||||
|
||||
if(function_exists("wp_list_sort")){
|
||||
$schedules = wp_list_sort($schedules, "interval", "ASC", true);
|
||||
}
|
||||
|
||||
$first = true;
|
||||
foreach ($schedules as $key => $value) {
|
||||
if(!isset($value["wpfc"])){
|
||||
continue;
|
||||
}
|
||||
|
||||
if($first){
|
||||
echo "<option value=''>".__("Choose One", 'wp-fastest-cache')."</option>";
|
||||
$first = false;
|
||||
}
|
||||
echo "<option value='{$key}'>".__($value["display"], 'wp-fastest-cache')."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td width="300" height="30" class="" style="font-family: Verdana,Geneva,Arial,Helvetica,sans-serif;font-size: 12px;">
|
||||
<span class="wpfc-timeout-at-text" style="padding-right:5px;display:none;">at</span>
|
||||
<select name="wpfc-timeout-rule-hour" style="display:none;">
|
||||
<?php
|
||||
for ($i=0; $i < 24; $i++) {
|
||||
?>
|
||||
<option value="<?php echo $i; ?>"><?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<select name="wpfc-timeout-rule-minute" style="display:none;">
|
||||
<?php
|
||||
for ($i=0; $i < 60; $i++) {
|
||||
?>
|
||||
<option value="<?php echo $i; ?>"><?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span><?php _e("delete the files", "wp-fastest-cache"); ?></span>
|
||||
</td>
|
||||
<td width="100"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table class="wpfc-server-time-cont" width="100%" cellspacing="0" cellpadding="0" border="0" height="100%" style="background: lightYellow; border: 1px solid #DCDCBC !important;border-radius:10px;margin-top:5px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" id="cond-list">
|
||||
<table width="100%" cellspacing="0" cellpadding="5" border="0" class="cond-line active-line">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="" width="300" style="text-align: center;">
|
||||
<label><?php _e("Server Time", "wp-fastest-cache"); ?>: </label><label class="wpfc-server-time"><?php echo current_time("H:i:s"); ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;">
|
||||
<button class="wpfc-dialog-buttons buttons-blood" type="button" action="remove">
|
||||
<span>Remove Rule</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="back">
|
||||
<span>Back</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="next">
|
||||
<span>Next</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons" type="button" action="close">
|
||||
<span>Close</span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var WpFcTimeout = {
|
||||
rules: [],
|
||||
schedules: {},
|
||||
init: function(rules){
|
||||
this.rules = rules;
|
||||
this.insert_existing_rules();
|
||||
this.click_event_for_add_button();
|
||||
|
||||
setInterval(function(){ WpFcTimeout.server_clock(); }, 1000);
|
||||
},
|
||||
server_clock: function(){
|
||||
jQuery(".wpfc-server-time").each(function(i, e){
|
||||
var time = jQuery(e).text().split(":");
|
||||
|
||||
time[2]++;
|
||||
|
||||
if(time[2] > 59){
|
||||
time[2] = "0";
|
||||
time[1]++;
|
||||
}
|
||||
|
||||
if(time[1] > 59){
|
||||
time[1] = "0";
|
||||
time[0]++;
|
||||
}
|
||||
|
||||
if(time[0] > 23){
|
||||
time[0] = "0";
|
||||
}
|
||||
|
||||
jQuery(time).each(function(i, e){
|
||||
if((time[i] < 10) && ((time[i] + "").length < 2)){
|
||||
time[i] = "0" + time[i];
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(e).text(time.join(":"));
|
||||
});
|
||||
},
|
||||
remove_rule: function(clone_modal_id, number){
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").remove();
|
||||
|
||||
Wpfc_Dialog.remove(clone_modal_id);
|
||||
|
||||
this.save(function(){
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").remove();
|
||||
});
|
||||
},
|
||||
add_item: function(number, e){
|
||||
var self = this;
|
||||
var item = jQuery(".wpfc-timeout-item").first().clone();
|
||||
|
||||
item.attr("wpfc-timeout-item-number", number);
|
||||
item.attr("prefix", e.prefix);
|
||||
item.attr("content", e.content);
|
||||
item.attr("schedule", e.schedule);
|
||||
|
||||
if(typeof e.hour != "undefined" && typeof e.minute != "undefined"){
|
||||
item.attr("hour", e.hour);
|
||||
item.attr("minute", e.minute);
|
||||
}
|
||||
|
||||
item.find(".wpfc-timeout-item-url").html(self.create_url_description(e.prefix, e.content));
|
||||
|
||||
if(typeof e.hour != "undefined" && typeof e.minute != "undefined"){
|
||||
item.find(".wpfc-timeout-item-form-title").html(self.create_title(e.prefix, e.content, e.schedule, e.hour, e.minute));
|
||||
}else{
|
||||
item.find(".wpfc-timeout-item-form-title").html(self.create_title(e.prefix, e.content, e.schedule));
|
||||
}
|
||||
|
||||
item.click(function(){
|
||||
var clone_modal = jQuery("#wpfc-modal-timeout").clone();
|
||||
var clone_modal_id = "wpfc-modal-timeout-" + new Date().getTime();
|
||||
|
||||
self.hide_input_content(clone_modal);
|
||||
self.show_hour_and_minute(clone_modal);
|
||||
|
||||
if(jQuery(this).attr("schedule").match(/^(onceaday|daily)/i)){
|
||||
clone_modal.find(".wpfc-timeout-at-text").show();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-hour']").show();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-minute']").show();
|
||||
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-hour']").val(jQuery(this).attr("hour"));
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-minute']").val(jQuery(this).attr("minute"));
|
||||
}
|
||||
|
||||
if(e.prefix == "homepage" || e.prefix == "all"){
|
||||
clone_modal.find("input").attr("name", "wpfc-timeout-rule-content").hide();
|
||||
}
|
||||
|
||||
clone_modal.attr("id", clone_modal_id);
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-schedule']").val(jQuery(this).attr("schedule"));
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-prefix']").val(jQuery(this).attr("prefix"));
|
||||
clone_modal.find("input[name='wpfc-timeout-rule-content']").val(jQuery(this).attr("content"));
|
||||
|
||||
|
||||
jQuery("#wpfc-modal-timeout").after(clone_modal);
|
||||
|
||||
if(typeof e.editable == "undefined"){
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"close" :
|
||||
function(){
|
||||
},
|
||||
"remove" :
|
||||
function(){
|
||||
self.remove_rule(clone_modal_id, number);
|
||||
},
|
||||
"finish" :
|
||||
function(){
|
||||
var prefix = clone_modal.find("select[name='wpfc-timeout-rule-prefix']").val();
|
||||
var content = clone_modal.find("input[name='wpfc-timeout-rule-content']").val();
|
||||
var schedule = clone_modal.find("select[name='wpfc-timeout-rule-schedule']").val();
|
||||
var hour = clone_modal.find("select[name='wpfc-timeout-rule-hour']").val();
|
||||
var minute = clone_modal.find("select[name='wpfc-timeout-rule-minute']").val();
|
||||
|
||||
content = self.remove_host_name(content);
|
||||
content = content.replace(/^\/|\/$/g, '');
|
||||
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").find("select[name='wpfc-timeout-rule-prefix-" + number + "']").val(prefix);
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").find("input[name='wpfc-timeout-rule-content-" + number + "']").val(content);
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").find("input[name='wpfc-timeout-rule-schedule-" + number + "']").val(schedule);
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").find("input[name='wpfc-timeout-rule-hour-" + number + "']").val(hour);
|
||||
jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number='" + number + "']").find("input[name='wpfc-timeout-rule-minute-" + number + "']").val(minute);
|
||||
|
||||
if(self.is_empty_values(prefix, content, schedule)){
|
||||
Wpfc_Dialog.remove(clone_modal_id);
|
||||
|
||||
self.save(function(){
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").attr("prefix", prefix);
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").attr("content", content);
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").attr("schedule", schedule);
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").attr("hour", hour);
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").attr("minute", minute);
|
||||
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").find(".wpfc-timeout-item-url").html(self.create_url_description(prefix, content));
|
||||
|
||||
jQuery("div.wpfc-timeout-item[wpfc-timeout-item-number='" + number + "']").find(".wpfc-timeout-item-form-title").html(self.create_title(prefix, content, schedule, hour, minute));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if(e.editable == false){
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"close" : function(){}});
|
||||
}
|
||||
});
|
||||
|
||||
item.show();
|
||||
|
||||
jQuery(".wpfc-timeout-list").append(item);
|
||||
},
|
||||
create_title: function(prefix, content, schedule, hour, minute){
|
||||
var title = "";
|
||||
|
||||
if(prefix == "exact"){
|
||||
title = "Is Equal To: " + content;
|
||||
}else if(prefix == "startwith"){
|
||||
title = "Start With: " + content;
|
||||
}else if(prefix == "contain"){
|
||||
title = "Contains: " + content;
|
||||
}else if(prefix == "homepage"){
|
||||
title = "Home Page";
|
||||
}else if(prefix == "all"){
|
||||
title = "The All Cache";
|
||||
}
|
||||
|
||||
if(typeof this.schedules[schedule] != "undefined"){
|
||||
title = title + ' - <span style="color: green;">' + this.schedules[schedule].display + '</span>';
|
||||
}else{
|
||||
title = title + ' - <span style="color: green;">' + schedule + '</span>';
|
||||
}
|
||||
|
||||
if(schedule.match(/^(onceaday|daily)/i)){
|
||||
if(typeof hour != "undefined" && typeof minute != "undefined"){
|
||||
minute = ((minute + "").length > 1) ? minute : "0" + (minute + "");
|
||||
hour = ((hour + "").length > 1) ? hour : "0" + (hour + "");
|
||||
|
||||
title = title + '/<span style="color:red;font-size:10px;">' + hour + ":" + minute + '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return title;
|
||||
},
|
||||
create_url_description: function(prefix, content){
|
||||
var request_uri = content;
|
||||
var b_start = "<b style='font-size:11px;color:#FFA100;'>";
|
||||
var b_end = "</b>"
|
||||
|
||||
if(prefix == "exact"){
|
||||
request_uri = b_start + content + b_end;
|
||||
}else if(prefix == "startwith"){
|
||||
request_uri = b_start + content + b_end + '(.*)';
|
||||
}else if(prefix == "contain"){
|
||||
request_uri = '(.*)' + b_start + content + b_end + '(.*)';
|
||||
}else if(prefix == "homepage" || prefix == "all"){
|
||||
request_uri = "";
|
||||
}
|
||||
|
||||
return "<?php echo home_url();?>" + "/" + request_uri;
|
||||
},
|
||||
add_line: function(number, e){
|
||||
var line = jQuery(".wpfc-timeout-rule-line").first().closest(".wpfc-timeout-rule-line").clone();
|
||||
|
||||
line.attr("wpfc-timeout-rule-number", number);
|
||||
|
||||
line.find(".wpfc-timeout-rule-line-add").remove();
|
||||
line.find(".wpfc-timeout-rule-line-delete").show();
|
||||
line.find("select").attr("name", "wpfc-timeout-rule-prefix-" + number).val(e.prefix);
|
||||
line.find("input[name='wpfc-timeout-rule-content']").attr("name", "wpfc-timeout-rule-content-" + number).val(e.content);
|
||||
line.find("input[name='wpfc-timeout-rule-schedule']").attr("name", "wpfc-timeout-rule-schedule-" + number).val(e.schedule);
|
||||
line.find("input[name='wpfc-timeout-rule-hour']").attr("name", "wpfc-timeout-rule-hour-" + number).val(e.hour);
|
||||
line.find("input[name='wpfc-timeout-rule-minute']").attr("name", "wpfc-timeout-rule-minute-" + number).val(e.minute);
|
||||
|
||||
console.log(e);
|
||||
|
||||
jQuery(".wpfc-timeout-rule-container").append(line);
|
||||
},
|
||||
click_event_for_add_button: function(){
|
||||
var self = this;
|
||||
|
||||
jQuery(".wpfc-add-new-timeout-button").click(function(e){
|
||||
if(jQuery(e.target).attr("disable-wp-cron")){
|
||||
if(jQuery("div[id^='wpfc-modal-disablewpcron-']").length === 0){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-disablewpcron", {close: "default"});
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
}
|
||||
}else{
|
||||
var clone_modal = jQuery("#wpfc-modal-timeout").clone();
|
||||
//var number = jQuery("div.wpfc-timeout-rule-line[wpfc-timeout-rule-number]").length;
|
||||
var number = new Date().getTime();
|
||||
var clone_modal_id = "wpfc-modal-timeout-" + new Date().getTime();
|
||||
|
||||
clone_modal.attr("id", clone_modal_id);
|
||||
|
||||
self.hide_input_content(clone_modal);
|
||||
self.show_hour_and_minute(clone_modal);
|
||||
|
||||
jQuery("#wpfc-modal-timeout").after(clone_modal);
|
||||
|
||||
Wpfc_Dialog.dialog(clone_modal_id, {"finish" :
|
||||
function(){
|
||||
var prefix = clone_modal.find("select[name='wpfc-timeout-rule-prefix']").val();
|
||||
var content = clone_modal.find("input[name='wpfc-timeout-rule-content']").val();
|
||||
var schedule = clone_modal.find("select[name='wpfc-timeout-rule-schedule']").val();
|
||||
var hour = clone_modal.find("select[name='wpfc-timeout-rule-hour']").val();
|
||||
var minute = clone_modal.find("select[name='wpfc-timeout-rule-minute']").val();
|
||||
|
||||
content = self.remove_host_name(content);
|
||||
content = content.replace(/^\/|\/$/g, '');
|
||||
|
||||
if(self.is_empty_values(prefix, content, schedule)){
|
||||
self.add_line(number + 1, {"prefix" : prefix, "content" : content, "schedule" : schedule, "hour" : hour, "minute" : minute});
|
||||
|
||||
Wpfc_Dialog.remove(clone_modal_id);
|
||||
|
||||
self.save(function(){
|
||||
self.add_item(number + 1, {"prefix" : prefix, "content" : content, "schedule" : schedule, "hour" : hour, "minute" : minute});
|
||||
});
|
||||
}
|
||||
},
|
||||
"close" :
|
||||
function(){
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
save: function(callback){
|
||||
var rule_number, prefix, schedule, content, hour, minute, rule, rules = [], self = this;
|
||||
|
||||
jQuery("form div.wpfc-timeout-rule-line").each(function(i, e){
|
||||
rule_number = jQuery(e).attr("wpfc-timeout-rule-number");
|
||||
prefix = jQuery(e).find("select[name^='wpfc-timeout-rule-prefix']").val();
|
||||
content = jQuery(e).find("input[name^='wpfc-timeout-rule-content']").val();
|
||||
schedule = jQuery(e).find("input[name^='wpfc-timeout-rule-schedule']").val();
|
||||
hour = jQuery(e).find("input[name^='wpfc-timeout-rule-hour']").val();
|
||||
minute = jQuery(e).find("input[name^='wpfc-timeout-rule-minute']").val();
|
||||
|
||||
content = self.remove_host_name(content);
|
||||
content = content.replace(/^\/|\/$/g, '');
|
||||
|
||||
|
||||
rules.push({"prefix" : prefix, "content" : content, "schedule" : schedule, "hour" : hour, "minute" : minute});
|
||||
});
|
||||
|
||||
jQuery("#revert-loader-toolbar").show();
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
url: ajaxurl,
|
||||
data : {"action": "wpfc_save_timeout_pages", "rules" : rules, security: '<?php echo wp_create_nonce( "wpfc-save-timeout-ajax-nonce" ); ?>'},
|
||||
success: function(res){
|
||||
if(res.success){
|
||||
jQuery("#revert-loader-toolbar").hide();
|
||||
callback();
|
||||
self.set_right_class_for_item();
|
||||
}else{
|
||||
alert("The rule cannot be added...");
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
alert("unknown error");
|
||||
}
|
||||
});
|
||||
},
|
||||
insert_existing_rules: function(){
|
||||
var self = this;
|
||||
|
||||
if(typeof this.rules != "undefined" && this.rules && this.rules.length > 0){
|
||||
jQuery.each(self.rules, function(i, e){
|
||||
if(i > 0){
|
||||
}
|
||||
|
||||
self.add_line(i + 1, e);
|
||||
self.add_item(i + 1, e);
|
||||
});
|
||||
|
||||
self.set_right_class_for_item();
|
||||
}
|
||||
},
|
||||
set_right_class_for_item: function(){
|
||||
jQuery(".wpfc-timeout-item").each(function(i, e){
|
||||
if(i%2 == 0){
|
||||
jQuery(e).addClass("wpfc-timeout-item-right");
|
||||
}else{
|
||||
jQuery(e).removeClass("wpfc-timeout-item-right");
|
||||
}
|
||||
});
|
||||
},
|
||||
is_empty_values: function(prefix, content, schedule){
|
||||
if(prefix){
|
||||
jQuery("#wpfc-wizard-timeout select[name='wpfc-timeout-rule-prefix']").css({'border-color': '#ddd'});
|
||||
}else{
|
||||
jQuery("#wpfc-wizard-timeout select[name='wpfc-timeout-rule-prefix']").css({'border-color': 'red'});
|
||||
}
|
||||
|
||||
if(content){
|
||||
jQuery("#wpfc-wizard-timeout input[name='wpfc-timeout-rule-content']").css({'border-color': '#ddd'});
|
||||
}else{
|
||||
jQuery("#wpfc-wizard-timeout input[name='wpfc-timeout-rule-content']").css({'border-color': 'red'});
|
||||
}
|
||||
|
||||
if(schedule){
|
||||
jQuery("#wpfc-wizard-timeout select[name='wpfc-timeout-rule-schedule']").css({'border-color': '#ddd'});
|
||||
}else{
|
||||
jQuery("#wpfc-wizard-timeout select[name='wpfc-timeout-rule-schedule']").css({'border-color': 'red'});
|
||||
}
|
||||
|
||||
if(prefix && content && schedule){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
remove_host_name: function(content){
|
||||
//to replace the urls which start with http:// or www. or with Host_Name
|
||||
content = content.replace(new RegExp('.*' + location.hostname.replace(/www\./, "") + "\/", "gi"), "");
|
||||
content = content.replace(/\/$/, "");
|
||||
|
||||
return content;
|
||||
},
|
||||
hide_input_content: function(clone_modal){
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-prefix']").change(function(){
|
||||
if(jQuery(this).val() == "homepage" || jQuery(this).val() == "all"){
|
||||
clone_modal.find("input").hide();
|
||||
clone_modal.find("input").attr("name", "wpfc-timeout-rule-content").val(jQuery(this).val());
|
||||
}else{
|
||||
clone_modal.find("input").show();
|
||||
clone_modal.find("input").attr("name", "wpfc-timeout-rule-content").val("");
|
||||
}
|
||||
});
|
||||
},
|
||||
show_hour_and_minute: function(clone_modal){
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-schedule']").change(function(e){
|
||||
if(jQuery(this).val().match(/^(onceaday|daily)/i)){
|
||||
clone_modal.find(".wpfc-timeout-at-text").show();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-hour']").show();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-minute']").show();
|
||||
clone_modal.find(".wpfc-server-time-cont").show();
|
||||
}else{
|
||||
clone_modal.find(".wpfc-timeout-at-text").hide();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-hour']").hide();
|
||||
clone_modal.find("select[name='wpfc-timeout-rule-minute']").hide();
|
||||
clone_modal.find(".wpfc-server-time-cont").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,77 @@
|
||||
<style type="text/css">
|
||||
div[id^="wpfc-modal-toolbarsettings"] .wiz-input-cont{
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 10px !important;
|
||||
float: left !important;
|
||||
width: 108px !important;
|
||||
}
|
||||
.wiz-input-cont label{
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div template-id="wpfc-modal-toolbarsettings" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 9995;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e('Toolbar Settings', 'wp-fastest-cache'); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<div class="wpfc-cdn-pages-container">
|
||||
<div class="wiz-cont" style="">
|
||||
<h1><?php _e("User Roles"); ?></h1>
|
||||
<p style="margin-bottom: 24px;"><?php _e("The WP Fastest Cache menu on the admin toolbar will be visible to the selected user roles below.", "wp-fastest-cache"); ?> <a target="_blank" href="https://www.wpfastestcache.com/features/clear-cache-link-on-the-toolbar/"><img src="<?php echo plugins_url("wp-fastest-cache/images/info.png"); ?>" /></a></p>
|
||||
|
||||
<?php
|
||||
global $wp_roles;
|
||||
|
||||
if(!isset($wp_roles)){
|
||||
$wp_roles = new WP_Roles();
|
||||
}
|
||||
|
||||
$wpfc_role_names = $wp_roles->get_names();
|
||||
|
||||
foreach ($wpfc_role_names as $key => $value){
|
||||
if($key == "administrator"){
|
||||
continue;
|
||||
}
|
||||
|
||||
$wpfc_toolbar_element_id = "wpfc_toolbar_".$key;
|
||||
?>
|
||||
|
||||
<div class="wiz-input-cont" style="padding-right: 12px;margin-right: 10px;width: auto !important;">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="checkbox" id="<?php echo $wpfc_toolbar_element_id; ?>" name="<?php echo $wpfc_toolbar_element_id; ?>"></label>
|
||||
<label for="<?php echo $wpfc_toolbar_element_id; ?>"><?php _e($value); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;">
|
||||
|
||||
<button class="wpfc-dialog-buttons" type="button" action="close">
|
||||
<span><?php _e("Cancel", "wp-fastest-cache"); ?></span>
|
||||
</button>
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span><?php _e("Save", "wp-fastest-cache"); ?></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<div id="wpfc-modal-updateerror" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 560px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Update Error", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 8px;">
|
||||
<div style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;" class="window-content">
|
||||
|
||||
|
||||
<div id="wpfc-wizard-downloaderror" class="wpfc-cdn-pages-container">
|
||||
<div wpfc-cdn-page="1" class="wiz-cont">
|
||||
<h1>Manually Update</h1>
|
||||
<p><label id="wpfc-update-error-message"><?php echo $error_message; ?></label> You need to download the file and update the plugin manually.</p>
|
||||
<div class="wiz-input-cont" style="text-align:center;" id="wpfc-send-email">
|
||||
<a id="wpfc-download-now" target="_blank" href="">
|
||||
<button class="wpfc-green-button" style="padding: 6px 60px;">
|
||||
<span>Download</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<p class="wpfc-bottom-note"><a target="_blank" href="http://www.wpfastestcache.com/warnings/how-to-update-the-premium-version-manually/">Note: Please read How to Update the Premium Version Manually</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
72
wp-content/plugins/wp-fastest-cache/templates/update_now.php
Normal file
72
wp-content/plugins/wp-fastest-cache/templates/update_now.php
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,31 @@
|
||||
<div id="wpfc-modal-updatesuccess" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 300px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Success", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<center style="color: black;">WP Fastest Cache Premium has been updated. Please <u>push</u> finish button </center>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span>Finish</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<div id="wpfc-modal-updatesuccess" style="top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 300px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Success", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<center style="color: black;">WP Fastest Cache Premium has been updated. Please <u>push</u> finish button </center>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons-green" type="button" action="finish">
|
||||
<span>Finish</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
91
wp-content/plugins/wp-fastest-cache/templates/updatepost.php
Normal file
91
wp-content/plugins/wp-fastest-cache/templates/updatepost.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<style type="text/css">
|
||||
div[id^="wpfc-modal-updatepost"] .wiz-input-cont{
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
.wiz-input-cont label{
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div template-id="wpfc-modal-updatepost" style="display:none;top: 10.5px; left: 226px; position: absolute; padding: 6px; height: auto; width: 330px; z-index: 10001;">
|
||||
<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;">
|
||||
</div>
|
||||
<div style="z-index: 600; border-radius: 3px;">
|
||||
<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;">
|
||||
<table width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<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;"><?php _e("Update Post", "wp-fastest-cache"); ?></td>
|
||||
<td width="20" align="center" style="vertical-align: middle;"></td>
|
||||
<td width="20" align="center" style="vertical-align: middle; font-family: Arial,Helvetica,sans-serif; color: rgb(170, 170, 170); cursor: default;">
|
||||
<div title="Close Window" class="close-wiz"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="window-content-wrapper" style="padding: 15px;">
|
||||
<div class="window-content" style="z-index: 1000; height: auto; position: relative; display: inline-block; width: 100%;">
|
||||
<p style="color:#666;margin-top:0 !important;"><?php _e("What do you want to happen after update a post or a page?", "wp-fastest-cache"); ?></p>
|
||||
|
||||
<?php
|
||||
$wpFastestCacheUpdatePost_type_post = "";
|
||||
$wpFastestCacheUpdatePost_type_all = "";
|
||||
|
||||
if(isset($this->options->wpFastestCacheUpdatePost_type)){
|
||||
if($this->options->wpFastestCacheUpdatePost_type == "post"){
|
||||
$wpFastestCacheUpdatePost_type_post = 'checked="checked"';
|
||||
}else if($this->options->wpFastestCacheUpdatePost_type == "all"){
|
||||
$wpFastestCacheUpdatePost_type_all = 'checked="checked"';
|
||||
}
|
||||
}else{
|
||||
$wpFastestCacheUpdatePost_type_post = 'checked="checked"';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheUpdatePost_type_all; ?> action-id="wpFastestCacheUpdatePost_type_all" id="wpFastestCacheUpdatePost_type_all" name="wpFastestCacheUpdatePost_type" value="all"></label>
|
||||
<label for="wpFastestCacheUpdatePost_type_all"><?php _e("Clear All Cache", "wp-fastest-cache"); ?></label>
|
||||
</div>
|
||||
<div class="wiz-input-cont">
|
||||
<label class="mc-input-label" style="margin-right: 5px;"><input type="radio" <?php echo $wpFastestCacheUpdatePost_type_post; ?> action-id="wpFastestCacheUpdatePost_type_post" id="wpFastestCacheUpdatePost_type_post" name="wpFastestCacheUpdatePost_type" value="post"></label>
|
||||
<label for="wpFastestCacheUpdatePost_type_post"><?php _e("Clear Cache of Post / Page", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheUpdatePost_type_post"><?php _e("Clear Cache of Post Categories", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheUpdatePost_type_post"><?php _e("Clear Cache of Post Tags", "wp-fastest-cache"); ?></label><br>
|
||||
<label style="margin-left:24px;" for="wpFastestCacheUpdatePost_type_post"><?php _e("Clear Cache of Home page", "wp-fastest-cache"); ?></label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="padding: 12px; height: 23px;text-align: center;">
|
||||
<button class="wpfc-dialog-buttons buttons" type="button" action="close">
|
||||
<span><?php _e("OK", "wp-fastest-cache"); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery("#wpFastestCacheUpdatePost").click(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
if(jQuery("div[id^='wpfc-modal-updatepost-']").length === 0){
|
||||
Wpfc_New_Dialog.dialog("wpfc-modal-updatepost", {close: function(){
|
||||
Wpfc_New_Dialog.clone.find("div.window-content input").each(function(){
|
||||
if(jQuery(this).is(':checked')){
|
||||
var id = jQuery(this).attr("action-id");
|
||||
jQuery("div.tab1 div[template-id='wpfc-modal-updatepost'] div.window-content input#" + id).attr("checked", true);
|
||||
}
|
||||
|
||||
//.attr("checked"
|
||||
});
|
||||
|
||||
Wpfc_New_Dialog.clone.remove();
|
||||
}});
|
||||
|
||||
Wpfc_New_Dialog.show_button("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
247
wp-content/plugins/wp-fastest-cache/templates/varnish.php
Normal file
247
wp-content/plugins/wp-fastest-cache/templates/varnish.php
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user