updated plugin Jetpack Protect
version 2.1.0
This commit is contained in:
@ -5,6 +5,22 @@ 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.4] - 2024-03-18
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.2.3] - 2024-03-14
|
||||
### Changed
|
||||
- Internal updates.
|
||||
|
||||
## [0.2.2] - 2024-02-27
|
||||
### Added
|
||||
- Increasing backup version for new endpoint [#35649]
|
||||
|
||||
## [0.2.1] - 2024-02-08
|
||||
### Fixed
|
||||
- Write helper script to ABSPATH by default, just like we did before [#35508]
|
||||
|
||||
## [0.2.0] - 2024-01-04
|
||||
### Fixed
|
||||
- Backup: Add namespace versioning to Helper_Script_Manager and other classes. [#34739]
|
||||
@ -13,4 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
- Initial release (improved helper script installer logging). [#34297]
|
||||
|
||||
[0.2.4]: https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v0.2.3...v0.2.4
|
||||
[0.2.3]: https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v0.2.2...v0.2.3
|
||||
[0.2.2]: https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v0.2.1...v0.2.2
|
||||
[0.2.1]: https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v0.1.0...v0.2.0
|
||||
|
@ -8,7 +8,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"yoast/phpunit-polyfills": "1.1.0",
|
||||
"automattic/jetpack-changelogger": "^4.0.5",
|
||||
"automattic/jetpack-changelogger": "^4.1.2",
|
||||
"automattic/wordbless": "@dev"
|
||||
},
|
||||
"suggest": {
|
||||
|
@ -9,7 +9,7 @@
|
||||
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
|
||||
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
|
||||
// are installed, or in some other cases).
|
||||
namespace Automattic\Jetpack\Backup\V0001;
|
||||
namespace Automattic\Jetpack\Backup\V0003;
|
||||
|
||||
use Exception;
|
||||
use WP_Error;
|
||||
@ -123,9 +123,21 @@ class Helper_Script_Manager_Impl {
|
||||
|
||||
$locations = array();
|
||||
|
||||
// Prioritize trying to write to "wp-content/" and "wp-content/uploads/" first, because those locations are
|
||||
// expected to be writable more often (unlike ABSPATH), and ABSPATH on some setups might have a weird value
|
||||
// which doesn't point to document root.
|
||||
// Prioritize ABSPATH first, because even though ABSPATH constant's value might be weird sometimes, it's the
|
||||
// path where the PHP scripts will be most likely be able to get executed.
|
||||
|
||||
try {
|
||||
if ( Throw_On_Errors::t_is_dir( ABSPATH ) ) {
|
||||
$abspath_dir = Throw_On_Errors::t_realpath( ABSPATH );
|
||||
$locations[ $abspath_dir ] = $abspath_url;
|
||||
}
|
||||
} catch ( Exception $exception ) {
|
||||
$locations[ ABSPATH ] = new WP_Error(
|
||||
'abspath_missing',
|
||||
'Unable to access WordPress root "' . ABSPATH . '": ' . $exception->getMessage(),
|
||||
array( 'status' => 500 )
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
if ( Throw_On_Errors::t_is_dir( WP_CONTENT_DIR ) ) {
|
||||
@ -180,19 +192,6 @@ class Helper_Script_Manager_Impl {
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
if ( Throw_On_Errors::t_is_dir( ABSPATH ) ) {
|
||||
$abspath_dir = Throw_On_Errors::t_realpath( ABSPATH );
|
||||
$locations[ $abspath_dir ] = $abspath_url;
|
||||
}
|
||||
} catch ( Exception $exception ) {
|
||||
$locations[ ABSPATH ] = new WP_Error(
|
||||
'abspath_missing',
|
||||
'Unable to access WordPress root "' . ABSPATH . '": ' . $exception->getMessage(),
|
||||
array( 'status' => 500 )
|
||||
);
|
||||
}
|
||||
|
||||
return $locations;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
|
||||
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
|
||||
// are installed, or in some other cases).
|
||||
namespace Automattic\Jetpack\Backup\V0001;
|
||||
namespace Automattic\Jetpack\Backup\V0003;
|
||||
|
||||
/**
|
||||
* Manage installation, deletion and cleanup of Helper Scripts to assist with backing up Jetpack Sites.
|
||||
|
@ -8,7 +8,7 @@
|
||||
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
|
||||
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
|
||||
// are installed, or in some other cases).
|
||||
namespace Automattic\Jetpack\Backup\V0001;
|
||||
namespace Automattic\Jetpack\Backup\V0003;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
@ -57,7 +57,7 @@ class Throw_On_Errors {
|
||||
* @param int|null $errline Line number where the error was raised.
|
||||
* @param array|null $errcontext Deprecated, unused.
|
||||
*
|
||||
* @return mixed
|
||||
* @return never
|
||||
* @throws Exception
|
||||
*/
|
||||
// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||
|
Reference in New Issue
Block a user