SG Optimizer - Version 5.3.9

Version Description

Download this release

Release Info

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

Code changes from version 5.3.8 to 5.3.9

core/Activator/Activator.php CHANGED
@@ -12,7 +12,7 @@ class Activator {
12
  * @since 5.0.9
13
  */
14
  public function activate() {
15
- if ( 0 === Helper::is_siteground_server() ) {
16
  echo '<div class="notice notice-error">' . esc_html__( 'The SG Optimizer plugin is designed to work only on SiteGround Servers. We\'ve deactivated it because it may render your site blank if used on another environment.', 'sg-cachpress' ) . '</div>';
17
 
18
  // Adding @ before will prevent XDebug output.
12
  * @since 5.0.9
13
  */
14
  public function activate() {
15
+ if ( ! file_exists( "/Z" ) ) {
16
  echo '<div class="notice notice-error">' . esc_html__( 'The SG Optimizer plugin is designed to work only on SiteGround Servers. We\'ve deactivated it because it may render your site blank if used on another environment.', 'sg-cachpress' ) . '</div>';
17
 
18
  // Adding @ before will prevent XDebug output.
core/Helper/Helper.php CHANGED
@@ -284,26 +284,4 @@ class Helper {
284
 
285
  return 0;
286
  }
287
-
288
- /**
289
- * Checks if the plugin run on the SiteGround interface.
290
- *
291
- * @since 5.4.0
292
- *
293
- * @return boolean True/False.
294
- */
295
- public static function is_siteground_server() {
296
- $response = shell_exec( 'test -f /etc/yum.repos.d/baseos.repo && echo Avalon' );
297
-
298
- // Get the account name.
299
- $account_name = defined( 'WP_CLI' ) ? $_SERVER['USER'] : get_current_user();
300
-
301
- // The post for our new server is aloways the same.
302
- if ( 'Avalon' === trim( $response ) || file_exists( "/home/{$account_name}/.SGCache" ) ) {
303
- return 1;
304
- }
305
-
306
- return 0;
307
- }
308
-
309
  }
284
 
285
  return 0;
286
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  }
readme.txt CHANGED
@@ -169,6 +169,9 @@ Our plugin uses a cookie in order to function properly. It does not store person
169
 
170
  == Changelog ==
171
 
 
 
 
172
  = Version 5.3.8 =
173
  * Fixed a bug when Memcached fails to purge when new WordPress version requiring a database update is released
174
  * Added alert and check if you’re running SG Optimizer on a host different than SiteGround
169
 
170
  == Changelog ==
171
 
172
+ = Version 5.3.9 =
173
+ * Improved check for SG Servers
174
+
175
  = Version 5.3.8 =
176
  * Fixed a bug when Memcached fails to purge when new WordPress version requiring a database update is released
177
  * Added alert and check if you’re running SG Optimizer on a host different than SiteGround
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.3.8
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.3.8' );
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.3.9
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.3.9' );
35
  }
36
 
37
  // Define slug constant.