SG Optimizer - Version 5.7.20

Version Description

Download this release

Release Info

Developer stoyangeorgiev
Plugin Icon 128x128 SG Optimizer
Version 5.7.20
Comparing to
See all releases

Code changes from version 5.7.19 to 5.7.20

core/Lazy_Load/Lazy_Load.php CHANGED
@@ -55,7 +55,7 @@ class Lazy_Load {
55
  wp_enqueue_script(
56
  'siteground-optimizer-lazy-sizes-js',
57
  \SiteGround_Optimizer\URL . '/assets/js/lazysizes.min.js',
58
- array( 'jquery' ), // Dependencies.
59
  \SiteGround_Optimizer\VERSION,
60
  true
61
  );
55
  wp_enqueue_script(
56
  'siteground-optimizer-lazy-sizes-js',
57
  \SiteGround_Optimizer\URL . '/assets/js/lazysizes.min.js',
58
+ array(), // Dependencies.
59
  \SiteGround_Optimizer\VERSION,
60
  true
61
  );
core/Supercacher/Supercacher_Posts.php CHANGED
@@ -106,6 +106,24 @@ class Supercacher_Posts extends Supercacher {
106
 
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  /**
110
  * Purge the cache of the post that has been changed and
111
  * it's parents, the index cache, and the post categories.
@@ -140,6 +158,8 @@ class Supercacher_Posts extends Supercacher {
140
  $this->purge_parents_cache( $post_id );
141
  // Purge post terms cache.
142
  $this->purge_post_terms( $post_id );
 
 
143
  // Purge the index cache.
144
  $this->purge_index_cache();
145
  // Purge the feed cache.
@@ -147,5 +167,3 @@ class Supercacher_Posts extends Supercacher {
147
  }
148
 
149
  }
150
-
151
-
106
 
107
  }
108
 
109
+ /**
110
+ * Purge the cache for the Post Page
111
+ *
112
+ * @since 5.7.20
113
+ */
114
+ public function purge_blog_page() {
115
+ // Check if a blog page is set.
116
+ $blog_id = (int) get_option( 'page_for_posts' );
117
+
118
+ // Bail if home page is set for blog page. It will be handled by purge_index_page().
119
+ if ( empty( $blog_id ) ) {
120
+ return;
121
+ }
122
+
123
+ // Purge the cache for that post.
124
+ $this->purge_post_cache( $blog_id );
125
+ }
126
+
127
  /**
128
  * Purge the cache of the post that has been changed and
129
  * it's parents, the index cache, and the post categories.
158
  $this->purge_parents_cache( $post_id );
159
  // Purge post terms cache.
160
  $this->purge_post_terms( $post_id );
161
+ // Purge the blog page cache.
162
+ $this->purge_blog_page();
163
  // Purge the index cache.
164
  $this->purge_index_cache();
165
  // Purge the feed cache.
167
  }
168
 
169
  }
 
 
readme.txt CHANGED
@@ -217,6 +217,10 @@ Our plugin uses a cookie in order to function properly. It does not store person
217
 
218
  == Changelog ==
219
 
 
 
 
 
220
  = Version 5.7.19 =
221
  * Change loseless quality
222
 
217
 
218
  == Changelog ==
219
 
220
+ = Version 5.7.20 =
221
+ * Perform smart purge on the blog page when editing a post.
222
+ * Remove jQuery Dependency from Lazy-load.
223
+
224
  = Version 5.7.19 =
225
  * Change loseless quality
226
 
sg-cachepress.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: SG Optimizer
11
  * Plugin URI: https://siteground.com
12
  * Description: This plugin will link your WordPress application with all the performance optimizations provided by SiteGround
13
- * Version: 5.7.19
14
  * Author: SiteGround
15
  * Author URI: https://www.siteground.com
16
  * Text Domain: sg-cachepress
@@ -31,7 +31,7 @@ if ( ! defined( 'WPINC' ) ) {
31
 
32
  // Define version constant.
33
  if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
34
- define( __NAMESPACE__ . '\VERSION', '5.7.19' );
35
  }
36
 
37
  // Define slug constant.
10
  * Plugin Name: SG Optimizer
11
  * Plugin URI: https://siteground.com
12
  * Description: This plugin will link your WordPress application with all the performance optimizations provided by SiteGround
13
+ * Version: 5.7.20
14
  * Author: SiteGround
15
  * Author URI: https://www.siteground.com
16
  * Text Domain: sg-cachepress
31
 
32
  // Define version constant.
33
  if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
34
+ define( __NAMESPACE__ . '\VERSION', '5.7.20' );
35
  }
36
 
37
  // Define slug constant.