Aruba HiSpeed Cache - Version 1.2.2

Version Description

  • Woocommerce save option bug fix.
  • Page update content bug fix.
  • Add no limit transient for json call.
  • Various minor bug fixes and other improvements.
Download this release

Release Info

Developer arubadev
Plugin Icon 128x128 Aruba HiSpeed Cache
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

aruba-hispeed-cache.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @wordpress-plugin
14
  * Plugin Name: Aruba HiSpeed Cache
15
- * Version: 1.2.1
16
  * Plugin URI: https://hosting.aruba.it/wordpress.aspx
17
  * Description: Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's HiSpeed Cache service and automates its management.
18
  * Author: Aruba.it
12
  *
13
  * @wordpress-plugin
14
  * Plugin Name: Aruba HiSpeed Cache
15
+ * Version: 1.2.2
16
  * Plugin URI: https://hosting.aruba.it/wordpress.aspx
17
  * Description: Aruba HiSpeed Cache interfaces directly with an Aruba hosting platform's HiSpeed Cache service and automates its management.
18
  * Author: Aruba.it
includes/ArubaHiSpeedCacheBootstrap.php CHANGED
@@ -160,6 +160,9 @@ if (! class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheBootstrap')) {
160
 
161
  //
162
  $this->loader->add_action('check_admin_referer', $aruba_hispeed_cache_purger, 'ahsc_bulk_manager', 20, 2);
 
 
 
163
  }
164
 
165
  /**
160
 
161
  //
162
  $this->loader->add_action('check_admin_referer', $aruba_hispeed_cache_purger, 'ahsc_bulk_manager', 20, 2);
163
+
164
+ //
165
+ $this->loader->add_action('post_updated', $aruba_hispeed_cache_purger, 'ahsc_post_updated', 200, 3);
166
  }
167
 
168
  /**
includes/ArubaHiSpeedCacheConfigs.php CHANGED
@@ -50,7 +50,7 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
50
  /**
51
  * PLUGIN_VERSION string
52
  */
53
- public static $PLUGIN_VERSION = '1.2.1';
54
 
55
  /**
56
  * MINIMUM_WP string
@@ -213,8 +213,9 @@ if (! \class_exists('ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs')) {
213
  */
214
  public static function ArubaHiSpeedCache_update_plugins_db()
215
  {
216
- //get the option
217
- $current_options = \get_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME);
 
218
  $new_options = self::ArubaHiSpeedCache_get_default_settings();
219
 
220
  $option_to_update = array_diff_key($new_options, $current_options);
50
  /**
51
  * PLUGIN_VERSION string
52
  */
53
+ public static $PLUGIN_VERSION = '1.2.2';
54
 
55
  /**
56
  * MINIMUM_WP string
213
  */
214
  public static function ArubaHiSpeedCache_update_plugins_db()
215
  {
216
+ //get the option, set to empty array to def.
217
+ $current_options = \is_array( \get_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME) ) ? \get_site_option(ARUBA_HISPEED_CACHE_OPTIONS_NAME) : array();
218
+
219
  $new_options = self::ArubaHiSpeedCache_get_default_settings();
220
 
221
  $option_to_update = array_diff_key($new_options, $current_options);
includes/ArubaHiSpeedCacheWpPurger.php CHANGED
@@ -16,43 +16,43 @@ namespace ArubaHiSpeedCache\includes;
16
  use ArubaHiSpeedCache\ArubaHiSpeedCachePurger;
17
  use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin;
18
  use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
19
- use WP_Comment;
20
- use WP_Post;
21
- use WP_Term;
22
-
23
- use get_permalink;
24
- use wp_get_attachment_url;
25
- use home_url;
26
- use get_taxonomy;
27
- use get_ancestors;
28
- use get_term;
29
- use user_trailingslashit;
30
- use trailingslashit;
31
- use get_term_link;
32
- use current_filter;
33
- use current_user_can;
34
- use wp_die;
35
- use __;
36
- use add_action;
37
- use check_admin_referer;
38
- use add_query_arg;
39
- use is_admin;
40
- use wp_parse_url;
41
- use wp_redirect;
42
- use esc_url_raw;
43
- use icl_get_home_url;
44
- use is_multisite;
45
- use get_current_blog_id;
46
- use get_site_url;
47
- use wp_is_post_autosave;
48
- use str_replace;
49
- use in_array;
50
- use array_reverse;
51
- use implode;
52
- use filter_input;
53
- use filter_var;
54
- use PHP_CodeSniffer\Files\DummyFile;
55
- use sprintf;
56
 
57
  if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
58
  /**
@@ -590,10 +590,11 @@ if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
590
  if (!$do_purge) {
591
  logger('transint non presente presente lo imposto', 'deffer');
592
  if ($is_multisite) {
593
- \set_site_transient('ahsc_do_purge', true, 15);
594
  } else {
595
- \set_transient('ahsc_do_purge', true, 15);
596
  }
 
597
  }
598
 
599
  logger('transint presente', 'deffer');
@@ -661,6 +662,31 @@ if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
661
  }
662
  }
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  /**
665
  * Ahsc_wp_update_nav_menu
666
  *
@@ -888,6 +914,7 @@ if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
888
 
889
  $is_multisite = \is_multisite();
890
  $do_purge = ($is_multisite) ? \get_site_transient('ahsc_do_purge') : \get_transient('ahsc_do_purge'); // phpcs:ignore
 
891
  if ($do_purge) {
892
  logger('trovato il transients', 'deffer by ahsc_deferred_purge_by_transient'); // phpcs:ignore
893
 
@@ -925,14 +952,13 @@ if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
925
  // bulk-tags
926
  global $wp_filter;
927
 
928
- $current_action = (_get_list_table('WP_Terms_List_Table')) ? (_get_list_table('WP_Terms_List_Table'))->current_action() : false; // phpcs:ignore
929
-
930
-
931
  $this->i = 1;
932
 
933
  switch ($action) {
934
  case 'bulk-tags':
935
 
 
 
936
  if ('bulk-delete' === $current_action) {
937
  logger('Tolgo il delete_term hook', 'Rimozione');
938
  $this->iterations = count((array) $_REQUEST['delete_tags']);
16
  use ArubaHiSpeedCache\ArubaHiSpeedCachePurger;
17
  use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheAdmin;
18
  use ArubaHiSpeedCache\includes\ArubaHiSpeedCacheConfigs;
19
+ use \WP_Comment;
20
+ use \WP_Post;
21
+ use \WP_Term;
22
+
23
+ use \get_permalink;
24
+ use \wp_get_attachment_url;
25
+ use \home_url;
26
+ use \get_taxonomy;
27
+ use \get_ancestors;
28
+ use \get_term;
29
+ use \user_trailingslashit;
30
+ use \trailingslashit;
31
+ use \get_term_link;
32
+ use \current_filter;
33
+ use \current_user_can;
34
+ use \wp_die;
35
+ use \__;
36
+ use \add_action;
37
+ use \check_admin_referer;
38
+ use \add_query_arg;
39
+ use \is_admin;
40
+ use \wp_parse_url;
41
+ use \wp_redirect;
42
+ use \esc_url_raw;
43
+ use \icl_get_home_url;
44
+ use \is_multisite;
45
+ use \get_current_blog_id;
46
+ use \get_site_url;
47
+ use \wp_is_post_autosave;
48
+ use \str_replace;
49
+ use \in_array;
50
+ use \array_reverse;
51
+ use \implode;
52
+ use \filter_input;
53
+ use \filter_var;
54
+ use \sprintf;
55
+ use \_get_list_table;
56
 
57
  if (!class_exists(__NAMESPACE__ . '\ArubaHiSpeedCacheWpPurger')) {
58
  /**
590
  if (!$do_purge) {
591
  logger('transint non presente presente lo imposto', 'deffer');
592
  if ($is_multisite) {
593
+ \set_site_transient('ahsc_do_purge', true);
594
  } else {
595
+ \set_transient('ahsc_do_purge', true);
596
  }
597
+ return;
598
  }
599
 
600
  logger('transint presente', 'deffer');
662
  }
663
  }
664
 
665
+ //ref tags/6.0/src/wp-includes/post.php
666
+ public function ahsc_post_updated($post_ID, $post_after, $post_before)
667
+ {
668
+ if (!$this->is_enable_setting('ahsc_enable_purge')) {
669
+ return;
670
+ }
671
+
672
+ /**
673
+ * Edit item
674
+ */
675
+ if ($this->is_enable_setting('ahsc_purge_page_on_mod') || $this->is_enable_setting('ahsc_purge_archive_on_edit')) { // phpcs:ignore
676
+ if ($this->is_enable_setting('ahsc_purge_homepage_on_edit')) {
677
+ $this->purgeUrl($this->parseUrl($this->getHomepage()));
678
+ //Logger
679
+ logger(
680
+ 'targhet ' . $this->parseUrl($this->getHomepage()),
681
+ 'hook:post_updated:edit::home',
682
+ 'info'
683
+ );
684
+ ///Logger
685
+ return;
686
+ }
687
+ }
688
+ }
689
+
690
  /**
691
  * Ahsc_wp_update_nav_menu
692
  *
914
 
915
  $is_multisite = \is_multisite();
916
  $do_purge = ($is_multisite) ? \get_site_transient('ahsc_do_purge') : \get_transient('ahsc_do_purge'); // phpcs:ignore
917
+
918
  if ($do_purge) {
919
  logger('trovato il transients', 'deffer by ahsc_deferred_purge_by_transient'); // phpcs:ignore
920
 
952
  // bulk-tags
953
  global $wp_filter;
954
 
 
 
 
955
  $this->i = 1;
956
 
957
  switch ($action) {
958
  case 'bulk-tags':
959
 
960
+ $current_action = (\_get_list_table('WP_Terms_List_Table')) ? (\_get_list_table('WP_Terms_List_Table'))->current_action() : false; // phpcs:ignore
961
+
962
  if ('bulk-delete' === $current_action) {
963
  logger('Tolgo il delete_term hook', 'Rimozione');
964
  $this->iterations = count((array) $_REQUEST['delete_tags']);
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: HiSpeed Cache, Aruba, cache, caching, performance, pagespeed, optimize, WP
5
  Requires at least: 5.4
6
  Tested up to: 6.1
7
  Requires PHP: 5.6
8
- Stable tag: 1.2.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -70,6 +70,12 @@ wordpress_no_cache, comment_author, wordpress_logged_in_, yith_wcwl_products, wp
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
73
  = 1.2.1 =
74
  * Edit the Bootstrap method to fix the large menu editing problem.
75
  * Action and filter loading system fixed.
@@ -105,7 +111,8 @@ wordpress_no_cache, comment_author, wordpress_logged_in_, yith_wcwl_products, wp
105
 
106
  == Upgrade Notice ==
107
 
108
- = 1.2.1 =
109
- * Edit the Bootstrap method to fix the large menu editing problem.
110
- * Action and filter loading system fixed.
 
111
  * Various minor bug fixes and other improvements.
5
  Requires at least: 5.4
6
  Tested up to: 6.1
7
  Requires PHP: 5.6
8
+ Stable tag: 1.2.2
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.2.2 =
74
+ * Woocommerce save option bug fix.
75
+ * Page update content bug fix.
76
+ * Add no limit transient for json call.
77
+ * Various minor bug fixes and other improvements.
78
+
79
  = 1.2.1 =
80
  * Edit the Bootstrap method to fix the large menu editing problem.
81
  * Action and filter loading system fixed.
111
 
112
  == Upgrade Notice ==
113
 
114
+ = 1.2.2 =
115
+ * Woocommerce save option bug fix.
116
+ * Page update content bug fix.
117
+ * Add no limit transient for json call.
118
  * Various minor bug fixes and other improvements.