Version Description
- Compatibility with PHP 5.6 and above;
- Compatibility with WordPress 5.4 and above;
- Monitoring of Aruba HiSpeed Cache service enabled/disabled;
- Message in the admin panel following the check: on the status of the service and if the website is hosted on an Aruba server or a server which is not compatible with the HiSpeed Cache service.
Download this release
Release Info
Developer | arubadev |
Plugin | Aruba HiSpeed Cache |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.1.0
- admin/css/aruba-hispeed-cache-admin-notice.css +35 -0
- admin/css/aruba-hispeed-cache-admin.css +12 -12
- admin/index.php +3 -1
- admin/js/aruba-hispeed-cache-admin.js +25 -30
- admin/partials/admin-display.php +15 -15
- admin/partials/admin-general-options.php +66 -61
- admin/partials/admin-notice-not-aruba-server.php +10 -0
- admin/partials/admin-notice-service-available.php +10 -0
- admin/partials/admin-notice-service-unavailable.php +10 -0
- admin/partials/admin-notice-version.php +3 -2
- aruba-hispeed-cache.php +42 -36
- includes/ArubaHiSpeedCacheAdmin.php +140 -72
- includes/ArubaHiSpeedCacheBootstrap.php +193 -152
- includes/ArubaHiSpeedCacheConfigs.php +140 -40
- includes/ArubaHiSpeedCacheLoader.php +6 -6
- includes/ArubaHiSpeedCachePurger.php +14 -14
- includes/ArubaHiSpeedCacheWpPurger.php +67 -50
- includes/ArubaHiSpeedCachei18n.php +8 -2
- includes/HiSpeedCacheServiceChecker.php +124 -0
- includes/index.php +7 -1
- index.php +7 -2
- languages/aruba-hispeed-cache-es_ES.mo +0 -0
- languages/aruba-hispeed-cache-es_ES.po +106 -90
- languages/aruba-hispeed-cache-it_IT.mo +0 -0
- languages/aruba-hispeed-cache-it_IT.po +86 -43
- languages/aruba-hispeed-cache.pot +53 -41
- readme.txt +29 -7
- uninstall.php +5 -4
admin/css/aruba-hispeed-cache-admin-notice.css
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
--icon-external-link: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"> <g style="stroke:rgb(35,82,124);stroke-width:1"> <line x1="5" y1="5" x2="5" y2="14" /> <line x1="14" y1="9" x2="14" y2="14" /> <line x1="5" y1="14" x2="14" y2="14" /> <line x1="5" y1="5" x2="9" y2="5" /> <line x1="10" y1="2" x2="17" y2="2" /> <line x1="17" y1="2" x2="17" y2="9" /> <line x1="10" y1="9" x2="17" y2="2" style="stroke-width:1.5" /></g></svg>');
|
3 |
+
}
|
4 |
+
|
5 |
+
#ahsc-service-error {
|
6 |
+
background: rgba(208, 2, 27, 0.1);
|
7 |
+
-webkit-box-shadow: 0 1px 2px 0 rgba(63, 63, 68, 0.25), inset 0 3px 0 0 #d0021b;
|
8 |
+
box-shadow: 0 1px 2px 0 rgba(63, 63, 68, 0.25), inset 0 3px 0 0 #d0021b;
|
9 |
+
}
|
10 |
+
|
11 |
+
#ahsc-service-warning {
|
12 |
+
background: rgba(245, 166, 35, 0.1);
|
13 |
+
-webkit-box-shadow: 0 1px 2px 0 rgba(63, 63, 68, 0.25), inset 0 3px 0 0 #f5a623;
|
14 |
+
box-shadow: 0 1px 2px 0 rgba(63, 63, 68, 0.25), inset 0 3px 0 0 #f5a623;
|
15 |
+
}
|
16 |
+
|
17 |
+
#ahsc-service-error,
|
18 |
+
#ahsc-service-warning {
|
19 |
+
border: none;
|
20 |
+
margin: 15px 0;
|
21 |
+
padding: 15px;
|
22 |
+
}
|
23 |
+
|
24 |
+
#ahsc-service-error a,
|
25 |
+
#ahsc-service-warning a {
|
26 |
+
text-decoration: none;
|
27 |
+
font-weight: 500;
|
28 |
+
}
|
29 |
+
|
30 |
+
#ahsc-service-error a::after,
|
31 |
+
#ahsc-service-warning a::after {
|
32 |
+
content: "";
|
33 |
+
background: no-repeat var(--icon-external-link);
|
34 |
+
padding-right: 1em;
|
35 |
+
}
|
admin/css/aruba-hispeed-cache-admin.css
CHANGED
@@ -2,35 +2,35 @@
|
|
2 |
}
|
3 |
.clearfix:before,
|
4 |
.clearfix:after {
|
5 |
-
|
6 |
-
|
7 |
}
|
8 |
.clearfix:after {
|
9 |
-
|
10 |
}
|
11 |
|
12 |
.form-table th,
|
13 |
.form-wrap label {
|
14 |
-
|
15 |
}
|
16 |
|
17 |
.form-table th {
|
18 |
-
|
19 |
}
|
20 |
|
21 |
.ahsc-options-wrapper tr td label {
|
22 |
-
|
23 |
}
|
24 |
|
25 |
h2,
|
26 |
h3 {
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
}
|
32 |
|
33 |
small::before {
|
34 |
-
|
35 |
-
|
36 |
}
|
2 |
}
|
3 |
.clearfix:before,
|
4 |
.clearfix:after {
|
5 |
+
content: " ";
|
6 |
+
display: table;
|
7 |
}
|
8 |
.clearfix:after {
|
9 |
+
clear: both;
|
10 |
}
|
11 |
|
12 |
.form-table th,
|
13 |
.form-wrap label {
|
14 |
+
vertical-align: middle;
|
15 |
}
|
16 |
|
17 |
.form-table th {
|
18 |
+
width: 25% !important;
|
19 |
}
|
20 |
|
21 |
.ahsc-options-wrapper tr td label {
|
22 |
+
width: 100%;
|
23 |
}
|
24 |
|
25 |
h2,
|
26 |
h3 {
|
27 |
+
color: #1d2327 !important;
|
28 |
+
font-size: 1.3em !important;
|
29 |
+
margin: 1em 0 !important;
|
30 |
+
padding: 8px 12px 8px 0px !important;
|
31 |
}
|
32 |
|
33 |
small::before {
|
34 |
+
content: "\a";
|
35 |
+
white-space: pre;
|
36 |
}
|
admin/index.php
CHANGED
@@ -1,2 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Silence.
|
4 |
+
*/
|
admin/js/aruba-hispeed-cache-admin.js
CHANGED
@@ -1,38 +1,33 @@
|
|
1 |
(() => {
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
"form#post_form > div > div"
|
10 |
-
).children;
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
});
|
23 |
-
};
|
24 |
|
25 |
-
|
26 |
-
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
})();
|
1 |
(() => {
|
2 |
+
"use strict";
|
3 |
|
4 |
+
const ahsc_show_option = () => {
|
5 |
+
let ahsc_enable_purge = document.querySelector("input#ahsc_enable_purge");
|
6 |
|
7 |
+
ahsc_enable_purge.addEventListener("change", (e) => {
|
8 |
+
let form_parts = document.querySelector("form#post_form > div > div").children;
|
|
|
|
|
9 |
|
10 |
+
if (form_parts[1].style.display === "none" && form_parts[2].style.display === "none") {
|
11 |
+
form_parts[1].style.removeProperty("display");
|
12 |
+
form_parts[2].style.removeProperty("display");
|
13 |
+
} else {
|
14 |
+
form_parts[1].style.display = "none";
|
15 |
+
form_parts[2].style.display = "none";
|
16 |
+
}
|
17 |
+
});
|
18 |
+
};
|
|
|
|
|
|
|
19 |
|
20 |
+
document.addEventListener("DOMContentLoaded", function (event) {
|
21 |
+
const purge_btn = document.querySelector("a#purgeall");
|
22 |
|
23 |
+
purge_btn.addEventListener("click", (e) => {
|
24 |
+
if (confirm(aruba_hispeed_cache.purge_confirm_string) === true) {
|
25 |
+
// Continue submitting form.
|
26 |
+
} else {
|
27 |
+
e.preventDefault();
|
28 |
+
}
|
29 |
+
});
|
30 |
|
31 |
+
ahsc_show_option();
|
32 |
+
});
|
33 |
})();
|
admin/partials/admin-display.php
CHANGED
@@ -5,20 +5,20 @@ global $pagenow;
|
|
5 |
<!-- This file should primarily consist of HTML with a little bit of PHP. -->
|
6 |
|
7 |
<div class="wrap ahsc-wrapper">
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
?>
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
</div> <!-- End of .wrap .ahsc-wrapper -->
|
5 |
<!-- This file should primarily consist of HTML with a little bit of PHP. -->
|
6 |
|
7 |
<div class="wrap ahsc-wrapper">
|
8 |
+
<h1 class="ahsc-option-title">
|
9 |
+
<?php \esc_html_e('Aruba HiSpeed Cache Settings ', 'aruba-hispeed-cache'); ?>
|
10 |
+
</h1>
|
11 |
|
12 |
+
<div id="poststuff">
|
13 |
+
<div id="post-body" class="metabox-holder columns-2">
|
14 |
+
<div id="post-body-content">
|
15 |
+
<?php
|
16 |
+
require ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. 'admin-general-options.php';
|
17 |
?>
|
18 |
+
</div> <!-- End of #post-body-content -->
|
19 |
+
<div id="postbox-container-1" class="postbox-container">
|
20 |
+
<!-- empty sidebar -->
|
21 |
+
</div> <!-- End of #postbox-container-1 -->
|
22 |
+
</div> <!-- End of #post-body -->
|
23 |
+
</div> <!-- End of #poststuff -->
|
24 |
+
</div> <!-- End of .wrap .ahsc-wrapper -->
|
admin/partials/admin-general-options.php
CHANGED
@@ -4,76 +4,81 @@
|
|
4 |
*/
|
5 |
$aruba_hispeed_cache_settings = $this->_settings_manager();
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
?>
|
8 |
|
9 |
<form id="post_form" method="post" action="#" name="smart_http_expire_form" class="clearfix">
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
|
58 |
-
|
59 |
-
|
60 |
|
61 |
</form> <!-- End of #post_form -->
|
62 |
|
63 |
<div class="ahsc-actions-wrapper">
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
\submit_button(__('Save changes', 'aruba-hispeed-cache'), 'primary', 'smart_http_expire_save', false, array('form' => 'post_form'));
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
</div>
|
4 |
*/
|
5 |
$aruba_hispeed_cache_settings = $this->_settings_manager();
|
6 |
|
7 |
+
/**
|
8 |
+
* @see ArubaHiSpeedCache\includes\_check_hispeed_cache_services_realtime function
|
9 |
+
*/
|
10 |
+
$this->_check_hispeed_cache_services_realtime();
|
11 |
+
|
12 |
?>
|
13 |
|
14 |
<form id="post_form" method="post" action="#" name="smart_http_expire_form" class="clearfix">
|
15 |
|
16 |
+
<div class="ahsc-options-wrapper">
|
17 |
+
<div class="inside">
|
18 |
+
<table class="form-table ahsc-table">
|
19 |
+
<?php foreach ($this->_form_fields() as $field_sets_key => $field_sets_data) : ?>
|
20 |
+
<?php if (isset($field_sets_data['title'])) : ?>
|
21 |
+
</table>
|
22 |
+
<h2 class="title"><?php echo esc_html($field_sets_data['title']); ?>
|
23 |
+
</h2>
|
24 |
+
<table class="form-table ahsc-table">
|
25 |
+
<?php continue; ?>
|
26 |
+
<?php endif; ?>
|
27 |
|
28 |
+
<tr class="<?php echo esc_html($field_sets_key); ?>">
|
29 |
+
<th scope="row">
|
30 |
+
<?php echo esc_html($field_sets_data['th']); ?>
|
31 |
+
<small><?php echo (isset($field_sets_data['small'])) ? esc_html($field_sets_data['small']) : '' ?></small>
|
32 |
+
</th>
|
33 |
+
<td>
|
34 |
+
<fieldset>
|
35 |
+
<legend class="screen-reader-text">
|
36 |
+
<span><?php echo esc_html($field_sets_data['legend_text']); ?></span>
|
37 |
+
</legend>
|
38 |
+
<?php foreach ($field_sets_data['fields'] as $field_key => $field): ?>
|
39 |
+
<label
|
40 |
+
for="<?php echo esc_html($field_key); ?>">
|
41 |
+
<input type="hidden"
|
42 |
+
name="<?php echo esc_html($field['name']); ?>"
|
43 |
+
value="0" />
|
44 |
+
<input
|
45 |
+
type="<?php echo esc_html($field['type']) ?>"
|
46 |
+
value="1"
|
47 |
+
name="<?php echo esc_html($field['name']); ?>"
|
48 |
+
id="<?php esc_html_e($field['id']); ?>"
|
49 |
+
<?php \checked($aruba_hispeed_cache_settings[$field_key], 1); ?>
|
50 |
+
/>
|
51 |
+
<?php _e($field['lable_text']); ?>
|
52 |
+
</label>
|
53 |
+
<?php endforeach; ?>
|
54 |
+
</fieldset>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
|
58 |
+
<?php endforeach;?>
|
59 |
+
</table>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
|
63 |
+
<input type="hidden" name="smart_http_expire_form_nonce"
|
64 |
+
value="<?php _e($this->_generate_settings_form_nonce()); ?>" />
|
65 |
|
66 |
</form> <!-- End of #post_form -->
|
67 |
|
68 |
<div class="ahsc-actions-wrapper">
|
69 |
+
<table class="form-table ahst-table">
|
70 |
+
<tr>
|
71 |
+
<th></th>
|
72 |
+
<td>
|
73 |
+
<?php
|
74 |
\submit_button(__('Save changes', 'aruba-hispeed-cache'), 'primary', 'smart_http_expire_save', false, array('form' => 'post_form'));
|
75 |
+
?>
|
76 |
+
<a id="purgeall"
|
77 |
+
href="<?php echo \esc_url($this->_generate_purge_nonce()); ?>"
|
78 |
+
class="button button-secondary">
|
79 |
+
<?php \esc_html_e('Purge entire cache', 'aruba-hispeed-cache'); ?>
|
80 |
+
</a>
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
</table>
|
84 |
+
</div>
|
admin/partials/admin-notice-not-aruba-server.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="ahsc-service-error" class="notice notice-error">
|
2 |
+
<p>
|
3 |
+
<?php
|
4 |
+
printf(
|
5 |
+
\wp_kses(__('<strong>The Aruba HiSpeed Cache plugin cannot be used because your WordPress website is not hosted on an Aruba hosting platform.</strong> Buy an <a href="%s" rel="nofollow" target="_blank">Aruba hosting</a> service and migrate your website to use the plugin.', 'aruba-hispeed-cache'), array( 'strong' => array(), 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array()) )),
|
6 |
+
esc_url(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getLocalizedLink('link_hosting_truck'))
|
7 |
+
);
|
8 |
+
?>
|
9 |
+
</p>
|
10 |
+
</div>
|
admin/partials/admin-notice-service-available.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="ahsc-service-warning" class="notice notice-warning">
|
2 |
+
<p>
|
3 |
+
<?php printf(
|
4 |
+
\wp_kses(__('<strong>The HiSpeed Cache feature is not enabled.</strong> To enable it, go to your domain <a href="%s" rel="nofollow" target="_blank">control panel</a>. For further details <a href="%s" rel="nofollow" target="_blank">see our guide</a>.', 'aruba-hispeed-cache'), array( 'strong' => array(), 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array()) )),
|
5 |
+
esc_url(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getLocalizedLink('link_aruba_pca')),
|
6 |
+
esc_url(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getLocalizedLink('link_guide'))
|
7 |
+
);
|
8 |
+
?>
|
9 |
+
</p>
|
10 |
+
</div>
|
admin/partials/admin-notice-service-unavailable.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<div id="ahsc-service-error" class="notice notice-error">
|
3 |
+
<p>
|
4 |
+
<?php printf(
|
5 |
+
\wp_kses(__('<strong>The HiSpeed Cache feature, with which the plugin interfaces, is not available on the server that hosts your website.</strong> To use HiSpeed Cache and the plugin, contact <a href="%s" rel="nofollow" target="_blank">support</a>.', 'aruba-hispeed-cache'), array( 'strong' => array(), 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array()) )),
|
6 |
+
esc_url(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getLocalizedLink('link_assistance'))
|
7 |
+
);
|
8 |
+
?>
|
9 |
+
</p>
|
10 |
+
</div>
|
admin/partials/admin-notice-version.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<div id="message" class="error">
|
2 |
<p>
|
3 |
<strong>
|
@@ -7,8 +8,8 @@
|
|
7 |
*/
|
8 |
\printf(
|
9 |
\esc_html__('Sorry, Aruba HiSpeed Cache requires WordPress %s or higher.', 'aruba-hispeed-cache'),
|
10 |
-
\esc_html(
|
11 |
); ?>
|
12 |
</strong>
|
13 |
</p>
|
14 |
-
</div>
|
1 |
+
|
2 |
<div id="message" class="error">
|
3 |
<p>
|
4 |
<strong>
|
8 |
*/
|
9 |
\printf(
|
10 |
\esc_html__('Sorry, Aruba HiSpeed Cache requires WordPress %s or higher.', 'aruba-hispeed-cache'),
|
11 |
+
\esc_html(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('MINIMUM_WP'))
|
12 |
); ?>
|
13 |
</strong>
|
14 |
</p>
|
15 |
+
</div>
|
aruba-hispeed-cache.php
CHANGED
@@ -6,20 +6,22 @@
|
|
6 |
* @package Aruba-HiSpeed-Cache
|
7 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
8 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
9 |
-
* @link
|
|
|
10 |
*
|
11 |
* @wordpress-plugin
|
12 |
* Plugin Name: Aruba HiSpeed Cache
|
13 |
-
* Version: 1.
|
14 |
* Plugin URI: https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx
|
15 |
-
* Description:
|
16 |
* Author: Aruba.it
|
17 |
* Author URI: https://www.aruba.it/
|
18 |
* Text Domain: aruba-hispeed-cache
|
|
|
19 |
* License: GPL v2
|
20 |
-
* Requires at least: 5.
|
21 |
* Tested up to: 6.0
|
22 |
-
* Requires PHP:
|
23 |
*
|
24 |
*
|
25 |
* This program is free software: you can redistribute it and/or modify
|
@@ -36,60 +38,64 @@
|
|
36 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
37 |
*/
|
38 |
|
39 |
-
|
40 |
|
41 |
namespace ArubaHiSpeedCache;
|
42 |
|
43 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
|
44 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheBootstrap;
|
45 |
-
use ArubaHiSpeedCache\includes\ArubaHiSpeedCache_WP_CLI_Command;
|
46 |
|
47 |
use \register_activation_hook;
|
48 |
use \register_deactivation_hook;
|
49 |
use \defined;
|
50 |
-
use \WP_CLI;
|
51 |
|
52 |
if (!defined('WPINC')) {
|
53 |
die;
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
-
* Require
|
58 |
-
*
|
59 |
-
*
|
60 |
*/
|
61 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'includes' .DIRECTORY_SEPARATOR. 'ArubaHiSpeedCacheConfigs.php';
|
62 |
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_set_default_constant(__FILE__);
|
63 |
|
64 |
/**
|
65 |
-
* Adding methods to "activate"
|
66 |
*/
|
67 |
-
\register_activation_hook(
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
77 |
|
78 |
-
/**
|
79 |
-
* run_aruba_hispeed_cache
|
80 |
-
*
|
81 |
-
* @return void
|
82 |
-
*/
|
83 |
-
function run_aruba_hispeed_cache()
|
84 |
-
{
|
85 |
-
global $aruba_hispeed_cache;
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
6 |
* @package Aruba-HiSpeed-Cache
|
7 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
8 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
9 |
+
* @link Null
|
10 |
+
* @since 1.0.0
|
11 |
*
|
12 |
* @wordpress-plugin
|
13 |
* Plugin Name: Aruba HiSpeed Cache
|
14 |
+
* Version: 1.1.0
|
15 |
* Plugin URI: https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx
|
16 |
+
* Description: Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's HiSpeed Cache service and automates its management.
|
17 |
* Author: Aruba.it
|
18 |
* Author URI: https://www.aruba.it/
|
19 |
* Text Domain: aruba-hispeed-cache
|
20 |
+
* Domain Path: /languages
|
21 |
* License: GPL v2
|
22 |
+
* Requires at least: 5.4
|
23 |
* Tested up to: 6.0
|
24 |
+
* Requires PHP: 5.6
|
25 |
*
|
26 |
*
|
27 |
* This program is free software: you can redistribute it and/or modify
|
38 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
39 |
*/
|
40 |
|
41 |
+
|
42 |
|
43 |
namespace ArubaHiSpeedCache;
|
44 |
|
45 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
|
46 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheBootstrap;
|
|
|
47 |
|
48 |
use \register_activation_hook;
|
49 |
use \register_deactivation_hook;
|
50 |
use \defined;
|
|
|
51 |
|
52 |
if (!defined('WPINC')) {
|
53 |
die;
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
+
* Require ArubaHiSpeedCacheConfigs.php to boostrasp the confing of plugin execution
|
58 |
+
* of the method ArubaHiSpeedCache_set_default_constant for the generation of the
|
59 |
+
* environment variables
|
60 |
*/
|
61 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'includes' .DIRECTORY_SEPARATOR. 'ArubaHiSpeedCacheConfigs.php';
|
62 |
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_set_default_constant(__FILE__);
|
63 |
|
64 |
/**
|
65 |
+
* Adding methods to "activate" hooks
|
66 |
*/
|
67 |
+
\register_activation_hook(
|
68 |
+
\ARUBA_HISPEED_CACHE_FILE,
|
69 |
+
function () {
|
70 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_activate();
|
71 |
+
}
|
72 |
+
);
|
73 |
|
74 |
+
/**
|
75 |
+
* Adding methods to "deactivate" hooks
|
76 |
+
*/
|
77 |
+
\register_deactivation_hook(
|
78 |
+
\ARUBA_HISPEED_CACHE_FILE,
|
79 |
+
function () {
|
80 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_deactivate();
|
81 |
+
}
|
82 |
+
);
|
83 |
|
84 |
+
/**
|
85 |
+
* Load bootstrap if not loaded
|
86 |
+
*/
|
87 |
+
if (!class_exists(__NAMESPACE__ . '\includes\ArubaHiSpeedCacheBootstrap')) {
|
88 |
+
include_once \ARUBA_HISPEED_CACHE_BASEPATH . 'includes' .\AHSC_DS. 'ArubaHiSpeedCacheBootstrap.php';
|
89 |
+
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
/**
|
93 |
+
* Run on WP Init
|
94 |
+
*/
|
95 |
+
$bootstrap = new ArubaHiSpeedCacheBootstrap();
|
96 |
|
97 |
+
//check on activation
|
98 |
+
add_action('activated_plugin', array($bootstrap, 'check_hispeed_cache_services'), 20, 1);
|
99 |
+
|
100 |
+
//Init
|
101 |
+
add_action('init', array($bootstrap, 'run'));
|
includes/ArubaHiSpeedCacheAdmin.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
-
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
@@ -57,18 +57,23 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
57 |
*
|
58 |
* @var array
|
59 |
*/
|
60 |
-
public
|
61 |
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
/**
|
65 |
* ArubaHiSpeedCacheAdmin\__construct
|
66 |
*
|
67 |
* @param mixed $name
|
68 |
*/
|
69 |
-
public function __construct(
|
70 |
{
|
71 |
-
|
72 |
$this->options = $this->aruba_hispeed_cache_settings();
|
73 |
}
|
74 |
|
@@ -78,17 +83,31 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
78 |
* @param string $hook the currente acp hookname
|
79 |
* @return void
|
80 |
*/
|
81 |
-
public function enqueue_styles(
|
82 |
{
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
return;
|
85 |
}
|
86 |
|
87 |
\wp_enqueue_style(
|
88 |
-
|
89 |
ARUBA_HISPEED_CACHE_BASEURL . 'admin/css/aruba-hispeed-cache-admin.css',
|
90 |
array(),
|
91 |
-
|
92 |
);
|
93 |
}
|
94 |
|
@@ -98,22 +117,26 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
98 |
* @param string $hook the currente acp hookname
|
99 |
* @return void
|
100 |
*/
|
101 |
-
public function enqueue_scripts(
|
102 |
{
|
103 |
if ('settings_page_aruba-hispeed-cache' !== $hook) {
|
104 |
return;
|
105 |
}
|
106 |
|
107 |
\wp_enqueue_script(
|
108 |
-
|
109 |
ARUBA_HISPEED_CACHE_BASEURL . 'admin/js/aruba-hispeed-cache-admin.js',
|
110 |
array(),
|
111 |
-
|
112 |
);
|
113 |
|
114 |
-
\wp_localize_script(
|
|
|
|
|
|
|
115 |
'purge_confirm_string' => \esc_html__('You are about to purge the entire cache. Do you want to continue?', 'aruba-hispeed-cache'),
|
116 |
-
|
|
|
117 |
}
|
118 |
|
119 |
/**
|
@@ -160,7 +183,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
160 |
* @param WP_Admin_Bar $wp_admin_bar
|
161 |
* @return void
|
162 |
*/
|
163 |
-
public function aruba_hispeed_cache_toolbar_purge_link(
|
164 |
{
|
165 |
if (! \current_user_can('manage_options')) {
|
166 |
return;
|
@@ -193,18 +216,31 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
193 |
);
|
194 |
}
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
/**
|
197 |
* Aruba_hispeed_cache_settings
|
198 |
*
|
199 |
* @return array $data
|
200 |
*/
|
201 |
-
public function aruba_hispeed_cache_settings()
|
202 |
{
|
203 |
$options = \get_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME);
|
204 |
|
205 |
$data = \wp_parse_args(
|
206 |
$options,
|
207 |
-
|
208 |
);
|
209 |
|
210 |
return $data;
|
@@ -216,7 +252,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
216 |
* @param array $links
|
217 |
* @return array $links
|
218 |
*/
|
219 |
-
public function aruba_hispeed_cache_settings_link(array $links)
|
220 |
{
|
221 |
$setting_page = (!\is_network_admin()) ? 'options-general.php' : 'settings.php';
|
222 |
|
@@ -238,7 +274,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
238 |
*/
|
239 |
public function display_notices_settings_saved()
|
240 |
{
|
241 |
-
|
242 |
}
|
243 |
|
244 |
/**
|
@@ -248,7 +284,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
248 |
*/
|
249 |
public function display_notices_purge_initied()
|
250 |
{
|
251 |
-
|
252 |
}
|
253 |
|
254 |
/**
|
@@ -259,10 +295,10 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
259 |
private function _generate_purge_nonce()
|
260 |
{
|
261 |
$purge_url = \add_query_arg(
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
);
|
267 |
return \wp_nonce_url($purge_url, 'aruba_hispeed_cache-purge_all');
|
268 |
}
|
@@ -288,16 +324,20 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
288 |
$current_options = $this->aruba_hispeed_cache_settings();
|
289 |
|
290 |
//prepare the filter to escape the inputs
|
291 |
-
$form_options = \array_merge(
|
|
|
|
|
|
|
292 |
$form_options = \array_fill_keys($form_options, FILTER_SANITIZE_STRING);
|
293 |
|
294 |
/**
|
295 |
* @see https://www.php.net/manual/en/function.filter-input-array.php
|
296 |
*/
|
297 |
-
$all_inputs = filter_input_array(INPUT_POST, $form_options, false);
|
298 |
|
299 |
-
if (isset($all_inputs['smart_http_expire_save'])
|
300 |
-
\wp_verify_nonce($all_inputs['smart_http_expire_form_nonce'], 'smart-http-expire-form-nonce')
|
|
|
301 |
unset($all_inputs['smart_http_expire_save']);
|
302 |
unset($all_inputs['smart_http_expire_form_nonce']);
|
303 |
unset($all_inputs['is_submit']);
|
@@ -315,6 +355,33 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
315 |
}
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
/**
|
319 |
* private _settings_manager()
|
320 |
*
|
@@ -335,21 +402,21 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
335 |
*/
|
336 |
private function _form_fields()
|
337 |
{
|
338 |
-
$fieldsSets =
|
339 |
|
340 |
-
$fieldsSets['ahsc_enable_purge'] =
|
341 |
'th' => \esc_html__('Purging options', 'aruba-hispeed-cache'),
|
342 |
'legend_text' => \esc_html__('Purging options', 'aruba-hispeed-cache'),
|
343 |
-
'fields' =>
|
344 |
-
'ahsc_enable_purge' =>
|
345 |
'type' => 'checkbox',
|
346 |
'id' => 'ahsc_enable_purge',
|
347 |
'name' => 'ahsc_enable_purge',
|
348 |
'lable_for' => 'ahsc_enable_purge',
|
349 |
'lable_text' => \esc_html__('Enable automatic purge', 'aruba-hispeed-cache'),
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
|
354 |
/**
|
355 |
* @see https://developer.wordpress.org/reference/functions/is_network_admin/
|
@@ -359,108 +426,109 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin')) {
|
|
359 |
* True if Multisite is enabled, false otherwise.
|
360 |
*/
|
361 |
if (! (!\is_network_admin() && \is_multisite())) {
|
362 |
-
|
|
|
363 |
|
364 |
//infos string
|
365 |
-
$fieldsSets['ahsc_info'] =
|
366 |
'title' => \esc_html__('Automatically purge entire cache when:', 'aruba-hispeed-cache'),
|
367 |
-
|
368 |
|
369 |
//fieldsSets ahsc_purge_homepage
|
370 |
-
$fieldsSets['ahsc_purge_homepage'] =
|
371 |
'th' => \esc_html__('Home page:', 'aruba-hispeed-cache'),
|
372 |
'legend_text' => \esc_html__('Home page:', 'aruba-hispeed-cache'),
|
373 |
-
'fields' =>
|
374 |
-
'ahsc_purge_homepage_on_edit' =>
|
375 |
'type' => 'checkbox',
|
376 |
'id' => 'ahsc_purge_homepage_on_edit',
|
377 |
'name' => 'ahsc_purge_homepage_on_edit',
|
378 |
'lable_for' => 'ahsc_purge_homepage_on_edit',
|
379 |
'lable_text' => \wp_kses(__('a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
380 |
-
|
381 |
-
'ahsc_purge_homepage_on_del' =>
|
382 |
'type' => 'checkbox',
|
383 |
'id' => 'ahsc_purge_homepage_on_del',
|
384 |
'name' => 'ahsc_purge_homepage_on_del',
|
385 |
'lable_for' => 'ahsc_purge_homepage_on_del',
|
386 |
'lable_text' => wp_kses(__('a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
|
391 |
//fieldsSets ahsc_purge_page
|
392 |
-
$fieldsSets['ahsc_purge_page'] =
|
393 |
'th' => \esc_html__('Post/page/custom post type:', 'aruba-hispeed-cache'),
|
394 |
'legend_text' => \esc_html__('Post/page/custom post type:', 'aruba-hispeed-cache'),
|
395 |
-
'fields' =>
|
396 |
-
'ahsc_purge_page_on_mod' =>
|
397 |
'type' => 'checkbox',
|
398 |
'id' => 'ahsc_purge_page_on_mod',
|
399 |
'name' => 'ahsc_purge_page_on_mod',
|
400 |
'lable_for' => 'ahsc_purge_page_on_mod',
|
401 |
'lable_text' => \wp_kses(__('a <strong>post</strong> is <strong>published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
402 |
-
|
403 |
-
'ahsc_purge_page_on_new_comment' =>
|
404 |
'type' => 'checkbox',
|
405 |
'id' => 'ahsc_purge_page_on_new_comment',
|
406 |
'name' => 'ahsc_purge_page_on_new_comment',
|
407 |
'lable_for' => 'ahsc_purge_page_on_new_comment',
|
408 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>approved/published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
409 |
-
|
410 |
-
'ahsc_purge_page_on_deleted_comment' =>
|
411 |
'type' => 'checkbox',
|
412 |
'id' => 'ahsc_purge_page_on_deleted_comment',
|
413 |
'name' => 'ahsc_purge_page_on_deleted_comment',
|
414 |
'lable_for' => 'ahsc_purge_page_on_deleted_comment',
|
415 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
|
420 |
//fieldsSets ahsc_purge_archive
|
421 |
-
$fieldsSets['ahsc_purge_archive'] =
|
422 |
'th' => \esc_html__('Archives:', 'aruba-hispeed-cache'),
|
423 |
'small' => \esc_html__('(date, category, tag, author, custom taxonomies)', 'aruba-hispeed-cache'),
|
424 |
'legend_text' => \esc_html__('Archives:', 'aruba-hispeed-cache'),
|
425 |
-
'fields' =>
|
426 |
-
'ahsc_purge_archive_on_edit' =>
|
427 |
'type' => 'checkbox',
|
428 |
'id' => 'ahsc_purge_archive_on_edit',
|
429 |
'name' => 'ahsc_purge_archive_on_edit',
|
430 |
'lable_for' => 'ahsc_purge_archive_on_edit',
|
431 |
'lable_text' => \wp_kses(__('a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
432 |
-
|
433 |
-
'ahsc_purge_archive_on_del' =>
|
434 |
'type' => 'checkbox',
|
435 |
'id' => 'ahsc_purge_archive_on_del',
|
436 |
'name' => 'ahsc_purge_archive_on_del',
|
437 |
'lable_for' => 'ahsc_purge_archive_on_del',
|
438 |
'lable_text' => \wp_kses(__('a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
|
443 |
//fieldsSets ahsc_purge_archive_on_comment
|
444 |
-
$fieldsSets['ahsc_purge_archive_on_comment'] =
|
445 |
'th' => \esc_html__('Comments:', 'aruba-hispeed-cache'),
|
446 |
'legend_text' => \esc_html__('Comments:', 'aruba-hispeed-cache'),
|
447 |
-
'fields' =>
|
448 |
-
'ahsc_purge_archive_on_new_comment' =>
|
449 |
'type' => 'checkbox',
|
450 |
'id' => 'ahsc_purge_archive_on_new_comment',
|
451 |
'name' => 'ahsc_purge_archive_on_new_comment',
|
452 |
'lable_for' => 'ahsc_purge_archive_on_new_comment',
|
453 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>approved/published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
454 |
-
|
455 |
-
'ahsc_purge_archive_on_deleted_comment' =>
|
456 |
'type' => 'checkbox',
|
457 |
'id' => 'ahsc_purge_archive_on_deleted_comment',
|
458 |
'name' => 'ahsc_purge_archive_on_deleted_comment',
|
459 |
'lable_for' => 'ahsc_purge_archive_on_deleted_comment',
|
460 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
}
|
465 |
}
|
466 |
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
+
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
57 |
*
|
58 |
* @var array
|
59 |
*/
|
60 |
+
public $options;
|
61 |
|
62 |
+
/**
|
63 |
+
* $config
|
64 |
+
*
|
65 |
+
* @var \ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs
|
66 |
+
*/
|
67 |
+
public $configs;
|
68 |
|
69 |
/**
|
70 |
* ArubaHiSpeedCacheAdmin\__construct
|
71 |
*
|
72 |
* @param mixed $name
|
73 |
*/
|
74 |
+
public function __construct()
|
75 |
{
|
76 |
+
//$this->configs = $configs;
|
77 |
$this->options = $this->aruba_hispeed_cache_settings();
|
78 |
}
|
79 |
|
83 |
* @param string $hook the currente acp hookname
|
84 |
* @return void
|
85 |
*/
|
86 |
+
public function enqueue_styles($hook)
|
87 |
{
|
88 |
+
$has_notice = (\is_multisite()) ?
|
89 |
+
\get_site_transient(ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME')) :
|
90 |
+
\get_transient(ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME'))
|
91 |
+
;
|
92 |
+
|
93 |
+
if ($has_notice) {
|
94 |
+
\wp_enqueue_style(
|
95 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_NAME') . '-notices',
|
96 |
+
ARUBA_HISPEED_CACHE_BASEURL . 'admin/css/aruba-hispeed-cache-admin-notice.css',
|
97 |
+
array(),
|
98 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_VERSION')
|
99 |
+
);
|
100 |
+
}
|
101 |
+
|
102 |
+
if ('settings_page_aruba-hispeed-cache' != $hook) {
|
103 |
return;
|
104 |
}
|
105 |
|
106 |
\wp_enqueue_style(
|
107 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_NAME'),
|
108 |
ARUBA_HISPEED_CACHE_BASEURL . 'admin/css/aruba-hispeed-cache-admin.css',
|
109 |
array(),
|
110 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_VERSION')
|
111 |
);
|
112 |
}
|
113 |
|
117 |
* @param string $hook the currente acp hookname
|
118 |
* @return void
|
119 |
*/
|
120 |
+
public function enqueue_scripts($hook)
|
121 |
{
|
122 |
if ('settings_page_aruba-hispeed-cache' !== $hook) {
|
123 |
return;
|
124 |
}
|
125 |
|
126 |
\wp_enqueue_script(
|
127 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_NAME'),
|
128 |
ARUBA_HISPEED_CACHE_BASEURL . 'admin/js/aruba-hispeed-cache-admin.js',
|
129 |
array(),
|
130 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_VERSION')
|
131 |
);
|
132 |
|
133 |
+
\wp_localize_script(
|
134 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_NAME'),
|
135 |
+
'aruba_hispeed_cache',
|
136 |
+
array(
|
137 |
'purge_confirm_string' => \esc_html__('You are about to purge the entire cache. Do you want to continue?', 'aruba-hispeed-cache'),
|
138 |
+
)
|
139 |
+
);
|
140 |
}
|
141 |
|
142 |
/**
|
183 |
* @param WP_Admin_Bar $wp_admin_bar
|
184 |
* @return void
|
185 |
*/
|
186 |
+
public function aruba_hispeed_cache_toolbar_purge_link($wp_admin_bar)
|
187 |
{
|
188 |
if (! \current_user_can('manage_options')) {
|
189 |
return;
|
216 |
);
|
217 |
}
|
218 |
|
219 |
+
/**
|
220 |
+
* Check_hispeed_cache_notices
|
221 |
+
*
|
222 |
+
* @return void
|
223 |
+
*/
|
224 |
+
public function check_hispeed_cache_notices()
|
225 |
+
{
|
226 |
+
$file_notice = (\is_multisite()) ? \get_site_transient('ahsc_activation_check') : \get_transient('ahsc_activation_check');
|
227 |
+
if ($file_notice) {
|
228 |
+
include_once ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. $file_notice .'.php';
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
/**
|
233 |
* Aruba_hispeed_cache_settings
|
234 |
*
|
235 |
* @return array $data
|
236 |
*/
|
237 |
+
public function aruba_hispeed_cache_settings()
|
238 |
{
|
239 |
$options = \get_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME);
|
240 |
|
241 |
$data = \wp_parse_args(
|
242 |
$options,
|
243 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_get_default_settings()
|
244 |
);
|
245 |
|
246 |
return $data;
|
252 |
* @param array $links
|
253 |
* @return array $links
|
254 |
*/
|
255 |
+
public function aruba_hispeed_cache_settings_link(array $links)
|
256 |
{
|
257 |
$setting_page = (!\is_network_admin()) ? 'options-general.php' : 'settings.php';
|
258 |
|
274 |
*/
|
275 |
public function display_notices_settings_saved()
|
276 |
{
|
277 |
+
include_once ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. 'admin-notice-settings-saved.php';
|
278 |
}
|
279 |
|
280 |
/**
|
284 |
*/
|
285 |
public function display_notices_purge_initied()
|
286 |
{
|
287 |
+
include_once ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. 'admin-notice-purge-completed.php';
|
288 |
}
|
289 |
|
290 |
/**
|
295 |
private function _generate_purge_nonce()
|
296 |
{
|
297 |
$purge_url = \add_query_arg(
|
298 |
+
array(
|
299 |
+
'aruba_hispeed_cache_action' => 'purge',
|
300 |
+
'aruba_hispeed_cache_urls' => 'all',
|
301 |
+
)
|
302 |
);
|
303 |
return \wp_nonce_url($purge_url, 'aruba_hispeed_cache-purge_all');
|
304 |
}
|
324 |
$current_options = $this->aruba_hispeed_cache_settings();
|
325 |
|
326 |
//prepare the filter to escape the inputs
|
327 |
+
$form_options = \array_merge(
|
328 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('OPTIONS'),
|
329 |
+
array('is_submit', 'smart_http_expire_save', 'smart_http_expire_form_nonce')
|
330 |
+
);
|
331 |
$form_options = \array_fill_keys($form_options, FILTER_SANITIZE_STRING);
|
332 |
|
333 |
/**
|
334 |
* @see https://www.php.net/manual/en/function.filter-input-array.php
|
335 |
*/
|
336 |
+
$all_inputs = filter_input_array(INPUT_POST, $form_options, false); // for php 5.4
|
337 |
|
338 |
+
if (isset($all_inputs['smart_http_expire_save'])
|
339 |
+
&& \wp_verify_nonce($all_inputs['smart_http_expire_form_nonce'], 'smart-http-expire-form-nonce')
|
340 |
+
) {
|
341 |
unset($all_inputs['smart_http_expire_save']);
|
342 |
unset($all_inputs['smart_http_expire_form_nonce']);
|
343 |
unset($all_inputs['is_submit']);
|
355 |
}
|
356 |
}
|
357 |
|
358 |
+
private function _check_hispeed_cache_services_realtime()
|
359 |
+
{
|
360 |
+
$has_notice = (\is_multisite()) ?
|
361 |
+
\get_site_transient(ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME')) :
|
362 |
+
\get_transient(ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME'))
|
363 |
+
;
|
364 |
+
|
365 |
+
if (!$has_notice) {
|
366 |
+
$checker = new HiSpeedCacheServiceChecker();
|
367 |
+
$notices_file = null;
|
368 |
+
|
369 |
+
switch ($checker->check()) {
|
370 |
+
case 'available':
|
371 |
+
$notices_file = 'admin-notice-service-available';
|
372 |
+
break;
|
373 |
+
case 'unavailable':
|
374 |
+
$notices_file = 'admin-notice-service-unavailable';
|
375 |
+
break;
|
376 |
+
case 'no-aruba-server':
|
377 |
+
$notices_file = 'admin-notice-not-aruba-server';
|
378 |
+
break;
|
379 |
+
}
|
380 |
+
|
381 |
+
include_once ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. $notices_file .'.php';
|
382 |
+
}
|
383 |
+
}
|
384 |
+
|
385 |
/**
|
386 |
* private _settings_manager()
|
387 |
*
|
402 |
*/
|
403 |
private function _form_fields()
|
404 |
{
|
405 |
+
$fieldsSets = array();
|
406 |
|
407 |
+
$fieldsSets['ahsc_enable_purge'] = array(
|
408 |
'th' => \esc_html__('Purging options', 'aruba-hispeed-cache'),
|
409 |
'legend_text' => \esc_html__('Purging options', 'aruba-hispeed-cache'),
|
410 |
+
'fields' => array(
|
411 |
+
'ahsc_enable_purge' => array(
|
412 |
'type' => 'checkbox',
|
413 |
'id' => 'ahsc_enable_purge',
|
414 |
'name' => 'ahsc_enable_purge',
|
415 |
'lable_for' => 'ahsc_enable_purge',
|
416 |
'lable_text' => \esc_html__('Enable automatic purge', 'aruba-hispeed-cache'),
|
417 |
+
)
|
418 |
+
)
|
419 |
+
);
|
420 |
|
421 |
/**
|
422 |
* @see https://developer.wordpress.org/reference/functions/is_network_admin/
|
426 |
* True if Multisite is enabled, false otherwise.
|
427 |
*/
|
428 |
if (! (!\is_network_admin() && \is_multisite())) {
|
429 |
+
$settings = $this->aruba_hispeed_cache_settings(); // for php 5.3
|
430 |
+
if ($settings['ahsc_enable_purge'] != 0) {
|
431 |
|
432 |
//infos string
|
433 |
+
$fieldsSets['ahsc_info'] = array(
|
434 |
'title' => \esc_html__('Automatically purge entire cache when:', 'aruba-hispeed-cache'),
|
435 |
+
);
|
436 |
|
437 |
//fieldsSets ahsc_purge_homepage
|
438 |
+
$fieldsSets['ahsc_purge_homepage'] = array(
|
439 |
'th' => \esc_html__('Home page:', 'aruba-hispeed-cache'),
|
440 |
'legend_text' => \esc_html__('Home page:', 'aruba-hispeed-cache'),
|
441 |
+
'fields' => array(
|
442 |
+
'ahsc_purge_homepage_on_edit' => array(
|
443 |
'type' => 'checkbox',
|
444 |
'id' => 'ahsc_purge_homepage_on_edit',
|
445 |
'name' => 'ahsc_purge_homepage_on_edit',
|
446 |
'lable_for' => 'ahsc_purge_homepage_on_edit',
|
447 |
'lable_text' => \wp_kses(__('a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
448 |
+
),
|
449 |
+
'ahsc_purge_homepage_on_del' => array(
|
450 |
'type' => 'checkbox',
|
451 |
'id' => 'ahsc_purge_homepage_on_del',
|
452 |
'name' => 'ahsc_purge_homepage_on_del',
|
453 |
'lable_for' => 'ahsc_purge_homepage_on_del',
|
454 |
'lable_text' => wp_kses(__('a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
455 |
+
)
|
456 |
+
)
|
457 |
+
);
|
458 |
|
459 |
//fieldsSets ahsc_purge_page
|
460 |
+
$fieldsSets['ahsc_purge_page'] = array(
|
461 |
'th' => \esc_html__('Post/page/custom post type:', 'aruba-hispeed-cache'),
|
462 |
'legend_text' => \esc_html__('Post/page/custom post type:', 'aruba-hispeed-cache'),
|
463 |
+
'fields' => array(
|
464 |
+
'ahsc_purge_page_on_mod' => array(
|
465 |
'type' => 'checkbox',
|
466 |
'id' => 'ahsc_purge_page_on_mod',
|
467 |
'name' => 'ahsc_purge_page_on_mod',
|
468 |
'lable_for' => 'ahsc_purge_page_on_mod',
|
469 |
'lable_text' => \wp_kses(__('a <strong>post</strong> is <strong>published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
470 |
+
),
|
471 |
+
'ahsc_purge_page_on_new_comment' => array(
|
472 |
'type' => 'checkbox',
|
473 |
'id' => 'ahsc_purge_page_on_new_comment',
|
474 |
'name' => 'ahsc_purge_page_on_new_comment',
|
475 |
'lable_for' => 'ahsc_purge_page_on_new_comment',
|
476 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>approved/published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
477 |
+
),
|
478 |
+
'ahsc_purge_page_on_deleted_comment' => array(
|
479 |
'type' => 'checkbox',
|
480 |
'id' => 'ahsc_purge_page_on_deleted_comment',
|
481 |
'name' => 'ahsc_purge_page_on_deleted_comment',
|
482 |
'lable_for' => 'ahsc_purge_page_on_deleted_comment',
|
483 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
484 |
+
)
|
485 |
+
)
|
486 |
+
);
|
487 |
|
488 |
//fieldsSets ahsc_purge_archive
|
489 |
+
$fieldsSets['ahsc_purge_archive'] = array(
|
490 |
'th' => \esc_html__('Archives:', 'aruba-hispeed-cache'),
|
491 |
'small' => \esc_html__('(date, category, tag, author, custom taxonomies)', 'aruba-hispeed-cache'),
|
492 |
'legend_text' => \esc_html__('Archives:', 'aruba-hispeed-cache'),
|
493 |
+
'fields' => array(
|
494 |
+
'ahsc_purge_archive_on_edit' => array(
|
495 |
'type' => 'checkbox',
|
496 |
'id' => 'ahsc_purge_archive_on_edit',
|
497 |
'name' => 'ahsc_purge_archive_on_edit',
|
498 |
'lable_for' => 'ahsc_purge_archive_on_edit',
|
499 |
'lable_text' => \wp_kses(__('a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
500 |
+
),
|
501 |
+
'ahsc_purge_archive_on_del' => array(
|
502 |
'type' => 'checkbox',
|
503 |
'id' => 'ahsc_purge_archive_on_del',
|
504 |
'name' => 'ahsc_purge_archive_on_del',
|
505 |
'lable_for' => 'ahsc_purge_archive_on_del',
|
506 |
'lable_text' => \wp_kses(__('a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
507 |
+
)
|
508 |
+
)
|
509 |
+
);
|
510 |
|
511 |
//fieldsSets ahsc_purge_archive_on_comment
|
512 |
+
$fieldsSets['ahsc_purge_archive_on_comment'] = array(
|
513 |
'th' => \esc_html__('Comments:', 'aruba-hispeed-cache'),
|
514 |
'legend_text' => \esc_html__('Comments:', 'aruba-hispeed-cache'),
|
515 |
+
'fields' => array(
|
516 |
+
'ahsc_purge_archive_on_new_comment' => array(
|
517 |
'type' => 'checkbox',
|
518 |
'id' => 'ahsc_purge_archive_on_new_comment',
|
519 |
'name' => 'ahsc_purge_archive_on_new_comment',
|
520 |
'lable_for' => 'ahsc_purge_archive_on_new_comment',
|
521 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>approved/published</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
522 |
+
),
|
523 |
+
'ahsc_purge_archive_on_deleted_comment' => array(
|
524 |
'type' => 'checkbox',
|
525 |
'id' => 'ahsc_purge_archive_on_deleted_comment',
|
526 |
'name' => 'ahsc_purge_archive_on_deleted_comment',
|
527 |
'lable_for' => 'ahsc_purge_archive_on_deleted_comment',
|
528 |
'lable_text' => \wp_kses(__('a <strong>comment</strong> is <strong>unapproved/deleted</strong>.', 'aruba-hispeed-cache'), array( 'strong' => array() ))
|
529 |
+
)
|
530 |
+
)
|
531 |
+
);
|
532 |
}
|
533 |
}
|
534 |
|
includes/ArubaHiSpeedCacheBootstrap.php
CHANGED
@@ -1,196 +1,237 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
|
|
|
|
3 |
* @category Wordpress-plugin
|
4 |
* @package Aruba-HiSpeed-Cache
|
5 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
-
* @link
|
|
|
8 |
*/
|
9 |
-
declare(strict_types=1);
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
13 |
-
use
|
|
|
|
|
|
|
14 |
|
15 |
-
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin;
|
16 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCachei18n;
|
|
|
17 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheLoader;
|
18 |
-
use ArubaHiSpeedCache\includes\
|
19 |
-
|
20 |
-
use \version_compare;
|
21 |
-
use \esc_html__;
|
22 |
-
use \esc_html;
|
23 |
-
use \is_multisite;
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
*/
|
28 |
-
class ArubaHiSpeedCacheBootstrap
|
29 |
-
{
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Undocumented variable
|
33 |
-
*
|
34 |
-
* @var [type]
|
35 |
-
*/
|
36 |
-
protected $loader;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Configs
|
40 |
-
*
|
41 |
-
* @var [type]
|
42 |
-
*/
|
43 |
-
protected $config;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Undocumented function
|
47 |
-
*/
|
48 |
-
public function __construct()
|
49 |
{
|
50 |
-
$this->config = $this->getConfigs();
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
private function _load_dependencies()
|
68 |
-
{
|
69 |
-
require_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheLoader.php';
|
70 |
-
require_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCachei18n.php';
|
71 |
-
require_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheAdmin.php';
|
72 |
-
require_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCachePurger.php';
|
73 |
-
require_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheWpPurger.php';
|
74 |
|
75 |
-
|
76 |
-
|
|
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
*/
|
83 |
-
private function _set_locale()
|
84 |
-
{
|
85 |
-
$plugin_i18n = new ArubaHiSpeedCachei18n($this->config::PLUGIN_NAME, ARUBA_HISPEED_CACHE_BASENAME);
|
86 |
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
-
|
91 |
-
* Define_admin_hooks
|
92 |
-
*
|
93 |
-
* @return void
|
94 |
-
*/
|
95 |
-
private function _define_admin_hooks()
|
96 |
-
{
|
97 |
-
global $aruba_hispeed_cache_admin, $aruba_hispeed_cache_purger;
|
98 |
|
99 |
-
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
-
|
106 |
-
$this->loader->add_action('network_admin_menu', $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_admin_menu');
|
107 |
-
$this->loader->add_filter('network_admin_plugin_action_links_' . ARUBA_HISPEED_CACHE_BASENAME, $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_settings_link');
|
108 |
-
} else {
|
109 |
-
$this->loader->add_action('admin_menu', $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_admin_menu');
|
110 |
-
$this->loader->add_filter('plugin_action_links_' . ARUBA_HISPEED_CACHE_BASENAME, $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_settings_link');
|
111 |
}
|
112 |
|
113 |
/**
|
114 |
-
*
|
|
|
|
|
115 |
*/
|
116 |
-
|
117 |
-
|
|
|
118 |
|
119 |
-
|
120 |
-
$
|
121 |
-
$this->loader->add_action('transition_comment_status', $aruba_hispeed_cache_purger, 'ahsc_transition_comment_status', 200, 3);
|
122 |
|
123 |
-
$this->loader->add_action('
|
|
|
124 |
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
130 |
|
131 |
-
|
132 |
-
|
|
|
133 |
|
134 |
-
|
135 |
-
* Run
|
136 |
-
*
|
137 |
-
* Wrap for the Aruba_HiSpeed_Cache_Loader/run method
|
138 |
-
*
|
139 |
-
* @see Aruba_HiSpeed_Cache_Loader/run
|
140 |
-
* @return void
|
141 |
-
*/
|
142 |
-
public function run()
|
143 |
-
{
|
144 |
-
$this->loader->run();
|
145 |
-
}
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
*
|
150 |
-
* @return ArubaHiSpeedCache\Aruba_HiSpeed_Cache_Loader
|
151 |
-
*/
|
152 |
-
public function get_loader()
|
153 |
-
{
|
154 |
-
return $this->loader;
|
155 |
-
}
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
*
|
160 |
-
* @return void
|
161 |
-
*/
|
162 |
-
private function getConfigs()
|
163 |
-
{
|
164 |
-
return ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs();
|
165 |
-
}
|
166 |
|
167 |
-
|
168 |
-
* Required_wp_version
|
169 |
-
* Checking the currently installed version and the minimum required version.
|
170 |
-
*
|
171 |
-
* @return bool
|
172 |
-
*/
|
173 |
-
public function required_wp_version(): bool
|
174 |
-
{
|
175 |
-
global $wp_version;
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
}
|
182 |
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
196 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* ArubaHiSpeedCacheBootstrap - Control center for everything.
|
4 |
+
* php version 5.6
|
5 |
+
*
|
6 |
* @category Wordpress-plugin
|
7 |
* @package Aruba-HiSpeed-Cache
|
8 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
+
* @link Null
|
11 |
+
* @since 1.0.0
|
12 |
*/
|
|
|
13 |
|
14 |
namespace ArubaHiSpeedCache\includes;
|
15 |
|
16 |
+
use \esc_html;
|
17 |
+
use \esc_html__;
|
18 |
+
use \is_multisite;
|
19 |
+
use \version_compare;
|
20 |
|
|
|
21 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCachei18n;
|
22 |
+
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin;
|
23 |
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheLoader;
|
24 |
+
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
|
25 |
+
use ArubaHiSpeedCache\includes\HiSpeedCacheServiceChecker;
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
if (! class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheBootstrap')) {
|
28 |
+
class ArubaHiSpeedCacheBootstrap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
{
|
|
|
30 |
|
31 |
+
/**
|
32 |
+
* Undocumented variable
|
33 |
+
*
|
34 |
+
* @var [type]
|
35 |
+
*/
|
36 |
+
protected $loader;
|
37 |
|
38 |
+
/**
|
39 |
+
* Configs
|
40 |
+
*
|
41 |
+
* @var [type]
|
42 |
+
*/
|
43 |
+
public static $config;
|
44 |
|
45 |
+
/**
|
46 |
+
* Undocumented function
|
47 |
+
*/
|
48 |
+
public function __construct()
|
49 |
+
{
|
50 |
+
// $this->config = $this->getConfigs();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
+
if (!$this->required_wp_version()) {
|
53 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_deactivate_me();
|
54 |
+
}
|
55 |
|
56 |
+
$this->_load_dependencies();
|
57 |
+
$this->_set_locale();
|
58 |
+
$this->_define_admin_hooks();
|
59 |
+
}
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
/**
|
62 |
+
* Load_dependencies
|
63 |
+
*
|
64 |
+
* @see ArubaHiSpeedCache_get_dependencies
|
65 |
+
* @return void
|
66 |
+
*/
|
67 |
+
private function _load_dependencies()
|
68 |
+
{
|
69 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheLoader.php';
|
70 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCachei18n.php';
|
71 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheAdmin.php';
|
72 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCachePurger.php';
|
73 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheWpPurger.php';
|
74 |
|
75 |
+
include_once \plugin_dir_path(ARUBA_HISPEED_CACHE_FILE) . 'includes' .AHSC_DS. 'HiSpeedCacheServiceChecker.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
$this->loader = new ArubaHiSpeedCacheLoader();
|
78 |
+
}
|
79 |
|
80 |
+
/**
|
81 |
+
* Set_locale
|
82 |
+
*
|
83 |
+
* @return void
|
84 |
+
*/
|
85 |
+
private function _set_locale()
|
86 |
+
{
|
87 |
+
$plugin_i18n = new ArubaHiSpeedCachei18n(ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PLUGIN_NAME'), ARUBA_HISPEED_CACHE_BASENAME);
|
88 |
|
89 |
+
$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
/**
|
93 |
+
* Define_admin_hooks
|
94 |
+
*
|
95 |
+
* @return void
|
96 |
*/
|
97 |
+
private function _define_admin_hooks()
|
98 |
+
{
|
99 |
+
global $aruba_hispeed_cache_admin, $aruba_hispeed_cache_purger;
|
100 |
|
101 |
+
$aruba_hispeed_cache_admin = new ArubaHiSpeedCacheAdmin();
|
102 |
+
$aruba_hispeed_cache_purger = new ArubaHiSpeedCacheWpPurger($aruba_hispeed_cache_admin);
|
|
|
103 |
|
104 |
+
$this->loader->add_action('admin_enqueue_scripts', $aruba_hispeed_cache_admin, 'enqueue_styles');
|
105 |
+
$this->loader->add_action('admin_enqueue_scripts', $aruba_hispeed_cache_admin, 'enqueue_scripts');
|
106 |
|
107 |
+
if (\is_multisite()) {
|
108 |
+
$this->loader->add_action('network_admin_menu', $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_admin_menu');
|
109 |
+
$this->loader->add_filter('network_admin_plugin_action_links_' . ARUBA_HISPEED_CACHE_BASENAME, $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_settings_link');
|
110 |
+
} else {
|
111 |
+
$this->loader->add_action('admin_menu', $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_admin_menu');
|
112 |
+
$this->loader->add_filter('plugin_action_links_' . ARUBA_HISPEED_CACHE_BASENAME, $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_settings_link');
|
113 |
+
}
|
114 |
|
115 |
+
/**
|
116 |
+
* I check if the 'ahsc_enable_purge' option is activated and in this case I add the hooks
|
117 |
+
*/
|
118 |
+
if (! empty($aruba_hispeed_cache_admin->options['ahsc_enable_purge']) && ARUBA_HISPEED_CACHE_PLUGIN) {
|
119 |
+
$this->loader->add_action('admin_bar_menu', $aruba_hispeed_cache_admin, 'aruba_hispeed_cache_toolbar_purge_link', 100);
|
120 |
|
121 |
+
// Add actions to purge.
|
122 |
+
$this->loader->add_action('wp_insert_comment', $aruba_hispeed_cache_purger, 'ahsc_wp_insert_comment', 200, 2);
|
123 |
+
$this->loader->add_action('transition_comment_status', $aruba_hispeed_cache_purger, 'ahsc_transition_comment_status', 200, 3);
|
124 |
|
125 |
+
$this->loader->add_action('transition_post_status', $aruba_hispeed_cache_purger, 'ahsc_transition_post_status', 20, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
+
$this->loader->add_action('edit_term', $aruba_hispeed_cache_purger, 'ahsc_edit_term', 20, 3);
|
128 |
+
$this->loader->add_action('delete_term', $aruba_hispeed_cache_purger, 'ahsc_delete_term', 20, 4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
+
$this->loader->add_action('check_ajax_referer', $aruba_hispeed_cache_purger, 'ahsc_check_ajax_referer', 20);
|
131 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
$this->loader->add_action('admin_bar_init', $aruba_hispeed_cache_purger, 'ahsc_admin_bar_init');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
+
//the chech on activation of plugin
|
136 |
+
//$this->loader->add_action('activated_plugin', $this, 'check_hispeed_cache_services', 20, 1);
|
137 |
+
//the activation notification in the established cases
|
138 |
+
$this->loader->add_action('admin_notices', $aruba_hispeed_cache_admin, 'check_hispeed_cache_notices');
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Run
|
143 |
+
*
|
144 |
+
* Wrap for the Aruba_HiSpeed_Cache_Loader/run method
|
145 |
+
*
|
146 |
+
* @see Aruba_HiSpeed_Cache_Loader/run
|
147 |
+
* @return void
|
148 |
+
*/
|
149 |
+
public function run()
|
150 |
+
{
|
151 |
+
$this->loader->run();
|
152 |
+
}
|
153 |
|
154 |
+
/**
|
155 |
+
* Get_loader
|
156 |
+
*
|
157 |
+
* @return ArubaHiSpeedCache\Aruba_HiSpeed_Cache_Loader
|
158 |
+
*/
|
159 |
+
public function get_loader()
|
160 |
+
{
|
161 |
+
return $this->loader;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Required_wp_version
|
166 |
+
* Checking the currently installed version and the minimum required version.
|
167 |
+
*
|
168 |
+
* @return bool
|
169 |
+
*/
|
170 |
+
public function required_wp_version()
|
171 |
+
{
|
172 |
+
global $wp_version;
|
173 |
+
|
174 |
+
if (!\version_compare($wp_version, ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('MINIMUM_WP'), '>=')) {
|
175 |
+
\add_action('admin_notices', array( &$this, 'display_notices' ));
|
176 |
+
\add_action('network_admin_notices', array( &$this, 'display_notices' ));
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Check_hispeed_cache_services - check if aruba hispeed cache service is activable
|
185 |
+
* or is a aruba server.
|
186 |
+
*
|
187 |
+
* @param string $plugin relative path of the plugin.
|
188 |
+
*
|
189 |
+
* @return void
|
190 |
+
*/
|
191 |
+
|
192 |
+
public function check_hispeed_cache_services($plugin)
|
193 |
+
{
|
194 |
+
if ('aruba-hispeed-cache/aruba-hispeed-cache.php' === $plugin) {
|
195 |
+
$checker = new HiSpeedCacheServiceChecker();
|
196 |
+
$notices_file = null;
|
197 |
+
|
198 |
+
switch ($checker->check()) {
|
199 |
+
case 'available':
|
200 |
+
$notices_file = 'admin-notice-service-available';
|
201 |
+
break;
|
202 |
+
case 'unavailable':
|
203 |
+
$notices_file = 'admin-notice-service-unavailable';
|
204 |
+
break;
|
205 |
+
case 'no-aruba-server':
|
206 |
+
$notices_file = 'admin-notice-not-aruba-server';
|
207 |
+
break;
|
208 |
+
}
|
209 |
+
|
210 |
+
if (\is_multisite() && !is_null($notices_file)) {
|
211 |
+
\set_site_transient(
|
212 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME'),
|
213 |
+
$notices_file,
|
214 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_LIFE_TIME')
|
215 |
+
);
|
216 |
+
} elseif (!is_null($notices_file)) {
|
217 |
+
\set_transient(
|
218 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_NAME'),
|
219 |
+
$notices_file,
|
220 |
+
ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('TRANSIENT_LIFE_TIME')
|
221 |
+
);
|
222 |
+
}
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Display_notices
|
228 |
+
* Adds the error message in case the function required_wp_version returns false
|
229 |
+
*
|
230 |
+
* @return void
|
231 |
+
*/
|
232 |
+
public function display_notices()
|
233 |
+
{
|
234 |
+
include_once ARUBA_HISPEED_CACHE_BASEPATH . 'admin' .AHSC_DS. 'partials' .AHSC_DS. 'admin-notice-version.php';
|
235 |
+
}
|
236 |
}
|
237 |
}
|
includes/ArubaHiSpeedCacheConfigs.php
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
|
|
|
|
3 |
* @category Wordpress-plugin
|
4 |
* @package Aruba-HiSpeed-Cache
|
5 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
-
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
@@ -20,6 +23,12 @@ use get_role;
|
|
20 |
if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
21 |
/**
|
22 |
* ArubaHiSpeedCacheConfigs
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
*/
|
24 |
|
25 |
class ArubaHiSpeedCacheConfigs
|
@@ -27,30 +36,30 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
27 |
/**
|
28 |
* USER_CAP array
|
29 |
*/
|
30 |
-
|
31 |
'Aruba Hispeed Cache | Config',
|
32 |
'Aruba Hispeed Cache | Purge cache'
|
33 |
-
|
34 |
|
35 |
/**
|
36 |
* PLUGIN_NAME string
|
37 |
*/
|
38 |
-
|
39 |
|
40 |
/**
|
41 |
* PLUGIN_VERSION string
|
42 |
*/
|
43 |
-
|
44 |
|
45 |
/**
|
46 |
* MINIMUM_WP string
|
47 |
*/
|
48 |
-
|
49 |
|
50 |
/**
|
51 |
* OPTIONS array
|
52 |
*/
|
53 |
-
|
54 |
'ahsc_enable_purge',
|
55 |
'ahsc_purge_homepage_on_edit',
|
56 |
'ahsc_purge_homepage_on_del',
|
@@ -61,37 +70,100 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
61 |
'ahsc_purge_page_on_mod',
|
62 |
'ahsc_purge_page_on_new_comment',
|
63 |
'ahsc_purge_page_on_deleted_comment'
|
64 |
-
|
65 |
|
66 |
/**
|
67 |
* PURGE_HOST string
|
68 |
* The host colled to purge the cache
|
69 |
*/
|
70 |
-
|
71 |
|
72 |
/**
|
73 |
* PURGE_PORT string
|
74 |
* the port of host.
|
75 |
*/
|
76 |
-
|
77 |
|
78 |
/**
|
79 |
* PURGE_TIME_OUT int
|
80 |
*/
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
/**
|
84 |
* ArubaHiSpeedCache_set_default_constant
|
85 |
*
|
86 |
-
* @param
|
87 |
-
* @param
|
|
|
88 |
* @return void
|
89 |
*/
|
90 |
-
public static function ArubaHiSpeedCache_set_default_constant(
|
91 |
{
|
92 |
$plugin_dir_path = \plugin_dir_path($file);
|
93 |
|
94 |
-
$default_constants =
|
95 |
'ARUBA_HISPEED_CACHE_PLUGIN' => true,
|
96 |
'ARUBA_HISPEED_CACHE_FILE' => $file,
|
97 |
'ARUBA_HISPEED_CACHE_BASEPATH' => $plugin_dir_path,
|
@@ -100,7 +172,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
100 |
'ARUBA_HISPEED_CACHE_OPTIONS_NAME' => 'aruba_hispeed_cache_options',
|
101 |
'HOME_URL' => \get_home_url(null, '/'),
|
102 |
'AHSC_DS' => DIRECTORY_SEPARATOR,
|
103 |
-
|
104 |
|
105 |
foreach ($default_constants as $name => $value) {
|
106 |
if (! \defined($name)) {
|
@@ -117,7 +189,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
117 |
public static function ArubaHiSpeedCache_activate()
|
118 |
{
|
119 |
if (! \current_user_can('activate_plugins')) {
|
120 |
-
|
121 |
}
|
122 |
|
123 |
$role = \get_role('administrator');
|
@@ -131,7 +203,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
131 |
}
|
132 |
|
133 |
//add the user cap to admin user
|
134 |
-
foreach (self
|
135 |
$role->add_cap($cap);
|
136 |
}
|
137 |
|
@@ -145,22 +217,6 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
145 |
\update_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME, $options);
|
146 |
}
|
147 |
|
148 |
-
/**
|
149 |
-
* ArubaHiSpeedCache_get_dependencies
|
150 |
-
*
|
151 |
-
* @return array list of files
|
152 |
-
*/
|
153 |
-
// public static function ArubaHiSpeedCache_get_dependencies(string $plugin_dir_path = '')
|
154 |
-
// {
|
155 |
-
// return [
|
156 |
-
// $plugin_dir_path . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheLoader.php',
|
157 |
-
// $plugin_dir_path . 'includes' .AHSC_DS. 'ArubaHiSpeedCachei18n.php',
|
158 |
-
// $plugin_dir_path . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheAdmin.php',
|
159 |
-
// $plugin_dir_path . 'includes' .AHSC_DS. 'ArubaHiSpeedCachePurger.php',
|
160 |
-
// $plugin_dir_path . 'includes' .AHSC_DS. 'ArubaHiSpeedCacheWpPurger.php'
|
161 |
-
// ];
|
162 |
-
// }
|
163 |
-
|
164 |
/**
|
165 |
* ArubaHiSpeedCache_deactivate
|
166 |
*
|
@@ -174,11 +230,23 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
174 |
|
175 |
$role = \get_role('administrator');
|
176 |
|
177 |
-
foreach (self
|
178 |
$role->remove_cap($cap);
|
179 |
}
|
180 |
}
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
/**
|
183 |
* ArubaHiSpeedCache_get_default_settings
|
184 |
*
|
@@ -186,19 +254,51 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
|
186 |
*/
|
187 |
public static function ArubaHiSpeedCache_get_default_settings()
|
188 |
{
|
189 |
-
$dafault_value =
|
190 |
|
191 |
-
return \array_combine(self
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
|
194 |
/**
|
195 |
* ArubaHiSpeedCache_getConfigs
|
196 |
*
|
197 |
-
* @
|
|
|
|
|
198 |
*/
|
199 |
-
public static function ArubaHiSpeedCache_getConfigs()
|
200 |
{
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
}
|
203 |
}
|
204 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* ArubaHiSpeedCacheConfigs - Utility class containing methods and settings for
|
4 |
+
* the correct functioning of the plugin.
|
5 |
+
*
|
6 |
* @category Wordpress-plugin
|
7 |
* @package Aruba-HiSpeed-Cache
|
8 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
* @link run_aruba_hispeed_cache
|
11 |
*/
|
12 |
+
|
13 |
|
14 |
namespace ArubaHiSpeedCache\includes;
|
15 |
|
23 |
if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
|
24 |
/**
|
25 |
* ArubaHiSpeedCacheConfigs
|
26 |
+
*
|
27 |
+
* @category ArubaHiSpeedCache\includes
|
28 |
+
* @package ArubaHiSpeedCache
|
29 |
+
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
30 |
+
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
31 |
+
* @link run_aruba_hispeed_cache
|
32 |
*/
|
33 |
|
34 |
class ArubaHiSpeedCacheConfigs
|
36 |
/**
|
37 |
* USER_CAP array
|
38 |
*/
|
39 |
+
public static $USER_CAP = array(
|
40 |
'Aruba Hispeed Cache | Config',
|
41 |
'Aruba Hispeed Cache | Purge cache'
|
42 |
+
);
|
43 |
|
44 |
/**
|
45 |
* PLUGIN_NAME string
|
46 |
*/
|
47 |
+
public static $PLUGIN_NAME = 'aruba-hispeed-cache';
|
48 |
|
49 |
/**
|
50 |
* PLUGIN_VERSION string
|
51 |
*/
|
52 |
+
public static $PLUGIN_VERSION = '1.0.1';
|
53 |
|
54 |
/**
|
55 |
* MINIMUM_WP string
|
56 |
*/
|
57 |
+
public static $MINIMUM_WP = '5.4';
|
58 |
|
59 |
/**
|
60 |
* OPTIONS array
|
61 |
*/
|
62 |
+
public static $OPTIONS = array(
|
63 |
'ahsc_enable_purge',
|
64 |
'ahsc_purge_homepage_on_edit',
|
65 |
'ahsc_purge_homepage_on_del',
|
70 |
'ahsc_purge_page_on_mod',
|
71 |
'ahsc_purge_page_on_new_comment',
|
72 |
'ahsc_purge_page_on_deleted_comment'
|
73 |
+
);
|
74 |
|
75 |
/**
|
76 |
* PURGE_HOST string
|
77 |
* The host colled to purge the cache
|
78 |
*/
|
79 |
+
public static $PURGE_HOST = '127.0.0.1';
|
80 |
|
81 |
/**
|
82 |
* PURGE_PORT string
|
83 |
* the port of host.
|
84 |
*/
|
85 |
+
public static $PURGE_PORT = '8889';
|
86 |
|
87 |
/**
|
88 |
* PURGE_TIME_OUT int
|
89 |
*/
|
90 |
+
public static $PURGE_TIME_OUT = 5;
|
91 |
+
|
92 |
+
/**
|
93 |
+
* TRANSIENT_NAME the transient name
|
94 |
+
*
|
95 |
+
* @var string
|
96 |
+
*/
|
97 |
+
public static $TRANSIENT_NAME = 'ahsc_activation_check';
|
98 |
+
|
99 |
+
/**
|
100 |
+
* TRANSIENT_LIFE_TIME the life time of transient
|
101 |
+
*
|
102 |
+
* @var int
|
103 |
+
*/
|
104 |
+
public static $TRANSIENT_LIFE_TIME = 15 * \MINUTE_IN_SECONDS;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* $LINK
|
108 |
+
* the aruba links
|
109 |
+
*
|
110 |
+
* @var array
|
111 |
+
*/
|
112 |
+
public static $LINKS = array(
|
113 |
+
'link_base' => array(
|
114 |
+
'it' => 'https://hosting.aruba.it/',
|
115 |
+
'en' => 'https://hosting.aruba.it/en/',
|
116 |
+
'es' => 'https://hosting.aruba.it/es/'
|
117 |
+
),
|
118 |
+
'link_guide' => array(
|
119 |
+
'it' => 'https://guide.hosting.aruba.it/hosting/cache-manager/gestione-cache.aspx',
|
120 |
+
),
|
121 |
+
'link_assistance' => array(
|
122 |
+
'it' => 'https://assistenza.aruba.it/home.aspx',
|
123 |
+
'en' => 'https://assistenza.aruba.it/en/home.aspx',
|
124 |
+
'es' => 'https://assistenza.aruba.it/es/home.aspx'
|
125 |
+
),
|
126 |
+
'link_hosting_truck' => array(
|
127 |
+
'it' => 'https://hosting.aruba.it/home.aspx?utm_source=pannello-wp&utm_medium=error-bar&utm_campain=aruba-hispeed-cache',
|
128 |
+
'en' => 'https://hosting.aruba.it/en/home.aspx?utm_source=pannello-wp&utm_medium=error-bar&utm_campain=aruba-hispeed-cache',
|
129 |
+
'es' => 'https://hosting.aruba.it/es/home.aspx?utm_source=pannello-wp&utm_medium=error-bar&utm_campain=aruba-hispeed-cache'
|
130 |
+
),
|
131 |
+
'link_aruba_pca' => array(
|
132 |
+
'it' => 'https://admin.aruba.it/PannelloAdmin/Login.aspx?Lang=it',
|
133 |
+
'en' => 'https://admin.aruba.it/PannelloAdmin/login.aspx?Op=ChangeLanguage&Lang=EN',
|
134 |
+
'es' => 'https://admin.aruba.it/PannelloAdmin/login.aspx?Op=ChangeLanguage&Lang=ES'
|
135 |
+
),
|
136 |
+
);
|
137 |
+
|
138 |
+
/**
|
139 |
+
* GetSiteHome - Helper method that returns the homepage address with support for wpml
|
140 |
+
*
|
141 |
+
* @return string $urlToTest url of wp website.
|
142 |
+
*/
|
143 |
+
public static function getSiteHome()
|
144 |
+
{
|
145 |
+
$home_uri = \trailingslashit(\home_url());
|
146 |
+
|
147 |
+
if (\function_exists('icl_get_home_url')) {
|
148 |
+
$home_uri = \trailingslashit(\icl_get_home_url());
|
149 |
+
}
|
150 |
+
|
151 |
+
return $home_uri;
|
152 |
+
}
|
153 |
|
154 |
/**
|
155 |
* ArubaHiSpeedCache_set_default_constant
|
156 |
*
|
157 |
+
* @param string $file __FILE__ for the root directory.
|
158 |
+
* @param string $prefix Possible prefix
|
159 |
+
*
|
160 |
* @return void
|
161 |
*/
|
162 |
+
public static function ArubaHiSpeedCache_set_default_constant($file, $prefix = '')
|
163 |
{
|
164 |
$plugin_dir_path = \plugin_dir_path($file);
|
165 |
|
166 |
+
$default_constants = array(
|
167 |
'ARUBA_HISPEED_CACHE_PLUGIN' => true,
|
168 |
'ARUBA_HISPEED_CACHE_FILE' => $file,
|
169 |
'ARUBA_HISPEED_CACHE_BASEPATH' => $plugin_dir_path,
|
172 |
'ARUBA_HISPEED_CACHE_OPTIONS_NAME' => 'aruba_hispeed_cache_options',
|
173 |
'HOME_URL' => \get_home_url(null, '/'),
|
174 |
'AHSC_DS' => DIRECTORY_SEPARATOR,
|
175 |
+
);
|
176 |
|
177 |
foreach ($default_constants as $name => $value) {
|
178 |
if (! \defined($name)) {
|
189 |
public static function ArubaHiSpeedCache_activate()
|
190 |
{
|
191 |
if (! \current_user_can('activate_plugins')) {
|
192 |
+
die();
|
193 |
}
|
194 |
|
195 |
$role = \get_role('administrator');
|
203 |
}
|
204 |
|
205 |
//add the user cap to admin user
|
206 |
+
foreach (self::$USER_CAP as $cap) {
|
207 |
$role->add_cap($cap);
|
208 |
}
|
209 |
|
217 |
\update_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME, $options);
|
218 |
}
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
/**
|
221 |
* ArubaHiSpeedCache_deactivate
|
222 |
*
|
230 |
|
231 |
$role = \get_role('administrator');
|
232 |
|
233 |
+
foreach (self::$USER_CAP as $cap) {
|
234 |
$role->remove_cap($cap);
|
235 |
}
|
236 |
}
|
237 |
|
238 |
+
/**
|
239 |
+
* Deactivates this plugin, hook this function on admin_init.
|
240 |
+
*
|
241 |
+
* @since 1.0.1
|
242 |
+
*/
|
243 |
+
public static function ArubaHiSpeedCache_deactivate_me()
|
244 |
+
{
|
245 |
+
if (\function_exists('deactivate_plugins')) {
|
246 |
+
\deactivate_plugins(\ARUBA_HISPEED_CACHE_BASENAME);
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
/**
|
251 |
* ArubaHiSpeedCache_get_default_settings
|
252 |
*
|
254 |
*/
|
255 |
public static function ArubaHiSpeedCache_get_default_settings()
|
256 |
{
|
257 |
+
$dafault_value = array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
|
258 |
|
259 |
+
return \array_combine(self::$OPTIONS, $dafault_value);
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* GetLocalizedLink
|
264 |
+
*
|
265 |
+
* @param [type] $link
|
266 |
+
* @return void
|
267 |
+
*/
|
268 |
+
public static function getLocalizedLink($link)
|
269 |
+
{
|
270 |
+
$locale = substr(\get_locale(), 0, 2); // return it_IT -> it
|
271 |
+
|
272 |
+
if (array_key_exists($locale, self::$LINKS[$link])) {
|
273 |
+
return self::$LINKS[$link][$locale];
|
274 |
+
}
|
275 |
+
|
276 |
+
return self::$LINKS[$link]['it'];
|
277 |
}
|
278 |
|
279 |
/**
|
280 |
* ArubaHiSpeedCache_getConfigs
|
281 |
*
|
282 |
+
* @param string $config name of config to get
|
283 |
+
*
|
284 |
+
* @return string|array confing
|
285 |
*/
|
286 |
+
public static function ArubaHiSpeedCache_getConfigs($config)
|
287 |
{
|
288 |
+
$configs = array(
|
289 |
+
'USER_CAP' => self::$USER_CAP,
|
290 |
+
'PLUGIN_NAME' => self::$PLUGIN_NAME,
|
291 |
+
'PLUGIN_VERSION' => self::$PLUGIN_VERSION,
|
292 |
+
'MINIMUM_WP' => self::$MINIMUM_WP,
|
293 |
+
'OPTIONS' => self::$OPTIONS,
|
294 |
+
'PURGE_HOST' => self::$PURGE_HOST,
|
295 |
+
'PURGE_PORT' => self::$PURGE_PORT,
|
296 |
+
'PURGE_TIME_OUT' => self::$PURGE_TIME_OUT,
|
297 |
+
'TRANSIENT_NAME' => self::$TRANSIENT_NAME,
|
298 |
+
'TRANSIENT_LIFE_TIME' => self::$TRANSIENT_LIFE_TIME
|
299 |
+
);
|
300 |
+
|
301 |
+
return $configs[$config];
|
302 |
}
|
303 |
}
|
304 |
}
|
includes/ArubaHiSpeedCacheLoader.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
-
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
@@ -25,14 +25,14 @@ class ArubaHiSpeedCacheLoader
|
|
25 |
*
|
26 |
* @var array
|
27 |
*/
|
28 |
-
protected $actions =
|
29 |
|
30 |
/**
|
31 |
* Filters
|
32 |
*
|
33 |
* @var array
|
34 |
*/
|
35 |
-
protected $filters =
|
36 |
|
37 |
// public function __construct()
|
38 |
// {}
|
@@ -50,7 +50,7 @@ class ArubaHiSpeedCacheLoader
|
|
50 |
* @param integer $accepted_args
|
51 |
* @return void
|
52 |
*/
|
53 |
-
public function add_action(
|
54 |
{
|
55 |
$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
|
56 |
}
|
@@ -69,7 +69,7 @@ class ArubaHiSpeedCacheLoader
|
|
69 |
* @param integer $accepted_args
|
70 |
* @return void
|
71 |
*/
|
72 |
-
public function add_filter(
|
73 |
{
|
74 |
$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
|
75 |
}
|
@@ -87,7 +87,7 @@ class ArubaHiSpeedCacheLoader
|
|
87 |
* @param integer $accepted_args
|
88 |
* @return array
|
89 |
*/
|
90 |
-
private function add(
|
91 |
{
|
92 |
$hooks[] = array(
|
93 |
'hook' => $hook,
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
+
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
25 |
*
|
26 |
* @var array
|
27 |
*/
|
28 |
+
protected $actions = array();
|
29 |
|
30 |
/**
|
31 |
* Filters
|
32 |
*
|
33 |
* @var array
|
34 |
*/
|
35 |
+
protected $filters = array();
|
36 |
|
37 |
// public function __construct()
|
38 |
// {}
|
50 |
* @param integer $accepted_args
|
51 |
* @return void
|
52 |
*/
|
53 |
+
public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1)
|
54 |
{
|
55 |
$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
|
56 |
}
|
69 |
* @param integer $accepted_args
|
70 |
* @return void
|
71 |
*/
|
72 |
+
public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
|
73 |
{
|
74 |
$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
|
75 |
}
|
87 |
* @param integer $accepted_args
|
88 |
* @return array
|
89 |
*/
|
90 |
+
private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
|
91 |
{
|
92 |
$hooks[] = array(
|
93 |
'hook' => $hook,
|
includes/ArubaHiSpeedCachePurger.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
*/
|
8 |
-
|
9 |
|
10 |
namespace ArubaHiSpeedCache;
|
11 |
|
@@ -20,21 +20,21 @@ abstract class ArubaHiSpeedCachePurger
|
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
-
protected
|
24 |
|
25 |
/**
|
26 |
* $server_port for the request
|
27 |
*
|
28 |
* @var string
|
29 |
*/
|
30 |
-
protected
|
31 |
|
32 |
/**
|
33 |
* $time_out of request
|
34 |
*
|
35 |
* @var integer
|
36 |
*/
|
37 |
-
protected
|
38 |
|
39 |
/**
|
40 |
* Purge the cache of a single page
|
@@ -42,7 +42,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
42 |
* @param string $url
|
43 |
* @return void
|
44 |
*/
|
45 |
-
abstract public function purgeUrl(
|
46 |
|
47 |
/**
|
48 |
* Purge the cache of a list of pages
|
@@ -50,7 +50,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
50 |
* @param array $urls
|
51 |
* @return void
|
52 |
*/
|
53 |
-
abstract public function purgeUrls(
|
54 |
|
55 |
/**
|
56 |
* Purge the alla chace of site
|
@@ -68,7 +68,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
68 |
*
|
69 |
* @return void
|
70 |
*/
|
71 |
-
abstract public function doRemoteGet(
|
72 |
|
73 |
/**
|
74 |
* PreparePurgeRequestUri
|
@@ -77,7 +77,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
77 |
*
|
78 |
* @return string for the purge request
|
79 |
*/
|
80 |
-
public function preparePurgeRequestUri(
|
81 |
{
|
82 |
return \sprintf(
|
83 |
"http://%s:%s/purge%s",
|
@@ -96,10 +96,10 @@ abstract class ArubaHiSpeedCachePurger
|
|
96 |
* 'server_port' => string '8889'
|
97 |
* ];
|
98 |
*
|
99 |
-
* @param
|
100 |
* @return void
|
101 |
*/
|
102 |
-
public function setPurger(
|
103 |
{
|
104 |
$this->setTimeOut($configs['time_out']);
|
105 |
$this->setServerHost($configs['server_host']);
|
@@ -109,7 +109,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
109 |
/**
|
110 |
* Get undocumented variable
|
111 |
*
|
112 |
-
* @return
|
113 |
*/
|
114 |
public function getTimeOut()
|
115 |
{
|
@@ -133,7 +133,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
133 |
/**
|
134 |
* Get undocumented variable
|
135 |
*
|
136 |
-
* @return
|
137 |
*/
|
138 |
public function getServerPort()
|
139 |
{
|
@@ -147,7 +147,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
147 |
*
|
148 |
* @return self
|
149 |
*/
|
150 |
-
public function setServerPort(
|
151 |
{
|
152 |
$this->serverPort = $serverPort;
|
153 |
|
@@ -171,7 +171,7 @@ abstract class ArubaHiSpeedCachePurger
|
|
171 |
*
|
172 |
* @return self
|
173 |
*/
|
174 |
-
public function setServerHost(
|
175 |
{
|
176 |
$this->serverHost = $serverHost;
|
177 |
|
5 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
*/
|
8 |
+
|
9 |
|
10 |
namespace ArubaHiSpeedCache;
|
11 |
|
20 |
*
|
21 |
* @var string
|
22 |
*/
|
23 |
+
protected $serverHost;
|
24 |
|
25 |
/**
|
26 |
* $server_port for the request
|
27 |
*
|
28 |
* @var string
|
29 |
*/
|
30 |
+
protected $serverPort;
|
31 |
|
32 |
/**
|
33 |
* $time_out of request
|
34 |
*
|
35 |
* @var integer
|
36 |
*/
|
37 |
+
protected $timeOut;
|
38 |
|
39 |
/**
|
40 |
* Purge the cache of a single page
|
42 |
* @param string $url
|
43 |
* @return void
|
44 |
*/
|
45 |
+
abstract public function purgeUrl($url);
|
46 |
|
47 |
/**
|
48 |
* Purge the cache of a list of pages
|
50 |
* @param array $urls
|
51 |
* @return void
|
52 |
*/
|
53 |
+
abstract public function purgeUrls($urls);
|
54 |
|
55 |
/**
|
56 |
* Purge the alla chace of site
|
68 |
*
|
69 |
* @return void
|
70 |
*/
|
71 |
+
abstract public function doRemoteGet($path = '/', $host = '');
|
72 |
|
73 |
/**
|
74 |
* PreparePurgeRequestUri
|
77 |
*
|
78 |
* @return string for the purge request
|
79 |
*/
|
80 |
+
public function preparePurgeRequestUri($url)
|
81 |
{
|
82 |
return \sprintf(
|
83 |
"http://%s:%s/purge%s",
|
96 |
* 'server_port' => string '8889'
|
97 |
* ];
|
98 |
*
|
99 |
+
* @param array $configs
|
100 |
* @return void
|
101 |
*/
|
102 |
+
public function setPurger($configs)
|
103 |
{
|
104 |
$this->setTimeOut($configs['time_out']);
|
105 |
$this->setServerHost($configs['server_host']);
|
109 |
/**
|
110 |
* Get undocumented variable
|
111 |
*
|
112 |
+
* @return integer
|
113 |
*/
|
114 |
public function getTimeOut()
|
115 |
{
|
133 |
/**
|
134 |
* Get undocumented variable
|
135 |
*
|
136 |
+
* @return string
|
137 |
*/
|
138 |
public function getServerPort()
|
139 |
{
|
147 |
*
|
148 |
* @return self
|
149 |
*/
|
150 |
+
public function setServerPort($serverPort)
|
151 |
{
|
152 |
$this->serverPort = $serverPort;
|
153 |
|
171 |
*
|
172 |
* @return self
|
173 |
*/
|
174 |
+
public function setServerHost($serverHost)
|
175 |
{
|
176 |
$this->serverHost = $serverHost;
|
177 |
|
includes/ArubaHiSpeedCacheWpPurger.php
CHANGED
@@ -1,12 +1,17 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
|
|
|
|
3 |
* @category Wordpress-plugin
|
4 |
* @package Aruba-HiSpeed-Cache
|
5 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
-
* @link
|
|
|
8 |
*/
|
9 |
-
|
|
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
@@ -53,22 +58,36 @@ use \sprintf;
|
|
53 |
if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
54 |
class ArubaHiSpeedCacheWpPurger extends ArubaHiSpeedCachePurger
|
55 |
{
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
private $admin;
|
59 |
|
|
|
60 |
/**
|
61 |
* Undocumented function
|
62 |
*
|
63 |
-
* @param
|
|
|
64 |
*/
|
65 |
-
public function __construct(
|
66 |
{
|
67 |
-
$this->setPurger(
|
68 |
-
|
69 |
-
'
|
70 |
-
'
|
71 |
-
|
|
|
|
|
72 |
|
73 |
$this->admin = $aruba_hispeed_cache;
|
74 |
$this->settings = $aruba_hispeed_cache->options;
|
@@ -81,7 +100,7 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
81 |
* @param string $url
|
82 |
* @return void
|
83 |
*/
|
84 |
-
public function purgeUrl(
|
85 |
{
|
86 |
$site_url = $this->getParseSiteUrl();
|
87 |
$host = $site_url['host'];
|
@@ -98,7 +117,7 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
98 |
* @param array $urls
|
99 |
* @return void
|
100 |
*/
|
101 |
-
public function purgeUrls(
|
102 |
{
|
103 |
$site_url = $this->getParseSiteUrl();
|
104 |
$host = $site_url['host'];
|
@@ -129,7 +148,7 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
129 |
* @param string $host
|
130 |
* @return void
|
131 |
*/
|
132 |
-
public function doRemoteGet(
|
133 |
{
|
134 |
$purgeUrl = $this->preparePurgeRequestUri($path);
|
135 |
|
@@ -168,13 +187,15 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
168 |
* @param string $url
|
169 |
* @return path of url
|
170 |
*/
|
171 |
-
public function parseUrl(
|
172 |
{
|
173 |
if (!filter_var($url, FILTER_VALIDATE_URL)) {
|
174 |
return ($url[0] != '/') ? '/' . $url : $url;
|
175 |
}
|
176 |
|
177 |
-
|
|
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
@@ -182,24 +203,18 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
182 |
*
|
183 |
* @return boolean true
|
184 |
*/
|
185 |
-
public function getHomepage()
|
186 |
{
|
187 |
-
|
188 |
-
// WPML installetd?.
|
189 |
-
if (\function_exists('icl_get_home_url')) {
|
190 |
-
return \trailingslashit(\icl_get_home_url());
|
191 |
-
}
|
192 |
-
|
193 |
-
return \trailingslashit(\home_url());
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
* Is_enable_setting
|
198 |
*
|
199 |
-
* @param string
|
200 |
* @return boolean
|
201 |
*/
|
202 |
-
public function is_enable_setting(
|
203 |
{
|
204 |
return (bool) $this->settings[$setting];
|
205 |
}
|
@@ -245,10 +260,10 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
245 |
\_e('Sorry, you do not have the necessary privileges to edit these options.', 'aruba-hispeed-cache')
|
246 |
),
|
247 |
'',
|
248 |
-
|
249 |
-
'link_url' => \esc_url('
|
250 |
'link_text' => \_e('Contact customer service', 'aruba-hispeed-cache')
|
251 |
-
|
252 |
);
|
253 |
}
|
254 |
|
@@ -314,12 +329,12 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
314 |
|
315 |
switch ($action) {
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
|
321 |
-
|
322 |
-
|
323 |
|
324 |
}
|
325 |
}
|
@@ -328,12 +343,12 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
328 |
* Ahsc_edit_term
|
329 |
* Purge the cache of term item or home on term edit.
|
330 |
*
|
331 |
-
* @param int
|
332 |
-
* @param int
|
333 |
* @param string $taxon
|
334 |
* @return void
|
335 |
*/
|
336 |
-
public function ahsc_edit_term(
|
337 |
{
|
338 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
339 |
return;
|
@@ -354,14 +369,16 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
354 |
}
|
355 |
|
356 |
/**
|
357 |
-
*
|
358 |
*
|
359 |
-
* @param
|
360 |
-
* @param
|
361 |
-
* @param string
|
|
|
|
|
362 |
* @return void
|
363 |
*/
|
364 |
-
public function ahsc_delete_term(
|
365 |
{
|
366 |
global $wp_rewrite;
|
367 |
|
@@ -408,12 +425,12 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
408 |
* Ahsc_transition_post_status
|
409 |
* Purge the cache of item or site on transition post status
|
410 |
*
|
411 |
-
* @param int|string
|
412 |
-
* @param int|string
|
413 |
-
* @param \WP_Post
|
414 |
* @return void
|
415 |
*/
|
416 |
-
public function ahsc_transition_post_status($new_status, $old_status,
|
417 |
{
|
418 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
419 |
return;
|
@@ -449,12 +466,12 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
449 |
* Ahsc_transition_comment_status
|
450 |
* Purge the cache of item or site on canghe status of the comment
|
451 |
*
|
452 |
-
* @param int|string
|
453 |
-
* @param int|string
|
454 |
* @param \WP_Comment $comment
|
455 |
* @return void
|
456 |
*/
|
457 |
-
public function ahsc_transition_comment_status($new_status, $old_status,
|
458 |
{
|
459 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
460 |
return;
|
@@ -491,7 +508,7 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
491 |
* @param \WP_Comment $comment
|
492 |
* @return void
|
493 |
*/
|
494 |
-
public function ahsc_wp_insert_comment(
|
495 |
{
|
496 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
497 |
return;
|
@@ -501,7 +518,7 @@ if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
|
501 |
return;
|
502 |
}
|
503 |
|
504 |
-
$_post_id
|
505 |
$post_url = \get_permalink($_post_id);
|
506 |
|
507 |
$this->purgeUrl($this->parseUrl($post_url));
|
1 |
<?php
|
2 |
/**
|
3 |
+
* ArubaHiSpeedCacheWpPurger
|
4 |
+
* php version 5.6
|
5 |
+
*
|
6 |
* @category Wordpress-plugin
|
7 |
* @package Aruba-HiSpeed-Cache
|
8 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
+
* @link \ArubaHiSpeedCache\Run_Aruba_Hispeed_cache()
|
11 |
+
* @since 1.0.0
|
12 |
*/
|
13 |
+
|
14 |
+
|
15 |
|
16 |
namespace ArubaHiSpeedCache\includes;
|
17 |
|
58 |
if (!class_exists(__NAMESPACE__ . 'ArubaHiSpeedCacheWpPurger')) {
|
59 |
class ArubaHiSpeedCacheWpPurger extends ArubaHiSpeedCachePurger
|
60 |
{
|
61 |
+
/**
|
62 |
+
* Undocumented variable
|
63 |
+
*
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
private $settings;
|
67 |
|
68 |
+
/**
|
69 |
+
* Undocumented variable
|
70 |
+
*
|
71 |
+
* @var [type]
|
72 |
+
*/
|
73 |
private $admin;
|
74 |
|
75 |
+
|
76 |
/**
|
77 |
* Undocumented function
|
78 |
*
|
79 |
+
* @param \ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs $configs
|
80 |
+
* @param \ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin $aruba_hispeed_cache
|
81 |
*/
|
82 |
+
public function __construct($aruba_hispeed_cache)
|
83 |
{
|
84 |
+
$this->setPurger(
|
85 |
+
array(
|
86 |
+
'time_out' => ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PURGE_TIME_OUT'),
|
87 |
+
'server_host' => ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PURGE_HOST'),
|
88 |
+
'server_port' => ArubaHiSpeedCacheConfigs::ArubaHiSpeedCache_getConfigs('PURGE_PORT')
|
89 |
+
)
|
90 |
+
);
|
91 |
|
92 |
$this->admin = $aruba_hispeed_cache;
|
93 |
$this->settings = $aruba_hispeed_cache->options;
|
100 |
* @param string $url
|
101 |
* @return void
|
102 |
*/
|
103 |
+
public function purgeUrl($url)
|
104 |
{
|
105 |
$site_url = $this->getParseSiteUrl();
|
106 |
$host = $site_url['host'];
|
117 |
* @param array $urls
|
118 |
* @return void
|
119 |
*/
|
120 |
+
public function purgeUrls($urls)
|
121 |
{
|
122 |
$site_url = $this->getParseSiteUrl();
|
123 |
$host = $site_url['host'];
|
148 |
* @param string $host
|
149 |
* @return void
|
150 |
*/
|
151 |
+
public function doRemoteGet($path = '/', $host = '')
|
152 |
{
|
153 |
$purgeUrl = $this->preparePurgeRequestUri($path);
|
154 |
|
187 |
* @param string $url
|
188 |
* @return path of url
|
189 |
*/
|
190 |
+
public function parseUrl($url)
|
191 |
{
|
192 |
if (!filter_var($url, FILTER_VALIDATE_URL)) {
|
193 |
return ($url[0] != '/') ? '/' . $url : $url;
|
194 |
}
|
195 |
|
196 |
+
$parse = \wp_parse_url($url); // for php 5.3
|
197 |
+
|
198 |
+
return \trailingslashit($parse['path']);
|
199 |
}
|
200 |
|
201 |
/**
|
203 |
*
|
204 |
* @return boolean true
|
205 |
*/
|
206 |
+
public function getHomepage()
|
207 |
{
|
208 |
+
return \ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getSiteHome();
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
|
211 |
/**
|
212 |
* Is_enable_setting
|
213 |
*
|
214 |
+
* @param string $setting
|
215 |
* @return boolean
|
216 |
*/
|
217 |
+
public function is_enable_setting($setting)
|
218 |
{
|
219 |
return (bool) $this->settings[$setting];
|
220 |
}
|
260 |
\_e('Sorry, you do not have the necessary privileges to edit these options.', 'aruba-hispeed-cache')
|
261 |
),
|
262 |
'',
|
263 |
+
array(
|
264 |
+
'link_url' => \esc_url(ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getLocalizedLink('link_assistance')),
|
265 |
'link_text' => \_e('Contact customer service', 'aruba-hispeed-cache')
|
266 |
+
)
|
267 |
);
|
268 |
}
|
269 |
|
329 |
|
330 |
switch ($action) {
|
331 |
|
332 |
+
case 'save-sidebar-widgets':
|
333 |
+
$this->purgeUrl($this->getHomepage());
|
334 |
+
break;
|
335 |
|
336 |
+
default:
|
337 |
+
break;
|
338 |
|
339 |
}
|
340 |
}
|
343 |
* Ahsc_edit_term
|
344 |
* Purge the cache of term item or home on term edit.
|
345 |
*
|
346 |
+
* @param int $term_id
|
347 |
+
* @param int $tt_id
|
348 |
* @param string $taxon
|
349 |
* @return void
|
350 |
*/
|
351 |
+
public function ahsc_edit_term($term_id, $tt_id, $taxon)
|
352 |
{
|
353 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
354 |
return;
|
369 |
}
|
370 |
|
371 |
/**
|
372 |
+
* ahsc_delete_term
|
373 |
*
|
374 |
+
* @param integer $term
|
375 |
+
* @param integer $tt_id
|
376 |
+
* @param string $taxonomy
|
377 |
+
* @param \WP_Term $deleted_term
|
378 |
+
* @param array $object_ids
|
379 |
* @return void
|
380 |
*/
|
381 |
+
public function ahsc_delete_term($term, $tt_id, $taxonomy, $deleted_term)
|
382 |
{
|
383 |
global $wp_rewrite;
|
384 |
|
425 |
* Ahsc_transition_post_status
|
426 |
* Purge the cache of item or site on transition post status
|
427 |
*
|
428 |
+
* @param int|string $new_status
|
429 |
+
* @param int|string $old_status
|
430 |
+
* @param \WP_Post $post
|
431 |
* @return void
|
432 |
*/
|
433 |
+
public function ahsc_transition_post_status($new_status, $old_status, $post)
|
434 |
{
|
435 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
436 |
return;
|
466 |
* Ahsc_transition_comment_status
|
467 |
* Purge the cache of item or site on canghe status of the comment
|
468 |
*
|
469 |
+
* @param int|string $new_status
|
470 |
+
* @param int|string $old_status
|
471 |
* @param \WP_Comment $comment
|
472 |
* @return void
|
473 |
*/
|
474 |
+
public function ahsc_transition_comment_status($new_status, $old_status, $comment)
|
475 |
{
|
476 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
477 |
return;
|
508 |
* @param \WP_Comment $comment
|
509 |
* @return void
|
510 |
*/
|
511 |
+
public function ahsc_wp_insert_comment($id, $comment)
|
512 |
{
|
513 |
if (!$this->is_enable_setting('ahsc_enable_purge')) {
|
514 |
return;
|
518 |
return;
|
519 |
}
|
520 |
|
521 |
+
$_post_id = $comment->comment_post_ID;
|
522 |
$post_url = \get_permalink($_post_id);
|
523 |
|
524 |
$this->purgeUrl($this->parseUrl($post_url));
|
includes/ArubaHiSpeedCachei18n.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
-
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
@@ -31,7 +31,13 @@ class ArubaHiSpeedCachei18n
|
|
31 |
*/
|
32 |
private $dirRelPath;
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
{
|
36 |
$this->domain = $domain;
|
37 |
$this->dirRelPath = dirname($plugin_rel_path);
|
6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
7 |
* @link run_aruba_hispeed_cache
|
8 |
*/
|
9 |
+
|
10 |
|
11 |
namespace ArubaHiSpeedCache\includes;
|
12 |
|
31 |
*/
|
32 |
private $dirRelPath;
|
33 |
|
34 |
+
/**
|
35 |
+
* Undocumented function
|
36 |
+
*
|
37 |
+
* @param string $domain
|
38 |
+
* @param string $plugin_rel_path
|
39 |
+
*/
|
40 |
+
public function __construct($domain = '', $plugin_rel_path = '')
|
41 |
{
|
42 |
$this->domain = $domain;
|
43 |
$this->dirRelPath = dirname($plugin_rel_path);
|
includes/HiSpeedCacheServiceChecker.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ArubaHiSpeedCacheBootstrap - Control center for everything.
|
4 |
+
* php version 5.6
|
5 |
+
*
|
6 |
+
* @category Component
|
7 |
+
* @package Aruba-HiSpeed-Cache
|
8 |
+
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
+
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
+
* @link Null
|
11 |
+
* @since 1.0.1
|
12 |
+
*/
|
13 |
+
|
14 |
+
namespace ArubaHiSpeedCache\includes;
|
15 |
+
|
16 |
+
use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
|
17 |
+
|
18 |
+
use \is_array;
|
19 |
+
|
20 |
+
use \is_wp_error;
|
21 |
+
use \wp_remote_get;
|
22 |
+
|
23 |
+
if (!class_exists(__NAMESPACE__ . '\HiSpeedCacheServiceChecker')) {
|
24 |
+
class HiSpeedCacheServiceChecker
|
25 |
+
{
|
26 |
+
private $target = null;
|
27 |
+
|
28 |
+
private $headers = array();
|
29 |
+
|
30 |
+
public $serviceIsActivabile = false;
|
31 |
+
public $serviceIsActive = false;
|
32 |
+
public $serviceStatus = null;
|
33 |
+
public $isArubaServer = false;
|
34 |
+
|
35 |
+
public function __construct($target = null)
|
36 |
+
{
|
37 |
+
//$this->target = ;
|
38 |
+
$this->target = (null === $target) ?
|
39 |
+
\ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs::getSiteHome() :
|
40 |
+
$target;
|
41 |
+
|
42 |
+
$this->_getHeaders();
|
43 |
+
}
|
44 |
+
|
45 |
+
private function _getHeaders()
|
46 |
+
{
|
47 |
+
$response = \wp_remote_get($this->target, array(
|
48 |
+
'sslverify' => false,
|
49 |
+
'user-agent' => 'aruba-ua',
|
50 |
+
'httpversion' => '1.1'
|
51 |
+
));
|
52 |
+
|
53 |
+
if (\is_array($response) && ! \is_wp_error($response)) {
|
54 |
+
$this->headers = $response['headers']->getAll();
|
55 |
+
return true;
|
56 |
+
}
|
57 |
+
|
58 |
+
if (\is_wp_error($response)) {
|
59 |
+
$code = $response->get_error_code();
|
60 |
+
$message = $response->get_error_message();
|
61 |
+
}
|
62 |
+
return list($code, $message) = array($error_code, $error_message);
|
63 |
+
}
|
64 |
+
|
65 |
+
private function _headersAnalizer()
|
66 |
+
{
|
67 |
+
//is ow aruba server?
|
68 |
+
if (array_key_exists('x-aruba-cache', $this->headers)) {
|
69 |
+
$this->isArubaServer = true;
|
70 |
+
$this->serviceStatus = $this->headers['x-aruba-cache'];
|
71 |
+
|
72 |
+
switch ($this->headers['x-aruba-cache']) {
|
73 |
+
case 'NA':
|
74 |
+
$this->serviceIsActivabile = false;
|
75 |
+
$this->serviceIsActive = false;
|
76 |
+
break;
|
77 |
+
case 'MISS':
|
78 |
+
case 'BYPASS':
|
79 |
+
$this->serviceIsActivabile = true;
|
80 |
+
$this->serviceIsActive = false;
|
81 |
+
break;
|
82 |
+
default:
|
83 |
+
$this->serviceIsActive = true;
|
84 |
+
break;
|
85 |
+
}
|
86 |
+
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
|
90 |
+
//it is not ow aruba server !
|
91 |
+
if (array_key_exists('server', $this->headers)) {
|
92 |
+
switch ($this->headers['server']) {
|
93 |
+
case 'aruba-proxy':
|
94 |
+
$this->serviceIsActivabile = true;
|
95 |
+
break;
|
96 |
+
case 'cloudflare':
|
97 |
+
$this->serviceIsActivabile = false;
|
98 |
+
|
99 |
+
if (array_key_exists('x-servername', $this->headers) && str_contains($this->headers['x-servername'], 'aruba.it')) {
|
100 |
+
$this->serviceIsActivabile = true;
|
101 |
+
}
|
102 |
+
break;
|
103 |
+
default:
|
104 |
+
$this->serviceIsActivabile = false;
|
105 |
+
break;
|
106 |
+
}
|
107 |
+
return;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
public function check()
|
112 |
+
{
|
113 |
+
$this->_headersAnalizer();
|
114 |
+
|
115 |
+
if ($this->isArubaServer && !$this->serviceIsActive) {
|
116 |
+
return ($this->serviceIsActivabile) ? 'available' : 'unavailable';
|
117 |
+
}
|
118 |
+
|
119 |
+
if (!$this->isArubaServer && !$this->serviceIsActive) {
|
120 |
+
return ($this->serviceIsActivabile) ? 'available' : 'no-aruba-server';
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
includes/index.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Silence is golden.
|
|
|
4 |
*
|
5 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
6 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* Silence is golden.
|
4 |
+
* php version 5.6
|
5 |
*
|
6 |
+
* @category Wordpress-plugin
|
7 |
+
* @package Aruba-HiSpeed-Cache
|
8 |
+
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
+
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
+
* @link \ArubaHiSpeedCache\Run_Aruba_Hispeed_cache()
|
11 |
+
* @since 1.0.0
|
12 |
*/
|
index.php
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Silence is golden.
|
|
|
4 |
*
|
5 |
-
* @
|
6 |
-
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Silence is golden.
|
4 |
+
* php version 5.6
|
5 |
*
|
6 |
+
* @category Wordpress-plugin
|
7 |
+
* @package Aruba-HiSpeed-Cache
|
8 |
+
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
+
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
+
* @link ArubaHiSpeedCache\run_aruba_hispeed_cache()
|
11 |
+
*/
|
languages/aruba-hispeed-cache-es_ES.mo
CHANGED
Binary file
|
languages/aruba-hispeed-cache-es_ES.po
CHANGED
@@ -2,13 +2,12 @@
|
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Aruba HiSpeed Cache 0.0.
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-"
|
7 |
-
"
|
8 |
-
"
|
9 |
-
"PO-Revision-Date: 2022-03-02 16:47+0100\n"
|
10 |
"Last-Translator: \n"
|
11 |
-
"Language-Team:
|
12 |
"Language: es\n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -18,22 +17,22 @@ msgstr ""
|
|
18 |
"X-Domain: aruba-hispeed-cache\n"
|
19 |
|
20 |
#. Plugin Name of the plugin
|
21 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
22 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
23 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:138
|
24 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:139
|
25 |
msgid "Aruba HiSpeed Cache"
|
26 |
msgstr "Aruba HiSpeed Cache"
|
27 |
|
28 |
#. Plugin URI of the plugin
|
29 |
-
msgid ""
|
30 |
-
"https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
31 |
-
msgstr ""
|
32 |
-
"https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
33 |
|
34 |
#. Description of the plugin
|
35 |
-
msgid "
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
|
38 |
#. Author of the plugin
|
39 |
msgid "Aruba.it"
|
@@ -45,135 +44,152 @@ msgstr "https://www.aruba.it/"
|
|
45 |
|
46 |
#: \admin\partials\admin-display.php:9
|
47 |
msgid "Aruba HiSpeed Cache Settings "
|
48 |
-
msgstr "
|
49 |
|
50 |
-
#: \admin\partials\admin-general-options.php:
|
51 |
msgid "Save changes"
|
52 |
-
msgstr "Guardar cambios"
|
53 |
|
54 |
-
#: \admin\partials\admin-general-options.php:
|
55 |
msgid "Purge entire cache"
|
56 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
59 |
msgid "Purge completed"
|
60 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
63 |
msgid "Settings saved."
|
64 |
-
msgstr "Ajustes guardados"
|
65 |
|
66 |
-
#: \admin\partials\admin-notice-version.php:
|
67 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
68 |
-
msgstr ""
|
69 |
-
"Lo sentimos mucho, Aruba HiSpeed Cache requiere WordPress %s o una versión "
|
70 |
-
"superior."
|
71 |
|
72 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
73 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
74 |
-
msgstr ""
|
75 |
-
"Estás a punto de borrar completamente la caché. ¿Seguro que quieres "
|
76 |
-
"continuar?"
|
77 |
|
78 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
79 |
msgid "Purge the page cache"
|
80 |
-
msgstr "
|
81 |
|
82 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
83 |
msgid "Purge Cache"
|
84 |
-
msgstr "
|
85 |
|
86 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
87 |
msgid "Settings"
|
88 |
-
msgstr "
|
89 |
|
90 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
91 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:342
|
92 |
msgid "Purging options"
|
93 |
-
msgstr "Opciones de
|
94 |
|
95 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
96 |
msgid "Enable automatic purge"
|
97 |
-
msgstr "Activar
|
98 |
|
99 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
100 |
msgid "Automatically purge entire cache when:"
|
101 |
-
msgstr "
|
102 |
|
103 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
104 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:372
|
105 |
msgid "Home page:"
|
106 |
msgstr "Página de inicio:"
|
107 |
|
108 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
109 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:431
|
110 |
msgid ""
|
111 |
-
"a <strong>post</strong> (or page/custom post) is <strong>modified</strong> "
|
112 |
-
"
|
113 |
msgstr ""
|
114 |
-
"se <strong>modifica</strong> o <strong>
|
115 |
-
"
|
116 |
|
117 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
118 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:438
|
119 |
msgid ""
|
120 |
-
"a <strong>published post</strong> (or page/custom post) is "
|
121 |
-
"<strong>cancelled</strong>."
|
122 |
msgstr ""
|
123 |
-
"se <strong>
|
124 |
-
"página/
|
125 |
|
126 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
127 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:394
|
128 |
msgid "Post/page/custom post type:"
|
129 |
-
msgstr "
|
130 |
|
131 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
132 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
133 |
-
msgstr "se <strong>publica</strong>
|
134 |
|
135 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
136 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:453
|
137 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
138 |
-
msgstr ""
|
139 |
-
"un <strong>comentario</strong> es <strong>aprobado/publicado</strong>."
|
140 |
|
141 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
142 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:460
|
143 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
144 |
-
msgstr ""
|
145 |
-
"un <strong>comentario</strong> es <strong>rechazado/eliminado</strong>."
|
146 |
|
147 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
148 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:424
|
149 |
msgid "Archives:"
|
150 |
-
msgstr "
|
151 |
|
152 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
153 |
msgid "(date, category, tag, author, custom taxonomies)"
|
154 |
-
msgstr "(fecha, categoría,
|
155 |
|
156 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
157 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:446
|
158 |
msgid "Comments:"
|
159 |
msgstr "Comentarios:"
|
160 |
|
161 |
-
#: \includes\ArubaHiSpeedCacheConfigs.php:
|
162 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
163 |
-
msgstr ""
|
164 |
-
"Lo sentimos mucho, tienes que ser administrador para usar Aruba HiSpeed "
|
165 |
-
"Cache."
|
166 |
|
167 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
168 |
msgid "An error has occurred."
|
169 |
-
msgstr "
|
170 |
|
171 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
172 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
173 |
-
msgstr ""
|
174 |
-
"Lo sentimos mucho pero no dispones de los permisos necesarios para "
|
175 |
-
"modificar estas opciones. "
|
176 |
|
177 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
178 |
msgid "Contact customer service"
|
179 |
-
msgstr "
|
|
|
|
|
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Aruba HiSpeed Cache 0.0.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2022-03-23T10:34:24+01:00\n"
|
8 |
+
"PO-Revision-Date: 2022-04-04 14:44+0200\n"
|
|
|
9 |
"Last-Translator: \n"
|
10 |
+
"Language-Team: Aruba Developer <hispeedcache.developer@aruba.it>\n"
|
11 |
"Language: es\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
17 |
"X-Domain: aruba-hispeed-cache\n"
|
18 |
|
19 |
#. Plugin Name of the plugin
|
20 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:152 \includes\ArubaHiSpeedCacheAdmin.php:153
|
21 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:161 \includes\ArubaHiSpeedCacheAdmin.php:162
|
|
|
|
|
22 |
msgid "Aruba HiSpeed Cache"
|
23 |
msgstr "Aruba HiSpeed Cache"
|
24 |
|
25 |
#. Plugin URI of the plugin
|
26 |
+
msgid "https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
27 |
+
msgstr "https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
|
|
|
|
28 |
|
29 |
#. Description of the plugin
|
30 |
+
msgid ""
|
31 |
+
"Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's HiSpeed "
|
32 |
+
"Cache service and automates its management."
|
33 |
+
msgstr ""
|
34 |
+
"Aruba HiSpeed Cache interactúa directamente con un servicio HiSpeed Cache de la "
|
35 |
+
"plataforma de alojamiento de Aruba y automatiza su gestión."
|
36 |
|
37 |
#. Author of the plugin
|
38 |
msgid "Aruba.it"
|
44 |
|
45 |
#: \admin\partials\admin-display.php:9
|
46 |
msgid "Aruba HiSpeed Cache Settings "
|
47 |
+
msgstr "Ajustes de Aruba HiSpeed Cache "
|
48 |
|
49 |
+
#: \admin\partials\admin-general-options.php:69
|
50 |
msgid "Save changes"
|
51 |
+
msgstr "Guardar los cambios"
|
52 |
|
53 |
+
#: \admin\partials\admin-general-options.php:74
|
54 |
msgid "Purge entire cache"
|
55 |
+
msgstr "Vaciar toda la caché"
|
56 |
+
|
57 |
+
#: \admin\partials\admin-notice-not-aruba-server.php:5
|
58 |
+
msgid ""
|
59 |
+
"<strong>The Aruba HiSpeed Cache plugin cannot be used because your WordPress website "
|
60 |
+
"is not hosted on an Aruba hosting platform.</strong> Buy an <a href=\"%s\" rel="
|
61 |
+
"\"nofollow\" target=\"_blank\">Aruba hosting</a> service and migrate your website to "
|
62 |
+
"use the plugin."
|
63 |
+
msgstr ""
|
64 |
+
"<strong>El plugin Aruba HiSpeed Cache no se puede usar porque tu sitio web de "
|
65 |
+
"WordPress no está alojado en la plataforma de hosting de Aruba.</strong> Compra un "
|
66 |
+
"servicio <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">hosting de Aruba</a> y "
|
67 |
+
"luego migra tu web para usar el plugin."
|
68 |
|
69 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
70 |
msgid "Purge completed"
|
71 |
+
msgstr "Vaciado terminado "
|
72 |
+
|
73 |
+
#: \admin\partials\admin-notice-service-available.php:4
|
74 |
+
msgid ""
|
75 |
+
"<strong>The HiSpeed Cache feature is not enabled.</strong> To enable it, go to your "
|
76 |
+
"domain <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">control panel</a>. For "
|
77 |
+
"further details <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">see our guide</a>."
|
78 |
+
msgstr ""
|
79 |
+
"<strong>El servicio HiSpeed Cache no está activado.</strong> Para activarlo, inicia "
|
80 |
+
"sesión en el <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">panel de control</a> "
|
81 |
+
"de tu dominio. Para más información <a href=\"%s\" rel=\"nofollow\" target=\"_blank"
|
82 |
+
"\">consulta nuestra guía</a>."
|
83 |
+
|
84 |
+
#: \admin\partials\admin-notice-service-unavailable.php:5
|
85 |
+
msgid ""
|
86 |
+
"<strong>The HiSpeed Cache feature, with which the plugin interfaces, is not available "
|
87 |
+
"on the server that hosts your website.</strong> To use HiSpeed Cache and the plugin, "
|
88 |
+
"contact <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">support</a>."
|
89 |
+
msgstr ""
|
90 |
+
"<strong>El servicio HiSpeed Cache, con el que interactúa el plugin, no está "
|
91 |
+
"disponible en el servidor donde está alojado tu sitio web.</strong> Para usar HiSpeed "
|
92 |
+
"Cache y el plugin, ponte en contacto con nuestra <a href=\"%s\" rel=\"nofollow\" "
|
93 |
+
"target=\"_blank\">asistencia</a>."
|
94 |
|
95 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
96 |
msgid "Settings saved."
|
97 |
+
msgstr "Ajustes guardados."
|
98 |
|
99 |
+
#: \admin\partials\admin-notice-version.php:10
|
100 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
101 |
+
msgstr "Lo siento, Aruba HiSpeed Cache necesita WordPress %s o superior."
|
|
|
|
|
102 |
|
103 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:137
|
104 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
105 |
+
msgstr "Estás a punto de vaciar toda la caché. ¿Quieres continuar?"
|
|
|
|
|
106 |
|
107 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:193
|
108 |
msgid "Purge the page cache"
|
109 |
+
msgstr "Vaciar la caché de la página"
|
110 |
|
111 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:197
|
112 |
msgid "Purge Cache"
|
113 |
+
msgstr "Vaciar la caché"
|
114 |
|
115 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:261
|
116 |
msgid "Settings"
|
117 |
+
msgstr "Ajustes"
|
118 |
|
119 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:380 \includes\ArubaHiSpeedCacheAdmin.php:381
|
|
|
120 |
msgid "Purging options"
|
121 |
+
msgstr "Opciones de vaciado"
|
122 |
|
123 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:388
|
124 |
msgid "Enable automatic purge"
|
125 |
+
msgstr "Activar el vaciado automático"
|
126 |
|
127 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:406
|
128 |
msgid "Automatically purge entire cache when:"
|
129 |
+
msgstr "Vaciar automáticamente toda la caché cuando:"
|
130 |
|
131 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:411 \includes\ArubaHiSpeedCacheAdmin.php:412
|
|
|
132 |
msgid "Home page:"
|
133 |
msgstr "Página de inicio:"
|
134 |
|
135 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:419 \includes\ArubaHiSpeedCacheAdmin.php:471
|
|
|
136 |
msgid ""
|
137 |
+
"a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or "
|
138 |
+
"<strong>added</strong>."
|
139 |
msgstr ""
|
140 |
+
"se <strong>modifica</strong> o se <strong>añade</strong> una <strong>entrada</strong> "
|
141 |
+
"(o página/custom post)"
|
142 |
|
143 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:426 \includes\ArubaHiSpeedCacheAdmin.php:478
|
|
|
144 |
msgid ""
|
145 |
+
"a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>."
|
|
|
146 |
msgstr ""
|
147 |
+
"se <strong>cancela</strong> la publicación de una <strong>entrada publicada</strong> "
|
148 |
+
"(o página/contenido personalizado)."
|
149 |
|
150 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:433 \includes\ArubaHiSpeedCacheAdmin.php:434
|
|
|
151 |
msgid "Post/page/custom post type:"
|
152 |
+
msgstr "Entrada/página/tipo de contenido personalizado (cpt):"
|
153 |
|
154 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:441
|
155 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
156 |
+
msgstr "se <strong>publica</strong> una <strong>entrada</strong>."
|
157 |
|
158 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:448 \includes\ArubaHiSpeedCacheAdmin.php:493
|
|
|
159 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
160 |
+
msgstr "se <strong>aprueba/publica</strong> un <strong>comentario</strong>."
|
|
|
161 |
|
162 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:455 \includes\ArubaHiSpeedCacheAdmin.php:500
|
|
|
163 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
164 |
+
msgstr "se <strong>rechaza/borra</strong> un <strong>comentario</strong>."
|
|
|
165 |
|
166 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:462 \includes\ArubaHiSpeedCacheAdmin.php:464
|
|
|
167 |
msgid "Archives:"
|
168 |
+
msgstr "Archivos:"
|
169 |
|
170 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:463
|
171 |
msgid "(date, category, tag, author, custom taxonomies)"
|
172 |
+
msgstr "(fecha, categoría, etiqueta, autor, taxonomías personalizadas)"
|
173 |
|
174 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:485 \includes\ArubaHiSpeedCacheAdmin.php:486
|
|
|
175 |
msgid "Comments:"
|
176 |
msgstr "Comentarios:"
|
177 |
|
178 |
+
#: \includes\ArubaHiSpeedCacheConfigs.php:189
|
179 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
180 |
+
msgstr "Lo siento, tienes que ser administrador para usar Aruba HiSpeed Cache."
|
|
|
|
|
181 |
|
182 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:260
|
183 |
msgid "An error has occurred."
|
184 |
+
msgstr "Ha ocurrido un error."
|
185 |
|
186 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:261
|
187 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
188 |
+
msgstr "Lo siento, no tienes los permisos necesarios para editar estas opciones. "
|
|
|
|
|
189 |
|
190 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:266
|
191 |
msgid "Contact customer service"
|
192 |
+
msgstr "Contactar con el servicio al cliente"
|
193 |
+
|
194 |
+
#~ msgid "Purges the cache whenever a post is edited or published."
|
195 |
+
#~ msgstr "Borrar la caché cada vez que se publique o modifique un artículo."
|
languages/aruba-hispeed-cache-it_IT.mo
CHANGED
Binary file
|
languages/aruba-hispeed-cache-it_IT.po
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Aruba HiSpeed Cache 0.0.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-"
|
7 |
"cache\n"
|
8 |
-
"POT-Creation-Date: 2022-03-
|
9 |
-
"PO-Revision-Date: 2022-03-
|
10 |
"Last-Translator: Aruba Developer <hispeedcache.developer@aruba.it>\n"
|
11 |
"Language-Team: Aruba Developer <hispeedcache.developer@aruba.it>\n"
|
12 |
"Language: it_IT\n"
|
@@ -14,7 +14,7 @@ msgstr ""
|
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
-
"X-Generator: Poedit
|
18 |
"X-Poedit-KeywordsList: __;_e;_n;_x;_ex;_nx;esc_attr__;esc_attr_e;esc_attr_x;"
|
19 |
"esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop;translate_nooped_plural\n"
|
20 |
"X-Domain: aruba-hispeed-cache\n"
|
@@ -22,10 +22,10 @@ msgstr ""
|
|
22 |
"X-Poedit-SearchPath-0: .\n"
|
23 |
|
24 |
#. Plugin Name of the plugin
|
25 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
26 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
27 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
28 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
29 |
msgid "Aruba HiSpeed Cache"
|
30 |
msgstr "Aruba HiSpeed Cache"
|
31 |
|
@@ -36,9 +36,12 @@ msgstr ""
|
|
36 |
"https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
37 |
|
38 |
#. Description of the plugin
|
39 |
-
msgid "
|
|
|
|
|
40 |
msgstr ""
|
41 |
-
"
|
|
|
42 |
|
43 |
#. Author of the plugin
|
44 |
msgid "Aruba.it"
|
@@ -52,64 +55,100 @@ msgstr "https://www.aruba.it/"
|
|
52 |
msgid "Aruba HiSpeed Cache Settings "
|
53 |
msgstr "Impostazioni Aruba HiSpeed Cache "
|
54 |
|
55 |
-
#: \admin\partials\admin-general-options.php:
|
56 |
msgid "Save changes"
|
57 |
msgstr "Salva modifiche"
|
58 |
|
59 |
-
#: \admin\partials\admin-general-options.php:
|
60 |
msgid "Purge entire cache"
|
61 |
msgstr "Cancella cache"
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
64 |
msgid "Purge completed"
|
65 |
msgstr "Cache cancellata correttamente"
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
68 |
msgid "Settings saved."
|
69 |
msgstr "Impostazioni salvate."
|
70 |
|
71 |
-
#: \admin\partials\admin-notice-version.php:
|
72 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
73 |
msgstr ""
|
74 |
"Ci dispiace, ma Aruba HiSpeed Cache richiede WordPress %s o una versione "
|
75 |
"superiore."
|
76 |
|
77 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
78 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
79 |
msgstr "Si sta per cancellare completamente la cache. Vuoi procedere?"
|
80 |
|
81 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
82 |
msgid "Purge the page cache"
|
83 |
msgstr "Cancella la cache della pagina"
|
84 |
|
85 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
86 |
msgid "Purge Cache"
|
87 |
msgstr "Cancella cache"
|
88 |
|
89 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
90 |
msgid "Settings"
|
91 |
msgstr "Impostazioni"
|
92 |
|
93 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
94 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
95 |
msgid "Purging options"
|
96 |
msgstr "Opzioni di pulizia della cache"
|
97 |
|
98 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
99 |
msgid "Enable automatic purge"
|
100 |
msgstr "Attiva la pulizia automatica della cache"
|
101 |
|
102 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
103 |
msgid "Automatically purge entire cache when:"
|
104 |
msgstr "Cancella automaticamente tutta la cache quando:"
|
105 |
|
106 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
107 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
108 |
msgid "Home page:"
|
109 |
msgstr "Home page:"
|
110 |
|
111 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
112 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
113 |
msgid ""
|
114 |
"a <strong>post</strong> (or page/custom post) is <strong>modified</strong> "
|
115 |
"or <strong>added</strong>."
|
@@ -117,8 +156,8 @@ msgstr ""
|
|
117 |
"un <strong>articolo</strong> (o pagina/contenuto personalizzato) è "
|
118 |
"<strong>modificato</strong> o <strong>aggiunto</strong>."
|
119 |
|
120 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
121 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
122 |
msgid ""
|
123 |
"a <strong>published post</strong> (or page/custom post) is "
|
124 |
"<strong>cancelled</strong>."
|
@@ -126,58 +165,62 @@ msgstr ""
|
|
126 |
"un <strong>articolo pubblicato</strong> (o pagina/contenuto personalizzato) "
|
127 |
"è <strong>cancellato</strong>."
|
128 |
|
129 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
130 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
131 |
msgid "Post/page/custom post type:"
|
132 |
msgstr "Articolo/pagina/contenuto personalizzato:"
|
133 |
|
134 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
135 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
136 |
msgstr "un <strong>articolo</strong> è <strong>pubblicato</strong>."
|
137 |
|
138 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
139 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
140 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
141 |
msgstr "un <strong>commento</strong> è <strong>approvato/pubblicato</strong>."
|
142 |
|
143 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
144 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
145 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
146 |
msgstr ""
|
147 |
"un <strong>commento</strong> è <strong>non approvato/cancellato</strong>."
|
148 |
|
149 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
150 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
151 |
msgid "Archives:"
|
152 |
msgstr "Archivio:"
|
153 |
|
154 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
155 |
msgid "(date, category, tag, author, custom taxonomies)"
|
156 |
msgstr "(data, categoria, tag, autore, tassonomia custom)"
|
157 |
|
158 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
159 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
160 |
msgid "Comments:"
|
161 |
msgstr "Commenti:"
|
162 |
|
163 |
-
#: \includes\ArubaHiSpeedCacheConfigs.php:
|
164 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
165 |
msgstr ""
|
166 |
"Ci dispiace, ma devi essere un amministratore per usare Aruba HiSpeed Cache."
|
167 |
|
168 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
169 |
msgid "An error has occurred."
|
170 |
msgstr "Si è verificato un errore."
|
171 |
|
172 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
173 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
174 |
msgstr ""
|
175 |
"Ci dispiace, ma non disponi dei permessi necessari per modificare queste "
|
176 |
"opzioni."
|
177 |
|
178 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
179 |
msgid "Contact customer service"
|
180 |
msgstr "Contatta il nostro servizio clienti"
|
181 |
|
|
|
|
|
|
|
|
|
182 |
#~ msgid "Purged Everything Done!"
|
183 |
#~ msgstr "Cache cancellata correttamente!"
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Aruba HiSpeed Cache 0.0.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-"
|
7 |
"cache\n"
|
8 |
+
"POT-Creation-Date: 2022-03-23T10:34:24+01:00\n"
|
9 |
+
"PO-Revision-Date: 2022-03-23 11:09+0100\n"
|
10 |
"Last-Translator: Aruba Developer <hispeedcache.developer@aruba.it>\n"
|
11 |
"Language-Team: Aruba Developer <hispeedcache.developer@aruba.it>\n"
|
12 |
"Language: it_IT\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"X-Generator: Poedit 3.0.1\n"
|
18 |
"X-Poedit-KeywordsList: __;_e;_n;_x;_ex;_nx;esc_attr__;esc_attr_e;esc_attr_x;"
|
19 |
"esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop;translate_nooped_plural\n"
|
20 |
"X-Domain: aruba-hispeed-cache\n"
|
22 |
"X-Poedit-SearchPath-0: .\n"
|
23 |
|
24 |
#. Plugin Name of the plugin
|
25 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:152
|
26 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:153
|
27 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:161
|
28 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:162
|
29 |
msgid "Aruba HiSpeed Cache"
|
30 |
msgstr "Aruba HiSpeed Cache"
|
31 |
|
36 |
"https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.aspx"
|
37 |
|
38 |
#. Description of the plugin
|
39 |
+
msgid ""
|
40 |
+
"Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's "
|
41 |
+
"HiSpeed Cache service and automates its management."
|
42 |
msgstr ""
|
43 |
+
"Aruba HiSpeed Cache si interfaccia direttamente con il servizio HiSpeed "
|
44 |
+
"Cache della piattaforma hosting di Aruba e ne automatizza la gestione."
|
45 |
|
46 |
#. Author of the plugin
|
47 |
msgid "Aruba.it"
|
55 |
msgid "Aruba HiSpeed Cache Settings "
|
56 |
msgstr "Impostazioni Aruba HiSpeed Cache "
|
57 |
|
58 |
+
#: \admin\partials\admin-general-options.php:69
|
59 |
msgid "Save changes"
|
60 |
msgstr "Salva modifiche"
|
61 |
|
62 |
+
#: \admin\partials\admin-general-options.php:74
|
63 |
msgid "Purge entire cache"
|
64 |
msgstr "Cancella cache"
|
65 |
|
66 |
+
#: \admin\partials\admin-notice-not-aruba-server.php:5
|
67 |
+
msgid ""
|
68 |
+
"<strong>The Aruba HiSpeed Cache plugin cannot be used because your WordPress "
|
69 |
+
"website is not hosted on an Aruba hosting platform.</strong> Buy an <a href="
|
70 |
+
"\"%s\" rel=\"nofollow\" target=\"_blank\">Aruba hosting</a> service and "
|
71 |
+
"migrate your website to use the plugin."
|
72 |
+
msgstr ""
|
73 |
+
"<strong>Il plugin Aruba HiSpeed Cache non è utilizzabile poiché il tuo sito "
|
74 |
+
"con WordPress non è ospitato su piattaforma hosting di Aruba.</strong> "
|
75 |
+
"Acquista un servizio <a href=\"%s\" rel=\"nofollow\" target=\"_blank"
|
76 |
+
"\">hosting di Aruba</a> poi migra il tuo sito per utilizzare il plugin."
|
77 |
+
|
78 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
79 |
msgid "Purge completed"
|
80 |
msgstr "Cache cancellata correttamente"
|
81 |
|
82 |
+
#: \admin\partials\admin-notice-service-available.php:4
|
83 |
+
msgid ""
|
84 |
+
"<strong>The HiSpeed Cache feature is not enabled.</strong> To enable it, go "
|
85 |
+
"to your domain <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">control "
|
86 |
+
"panel</a>. For further details <a href=\"%s\" rel=\"nofollow\" target="
|
87 |
+
"\"_blank\">see our guide</a>."
|
88 |
+
msgstr ""
|
89 |
+
"<strong>Il servizio HiSpeed Cache non è attivo.</strong> Accedi al <a href="
|
90 |
+
"\"%s\" rel=\"nofollow\" target=\"_blank\">pannello di controllo</a> del tuo "
|
91 |
+
"dominio per attivarlo. Per maggiori dettagli <a href=\"%s\" rel=\"nofollow\" "
|
92 |
+
"target=\"_blank\">consulta la nostra guida</a>."
|
93 |
+
|
94 |
+
#: \admin\partials\admin-notice-service-unavailable.php:5
|
95 |
+
msgid ""
|
96 |
+
"<strong>The HiSpeed Cache feature, with which the plugin interfaces, is not "
|
97 |
+
"available on the server that hosts your website.</strong> To use HiSpeed "
|
98 |
+
"Cache and the plugin, contact <a href=\"%s\" rel=\"nofollow\" target=\"_blank"
|
99 |
+
"\">support</a>."
|
100 |
+
msgstr ""
|
101 |
+
"<strong>Il servizio HiSpeed Cache, con cui il plugin si interfaccia, non è "
|
102 |
+
"disponibile sul server su cui è ospitato il tuo sito.</strong> Per poter "
|
103 |
+
"utilizzare HiSpeed Cache ed il plugin, contatta la nostra <a href=\"%s\" rel="
|
104 |
+
"\"nofollow\" target=\"_blank\">assistenza.</a>."
|
105 |
+
|
106 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
107 |
msgid "Settings saved."
|
108 |
msgstr "Impostazioni salvate."
|
109 |
|
110 |
+
#: \admin\partials\admin-notice-version.php:10
|
111 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
112 |
msgstr ""
|
113 |
"Ci dispiace, ma Aruba HiSpeed Cache richiede WordPress %s o una versione "
|
114 |
"superiore."
|
115 |
|
116 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:137
|
117 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
118 |
msgstr "Si sta per cancellare completamente la cache. Vuoi procedere?"
|
119 |
|
120 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:193
|
121 |
msgid "Purge the page cache"
|
122 |
msgstr "Cancella la cache della pagina"
|
123 |
|
124 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:197
|
125 |
msgid "Purge Cache"
|
126 |
msgstr "Cancella cache"
|
127 |
|
128 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:261
|
129 |
msgid "Settings"
|
130 |
msgstr "Impostazioni"
|
131 |
|
132 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:380
|
133 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:381
|
134 |
msgid "Purging options"
|
135 |
msgstr "Opzioni di pulizia della cache"
|
136 |
|
137 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:388
|
138 |
msgid "Enable automatic purge"
|
139 |
msgstr "Attiva la pulizia automatica della cache"
|
140 |
|
141 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:406
|
142 |
msgid "Automatically purge entire cache when:"
|
143 |
msgstr "Cancella automaticamente tutta la cache quando:"
|
144 |
|
145 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:411
|
146 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:412
|
147 |
msgid "Home page:"
|
148 |
msgstr "Home page:"
|
149 |
|
150 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:419
|
151 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:471
|
152 |
msgid ""
|
153 |
"a <strong>post</strong> (or page/custom post) is <strong>modified</strong> "
|
154 |
"or <strong>added</strong>."
|
156 |
"un <strong>articolo</strong> (o pagina/contenuto personalizzato) è "
|
157 |
"<strong>modificato</strong> o <strong>aggiunto</strong>."
|
158 |
|
159 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:426
|
160 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:478
|
161 |
msgid ""
|
162 |
"a <strong>published post</strong> (or page/custom post) is "
|
163 |
"<strong>cancelled</strong>."
|
165 |
"un <strong>articolo pubblicato</strong> (o pagina/contenuto personalizzato) "
|
166 |
"è <strong>cancellato</strong>."
|
167 |
|
168 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:433
|
169 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:434
|
170 |
msgid "Post/page/custom post type:"
|
171 |
msgstr "Articolo/pagina/contenuto personalizzato:"
|
172 |
|
173 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:441
|
174 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
175 |
msgstr "un <strong>articolo</strong> è <strong>pubblicato</strong>."
|
176 |
|
177 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:448
|
178 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:493
|
179 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
180 |
msgstr "un <strong>commento</strong> è <strong>approvato/pubblicato</strong>."
|
181 |
|
182 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:455
|
183 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:500
|
184 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
185 |
msgstr ""
|
186 |
"un <strong>commento</strong> è <strong>non approvato/cancellato</strong>."
|
187 |
|
188 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:462
|
189 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:464
|
190 |
msgid "Archives:"
|
191 |
msgstr "Archivio:"
|
192 |
|
193 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:463
|
194 |
msgid "(date, category, tag, author, custom taxonomies)"
|
195 |
msgstr "(data, categoria, tag, autore, tassonomia custom)"
|
196 |
|
197 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:485
|
198 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:486
|
199 |
msgid "Comments:"
|
200 |
msgstr "Commenti:"
|
201 |
|
202 |
+
#: \includes\ArubaHiSpeedCacheConfigs.php:189
|
203 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
204 |
msgstr ""
|
205 |
"Ci dispiace, ma devi essere un amministratore per usare Aruba HiSpeed Cache."
|
206 |
|
207 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:260
|
208 |
msgid "An error has occurred."
|
209 |
msgstr "Si è verificato un errore."
|
210 |
|
211 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:261
|
212 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
213 |
msgstr ""
|
214 |
"Ci dispiace, ma non disponi dei permessi necessari per modificare queste "
|
215 |
"opzioni."
|
216 |
|
217 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:266
|
218 |
msgid "Contact customer service"
|
219 |
msgstr "Contatta il nostro servizio clienti"
|
220 |
|
221 |
+
#~ msgid "Purges the cache whenever a post is edited or published."
|
222 |
+
#~ msgstr ""
|
223 |
+
#~ "Cancella la cache ogni volta che un articolo è modificato o pubblicato."
|
224 |
+
|
225 |
#~ msgid "Purged Everything Done!"
|
226 |
#~ msgstr "Cache cancellata correttamente!"
|
languages/aruba-hispeed-cache.pot
CHANGED
@@ -2,23 +2,23 @@
|
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Aruba HiSpeed Cache
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-cache\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-03-
|
13 |
-
"PO-Revision-Date: 2022-03-
|
14 |
"X-Generator: WP-CLI 2.0.1\n"
|
15 |
"X-Domain: aruba-hispeed-cache\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
19 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
20 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
21 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
22 |
msgid "Aruba HiSpeed Cache"
|
23 |
msgstr ""
|
24 |
|
@@ -27,7 +27,7 @@ msgid "https://www.aruba.it/magazine/hosting/siti-piu-veloci-con-hispeed-cache.a
|
|
27 |
msgstr ""
|
28 |
|
29 |
#. Description of the plugin
|
30 |
-
msgid "
|
31 |
msgstr ""
|
32 |
|
33 |
#. Author of the plugin
|
@@ -42,115 +42,127 @@ msgstr ""
|
|
42 |
msgid "Aruba HiSpeed Cache Settings "
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: \admin\partials\admin-general-options.php:
|
46 |
msgid "Save changes"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: \admin\partials\admin-general-options.php:
|
50 |
msgid "Purge entire cache"
|
51 |
msgstr ""
|
52 |
|
|
|
|
|
|
|
|
|
53 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
54 |
msgid "Purge completed"
|
55 |
msgstr ""
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
58 |
msgid "Settings saved."
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: \admin\partials\admin-notice-version.php:
|
62 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
66 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
70 |
msgid "Purge the page cache"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
74 |
msgid "Purge Cache"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
78 |
msgid "Settings"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
82 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
83 |
msgid "Purging options"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
87 |
msgid "Enable automatic purge"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
91 |
msgid "Automatically purge entire cache when:"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
95 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
96 |
msgid "Home page:"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
100 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
101 |
msgid "a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
105 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
106 |
msgid "a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
110 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
111 |
msgid "Post/page/custom post type:"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
115 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
119 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
120 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
124 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
125 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
129 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
130 |
msgid "Archives:"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
134 |
msgid "(date, category, tag, author, custom taxonomies)"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
138 |
-
#: \includes\ArubaHiSpeedCacheAdmin.php:
|
139 |
msgid "Comments:"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: \includes\ArubaHiSpeedCacheConfigs.php:
|
143 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
147 |
msgid "An error has occurred."
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
151 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: \includes\ArubaHiSpeedCacheWpPurger.php:
|
155 |
msgid "Contact customer service"
|
156 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Aruba HiSpeed Cache plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Aruba HiSpeed Cache 1.0.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/aruba-hispeed-cache\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-03-23T10:34:24+01:00\n"
|
13 |
+
"PO-Revision-Date: 2022-03-23T10:34:24+01:00\n"
|
14 |
"X-Generator: WP-CLI 2.0.1\n"
|
15 |
"X-Domain: aruba-hispeed-cache\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:152
|
19 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:153
|
20 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:161
|
21 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:162
|
22 |
msgid "Aruba HiSpeed Cache"
|
23 |
msgstr ""
|
24 |
|
27 |
msgstr ""
|
28 |
|
29 |
#. Description of the plugin
|
30 |
+
msgid "Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's HiSpeed Cache service and automates its management."
|
31 |
msgstr ""
|
32 |
|
33 |
#. Author of the plugin
|
42 |
msgid "Aruba HiSpeed Cache Settings "
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: \admin\partials\admin-general-options.php:69
|
46 |
msgid "Save changes"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: \admin\partials\admin-general-options.php:74
|
50 |
msgid "Purge entire cache"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: \admin\partials\admin-notice-not-aruba-server.php:5
|
54 |
+
msgid "<strong>The Aruba HiSpeed Cache plugin cannot be used because your WordPress website is not hosted on an Aruba hosting platform.</strong> Buy an <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">Aruba hosting</a> service and migrate your website to use the plugin."
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
#: \admin\partials\admin-notice-purge-completed.php:4
|
58 |
msgid "Purge completed"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: \admin\partials\admin-notice-service-available.php:4
|
62 |
+
msgid "<strong>The HiSpeed Cache feature is not enabled.</strong> To enable it, go to your domain <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">control panel</a>. For further details <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">see our guide</a>."
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: \admin\partials\admin-notice-service-unavailable.php:5
|
66 |
+
msgid "<strong>The HiSpeed Cache feature, with which the plugin interfaces, is not available on the server that hosts your website.</strong> To use HiSpeed Cache and the plugin, contact <a href=\"%s\" rel=\"nofollow\" target=\"_blank\">support</a>."
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
#: \admin\partials\admin-notice-settings-saved.php:4
|
70 |
msgid "Settings saved."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: \admin\partials\admin-notice-version.php:10
|
74 |
msgid "Sorry, Aruba HiSpeed Cache requires WordPress %s or higher."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:137
|
78 |
msgid "You are about to purge the entire cache. Do you want to continue?"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:193
|
82 |
msgid "Purge the page cache"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:197
|
86 |
msgid "Purge Cache"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:261
|
90 |
msgid "Settings"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:380
|
94 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:381
|
95 |
msgid "Purging options"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:388
|
99 |
msgid "Enable automatic purge"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:406
|
103 |
msgid "Automatically purge entire cache when:"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:411
|
107 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:412
|
108 |
msgid "Home page:"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:419
|
112 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:471
|
113 |
msgid "a <strong>post</strong> (or page/custom post) is <strong>modified</strong> or <strong>added</strong>."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:426
|
117 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:478
|
118 |
msgid "a <strong>published post</strong> (or page/custom post) is <strong>cancelled</strong>."
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:433
|
122 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:434
|
123 |
msgid "Post/page/custom post type:"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:441
|
127 |
msgid "a <strong>post</strong> is <strong>published</strong>."
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:448
|
131 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:493
|
132 |
msgid "a <strong>comment</strong> is <strong>approved/published</strong>."
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:455
|
136 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:500
|
137 |
msgid "a <strong>comment</strong> is <strong>unapproved/deleted</strong>."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:462
|
141 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:464
|
142 |
msgid "Archives:"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:463
|
146 |
msgid "(date, category, tag, author, custom taxonomies)"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:485
|
150 |
+
#: \includes\ArubaHiSpeedCacheAdmin.php:486
|
151 |
msgid "Comments:"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: \includes\ArubaHiSpeedCacheConfigs.php:189
|
155 |
msgid "Sorry, you need to be an administrator to use Aruba HiSpeed Cache."
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:260
|
159 |
msgid "An error has occurred."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:261
|
163 |
msgid "Sorry, you do not have the necessary privileges to edit these options."
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: \includes\ArubaHiSpeedCacheWpPurger.php:266
|
167 |
msgid "Contact customer service"
|
168 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Aruba HiSpeed Cache ===
|
2 |
|
3 |
Contributors: arubait, arubadev, arubasupport, agelmini, camaran
|
4 |
-
Tags:
|
5 |
-
Requires at least: 5.
|
6 |
Tested up to: 6.0
|
7 |
-
Requires PHP:
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -28,10 +28,10 @@ For more details and to find out whether the HiSpeed Cache service is active on
|
|
28 |
== Installation ==
|
29 |
|
30 |
= From your WordPress dashboard =
|
31 |
-
1. Visit
|
32 |
-
2. Search for
|
33 |
3. Activate Aruba HiSpeed Cache from your Plugins page.
|
34 |
-
4. Click
|
35 |
|
36 |
= From WordPress.org =
|
37 |
1. Download Aruba HiSpeed Cache.
|
@@ -53,6 +53,16 @@ When the service is active, using the plugin means you can clear the website's c
|
|
53 |
|
54 |
You can install the plugin, but it was designed to interface with the caching system for an Aruba hosting platform. Purchase an Aruba hosting service then migrate your website to use the plugin.
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
== Screenshots ==
|
57 |
|
58 |
1. General Settings enabled
|
@@ -60,10 +70,22 @@ You can install the plugin, but it was designed to interface with the caching sy
|
|
60 |
|
61 |
== Changelog ==
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
= 1.0.0 =
|
64 |
* First stable version released.
|
65 |
|
66 |
== Upgrade Notice ==
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
= 1.0.0 =
|
69 |
* First stable version released.
|
1 |
=== Aruba HiSpeed Cache ===
|
2 |
|
3 |
Contributors: arubait, arubadev, arubasupport, agelmini, camaran
|
4 |
+
Tags: HiSpeed Cache, Aruba, cache, caching, performance, pagespeed, optimize, WP cache, speed, purge
|
5 |
+
Requires at least: 5.4
|
6 |
Tested up to: 6.0
|
7 |
+
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.1.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
28 |
== Installation ==
|
29 |
|
30 |
= From your WordPress dashboard =
|
31 |
+
1. Visit 'Plugins -> Add New'
|
32 |
+
2. Search for 'Aruba HiSpeed Cache'
|
33 |
3. Activate Aruba HiSpeed Cache from your Plugins page.
|
34 |
+
4. Click 'Settings -> Aruba HiSpeed Cache'
|
35 |
|
36 |
= From WordPress.org =
|
37 |
1. Download Aruba HiSpeed Cache.
|
53 |
|
54 |
You can install the plugin, but it was designed to interface with the caching system for an Aruba hosting platform. Purchase an Aruba hosting service then migrate your website to use the plugin.
|
55 |
|
56 |
+
= Should I exclude pages from the caching system? =
|
57 |
+
|
58 |
+
No, you don't need to because the caching system already excludes:
|
59 |
+
|
60 |
+
addresses with one of the following strings:
|
61 |
+
wp-login, preview=true, cart, my-account, checkout, addons, add-to-cart, wp-cron.php, xmlrpc.php, contact, task=registration, registerview=registration|administrator|remind|login, admin/content/backup_migrate/export, status.php, update.php, install.php, user, info, flag, ajax, aha;
|
62 |
+
|
63 |
+
requests with cookies containing one of the following strings:
|
64 |
+
wordpress_no_cache, comment_author, wordpress_logged_in_, yith_wcwl_products, wp-postpass_, it_exchange_session_, wp_woocommerce_session, woocommerce_cart_hash, edd_items_in_cart=1, jSGCacheBypass=1, wpSGCacheBypass=1, woocommerce_items_in_cart=1.
|
65 |
+
|
66 |
== Screenshots ==
|
67 |
|
68 |
1. General Settings enabled
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.1.0 =
|
74 |
+
* Compatibility with PHP 5.6 and above;
|
75 |
+
* Compatibility with WordPress 5.4 and above;
|
76 |
+
* Monitoring of Aruba HiSpeed Cache service enabled/disabled;
|
77 |
+
* Message in the admin panel following the check: on the status of the service and if the website is hosted on an Aruba server or a server which is not compatible with the HiSpeed Cache service.
|
78 |
+
|
79 |
= 1.0.0 =
|
80 |
* First stable version released.
|
81 |
|
82 |
== Upgrade Notice ==
|
83 |
|
84 |
+
= 1.1.0 =
|
85 |
+
* Compatibility with PHP 5.6 and above;
|
86 |
+
* Compatibility with WordPress 5.4 and above;
|
87 |
+
* Monitoring of Aruba HiSpeed Cache service enabled/disabled;
|
88 |
+
* Message in the admin panel following the check: on the status of the service and if the website is hosted on an Aruba server or a server which is not compatible with the HiSpeed Cache service.
|
89 |
+
|
90 |
= 1.0.0 =
|
91 |
* First stable version released.
|
uninstall.php
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Manages the uninstallation process of the
|
4 |
-
*
|
|
|
5 |
*
|
6 |
* @category Wordpress-plugin
|
7 |
* @package Aruba-HiSpeed-Cache
|
8 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
9 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
10 |
-
* @link
|
11 |
*/
|
12 |
|
13 |
-
|
14 |
|
15 |
namespace ArubaHiSpeedCache;
|
16 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Manages the uninstallation process of the
|
4 |
+
* Aruba HiSpeed Cache Plugin for more information
|
5 |
+
* php version 5.6
|
6 |
*
|
7 |
* @category Wordpress-plugin
|
8 |
* @package Aruba-HiSpeed-Cache
|
9 |
* @author Aruba Developer <hispeedcache.developer@aruba.it>
|
10 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
|
11 |
+
* @link https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/
|
12 |
*/
|
13 |
|
14 |
+
|
15 |
|
16 |
namespace ArubaHiSpeedCache;
|
17 |
|