updated plugin Jetpack Protect
version 1.2.0
This commit is contained in:
@ -5,6 +5,16 @@ 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.6.0] - 2022-12-05
|
||||
### Changed
|
||||
- Improve design of the error notice. [#27340]
|
||||
- Updated package dependencies. [#27340]
|
||||
|
||||
## [2.5.2] - 2022-12-02
|
||||
### Changed
|
||||
- My Jetpack: Requires connection only if needed [#27615]
|
||||
- Updated package dependencies. [#27697]
|
||||
|
||||
## [2.5.1] - 2022-11-30
|
||||
|
||||
## [2.5.0] - 2022-11-28
|
||||
@ -680,6 +690,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Added
|
||||
- Created package
|
||||
|
||||
[2.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.2...2.6.0
|
||||
[2.5.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.1...2.5.2
|
||||
[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
|
||||
|
@ -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' => '2eead7d064827ada273f');
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '813aee29e3796bd68b53');
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,18 +4,18 @@
|
||||
"type": "jetpack-library",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"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"
|
||||
"automattic/jetpack-admin-ui": "^0.2.14",
|
||||
"automattic/jetpack-assets": "^1.17.28",
|
||||
"automattic/jetpack-connection": "^1.47.1",
|
||||
"automattic/jetpack-jitm": "^2.2.35",
|
||||
"automattic/jetpack-licensing": "^1.7.13",
|
||||
"automattic/jetpack-plugins-installer": "^0.2.2",
|
||||
"automattic/jetpack-redirect": "^1.7.21",
|
||||
"automattic/jetpack-constants": "^1.6.20"
|
||||
},
|
||||
"require-dev": {
|
||||
"yoast/phpunit-polyfills": "1.0.3",
|
||||
"automattic/jetpack-changelogger": "^3.2.1",
|
||||
"yoast/phpunit-polyfills": "1.0.4",
|
||||
"automattic/jetpack-changelogger": "^3.2.2",
|
||||
"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.5.x-dev"
|
||||
"dev-trunk": "2.6.x-dev"
|
||||
},
|
||||
"version-constants": {
|
||||
"::PACKAGE_VERSION": "src/class-initializer.php"
|
||||
|
@ -30,7 +30,7 @@ class Initializer {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PACKAGE_VERSION = '2.5.1';
|
||||
const PACKAGE_VERSION = '2.6.0';
|
||||
|
||||
/**
|
||||
* Initialize My Jetpack
|
||||
|
@ -35,21 +35,36 @@ class Wpcom_Products {
|
||||
* @return Object|WP_Error
|
||||
*/
|
||||
private static function get_products_from_wpcom() {
|
||||
|
||||
$blog_id = \Jetpack_Options::get_option( 'id' );
|
||||
$endpoint = sprintf( '/sites/%d/products/?_locale=%s&type=jetpack', $blog_id, get_user_locale() );
|
||||
|
||||
$wpcom_request = Client::wpcom_json_api_request_as_blog(
|
||||
$endpoint,
|
||||
'1.1',
|
||||
array(
|
||||
'method' => 'GET',
|
||||
'headers' => array(
|
||||
'X-Forwarded-For' => ( new Visitor() )->get_ip( true ),
|
||||
),
|
||||
)
|
||||
$blog_id = \Jetpack_Options::get_option( 'id' );
|
||||
$ip = ( new Visitor() )->get_ip( true );
|
||||
$headers = array(
|
||||
'X-Forwarded-For' => $ip,
|
||||
);
|
||||
|
||||
// If has a blog id, use connected endpoint.
|
||||
|
||||
if ( $blog_id ) {
|
||||
$endpoint = sprintf( '/sites/%d/products/?_locale=%s&type=jetpack', $blog_id, get_user_locale() );
|
||||
|
||||
$wpcom_request = Client::wpcom_json_api_request_as_blog(
|
||||
$endpoint,
|
||||
'1.1',
|
||||
array(
|
||||
'method' => 'GET',
|
||||
'headers' => $headers,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$endpoint = 'https://public-api.wordpress.com/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack';
|
||||
|
||||
$wpcom_request = wp_remote_get(
|
||||
esc_url_raw( $endpoint ),
|
||||
array(
|
||||
'headers' => $headers,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$response_code = wp_remote_retrieve_response_code( $wpcom_request );
|
||||
|
||||
if ( 200 === $response_code ) {
|
||||
|
@ -99,7 +99,7 @@ class Videopress extends Hybrid_Product {
|
||||
return array(
|
||||
_x( '1TB of storage', 'VideoPress Product Feature', 'jetpack-my-jetpack' ),
|
||||
_x( 'Built into WordPress editor', 'VideoPress Product Feature', 'jetpack-my-jetpack' ),
|
||||
_x( 'Ad-free and brandable player', 'VideoPress Product Feature', 'jetpack-my-jetpack' ),
|
||||
_x( 'Ad-free and customizable player', 'VideoPress Product Feature', 'jetpack-my-jetpack' ),
|
||||
_x( 'Unlimited users', 'VideoPress Product Feature', 'jetpack-my-jetpack' ),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user