File Editor
Directories:
.. (Back)
cdn
Files:
buttons.html
cache_path.php
clearing_specific_pages.php
cloudflare_warning.html
disable_wp_cron.php
download.html
exclude.php
htaccess.html
lazy_load.php
newpost.php
nginx_gzip.php
permission_error.html
preload.php
sample_img_list.html
timeout.php
toolbar_settings.php
update_error.html
update_now.php
update_success.html
update_success.php
updatepost.php
varnish.php
Create New File
Create
Edit File: varnish.php
<div template-id="wpfc-modal-varnish" 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;">Varnish Cache 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-varnish" class="wpfc-cdn-pages-container"> <div wpfc-cdn-page="1" class="wiz-cont"> <h1>Varnish Server</h1> <p>Specify the IP address of your varnish instance. If you do not know the ip address, you can ask your hosting provider on what to set here.</p> <div class="wiz-input-cont"> <?php $datas = get_option("WpFastestCacheVarnish"); $ip = isset($datas["server"]) && $datas["server"] ? $datas["server"] : "127.0.0.1"; ?> <input value="<?php echo $ip; ?>" type="text" name="server" 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/using-varnish-cache-with-wp-fastest-cache/">Note: Please read this article to learn about this feature.</a></p> </div> <img style="border-radius:100px;" class="wiz-bg-img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAC/VBMVEVrvtTw+fz1+/3y+vxyQJK+Hi6KWaF5mcxLLHhhK4f///9OLXlrw9jP5fLAHjCfudzW7fXT0eWLWqKkHiXBwNnT6fObttuhu97M4vDa7/XG3O2pwuHZMEnMJjx/FhekvuDJ3+9RLXu+1uxvPZBafJtULn3C2ey4Hy74/f6rxeNruNB4l8rEIDO1zufIIzfd8fZeNoTdM07VLkeuyORYeJhovNNWMX+40eimwOCYs9qVsNhLKnZdf6BjOYgvnHJ/EhOyy+bDxN1rO42yHStnPIpaLILTK0O70+pghKRaNIGUGR/h8vZqssvQKUCEFhjp9vh0RpPk8/iKFhpWdpaioMqcGyLJyeB6eq3gNlJtvNN+TZlKsnPp6vNorsdbeJrOzeN1k8WAf7Bkhq5Zdpe9vNdvjLx6dKmGVJ+rHil+nc6nps1ONX2Pq9acnsRmqMOPl8Jyk754SpaOGB1SRYfi5O/U1ee5udZjnbmEhbaCUZzkOVbw8vjb3OqIptOxsNFKKHWksNCDodCtq89uqMpriaeJMDVxncF1jbd4g7JfjquAGx1tRI5glLJVUI4mhF+DISV8EBGepspjocBSPII5oniXpsxhbaRfW5t3YpgrjGa1ttSKirSYlbyOj7p8lrRykqxmMYtGpYQxlWm6yN6OrMxuhbiS07JWXZOWTFbC1OOzv9qYrs6PoMtdfKroYZ1PSHyxyeKAs9GEkcCzl6yFuKikZ3ipudX0r7p1jZwifVp+KS/W5ex1w9jCt8yNpsGCpaR7cpxaZ5loaJBhWYi9K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veOQBV5jOprjjlkQRIJkFkNHen/XH9ymykRbNsCTMBVKEWRfA/Afw0au5I+aMEkHqB24gk9PWpqT/PhmOMdElrYyIxLV8EOweIDGpk+rQ/hNnbjH5klCSXX+o98oYBU4Gf8UfFfCfYMUCW5bbGoEp6JAF0Jly+VOru3uSPnxtvap0AcAZRBP8TQFbn1MygRgQLXH968xUhBOqkfwcXG/zYaFo7LQaATQsArgh2DoBhZAmbYPKILoOw/ox9IuPqJn8EgA4FYty0sjvtfBHsFCDS5bEvj5tk8MfNISo0gD5DR3ppAI3ctOmTjl6EvzYTAGKyJ/1PAHZvlLXMjRtkAhmWvsFgMJMVKDXoZET0zO52uwGlof5OlsFUYgHAFC2CnReh0xtkA6dBoDObyMav0eDycd7CK1BSgv/YRTGRjQDAnxWT/WjnAK9Gu7QsGxCvjRtH7z/648aNm3ODOHHhoE6PgCkIw/gg8o8A2OUEACJFsHMAWgIWliUxuPdB6LCwvrm0zH76Ruxl7RIhQTzIORShmbum5QKQArCjCLYF0Ikv/PunLtAVZYkCWq/D5VgQNpflFMwn2ip372kpOj79x6P75CA6tnZRDH9aASmAbRbBX6vohKGJa8VeAAAAAElFTkSuQmCC"/> </div> </div> </div> <?php include WPFC_MAIN_PATH."templates/buttons.html"; ?> </div> </div> <script type="text/javascript"> var WpFcVarnish = { init: function(){ this.click_event_for_add_button(); }, click_event_for_add_button: function(){ let self = this; jQuery(".varnish-cache-list > div").click(function(){ self.open_modal(); }); }, open_modal: function(item){ var self = this; Wpfc_New_Dialog.dialog("wpfc-modal-varnish", { close: function(e){ let modal = jQuery(e).closest("div[id^='wpfc-modal-varnish']"); let modal_id = modal.attr("id"); modal.find("label.wiz-error-msg").text(""); Wpfc_New_Dialog.id = modal_id; Wpfc_New_Dialog.disable_button("close"); jQuery.ajax({ type: 'POST', dataType: "json", url: ajaxurl, data : {"action": "wpfc_purgecache_varnish", security: '<?php echo wp_create_nonce( "wpfc-varnish-ajax-nonce" ); ?>'}, success: function(res){ if(!res.success){ modal.find("label.wiz-error-msg").text(res.message); } Wpfc_New_Dialog.enable_button("close"); }, error: function(e) { alert("unknown error"); } }); }, start: function(e){ let modal = jQuery(e).closest("div[id^='wpfc-modal-varnish']"); let modal_id = modal.attr("id"); modal.find("label.wiz-error-msg").text(""); Wpfc_New_Dialog.id = modal_id; Wpfc_New_Dialog.disable_button("start"); jQuery.ajax({ type: 'POST', dataType: "json", url: ajaxurl, data : {"action": "wpfc_start_varnish", security: '<?php echo wp_create_nonce( "wpfc-varnish-ajax-nonce" ); ?>'}, success: function(res){ Wpfc_New_Dialog.enable_button("start"); if(res.success === true){ jQuery("div.varnish-cache-list").find("div.meta").removeClass("pause"); Wpfc_New_Dialog.show_button("pause"); Wpfc_New_Dialog.hide_button("start"); }else{ modal.find("label.wiz-error-msg").text(res.message); } }, error: function(e) { alert("unknown error"); } }); }, pause: function(e){ let modal = jQuery(e).closest("div[id^='wpfc-modal-varnish']"); let modal_id = modal.attr("id"); modal.find("label.wiz-error-msg").text(""); Wpfc_New_Dialog.id = modal_id; Wpfc_New_Dialog.disable_button("pause"); jQuery.ajax({ type: 'POST', dataType: "json", url: ajaxurl, data : {"action": "wpfc_pause_varnish", security: '<?php echo wp_create_nonce( "wpfc-varnish-ajax-nonce" ); ?>'}, success: function(res){ if(res.success === true){ Wpfc_New_Dialog.enable_button("pause"); jQuery("div.varnish-cache-list").find("div.meta").addClass("pause"); Wpfc_New_Dialog.show_button("start"); Wpfc_New_Dialog.hide_button("pause"); } }, error: function(e) { alert("unknown error"); } }); }, remove: function(e){ let modal = jQuery(e).closest("div[id^='wpfc-modal-varnish']"); let modal_id = modal.attr("id"); Wpfc_New_Dialog.id = modal_id; Wpfc_New_Dialog.disable_button("remove"); jQuery.ajax({ type: 'POST', dataType: "json", url: ajaxurl, data : {"action": "wpfc_remove_varnish", security: '<?php echo wp_create_nonce( "wpfc-varnish-ajax-nonce" ); ?>'}, success: function(res){ if(res.success === true){ Wpfc_New_Dialog.enable_button("remove"); jQuery("div.varnish-cache-list").find("div.meta").removeClass("isConnected"); jQuery("div.varnish-cache-list").find("div.meta").removeClass("pause"); modal.remove(); } }, error: function(e) { alert("unknown error"); } }); }, finish: function(e){ let modal = jQuery(e).closest("div[id^='wpfc-modal-varnish']"); let modal_id = modal.attr("id"); let server = modal.find("input[name='server']").val(); let error_label = modal.find("label.wiz-error-msg"); if(server.length == 0){ server = "127.0.0.1"; modal.find("input[name='server']").val(server); } modal.find("label.wiz-error-msg").text(""); modal.find("input").attr('disabled', true); Wpfc_New_Dialog.id = modal_id; Wpfc_New_Dialog.disable_button("finish"); jQuery.ajax({ type: 'POST', dataType: "json", url: ajaxurl, data : {"action": "wpfc_save_varnish", "server" : server, security: '<?php echo wp_create_nonce( "wpfc-varnish-ajax-nonce" ); ?>'}, success: function(res){ Wpfc_New_Dialog.enable_button("finish"); modal.find("input").attr('disabled', false); if(!res.success){ modal.find("label.wiz-error-msg").text(res.message); }else{ jQuery("div#wpfc-wizard-varnish").find("input[name='server']").val(server); jQuery("div.varnish-cache-list").find("div.meta").addClass("isConnected"); modal.remove(); } }, error: function(e) { Wpfc_New_Dialog.enable_button("finish"); modal.find("input").attr('disabled', false); modal.find("label.wiz-error-msg").text("Please make sure that your server has Varnish Cache"); } }); } }, function(dialog){ if(jQuery("div.varnish-cache-list").find("div.meta.isConnected.pause").length == 1){ Wpfc_New_Dialog.show_button("remove"); Wpfc_New_Dialog.show_button("start"); Wpfc_New_Dialog.show_button("close"); }else if(jQuery("div.varnish-cache-list").find("div.meta.isConnected").length == 1){ Wpfc_New_Dialog.show_button("remove"); Wpfc_New_Dialog.show_button("pause"); Wpfc_New_Dialog.show_button("close"); } Wpfc_New_Dialog.clone.find("div.window-buttons-wrapper").find("button[action='close']").text("Purge Varnish Cache"); Wpfc_New_Dialog.show_button("finish"); }); } } WpFcVarnish.init(); </script>
Save Changes
Rename File
Rename