Version Description
Download this release
Release Info
Developer | elenachavdarova |
Plugin | SG Optimizer |
Version | 7.1.2 |
Comparing to | |
See all releases |
Code changes from version 7.1.1 to 7.1.2
- core/Install_Service/Install_7_1_2.php +34 -0
- core/Install_Service/Install_Service.php +2 -0
- core/Loader/Loader.php +1 -1
- core/Memcache/Memcache.php +18 -6
- readme.txt +6 -0
- sg-cachepress.php +2 -2
- templates/memcached.tpl +10 -0
- vendor/autoload.php +6 -1
- vendor/composer/InstalledVersions.php +2 -0
- vendor/composer/autoload_classmap.php +1 -1
- vendor/composer/autoload_files.php +2 -2
- vendor/composer/autoload_namespaces.php +1 -1
- vendor/composer/autoload_psr4.php +1 -1
- vendor/composer/autoload_real.php +9 -32
- vendor/composer/autoload_static.php +6 -6
- vendor/composer/installed.json +3 -3
- vendor/composer/installed.php +13 -13
- vendor/siteground/siteground-data/src/Settings.php +16 -5
- vendor/siteground/siteground-helper/.gitignore +3 -0
core/Install_Service/Install_7_1_2.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace SiteGround_Optimizer\Install_Service;
|
3 |
+
|
4 |
+
use SiteGround_Optimizer\Memcache\Memcache;
|
5 |
+
use SiteGround_Optimizer\Options\Options;
|
6 |
+
|
7 |
+
class Install_7_1_2 extends Install {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* The default install version. Overridden by the installation packages.
|
11 |
+
*
|
12 |
+
* @since 7.1.2
|
13 |
+
*
|
14 |
+
* @access protected
|
15 |
+
*
|
16 |
+
* @var string $version The install version.
|
17 |
+
*/
|
18 |
+
protected static $version = '7.1.2';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Run the install procedure.
|
22 |
+
*
|
23 |
+
* @since 7.1.2
|
24 |
+
*/
|
25 |
+
public function install() {
|
26 |
+
|
27 |
+
if ( Options::is_enabled( 'siteground_optimizer_enable_memcached' ) ) {
|
28 |
+
$memcached = new Memcache();
|
29 |
+
$memcached->remove_memcached_dropin();
|
30 |
+
$memcached->create_memcached_dropin();
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
core/Install_Service/Install_Service.php
CHANGED
@@ -33,6 +33,7 @@ use SiteGround_Optimizer\Install_Service\Install_6_0_0;
|
|
33 |
use SiteGround_Optimizer\Install_Service\Install_6_0_2;
|
34 |
use SiteGround_Optimizer\Install_Service\Install_6_0_3;
|
35 |
use SiteGround_Optimizer\Install_Service\Install_7_1_0;
|
|
|
36 |
use SiteGround_Optimizer\Install_Service\Install_Cleanup;
|
37 |
use SiteGround_Optimizer\Supercacher\Supercacher;
|
38 |
|
@@ -77,6 +78,7 @@ class Install_Service {
|
|
77 |
new Install_6_0_2(),
|
78 |
new Install_6_0_3(),
|
79 |
new Install_7_1_0(),
|
|
|
80 |
);
|
81 |
}
|
82 |
|
33 |
use SiteGround_Optimizer\Install_Service\Install_6_0_2;
|
34 |
use SiteGround_Optimizer\Install_Service\Install_6_0_3;
|
35 |
use SiteGround_Optimizer\Install_Service\Install_7_1_0;
|
36 |
+
use SiteGround_Optimizer\Install_Service\Install_7_1_2;
|
37 |
use SiteGround_Optimizer\Install_Service\Install_Cleanup;
|
38 |
use SiteGround_Optimizer\Supercacher\Supercacher;
|
39 |
|
78 |
new Install_6_0_2(),
|
79 |
new Install_6_0_3(),
|
80 |
new Install_7_1_0(),
|
81 |
+
new Install_7_1_2(),
|
82 |
);
|
83 |
}
|
84 |
|
core/Loader/Loader.php
CHANGED
@@ -97,7 +97,7 @@ class Loader {
|
|
97 |
// Register rest route.
|
98 |
add_action( 'rest_api_init', array( $this->settings_page, 'register_rest_routes' ) );
|
99 |
|
100 |
-
if ( 1 === intval( get_option( '
|
101 |
$this->settings->schedule_cron_job();
|
102 |
}
|
103 |
}
|
97 |
// Register rest route.
|
98 |
add_action( 'rest_api_init', array( $this->settings_page, 'register_rest_routes' ) );
|
99 |
|
100 |
+
if ( 1 === intval( get_option( 'siteground_data_consent', 0 ) ) ) {
|
101 |
$this->settings->schedule_cron_job();
|
102 |
}
|
103 |
}
|
core/Memcache/Memcache.php
CHANGED
@@ -169,16 +169,28 @@ class Memcache {
|
|
169 |
* @return bool True on retrieving exactly the value set, false otherwise.
|
170 |
*/
|
171 |
public function is_connection_working() {
|
172 |
-
//
|
173 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
$memcache = new \Memcached();
|
181 |
-
$memcache->addServer(
|
182 |
$memcache->set( 'SGCP_Memcached_Test', 'Test!1', 50 );
|
183 |
|
184 |
if ( 'Test!1' === $memcache->get( 'SGCP_Memcached_Test' ) ) {
|
169 |
* @return bool True on retrieving exactly the value set, false otherwise.
|
170 |
*/
|
171 |
public function is_connection_working() {
|
172 |
+
// Do we have memcached UNIX socket?
|
173 |
+
$use_unix = 0;
|
174 |
+
$per_user_unix_socket = "/home/.tmp/memcached.sock";
|
175 |
+
$stat = @stat( $per_user_unix_socket );
|
176 |
+
if ( $stat !== false && ( $stat["mode"] & 0140000 ) == 0140000 ) {
|
177 |
+
// We have UNIX socket, use it
|
178 |
+
$addr = $per_user_unix_socket;
|
179 |
+
$port = 0;
|
180 |
+
$use_unix = 1;
|
181 |
+
}
|
182 |
|
183 |
+
if ( ! $use_unix ) {
|
184 |
+
$addr = self::IP;
|
185 |
+
$port = $this->get_memcached_port();
|
186 |
+
// Bail if the port doesn't exists.
|
187 |
+
if ( empty( $port ) ) {
|
188 |
+
return false;
|
189 |
+
}
|
190 |
}
|
191 |
|
192 |
$memcache = new \Memcached();
|
193 |
+
$memcache->addServer( $addr, $port );
|
194 |
$memcache->set( 'SGCP_Memcached_Test', 'Test!1', 50 );
|
195 |
|
196 |
if ( 'Test!1' === $memcache->get( 'SGCP_Memcached_Test' ) ) {
|
readme.txt
CHANGED
@@ -376,6 +376,12 @@ Our plugin uses a cookie in order to function properly. It does not store person
|
|
376 |
|
377 |
== Changelog ==
|
378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
= Version 7.1.1 =
|
380 |
Release Date: May 20th, 2022
|
381 |
|
376 |
|
377 |
== Changelog ==
|
378 |
|
379 |
+
= Version 7.1.2 =
|
380 |
+
Release Date: June 16th, 2022
|
381 |
+
|
382 |
+
* Adding Memcached UNIX socket support
|
383 |
+
* Improved data collection
|
384 |
+
|
385 |
= Version 7.1.1 =
|
386 |
Release Date: May 20th, 2022
|
387 |
|
sg-cachepress.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: SiteGround 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: 7.1.
|
14 |
* Author: SiteGround
|
15 |
* Author URI: https://www.siteground.com
|
16 |
* Text Domain: sg-cachepress
|
@@ -32,7 +32,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
32 |
|
33 |
// Define version constant.
|
34 |
if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
|
35 |
-
define( __NAMESPACE__ . '\VERSION', '7.1.
|
36 |
}
|
37 |
|
38 |
// Define slug constant.
|
10 |
* Plugin Name: SiteGround 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: 7.1.2
|
14 |
* Author: SiteGround
|
15 |
* Author URI: https://www.siteground.com
|
16 |
* Text Domain: sg-cachepress
|
32 |
|
33 |
// Define version constant.
|
34 |
if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
|
35 |
+
define( __NAMESPACE__ . '\VERSION', '7.1.2' );
|
36 |
}
|
37 |
|
38 |
// Define slug constant.
|
templates/memcached.tpl
CHANGED
@@ -463,6 +463,16 @@ class WP_Object_Cache {
|
|
463 |
$instances = array();
|
464 |
foreach ( $servers as $server ) {
|
465 |
@list( $node, $port ) = explode( ':', $server );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
if ( empty( $port ) )
|
467 |
$port = ini_get( 'memcache.default_port' );
|
468 |
$port = intval( $port );
|
463 |
$instances = array();
|
464 |
foreach ( $servers as $server ) {
|
465 |
@list( $node, $port ) = explode( ':', $server );
|
466 |
+
// Use UNIX socket (if exists) for local connections
|
467 |
+
if ( $server == 'localhost:11211' || $server == '127.0.0.1:11211' ) {
|
468 |
+
$per_user_unix_socket = "/home/.tmp/memcached.sock";
|
469 |
+
$stat = @stat( $per_user_unix_socket );
|
470 |
+
if ( $stat !== false && ( $stat["mode"] & 0140000 ) == 0140000 ) {
|
471 |
+
// We have UNIX socket, use it
|
472 |
+
$instances[] = array( $per_user_unix_socket, 0, 1 );
|
473 |
+
break;
|
474 |
+
}
|
475 |
+
}
|
476 |
if ( empty( $port ) )
|
477 |
$port = ini_get( 'memcache.default_port' );
|
478 |
$port = intval( $port );
|
vendor/autoload.php
CHANGED
@@ -2,6 +2,11 @@
|
|
2 |
|
3 |
// autoload.php @generated by Composer
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
2 |
|
3 |
// autoload.php @generated by Composer
|
4 |
|
5 |
+
if (PHP_VERSION_ID < 50600) {
|
6 |
+
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
7 |
+
exit(1);
|
8 |
+
}
|
9 |
+
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInit6aabfa86f466ba6438be5ac1658af064::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -21,6 +21,8 @@ use Composer\Semver\VersionParser;
|
|
21 |
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
*
|
23 |
* To require its presence, you can require `composer-runtime-api ^2.0`
|
|
|
|
|
24 |
*/
|
25 |
class InstalledVersions
|
26 |
{
|
21 |
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
*
|
23 |
* To require its presence, you can require `composer-runtime-api ^2.0`
|
24 |
+
*
|
25 |
+
* @final
|
26 |
*/
|
27 |
class InstalledVersions
|
28 |
{
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_classmap.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
2 |
|
3 |
// autoload_classmap.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
vendor/composer/autoload_files.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
// autoload_files.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
-
'
|
10 |
);
|
2 |
|
3 |
// autoload_files.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'7135897415a2b76322abd22e8fdd66f8' => $baseDir . '/helpers/helpers.php',
|
10 |
);
|
vendor/composer/autoload_namespaces.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_namespaces.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
2 |
|
3 |
// autoload_namespaces.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_psr4.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
2 |
|
3 |
// autoload_psr4.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,41 +24,18 @@ class ComposerAutoloaderInit41f6b662d9353f9163f563d74935e475
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
require __DIR__ . '/autoload_static.php';
|
34 |
-
|
35 |
-
call_user_func(\Composer\Autoload\ComposerStaticInit41f6b662d9353f9163f563d74935e475::getInitializer($loader));
|
36 |
-
} else {
|
37 |
-
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
-
foreach ($map as $namespace => $path) {
|
39 |
-
$loader->set($namespace, $path);
|
40 |
-
}
|
41 |
-
|
42 |
-
$map = require __DIR__ . '/autoload_psr4.php';
|
43 |
-
foreach ($map as $namespace => $path) {
|
44 |
-
$loader->setPsr4($namespace, $path);
|
45 |
-
}
|
46 |
-
|
47 |
-
$classMap = require __DIR__ . '/autoload_classmap.php';
|
48 |
-
if ($classMap) {
|
49 |
-
$loader->addClassMap($classMap);
|
50 |
-
}
|
51 |
-
}
|
52 |
|
53 |
$loader->register(true);
|
54 |
|
55 |
-
|
56 |
-
$includeFiles = Composer\Autoload\ComposerStaticInit41f6b662d9353f9163f563d74935e475::$files;
|
57 |
-
} else {
|
58 |
-
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
-
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
@@ -70,7 +47,7 @@ class ComposerAutoloaderInit41f6b662d9353f9163f563d74935e475
|
|
70 |
* @param string $file
|
71 |
* @return void
|
72 |
*/
|
73 |
-
function
|
74 |
{
|
75 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
76 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit6aabfa86f466ba6438be5ac1658af064
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit6aabfa86f466ba6438be5ac1658af064', 'loadClassLoader'), true, true);
|
28 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit6aabfa86f466ba6438be5ac1658af064', 'loadClassLoader'));
|
30 |
|
31 |
+
require __DIR__ . '/autoload_static.php';
|
32 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::getInitializer($loader));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
36 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::$files;
|
|
|
|
|
|
|
|
|
37 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
38 |
+
composerRequire6aabfa86f466ba6438be5ac1658af064($fileIdentifier, $file);
|
39 |
}
|
40 |
|
41 |
return $loader;
|
47 |
* @param string $file
|
48 |
* @return void
|
49 |
*/
|
50 |
+
function composerRequire6aabfa86f466ba6438be5ac1658af064($fileIdentifier, $file)
|
51 |
{
|
52 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
53 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,10 +4,10 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
-
'
|
11 |
);
|
12 |
|
13 |
public static $prefixLengthsPsr4 = array (
|
@@ -96,10 +96,10 @@ class ComposerStaticInit41f6b662d9353f9163f563d74935e475
|
|
96 |
public static function getInitializer(ClassLoader $loader)
|
97 |
{
|
98 |
return \Closure::bind(function () use ($loader) {
|
99 |
-
$loader->prefixLengthsPsr4 =
|
100 |
-
$loader->prefixDirsPsr4 =
|
101 |
-
$loader->prefixesPsr0 =
|
102 |
-
$loader->classMap =
|
103 |
|
104 |
}, null, ClassLoader::class);
|
105 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit6aabfa86f466ba6438be5ac1658af064
|
8 |
{
|
9 |
public static $files = array (
|
10 |
+
'7135897415a2b76322abd22e8fdd66f8' => __DIR__ . '/../..' . '/helpers/helpers.php',
|
11 |
);
|
12 |
|
13 |
public static $prefixLengthsPsr4 = array (
|
96 |
public static function getInitializer(ClassLoader $loader)
|
97 |
{
|
98 |
return \Closure::bind(function () use ($loader) {
|
99 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::$prefixLengthsPsr4;
|
100 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::$prefixDirsPsr4;
|
101 |
+
$loader->prefixesPsr0 = ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::$prefixesPsr0;
|
102 |
+
$loader->classMap = ComposerStaticInit6aabfa86f466ba6438be5ac1658af064::$classMap;
|
103 |
|
104 |
}, null, ClassLoader::class);
|
105 |
}
|
vendor/composer/installed.json
CHANGED
@@ -345,10 +345,10 @@
|
|
345 |
"version_normalized": "dev-master",
|
346 |
"source": {
|
347 |
"type": "git",
|
348 |
-
"url": "
|
349 |
-
"reference": "
|
350 |
},
|
351 |
-
"time": "2022-
|
352 |
"default-branch": true,
|
353 |
"type": "library",
|
354 |
"installation-source": "source",
|
345 |
"version_normalized": "dev-master",
|
346 |
"source": {
|
347 |
"type": "git",
|
348 |
+
"url": "git@gitlab.siteground.com:wordpress/siteground-data.git",
|
349 |
+
"reference": "58ba53b8a5711c0cd33be62ebedf99cc2ec180ec"
|
350 |
},
|
351 |
+
"time": "2022-06-09T12:55:21+00:00",
|
352 |
"default-branch": true,
|
353 |
"type": "library",
|
354 |
"installation-source": "source",
|
vendor/composer/installed.php
CHANGED
@@ -2,23 +2,14 @@
|
|
2 |
'root' => array(
|
3 |
'pretty_version' => 'dev-develop',
|
4 |
'version' => 'dev-develop',
|
5 |
-
'type' => '
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
-
'name' => '
|
10 |
'dev' => true,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
-
'__root__' => array(
|
14 |
-
'pretty_version' => 'dev-develop',
|
15 |
-
'version' => 'dev-develop',
|
16 |
-
'type' => 'library',
|
17 |
-
'install_path' => __DIR__ . '/../../',
|
18 |
-
'aliases' => array(),
|
19 |
-
'reference' => '2aca6cdc6a1f88b3720e06d66177969d641714c4',
|
20 |
-
'dev_requirement' => false,
|
21 |
-
),
|
22 |
'a5hleyrich/wp-background-processing' => array(
|
23 |
'pretty_version' => '1.0.2',
|
24 |
'version' => '1.0.2.0',
|
@@ -75,6 +66,15 @@
|
|
75 |
'reference' => '8a6bbcd4a231b19e1b052c1c46b0fe2935331afe',
|
76 |
'dev_requirement' => false,
|
77 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
'siteground/siteground-data' => array(
|
79 |
'pretty_version' => 'dev-master',
|
80 |
'version' => 'dev-master',
|
@@ -83,7 +83,7 @@
|
|
83 |
'aliases' => array(
|
84 |
0 => '9999999-dev',
|
85 |
),
|
86 |
-
'reference' => '
|
87 |
'dev_requirement' => false,
|
88 |
),
|
89 |
'siteground/siteground-emails' => array(
|
2 |
'root' => array(
|
3 |
'pretty_version' => 'dev-develop',
|
4 |
'version' => 'dev-develop',
|
5 |
+
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'c84bdb035cf947415ff0cb22bdd7c0f4c6a2c570',
|
9 |
+
'name' => 'siteground/sg-cachepress',
|
10 |
'dev' => true,
|
11 |
),
|
12 |
'versions' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
'a5hleyrich/wp-background-processing' => array(
|
14 |
'pretty_version' => '1.0.2',
|
15 |
'version' => '1.0.2.0',
|
66 |
'reference' => '8a6bbcd4a231b19e1b052c1c46b0fe2935331afe',
|
67 |
'dev_requirement' => false,
|
68 |
),
|
69 |
+
'siteground/sg-cachepress' => array(
|
70 |
+
'pretty_version' => 'dev-develop',
|
71 |
+
'version' => 'dev-develop',
|
72 |
+
'type' => 'wordpress-plugin',
|
73 |
+
'install_path' => __DIR__ . '/../../',
|
74 |
+
'aliases' => array(),
|
75 |
+
'reference' => 'c84bdb035cf947415ff0cb22bdd7c0f4c6a2c570',
|
76 |
+
'dev_requirement' => false,
|
77 |
+
),
|
78 |
'siteground/siteground-data' => array(
|
79 |
'pretty_version' => 'dev-master',
|
80 |
'version' => 'dev-master',
|
83 |
'aliases' => array(
|
84 |
0 => '9999999-dev',
|
85 |
),
|
86 |
+
'reference' => '58ba53b8a5711c0cd33be62ebedf99cc2ec180ec',
|
87 |
'dev_requirement' => false,
|
88 |
),
|
89 |
'siteground/siteground-emails' => array(
|
vendor/siteground/siteground-data/src/Settings.php
CHANGED
@@ -567,13 +567,24 @@ if ( ! class_exists( 'SiteGround_Data/Settings' ) ) {
|
|
567 |
* @since 1.0.0
|
568 |
*/
|
569 |
public function store_data_locally( $latest_data ) {
|
570 |
-
//
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
|
575 |
// Update the datastore option.
|
576 |
-
update_option( 'siteground_data_store', $
|
|
|
|
|
|
|
577 |
}
|
578 |
}
|
579 |
}
|
567 |
* @since 1.0.0
|
568 |
*/
|
569 |
public function store_data_locally( $latest_data ) {
|
570 |
+
// If the request is not admin, don't retrieve and send data.
|
571 |
+
if ( ! current_user_can( 'manage_options' ) && ! wp_doing_cron() ) {
|
572 |
+
return true;
|
573 |
+
}
|
574 |
+
|
575 |
+
// Retrieve the timestamp from the DB.
|
576 |
+
$timestamp = get_option( 'siteground_data_store_timestamp', false );
|
577 |
+
|
578 |
+
// Bail if the timestamp is set and is sooner than 1 month.
|
579 |
+
if ( $timestamp !== false && ( $timestamp > time() - MONTH_IN_SECONDS ) ) {
|
580 |
+
return true;
|
581 |
+
}
|
582 |
|
583 |
// Update the datastore option.
|
584 |
+
update_option( 'siteground_data_store', $latest_data );
|
585 |
+
// Update the timestamp
|
586 |
+
update_option( 'siteground_data_store_timestamp', time() );
|
587 |
+
return true;
|
588 |
}
|
589 |
}
|
590 |
}
|
vendor/siteground/siteground-helper/.gitignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/vendor/
|
2 |
+
.DS_Store
|
3 |
+
/.DS_Store
|