updated plugin Jetpack Protect version 1.1.2

This commit is contained in:
2022-12-19 23:08:19 +00:00
committed by Gitium
parent dcc5b4d910
commit 7b2202370c
91 changed files with 1019 additions and 656 deletions

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.16] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.4.15] - 2022-07-26
### Changed
- Updated package dependencies. [#25158]
@ -99,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Creates the MC Stats package
[1.4.16]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.15...v1.4.16
[1.4.15]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.14...v1.4.15
[1.4.14]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.13...v1.4.14
[1.4.13]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.12...v1.4.13

View File

@ -6,7 +6,7 @@
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.13] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [0.2.12] - 2022-09-20
### Changed
- Updated package dependencies.
@ -76,6 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixing menu visibility issues.
[0.2.13]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.12...0.2.13
[0.2.12]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.11...0.2.12
[0.2.11]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.10...0.2.11
[0.2.10]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.9...0.2.10

View File

@ -6,7 +6,7 @@
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"automattic/wordbless": "dev-master"
},
"autoload": {

View File

@ -13,7 +13,7 @@ namespace Automattic\Jetpack\Admin_UI;
*/
class Admin_Menu {
const PACKAGE_VERSION = '0.2.12';
const PACKAGE_VERSION = '0.2.13';
/**
* Whether this class has been initialized

View File

@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.17.27] - 2022-11-28
### Changed
- Updated package dependencies. [#27576]
## [1.17.26] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.17.25] - 2022-11-08
### Changed
- Updated package dependencies. [#27289]
@ -276,6 +284,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Statically access asset tools
[1.17.27]: https://github.com/Automattic/jetpack-assets/compare/v1.17.26...v1.17.27
[1.17.26]: https://github.com/Automattic/jetpack-assets/compare/v1.17.25...v1.17.26
[1.17.25]: https://github.com/Automattic/jetpack-assets/compare/v1.17.24...v1.17.25
[1.17.24]: https://github.com/Automattic/jetpack-assets/compare/v1.17.23...v1.17.24
[1.17.23]: https://github.com/Automattic/jetpack-assets/compare/v1.17.22...v1.17.23

View File

@ -4,12 +4,12 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-constants": "^1.6"
"automattic/jetpack-constants": "^1.6.19"
},
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0"
},
"autoload": {

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.11.1] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.11.0] - 2022-10-11
### Changed
- Integrate Stats package in Jetpack plugin [#26640]
@ -152,6 +156,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Trying to add deterministic initialization.
[1.11.1]: https://github.com/Automattic/jetpack-config/compare/v1.11.0...v1.11.1
[1.11.0]: https://github.com/Automattic/jetpack-config/compare/v1.10.0...v1.11.0
[1.10.0]: https://github.com/Automattic/jetpack-config/compare/v1.9.6...v1.10.0
[1.9.6]: https://github.com/Automattic/jetpack-config/compare/v1.9.5...v1.9.6

View File

@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.47.0] - 2022-11-30
### Added
- Added full response logging for failed Sync data requests. [#27644]
## [1.46.4] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.46.3] - 2022-11-08
### Changed
- Updated package dependencies. [#27289]
@ -721,6 +729,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Separate the connection library into its own package.
[1.47.0]: https://github.com/Automattic/jetpack-connection/compare/v1.46.4...v1.47.0
[1.46.4]: https://github.com/Automattic/jetpack-connection/compare/v1.46.3...v1.46.4
[1.46.3]: https://github.com/Automattic/jetpack-connection/compare/v1.46.2...v1.46.3
[1.46.2]: https://github.com/Automattic/jetpack-connection/compare/v1.46.1...v1.46.2
[1.46.1]: https://github.com/Automattic/jetpack-connection/compare/v1.46.0...v1.46.1

View File

@ -4,18 +4,18 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4",
"automattic/jetpack-admin-ui": "^0.2",
"automattic/jetpack-constants": "^1.6",
"automattic/jetpack-roles": "^1.4",
"automattic/jetpack-status": "^1.15",
"automattic/jetpack-redirect": "^1.7"
"automattic/jetpack-a8c-mc-stats": "^1.4.16",
"automattic/jetpack-admin-ui": "^0.2.13",
"automattic/jetpack-constants": "^1.6.19",
"automattic/jetpack-roles": "^1.4.18",
"automattic/jetpack-status": "^1.15.1",
"automattic/jetpack-redirect": "^1.7.20"
},
"require-dev": {
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.0.3",
"brain/monkey": "2.6.1",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [
@ -56,7 +56,7 @@
"link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "1.46.x-dev"
"dev-trunk": "1.47.x-dev"
}
},
"config": {

View File

@ -34,6 +34,13 @@ class Jetpack_IXR_Client extends IXR_Client {
*/
public $response_headers = null;
/**
* Holds the raw remote response from the latest call to query().
*
* @var null|array|WP_Error
*/
public $last_response = null;
/**
* Constructor.
* Initialize a new Jetpack IXR client instance.
@ -77,6 +84,13 @@ class Jetpack_IXR_Client extends IXR_Client {
// Store response headers.
$this->response_headers = wp_remote_retrieve_headers( $response );
$this->last_response = $response;
if ( is_array( $this->last_response ) && isset( $this->last_response['http_response'] ) ) {
// If the expected array response is received, format the data as plain arrays.
$this->last_response = $this->last_response['http_response']->to_array();
$this->last_response['headers'] = $this->last_response['headers']->getAll();
}
if ( is_wp_error( $response ) ) {
$this->error = new IXR_Error( -10520, sprintf( 'Jetpack: [%s] %s', $response->get_error_code(), $response->get_error_message() ) );
return false;
@ -154,4 +168,13 @@ class Jetpack_IXR_Client extends IXR_Client {
}
return false;
}
/**
* Retrieve the raw response for the last query() call.
*
* @return null|array|WP_Error
*/
public function get_last_response() {
return $this->last_response;
}
}

View File

@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Connection;
*/
class Package_Version {
const PACKAGE_VERSION = '1.46.3';
const PACKAGE_VERSION = '1.47.0';
const PACKAGE_SLUG = 'connection';

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.6.19] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.6.18] - 2022-07-26
### Changed
- Updated package dependencies. [#25158]
@ -134,6 +138,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Packages: Finish the constants package
[1.6.19]: https://github.com/Automattic/jetpack-constants/compare/v1.6.18...v1.6.19
[1.6.18]: https://github.com/Automattic/jetpack-constants/compare/v1.6.17...v1.6.18
[1.6.17]: https://github.com/Automattic/jetpack-constants/compare/v1.6.16...v1.6.17
[1.6.16]: https://github.com/Automattic/jetpack-constants/compare/v1.6.15...v1.6.16

View File

@ -7,7 +7,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.21] - 2022-11-22
### Added
- Add a guard in `functions.php` against being loaded twice from different copies of the package. [#27475]
### Changed
- Updated package dependencies. [#27043]
## [1.4.20] - 2022-11-07
### Fixed
- Ensure that User_Agent is loaded in environments without autoload enabled. (e.g.: WordPress.com and Super Cache) [#27223]
@ -132,6 +139,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Moving jetpack_is_mobile into a package
[1.4.21]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.20...v1.4.21
[1.4.20]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.19...v1.4.20
[1.4.19]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.18...v1.4.19
[1.4.18]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.17...v1.4.18

View File

@ -6,7 +6,7 @@
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -7,25 +7,30 @@
namespace Automattic\Jetpack\Device_Detection;
/**
* A wrapper for WordPress's `wp_unslash()`.
*
* Even though PHP itself dropped the option to add slashes to superglobals a decade ago,
* WordPress still does it through some misguided extreme backwards compatibility. 🙄
*
* If WordPress's function exists, assume it needs to be called.
* Else if on WordPress.com, do a simplified version because we're running really early.
* Else, assume it's not needed.
*
* @param string $value String of data to unslash.
* @return string Possibly unslashed $value.
*/
function wp_unslash( $value ) {
if ( function_exists( '\\wp_unslash' ) ) {
return \wp_unslash( $value );
} elseif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
return stripslashes( $value );
} else {
return $value;
// Check if the function is already defined, in case someone bypassed the autoloader or something
// to get the two classes from different copies of the package.
if ( ! function_exists( __NAMESPACE__ . '\\wp_unslash' ) ) {
/**
* A wrapper for WordPress's `wp_unslash()`.
*
* Even though PHP itself dropped the option to add slashes to superglobals a decade ago,
* WordPress still does it through some misguided extreme backwards compatibility. 🙄
*
* If WordPress's function exists, assume it needs to be called.
* Else if on WordPress.com, do a simplified version because we're running really early.
* Else, assume it's not needed.
*
* @param string $value String of data to unslash.
* @return string Possibly unslashed $value.
*/
function wp_unslash( $value ) {
if ( function_exists( '\\wp_unslash' ) ) {
return \wp_unslash( $value );
} elseif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
return stripslashes( $value );
} else {
return $value;
}
}
}

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.8.32] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [0.8.31] - 2022-11-10
### Changed
- Updated package dependencies. [#27319]
@ -300,6 +304,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated package dependencies.
- Use Connection/Urls for home_url and site_url functions migrated from Sync.
[0.8.32]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.31...v0.8.32
[0.8.31]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.30...v0.8.31
[0.8.30]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.29...v0.8.30
[0.8.29]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.28...v0.8.29

View File

@ -4,14 +4,14 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-connection": "^1.46",
"automattic/jetpack-constants": "^1.6",
"automattic/jetpack-status": "^1.15",
"automattic/jetpack-logo": "^1.5",
"automattic/jetpack-assets": "^1.17"
"automattic/jetpack-connection": "^1.46.4",
"automattic/jetpack-constants": "^1.6.19",
"automattic/jetpack-status": "^1.15.1",
"automattic/jetpack-logo": "^1.5.19",
"automattic/jetpack-assets": "^1.17.26"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/wordbless": "@dev"
},

View File

@ -28,7 +28,7 @@ class Identity_Crisis {
/**
* Package Version
*/
const PACKAGE_VERSION = '0.8.31';
const PACKAGE_VERSION = '0.8.32';
/**
* Instance of the object.

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.34] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [2.2.33] - 2022-11-08
### Changed
- Updated package dependencies. [#27289]
@ -506,6 +510,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update Jetpack to use new JITM package
[2.2.34]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.33...v2.2.34
[2.2.33]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.32...v2.2.33
[2.2.32]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.31...v2.2.32
[2.2.31]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.30...v2.2.31

View File

@ -4,19 +4,19 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4",
"automattic/jetpack-assets": "^1.17",
"automattic/jetpack-connection": "^1.46",
"automattic/jetpack-device-detection": "^1.4",
"automattic/jetpack-logo": "^1.5",
"automattic/jetpack-partner": "^1.7",
"automattic/jetpack-redirect": "^1.7",
"automattic/jetpack-status": "^1.15"
"automattic/jetpack-a8c-mc-stats": "^1.4.16",
"automattic/jetpack-assets": "^1.17.26",
"automattic/jetpack-connection": "^1.46.4",
"automattic/jetpack-device-detection": "^1.4.21",
"automattic/jetpack-logo": "^1.5.19",
"automattic/jetpack-partner": "^1.7.20",
"automattic/jetpack-redirect": "^1.7.20",
"automattic/jetpack-status": "^1.15.1"
},
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -20,7 +20,7 @@ use Automattic\Jetpack\Status;
*/
class JITM {
const PACKAGE_VERSION = '2.2.33';
const PACKAGE_VERSION = '2.2.34';
/**
* The configuration method that is called from the jetpack-config package.

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.12] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.7.11] - 2022-10-25
### Changed
- Updated package dependencies. [#26705]
@ -218,6 +222,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Licensing: Add support for Jetpack licenses
[1.7.12]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.11...v1.7.12
[1.7.11]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.10...v1.7.11
[1.7.10]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.9...v1.7.10
[1.7.9]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.8...v1.7.9

View File

@ -4,12 +4,12 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-connection": "^1.46"
"automattic/jetpack-connection": "^1.46.4"
},
"require-dev": {
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.5.19] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.5.18] - 2022-11-07
### Changed
- Updated package dependencies.
@ -130,6 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Packages: Add a basic Jetpack Logo package
[1.5.19]: https://github.com/Automattic/jetpack-logo/compare/v1.5.18...v1.5.19
[1.5.18]: https://github.com/Automattic/jetpack-logo/compare/v1.5.17...v1.5.18
[1.5.17]: https://github.com/Automattic/jetpack-logo/compare/v1.5.16...v1.5.17
[1.5.16]: https://github.com/Automattic/jetpack-logo/compare/v1.5.15...v1.5.16

View File

@ -6,7 +6,7 @@
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.5.1] - 2022-11-30
## [2.5.0] - 2022-11-28
### Changed
- My Jetpack: rename Backup and Anti-Spam to new product names [#27377]
- Show My Jetpack even if site is disconnected [#26967]
- Updated package dependencies. [#27576]
## [2.4.1] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [2.4.0] - 2022-11-17
### Added
- Added Jetpack Protect to My Jetpack. [#26069]
@ -668,6 +680,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created package
[2.5.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.0...2.5.1
[2.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.1...2.5.0
[2.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.0...2.4.1
[2.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.5...2.4.0
[2.3.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.4...2.3.5
[2.3.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.3...2.3.4

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 42 28.9" style="enable-background:new 0 0 42 28.9;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;}
</style>
<path class="st0" d="M10.2,8.7c-0.1,0-0.3,0-0.4,0C4.4,8.7,0,13.2,0,18.8s4.4,10.1,9.8,10.1l0.1,0h23.7l0,0c4.6,0,8.4-3.9,8.4-8.7
c0-4.3-3-7.9-7-8.5l0-0.1C35,5.2,29.4,0,22.4,0C16.5,0,11.6,3.7,10.2,8.7L10.2,8.7z M31,15l0-3.4l0-0.1c0-3.9-3.5-7.6-8.7-7.6
c-4.3,0-7.5,2.7-8.4,5.8l-0.8,3L10,12.6c-0.1,0-0.2,0-0.2,0c-3.1,0-5.9,2.6-5.9,6.2c0,3.5,2.7,6.2,5.9,6.2l0.1,0h23.7l0,0
c2.4,0,4.5-2,4.5-4.7c0-2.4-1.7-4.3-3.7-4.7L31,15z"/>
</svg>

After

Width:  |  Height:  |  Size: 856 B

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:2;}
.st1{clip-path:url(#SVGID_00000131361309518468547900000009062464345318814348_);}
.st2{fill:#F6F7F7;filter:url(#Adobe_OpacityMaskFilter);}
.st3{mask:url(#mask0_2900_10877_00000159448472586931246160000013733448166778715831_);}
.st4{fill:#F0F2EB;}
.st5{fill-rule:evenodd;clip-rule:evenodd;fill:#646970;}
</style>
<circle class="st0" cx="18" cy="18" r="17"/>
<g>
<defs>
<rect id="SVGID_1_" width="36" height="36"/>
</defs>
<clipPath id="SVGID_00000143603845024951162640000013916798552048052664_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g style="clip-path:url(#SVGID_00000143603845024951162640000013916798552048052664_);">
<defs>
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="0" y="0" width="36" height="36">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36" id="mask0_2900_10877_00000159448472586931246160000013733448166778715831_">
<circle class="st2" cx="18" cy="18" r="18"/>
</mask>
<g class="st3">
<circle class="st4" cx="18" cy="18" r="18"/>
<path class="st5" d="M12.7,23c-1.2-1.3-2-3.1-2-5c0-4,3.3-7.3,7.3-7.3s7.3,3.3,7.3,7.3c0,1.9-0.7,3.7-2,5v-0.5
c0-1.7-1.4-3.1-3.1-3.1h-4.5c-1.7,0-3.1,1.4-3.1,3.1V23z M14.3,24.3c1.1,0.6,2.3,1,3.7,1s2.6-0.4,3.7-1v-1.8
c0-0.8-0.6-1.4-1.4-1.4h-4.5c-0.8,0-1.4,0.6-1.4,1.4V24.3z M9,18c0-5,4-9,9-9s9,4,9,9s-4,9-9,9S9,23,9,18z M20.2,15.8
c0,1.2-1,2.2-2.2,2.2s-2.2-1-2.2-2.2s1-2.2,2.2-2.2S20.2,14.5,20.2,15.8z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{clip-path:url(#SVGID_00000115494289508776443440000006419494924222942340_);}
.st1{stroke:#FFFFFF;stroke-width:2;}
.st2{fill:#FFFFFF;}
</style>
<g>
<defs>
<rect id="SVGID_1_" x="0" y="0" width="32" height="32"/>
</defs>
<clipPath id="SVGID_00000114031482566589492640000009417605807093364883_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g style="clip-path:url(#SVGID_00000114031482566589492640000009417605807093364883_);">
<path class="st1" d="M16,33c9.4,0,17-7.6,17-17c0-9.4-7.6-17-17-17C6.6-1-1,6.6-1,16C-1,25.4,6.6,33,16,33z"/>
<path class="st2" d="M16.8,13.3v15.5l8-15.5H16.8z"/>
<path class="st2" d="M15.2,18.7V3.2l-8,15.5H15.2z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'c8b0206144b22212a975');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '2eead7d064827ada273f');

View File

@ -4,18 +4,18 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-admin-ui": "^0.2",
"automattic/jetpack-assets": "^1.17",
"automattic/jetpack-connection": "^1.46",
"automattic/jetpack-jitm": "^2.2",
"automattic/jetpack-licensing": "^1.7",
"automattic/jetpack-plugins-installer": "^0.2",
"automattic/jetpack-redirect": "^1.7",
"automattic/jetpack-constants": "^1.6"
"automattic/jetpack-admin-ui": "^0.2.13",
"automattic/jetpack-assets": "^1.17.27",
"automattic/jetpack-connection": "^1.47.0",
"automattic/jetpack-jitm": "^2.2.34",
"automattic/jetpack-licensing": "^1.7.12",
"automattic/jetpack-plugins-installer": "^0.2.1",
"automattic/jetpack-redirect": "^1.7.20",
"automattic/jetpack-constants": "^1.6.19"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"automattic/wordbless": "@dev"
},
"autoload": {
@ -65,7 +65,7 @@
"link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}"
},
"branch-alias": {
"dev-trunk": "2.4.x-dev"
"dev-trunk": "2.5.x-dev"
},
"version-constants": {
"::PACKAGE_VERSION": "src/class-initializer.php"

View File

@ -30,10 +30,10 @@ class Initializer {
*
* @var string
*/
const PACKAGE_VERSION = '2.4.0';
const PACKAGE_VERSION = '2.5.1';
/**
* Initialize My Jetapack
* Initialize My Jetpack
*
* @return void
*/
@ -240,11 +240,6 @@ class Initializer {
$should = false;
}
// Do not initialize My Jetpack if site is not connected.
if ( ! ( new Connection_Manager() )->is_connected() ) {
$should = false;
}
/**
* Allows filtering whether My Jetpack should be initialized.
*

View File

@ -49,7 +49,7 @@ class Anti_Spam extends Product {
* @return string
*/
public static function get_name() {
return __( 'Anti-Spam', 'jetpack-my-jetpack' );
return __( 'Akismet Anti-spam', 'jetpack-my-jetpack' );
}
/**
@ -58,7 +58,7 @@ class Anti_Spam extends Product {
* @return string
*/
public static function get_title() {
return __( 'Jetpack Anti-Spam', 'jetpack-my-jetpack' );
return __( 'Jetpack Akismet Anti-spam', 'jetpack-my-jetpack' );
}
/**

View File

@ -50,7 +50,7 @@ class Backup extends Hybrid_Product {
* @return string
*/
public static function get_name() {
return __( 'Backup', 'jetpack-my-jetpack' );
return __( 'VaultPress Backup', 'jetpack-my-jetpack' );
}
/**
@ -59,7 +59,7 @@ class Backup extends Hybrid_Product {
* @return string
*/
public static function get_title() {
return __( 'Jetpack Backup', 'jetpack-my-jetpack' );
return __( 'Jetpack VaultPress Backup', 'jetpack-my-jetpack' );
}
/**

View File

@ -56,7 +56,7 @@ class Security extends Module_Product {
* @return string
*/
public static function get_description() {
return __( 'Comprehensive site security, including Backup, Scan, and Anti-spam.', 'jetpack-my-jetpack' );
return __( 'Comprehensive site security, including VaultPress Backup, Scan, and Akismet Anti-spam.', 'jetpack-my-jetpack' );
}
/**
@ -65,7 +65,7 @@ class Security extends Module_Product {
* @return string
*/
public static function get_long_description() {
return __( 'Comprehensive site security, including Backup, Scan, and Anti-spam.', 'jetpack-my-jetpack' );
return __( 'Comprehensive site security, including VaultPress Backup, Scan, and Akismet Anti-spam.', 'jetpack-my-jetpack' );
}
/**

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.20] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.7.19] - 2022-11-07
### Changed
- Updated package dependencies. [#27278]
@ -200,6 +204,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add partner subsidiary id to upgrade URLs.
[1.7.20]: https://github.com/Automattic/jetpack-partner/compare/v1.7.19...v1.7.20
[1.7.19]: https://github.com/Automattic/jetpack-partner/compare/v1.7.18...v1.7.19
[1.7.18]: https://github.com/Automattic/jetpack-partner/compare/v1.7.17...v1.7.18
[1.7.17]: https://github.com/Automattic/jetpack-partner/compare/v1.7.16...v1.7.17

View File

@ -4,13 +4,13 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-connection": "^1.46",
"automattic/jetpack-status": "^1.15"
"automattic/jetpack-connection": "^1.46.4",
"automattic/jetpack-status": "^1.15.1"
},
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"automattic/wordbless": "@dev"
},
"autoload": {

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.8] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [0.2.7] - 2022-09-20
### Changed
- Updated package dependencies.
@ -80,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
[0.2.8]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.7...v0.2.8
[0.2.7]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.6...v0.2.7
[0.2.6]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.4...v0.2.5

View File

@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.0.3"
},

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.1] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [0.2.0] - 2022-08-23
### Added
- Add method to check plugin activation context. [#25422]
@ -36,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fix method logic
[0.2.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.4...v0.2.0
[0.1.4]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.2...v0.1.3

View File

@ -4,11 +4,11 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4"
"automattic/jetpack-a8c-mc-stats": "^1.4.16"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.20] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.7.19] - 2022-11-07
### Changed
- Updated package dependencies. [#27278]
@ -156,6 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Create Jetpack Redirect package
[1.7.20]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.19...v1.7.20
[1.7.19]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.18...v1.7.19
[1.7.18]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.17...v1.7.18
[1.7.17]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.16...v1.7.17

View File

@ -4,12 +4,12 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-status": "^1.15"
"automattic/jetpack-status": "^1.15.1"
},
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.18] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.4.17] - 2022-07-26
### Changed
- Updated package dependencies. [#25158]
@ -123,6 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Jetpack DNA: Introduce a Roles package
[1.4.18]: https://github.com/Automattic/jetpack-roles/compare/v1.4.17...v1.4.18
[1.4.17]: https://github.com/Automattic/jetpack-roles/compare/v1.4.16...v1.4.17
[1.4.16]: https://github.com/Automattic/jetpack-roles/compare/v1.4.15...v1.4.16
[1.4.15]: https://github.com/Automattic/jetpack-roles/compare/v1.4.14...v1.4.15

View File

@ -7,7 +7,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.15.1] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.15.0] - 2022-11-07
### Added
- WordPress.com: add checks for Simple or either Simple/WoA. [#27278]
@ -212,6 +216,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Packages: Introduce a status package
[1.15.1]: https://github.com/Automattic/jetpack-status/compare/v1.15.0...v1.15.1
[1.15.0]: https://github.com/Automattic/jetpack-status/compare/v1.14.3...v1.15.0
[1.14.3]: https://github.com/Automattic/jetpack-status/compare/v1.14.2...v1.14.3
[1.14.2]: https://github.com/Automattic/jetpack-status/compare/v1.14.1...v1.14.2

View File

@ -4,12 +4,12 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-constants": "^1.6"
"automattic/jetpack-constants": "^1.6.19"
},
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2"
"automattic/jetpack-changelogger": "^3.2.1"
},
"autoload": {
"classmap": [

View File

@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.44.0] - 2022-11-30
### Added
- Added full response logging for failed Sync data requests. [#27644]
### Fixed
- Make sure Dedicated Sync can revert back to Default Sync if it stops sending events for one reason or another. [#27632]
## [1.43.2] - 2022-11-28
### Changed
- Sync: Limit next_sync_time lock to be at most 1 hour in the future [#27606]
## [1.43.1] - 2022-11-22
### Changed
- Updated package dependencies. [#27043]
## [1.43.0] - 2022-11-17
### Added
- Added new sync option for launch-status [#27434]
@ -761,6 +776,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Packages: Move sync to a classmapped package
[1.44.0]: https://github.com/Automattic/jetpack-sync/compare/v1.43.2...v1.44.0
[1.43.2]: https://github.com/Automattic/jetpack-sync/compare/v1.43.1...v1.43.2
[1.43.1]: https://github.com/Automattic/jetpack-sync/compare/v1.43.0...v1.43.1
[1.43.0]: https://github.com/Automattic/jetpack-sync/compare/v1.42.0...v1.43.0
[1.42.0]: https://github.com/Automattic/jetpack-sync/compare/v1.41.0...v1.42.0
[1.41.0]: https://github.com/Automattic/jetpack-sync/compare/v1.40.3...v1.41.0

View File

@ -4,15 +4,15 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-connection": "^1.46",
"automattic/jetpack-constants": "^1.6",
"automattic/jetpack-identity-crisis": "^0.8",
"automattic/jetpack-password-checker": "^0.2",
"automattic/jetpack-roles": "^1.4",
"automattic/jetpack-status": "^1.15"
"automattic/jetpack-connection": "^1.47.0",
"automattic/jetpack-constants": "^1.6.19",
"automattic/jetpack-identity-crisis": "^0.8.32",
"automattic/jetpack-password-checker": "^0.2.8",
"automattic/jetpack-roles": "^1.4.18",
"automattic/jetpack-status": "^1.15.1"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"yoast/phpunit-polyfills": "1.0.3",
"automattic/wordbless": "@dev"
},
@ -47,7 +47,7 @@
"link-template": "https://github.com/Automattic/jetpack-sync/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "1.43.x-dev"
"dev-trunk": "1.44.x-dev"
}
},
"config": {

View File

@ -355,13 +355,14 @@ class Actions {
$full_queue = self::$sender->get_full_sync_queue();
$debug['debug_details']['sync_locks'] = array(
'retry_time_sync' => get_option( self::RETRY_AFTER_PREFIX . 'sync' ),
'retry_time_full_sync' => get_option( self::RETRY_AFTER_PREFIX . 'full_sync' ),
'next_sync_time_sync' => self::$sender->get_next_sync_time( 'sync' ),
'next_sync_time_full_sync' => self::$sender->get_next_sync_time( 'full_sync' ),
'queue_locked_sync' => $queue->is_locked(),
'queue_locked_full_sync' => $full_queue->is_locked(),
'dedicated_sync_request_lock' => \Jetpack_Options::get_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ),
'retry_time_sync' => get_option( self::RETRY_AFTER_PREFIX . 'sync' ),
'retry_time_full_sync' => get_option( self::RETRY_AFTER_PREFIX . 'full_sync' ),
'next_sync_time_sync' => self::$sender->get_next_sync_time( 'sync' ),
'next_sync_time_full_sync' => self::$sender->get_next_sync_time( 'full_sync' ),
'queue_locked_sync' => $queue->is_locked(),
'queue_locked_full_sync' => $full_queue->is_locked(),
'dedicated_sync_request_lock' => \Jetpack_Options::get_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ),
'dedicated_sync_temporary_disable_flag' => get_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG ),
);
// Sync Logs.
@ -494,12 +495,7 @@ class Actions {
// Enable/Disable Dedicated Sync flow via response headers.
$dedicated_sync_header = $rpc->get_response_header( 'Jetpack-Dedicated-Sync' );
if ( false !== $dedicated_sync_header ) {
$dedicated_sync_enabled = 'on' === $dedicated_sync_header ? 1 : 0;
Settings::update_settings(
array(
'dedicated_sync_enabled' => $dedicated_sync_enabled,
)
);
Dedicated_Sender::maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header );
}
if ( ! $result ) {
@ -517,7 +513,9 @@ class Actions {
$error_log = array_slice( $error_log, -4, null, true );
}
// Add new error indexed to time.
$error_log[ (string) microtime( true ) ] = $rpc->get_jetpack_error();
$error = $rpc->get_jetpack_error();
$error->add_data( $rpc->get_last_response() );
$error_log[ (string) microtime( true ) ] = $error;
// Update the error log.
update_option( self::ERROR_LOG_PREFIX . $queue_id, $error_log );
@ -1049,21 +1047,29 @@ class Actions {
* @access public
* @static
* @since 1.43.0
*
* @param bool $unlock_queues Whether to unlock Sync queues. Defaults to true.
*/
public static function reset_sync_locks() {
public static function reset_sync_locks( $unlock_queues = true ) {
// Next sync locks.
delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_sync' );
delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full_sync' );
delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full-sync-enqueue' );
// Retry after locks.
delete_option( self::RETRY_AFTER_PREFIX . '_sync' );
delete_option( self::RETRY_AFTER_PREFIX . '_full_sync' );
// Dedicated sync lock.
delete_option( self::RETRY_AFTER_PREFIX . 'sync' );
delete_option( self::RETRY_AFTER_PREFIX . 'full_sync' );
// Dedicated sync locks.
\Jetpack_Options::delete_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME );
delete_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG );
// Queue locks.
$sync_queue = new Queue( 'sync' );
$sync_queue->unlock();
$full_sync_queue = new Queue( 'full_sync' );
$full_sync_queue->unlock();
// Note that we are just unlocking the queues here, not reseting them.
if ( $unlock_queues ) {
$sync_queue = new Queue( 'sync' );
$sync_queue->unlock();
$full_sync_queue = new Queue( 'full_sync' );
$full_sync_queue->unlock();
}
}
}

View File

@ -50,6 +50,11 @@ class Dedicated_Sender {
*/
const DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME = 'request_lock_id';
/**
* The name of the transient to use to temporarily disable enabling of Dedicated sync.
*/
const DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG = 'jetpack_sync_dedicated_sync_temp_disable';
/**
* Filter a URL to check if Dedicated Sync is enabled.
* We need to remove slashes and then run it through `urldecode` as sometimes the
@ -111,7 +116,7 @@ class Dedicated_Sender {
*
* @access public
*
* @param Automattic\Jetpack\Sync\Queue $queue Queue object.
* @param \Automattic\Jetpack\Sync\Queue $queue Queue object.
*
* @return boolean|WP_Error True if spawned, WP_Error otherwise.
*/
@ -139,6 +144,41 @@ class Dedicated_Sender {
if ( $sync_next_time > microtime( true ) ) {
return new WP_Error( 'sync_throttled_' . $queue->id );
}
/**
* How much time to wait before we start suspecting Dedicated Sync is in trouble.
*/
$queue_send_time_threshold = 30 * MINUTE_IN_SECONDS;
$queue_lag = $queue->lag();
// Only check if we're failing to send events if the queue lag is longer than the threshold.
if ( $queue_lag > $queue_send_time_threshold ) {
/**
* Check if Dedicated Sync is healthy and revert to Default Sync if such case is detected.
*/
$last_successful_queue_send_time = get_option( Actions::LAST_SUCCESS_PREFIX . $queue->id, null );
if ( $last_successful_queue_send_time === null ) {
/**
* No successful sync sending completed. This might be either a "new" sync site or a site that's totally stuck.
*/
self::on_dedicated_sync_lag_not_sending_threshold_reached();
return new WP_Error( 'dedicated_sync_not_sending', 'Dedicated Sync is not successfully sending events' );
} else {
/**
* We have recorded a successful sending of events. Let's see if that is not too long ago in the past.
*/
$time_since_last_succesful_send = time() - $last_successful_queue_send_time;
if ( $time_since_last_succesful_send > $queue_send_time_threshold ) {
// We haven't successfully sent stuff in more than 30 minutes. Revert to Default Sync
self::on_dedicated_sync_lag_not_sending_threshold_reached();
return new WP_Error( 'dedicated_sync_not_sending', 'Dedicated Sync is not successfully sending events' );
}
}
}
/**
* Try to acquire a request lock, so we don't spawn multiple requests at the same time.
@ -312,4 +352,60 @@ class Dedicated_Sender {
return self::DEDICATED_SYNC_VALIDATION_STRING === $dedicated_sync_response_body;
}
/**
* Disable dedicated sync and set a transient to prevent re-enabling it for some time.
*
* @return void
*/
public static function on_dedicated_sync_lag_not_sending_threshold_reached() {
set_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG, true, 6 * HOUR_IN_SECONDS );
Settings::update_settings(
array(
'dedicated_sync_enabled' => 0,
)
);
// Inform that we had to temporarily disable Dedicated Sync
$data = array(
'timestamp' => microtime( true ),
// Send the flow type that was attempted.
'sync_flow_type' => 'dedicated',
);
$sender = Sender::get_instance();
$sender->send_action( 'jetpack_sync_flow_error_temp_disable', $data );
}
/**
* Disable or enable Dedicated Sync sender based on the header value returned from WordPress.com
*
* @param string $dedicated_sync_header The Dedicated Sync header value - `on` or `off`.
*
* @return bool Whether Dedicated Sync is going to be enabled or not.
*/
public static function maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header ) {
$dedicated_sync_enabled = 'on' === $dedicated_sync_header ? 1 : 0;
// Prevent enabling of Dedicated sync via header flag if we're in an autoheal timeout.
if ( $dedicated_sync_enabled ) {
$check_transient = get_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG );
if ( $check_transient ) {
// Something happened and Dedicated Sync should not be automatically re-enabled.
return false;
}
}
Settings::update_settings(
array(
'dedicated_sync_enabled' => $dedicated_sync_enabled,
)
);
return Settings::is_dedicated_sync_enabled();
}
}

View File

@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Sync;
*/
class Package_Version {
const PACKAGE_VERSION = '1.43.0';
const PACKAGE_VERSION = '1.44.0';
const PACKAGE_SLUG = 'sync';

View File

@ -227,13 +227,29 @@ class Sender {
/**
* Retrieve the next sync time.
*
* Update @since 1.43.2
* Sometimes when we process Sync requests in Jetpack, the server clock can be a
* bit in the future and this can lock Sync to not send stuff for a while.
* We are introducing an extra check, to make sure to limit the next_sync_time
* to be at most one hour in the future from the current time.
*
* @access public
*
* @param string $queue_name Name of the queue.
* @return float Timestamp of the next sync.
*/
public function get_next_sync_time( $queue_name ) {
return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 );
$option_name = self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name;
$next_sync_time = (float) get_option( $option_name, 0 );
$is_more_than_one_hour = ( $next_sync_time - microtime( true ) ) >= HOUR_IN_SECONDS;
if ( $is_more_than_one_hour ) {
delete_option( $option_name );
$next_sync_time = 0;
}
return $next_sync_time;
}
/**
@ -944,10 +960,8 @@ class Sender {
foreach ( Modules::get_modules() as $module ) {
$module->reset_data();
}
foreach ( array( 'sync', 'full_sync', 'full-sync-enqueue' ) as $queue_name ) {
delete_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name );
}
// Reset Sync locks without unlocking queues since we already reset those.
Actions::reset_sync_locks( false );
Settings::reset_data();
}

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.1] - 2022-11-30
### Changed
- Updated package dependencies. [#27043]
## 0.1.0 - 2022-11-01
### Added
- Adding the initial empty package
@ -12,3 +16,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies.
[0.1.1]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.0...v0.1.1

View File

@ -4,11 +4,11 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-connection": "^1.46"
"automattic/jetpack-connection": "^1.47.0"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.2",
"automattic/jetpack-changelogger": "^3.2.1",
"automattic/wordbless": "dev-master"
},
"autoload": {

View File

@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Transport_Helper;
*/
class Package_Version {
const PACKAGE_VERSION = '0.1.0';
const PACKAGE_VERSION = '0.1.1';
const PACKAGE_SLUG = 'transport-helper';

View File

@ -6,51 +6,51 @@ return array(
'packages' => array(
'jetpack-admin-ui' => array(
'path' => 'jetpack_vendor/automattic/jetpack-admin-ui',
'ver' => '0.2.12',
'ver' => '0.2.13',
),
'jetpack-assets' => array(
'path' => 'jetpack_vendor/automattic/jetpack-assets',
'ver' => '1.17.25',
'ver' => '1.17.27',
),
'jetpack-config' => array(
'path' => 'jetpack_vendor/automattic/jetpack-config',
'ver' => '1.11.0',
'ver' => '1.11.1',
),
'jetpack-connection' => array(
'path' => 'jetpack_vendor/automattic/jetpack-connection',
'ver' => '1.46.3',
'ver' => '1.47.0',
),
'jetpack-idc' => array(
'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis',
'ver' => '0.8.31',
'ver' => '0.8.32',
),
'jetpack-jitm' => array(
'path' => 'jetpack_vendor/automattic/jetpack-jitm',
'ver' => '2.2.33',
'ver' => '2.2.34',
),
'jetpack-licensing' => array(
'path' => 'jetpack_vendor/automattic/jetpack-licensing',
'ver' => '1.7.11',
'ver' => '1.7.12',
),
'jetpack-my-jetpack' => array(
'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
'ver' => '2.4.0',
'ver' => '2.5.1',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
'ver' => '0.2.7',
'ver' => '0.2.8',
),
'jetpack-plugins-installer' => array(
'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer',
'ver' => '0.2.0',
'ver' => '0.2.1',
),
'jetpack-sync' => array(
'path' => 'jetpack_vendor/automattic/jetpack-sync',
'ver' => '1.43.0',
'ver' => '1.44.0',
),
'jetpack-transport-helper' => array(
'path' => 'jetpack_vendor/automattic/jetpack-transport-helper',
'ver' => '0.1.0',
'ver' => '0.1.1',
),
),
);