updated plugin Jetpack Protect
version 1.4.0
This commit is contained in:
@ -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).
|
||||
|
||||
## [1.17.0] - 2023-04-17
|
||||
### Changed
|
||||
- When Jetpack is available, `Modules::get()` no longer translates `module_tags`. Use Jetpack's `jetpack_get_module_i18n_tag()` function if you need translations. [#30067]
|
||||
|
||||
## [1.16.4] - 2023-04-10
|
||||
### Added
|
||||
- Add Jetpack Autoloader package suggestion. [#29988]
|
||||
|
||||
## [1.16.3] - 2023-03-28
|
||||
### Changed
|
||||
- Move brute force protection into WAF package. [#28401]
|
||||
|
||||
## [1.16.2] - 2023-02-20
|
||||
### Changed
|
||||
- Minor internal updates.
|
||||
@ -240,6 +252,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Packages: Introduce a status package
|
||||
|
||||
[1.17.0]: https://github.com/Automattic/jetpack-status/compare/v1.16.4...v1.17.0
|
||||
[1.16.4]: https://github.com/Automattic/jetpack-status/compare/v1.16.3...v1.16.4
|
||||
[1.16.3]: https://github.com/Automattic/jetpack-status/compare/v1.16.2...v1.16.3
|
||||
[1.16.2]: https://github.com/Automattic/jetpack-status/compare/v1.16.1...v1.16.2
|
||||
[1.16.1]: https://github.com/Automattic/jetpack-status/compare/v1.16.0...v1.16.1
|
||||
[1.16.0]: https://github.com/Automattic/jetpack-status/compare/v1.15.4...v1.16.0
|
||||
|
@ -4,12 +4,16 @@
|
||||
"type": "jetpack-library",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"automattic/jetpack-constants": "^1.6.21"
|
||||
"automattic/jetpack-constants": "^1.6.22"
|
||||
},
|
||||
"require-dev": {
|
||||
"brain/monkey": "2.6.1",
|
||||
"yoast/phpunit-polyfills": "1.0.4",
|
||||
"automattic/jetpack-changelogger": "^3.3.2"
|
||||
"automattic/jetpack-changelogger": "^3.3.2",
|
||||
"automattic/jetpack-ip": "^0.1.2"
|
||||
},
|
||||
"suggest": {
|
||||
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
@ -33,7 +37,7 @@
|
||||
"link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-trunk": "1.16.x-dev"
|
||||
"dev-trunk": "1.17.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
namespace Automattic\Jetpack;
|
||||
|
||||
use Automattic\Jetpack\Constants as Constants;
|
||||
use Automattic\Jetpack\IP\Utils as IP_Utils;
|
||||
|
||||
/**
|
||||
* Class Automattic\Jetpack\Modules
|
||||
@ -79,9 +80,8 @@ class Modules {
|
||||
if ( $mod['module_tags'] ) {
|
||||
$mod['module_tags'] = explode( ',', $mod['module_tags'] );
|
||||
$mod['module_tags'] = array_map( 'trim', $mod['module_tags'] );
|
||||
$mod['module_tags'] = array_map( 'jetpack_get_module_i18n_tag', $mod['module_tags'] );
|
||||
} else {
|
||||
$mod['module_tags'] = array( jetpack_get_module_i18n_tag( 'Other' ) );
|
||||
$mod['module_tags'] = array( 'Other' );
|
||||
}
|
||||
|
||||
if ( $mod['plan_classes'] ) {
|
||||
@ -95,7 +95,7 @@ class Modules {
|
||||
$mod['feature'] = explode( ',', $mod['feature'] );
|
||||
$mod['feature'] = array_map( 'trim', $mod['feature'] );
|
||||
} else {
|
||||
$mod['feature'] = array( jetpack_get_module_i18n_tag( 'Other' ) );
|
||||
$mod['feature'] = array( 'Other' );
|
||||
}
|
||||
|
||||
$modules_details[ $module ] = $mod;
|
||||
@ -434,9 +434,8 @@ class Modules {
|
||||
}
|
||||
|
||||
// Protect won't work with mis-configured IPs.
|
||||
if ( 'protect' === $module && Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) {
|
||||
include_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php';
|
||||
if ( ! jetpack_protect_get_ip() ) {
|
||||
if ( 'protect' === $module ) {
|
||||
if ( ! IP_Utils::get_ip() ) {
|
||||
$state->state( 'message', 'protect_misconfigured_ip' );
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user