SG Optimizer - Version 5.6.7

Version Description

Download this release

Release Info

Developer sstoqnov
Plugin Icon 128x128 SG Optimizer
Version 5.6.7
Comparing to
See all releases

Code changes from version 5.6.6 to 5.6.7

core/Combinator/Js_Combinator.php CHANGED
@@ -16,6 +16,8 @@ class Js_Combinator extends Abstract_Combinator {
16
  * @var array Array containing all excluded inline content.
17
  */
18
  private $excluded_inline_content = array(
 
 
19
  'var markersData',
20
  'setREVStartSize',
21
  'countUp',
@@ -249,6 +251,7 @@ class Js_Combinator extends Abstract_Combinator {
249
  * @var array Array containing all paths that should be excluded.
250
  */
251
  private $excluded_paths = array(
 
252
  'cdn.ampproject.org',
253
  'app.getresponse.com',
254
  'googleadservices.com',
16
  * @var array Array containing all excluded inline content.
17
  */
18
  private $excluded_inline_content = array(
19
+ '#fld_',
20
+ '.shop-filter',
21
  'var markersData',
22
  'setREVStartSize',
23
  'countUp',
251
  * @var array Array containing all paths that should be excluded.
252
  */
253
  private $excluded_paths = array(
254
+ 'scripts.sirv.com',
255
  'cdn.ampproject.org',
256
  'app.getresponse.com',
257
  'googleadservices.com',
core/Front_End_Optimization/Front_End_Optimization.php CHANGED
@@ -31,7 +31,7 @@ class Front_End_Optimization {
31
  *
32
  * @var int Bytes.
33
  */
34
- const LIMIT = 200000000;
35
 
36
  /**
37
  * Script handles that shouldn't be loaded async.
@@ -93,7 +93,7 @@ class Front_End_Optimization {
93
  ! wp_next_scheduled( 'siteground_optimizer_check_assets_dir' ) &&
94
  1 === intval( get_option( 'siteground_optimizer_combine_javascript', 0 ) )
95
  ) {
96
- wp_schedule_event( time(), 'twicedaily', 'siteground_optimizer_check_assets_dir' );
97
  }
98
 
99
  // Enabled images optimizer.
@@ -575,12 +575,12 @@ class Front_End_Optimization {
575
  return;
576
  }
577
 
578
- Supercacher::purge_cache();
579
- Supercacher::flush_memcache();
580
-
581
  update_option( 'siteground_optimizer_combine_javascript', 0 );
582
  update_option( 'siteground_optimizer_combine_javascript_error', 1 );
583
 
 
 
 
584
  wp_clear_scheduled_hook( 'siteground_optimizer_check_assets_dir' );
585
  }
586
 
31
  *
32
  * @var int Bytes.
33
  */
34
+ const LIMIT = 1000000000;
35
 
36
  /**
37
  * Script handles that shouldn't be loaded async.
93
  ! wp_next_scheduled( 'siteground_optimizer_check_assets_dir' ) &&
94
  1 === intval( get_option( 'siteground_optimizer_combine_javascript', 0 ) )
95
  ) {
96
+ wp_schedule_event( time(), 'daily', 'siteground_optimizer_check_assets_dir' );
97
  }
98
 
99
  // Enabled images optimizer.
575
  return;
576
  }
577
 
 
 
 
578
  update_option( 'siteground_optimizer_combine_javascript', 0 );
579
  update_option( 'siteground_optimizer_combine_javascript_error', 1 );
580
 
581
+ Supercacher::purge_cache();
582
+ Supercacher::flush_memcache();
583
+
584
  wp_clear_scheduled_hook( 'siteground_optimizer_check_assets_dir' );
585
  }
586
 
core/Install_Service/Install_5_6_7.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace SiteGround_Optimizer\Install_Service;
3
+
4
+ class Install_5_6_7 extends Install {
5
+
6
+ /**
7
+ * The default install version. Overridden by the installation packages.
8
+ *
9
+ * @since 5.6.7
10
+ *
11
+ * @access protected
12
+ *
13
+ * @var string $version The install version.
14
+ */
15
+ protected static $version = '5.6.7';
16
+
17
+ /**
18
+ * Run the install procedure.
19
+ *
20
+ * @since 5.6.7
21
+ */
22
+ public function install() {
23
+ wp_clear_scheduled_hook( 'siteground_optimizer_check_assets_dir' );
24
+ wp_clear_scheduled_hook( 'siteground_delete_assets' );
25
+ }
26
+
27
+ }
core/Install_Service/Install_Service.php CHANGED
@@ -24,6 +24,7 @@ use SiteGround_Optimizer\Install_Service\Install_5_5_0;
24
  use SiteGround_Optimizer\Install_Service\Install_5_5_2;
25
  use SiteGround_Optimizer\Install_Service\Install_5_5_4;
26
  use SiteGround_Optimizer\Install_Service\Install_5_6_3;
 
27
  use SiteGround_Optimizer\Install_Service\Install_Cleanup;
28
  use SiteGround_Optimizer\Supercacher\Supercacher;
29
 
@@ -59,6 +60,7 @@ class Install_Service {
59
  new Install_5_5_2(),
60
  new Install_5_5_4(),
61
  new Install_5_6_3(),
 
62
  );
63
 
64
  add_action( 'upgrader_process_complete', array( $this, 'install' ) );
24
  use SiteGround_Optimizer\Install_Service\Install_5_5_2;
25
  use SiteGround_Optimizer\Install_Service\Install_5_5_4;
26
  use SiteGround_Optimizer\Install_Service\Install_5_6_3;
27
+ use SiteGround_Optimizer\Install_Service\Install_5_6_7;
28
  use SiteGround_Optimizer\Install_Service\Install_Cleanup;
29
  use SiteGround_Optimizer\Supercacher\Supercacher;
30
 
60
  new Install_5_5_2(),
61
  new Install_5_5_4(),
62
  new Install_5_6_3(),
63
+ new Install_5_6_7(),
64
  );
65
 
66
  add_action( 'upgrader_process_complete', array( $this, 'install' ) );
core/Supercacher/Supercacher.php CHANGED
@@ -75,7 +75,7 @@ class Supercacher {
75
 
76
  // Schedule a cron job that will delete all assets (minified js and css files) every 30 days.
77
  if ( ! wp_next_scheduled( 'siteground_delete_assets' ) ) {
78
- wp_schedule_event( time(), 'siteground_monthly', 'siteground_delete_assets' );
79
  }
80
 
81
  $this->purge_on_other_events();
@@ -336,10 +336,10 @@ class Supercacher {
336
  */
337
  public function add_siteground_cron_schedule( $schedules ) {
338
 
339
- if ( ! array_key_exists( 'siteground_monthly', $schedules ) ) {
340
- $schedules['siteground_monthly'] = array(
341
- 'interval' => 2635200,
342
- 'display' => __( 'Monthly', 'sg-cachepress' ),
343
  );
344
  }
345
 
75
 
76
  // Schedule a cron job that will delete all assets (minified js and css files) every 30 days.
77
  if ( ! wp_next_scheduled( 'siteground_delete_assets' ) ) {
78
+ wp_schedule_event( time(), 'siteground_every_two_days', 'siteground_delete_assets' );
79
  }
80
 
81
  $this->purge_on_other_events();
336
  */
337
  public function add_siteground_cron_schedule( $schedules ) {
338
 
339
+ if ( ! array_key_exists( 'siteground_every_two_days', $schedules ) ) {
340
+ $schedules['siteground_every_two_days'] = array(
341
+ 'interval' => 172800,
342
+ 'display' => __( 'Every two days', 'sg-cachepress' ),
343
  );
344
  }
345
 
readme.txt CHANGED
@@ -208,6 +208,11 @@ Our plugin uses a cookie in order to function properly. It does not store person
208
 
209
  == Changelog ==
210
 
 
 
 
 
 
211
  = Version 5.6.6 =
212
  * Improved JS Combination exclude list
213
  * Bumped JS Combination stop limit
208
 
209
  == Changelog ==
210
 
211
+ = Version 5.6.7 =
212
+ * Improved JS & CSS Combination exclude list
213
+ * Bumped JS Combination stop limit
214
+ * Improved functionality to stop JS Combination if randomized names create endless combination files
215
+
216
  = Version 5.6.6 =
217
  * Improved JS Combination exclude list
218
  * Bumped JS Combination stop limit
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.6.6
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.6.6' );
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.6.7
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.6.7' );
35
  }
36
 
37
  // Define slug constant.