Version Description
- 21 July 2016 =
- Compatibility updates for Jetpack 4.1
Download this release
Release Info
| Developer | Viper007Bond |
| Plugin | |
| Version | 1.8.4 |
| Comparing to | |
| See all releases | |
Code changes from version 1.8.3 to 1.8.4
- readme.txt +5 -2
- vaultpress.php +45 -8
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: automattic, apokalyptik, briancolinger, josephscott, shaunandrews, xknown, thingalon
|
| 3 |
Tags: security, malware, virus, archive, back up, back ups, backup, backups, scanning, restore, wordpress backup, site backup, website backup
|
| 4 |
Requires at least: 3.2
|
| 5 |
-
Tested up to: 4.
|
| 6 |
-
Stable tag: 1.8.
|
| 7 |
License: GPLv2
|
| 8 |
|
| 9 |
VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
|
|
@@ -51,6 +51,9 @@ A VaultPress subscription is for a single WordPress site. You can purchase addit
|
|
| 51 |
Yes, VaultPress supports Multisite installs. Each site will require its own subscription.
|
| 52 |
|
| 53 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
| 54 |
= 1.8.3 - 26 May 2016 =
|
| 55 |
* Security: Hotfix for certain versions of Jetpack
|
| 56 |
|
| 2 |
Contributors: automattic, apokalyptik, briancolinger, josephscott, shaunandrews, xknown, thingalon
|
| 3 |
Tags: security, malware, virus, archive, back up, back ups, backup, backups, scanning, restore, wordpress backup, site backup, website backup
|
| 4 |
Requires at least: 3.2
|
| 5 |
+
Tested up to: 4.6
|
| 6 |
+
Stable tag: 1.8.4
|
| 7 |
License: GPLv2
|
| 8 |
|
| 9 |
VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
|
| 51 |
Yes, VaultPress supports Multisite installs. Each site will require its own subscription.
|
| 52 |
|
| 53 |
== Changelog ==
|
| 54 |
+
= 1.8.4 - 21 July 2016 =
|
| 55 |
+
* Compatibility updates for Jetpack 4.1
|
| 56 |
+
|
| 57 |
= 1.8.3 - 26 May 2016 =
|
| 58 |
* Security: Hotfix for certain versions of Jetpack
|
| 59 |
|
vaultpress.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: VaultPress
|
| 4 |
* Plugin URI: http://vaultpress.com/?utm_source=plugin-uri&utm_medium=plugin-description&utm_campaign=1.0
|
| 5 |
* Description: Protect your content, themes, plugins, and settings with <strong>realtime backup</strong> and <strong>automated security scanning</strong> from <a href="http://vaultpress.com/?utm_source=wp-admin&utm_medium=plugin-description&utm_campaign=1.0" rel="nofollow">VaultPress</a>. Activate, enter your registration key, and never worry again. <a href="http://vaultpress.com/help/?utm_source=wp-admin&utm_medium=plugin-description&utm_campaign=1.0" rel="nofollow">Need some help?</a>
|
| 6 |
-
* Version: 1.8.
|
| 7 |
* Author: Automattic
|
| 8 |
* Author URI: http://vaultpress.com/?utm_source=author-uri&utm_medium=plugin-description&utm_campaign=1.0
|
| 9 |
* License: GPL2+
|
|
@@ -18,7 +18,7 @@ class VaultPress {
|
|
| 18 |
var $option_name = 'vaultpress';
|
| 19 |
var $auto_register_option = 'vaultpress_auto_register';
|
| 20 |
var $db_version = 4;
|
| 21 |
-
var $plugin_version = '1.8.
|
| 22 |
|
| 23 |
function __construct() {
|
| 24 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
|
@@ -1073,10 +1073,10 @@ class VaultPress {
|
|
| 1073 |
// Update local cache of VP plan settings, based on a ping or connection test result
|
| 1074 |
function update_plan_settings( $message ) {
|
| 1075 |
if ( array_key_exists( 'do_backups', $message ) )
|
| 1076 |
-
$this->update_option( 'do_not_backup', ( false === $message['do_backups'] ) || ( '' === $message['do_backups'] ) );
|
| 1077 |
|
| 1078 |
if ( array_key_exists( 'do_backup_pings', $message ) )
|
| 1079 |
-
$this->update_option( 'do_not_send_backup_pings', ( false === $message['do_backup_pings'] ) || ( '' === $message['do_backup_pings'] ) );
|
| 1080 |
}
|
| 1081 |
|
| 1082 |
function check_connection( $force_check = false ) {
|
|
@@ -2258,7 +2258,7 @@ JS;
|
|
| 2258 |
* Sync the VaultPress options to WordPress.com if the Jetpack plugin is active.
|
| 2259 |
*/
|
| 2260 |
function sync_jetpack_options() {
|
| 2261 |
-
if ( class_exists( 'Jetpack_Sync' ) ) {
|
| 2262 |
Jetpack_Sync::sync_options( __FILE__, $this->auto_register_option, $this->option_name );
|
| 2263 |
}
|
| 2264 |
}
|
|
@@ -2284,7 +2284,7 @@ JS;
|
|
| 2284 |
* This should only be run when the option is updated from the Jetpack/WP.com
|
| 2285 |
* API call, and only if the new key is different than the old key.
|
| 2286 |
*
|
| 2287 |
-
* @param mixed $old_value The old option value.
|
| 2288 |
* @param mixed $value The new option value.
|
| 2289 |
*/
|
| 2290 |
function updated_auto_register_option( $old_value, $value ) {
|
|
@@ -2293,8 +2293,45 @@ JS;
|
|
| 2293 |
return;
|
| 2294 |
}
|
| 2295 |
|
| 2296 |
-
$this->
|
| 2297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2298 |
}
|
| 2299 |
|
| 2300 |
function add_global_actions_and_filters() {
|
| 3 |
* Plugin Name: VaultPress
|
| 4 |
* Plugin URI: http://vaultpress.com/?utm_source=plugin-uri&utm_medium=plugin-description&utm_campaign=1.0
|
| 5 |
* Description: Protect your content, themes, plugins, and settings with <strong>realtime backup</strong> and <strong>automated security scanning</strong> from <a href="http://vaultpress.com/?utm_source=wp-admin&utm_medium=plugin-description&utm_campaign=1.0" rel="nofollow">VaultPress</a>. Activate, enter your registration key, and never worry again. <a href="http://vaultpress.com/help/?utm_source=wp-admin&utm_medium=plugin-description&utm_campaign=1.0" rel="nofollow">Need some help?</a>
|
| 6 |
+
* Version: 1.8.4
|
| 7 |
* Author: Automattic
|
| 8 |
* Author URI: http://vaultpress.com/?utm_source=author-uri&utm_medium=plugin-description&utm_campaign=1.0
|
| 9 |
* License: GPL2+
|
| 18 |
var $option_name = 'vaultpress';
|
| 19 |
var $auto_register_option = 'vaultpress_auto_register';
|
| 20 |
var $db_version = 4;
|
| 21 |
+
var $plugin_version = '1.8.4';
|
| 22 |
|
| 23 |
function __construct() {
|
| 24 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
| 1073 |
// Update local cache of VP plan settings, based on a ping or connection test result
|
| 1074 |
function update_plan_settings( $message ) {
|
| 1075 |
if ( array_key_exists( 'do_backups', $message ) )
|
| 1076 |
+
$this->update_option( 'do_not_backup', ( false === $message['do_backups'] ) || ( '0' === $message['do_backups'] ) );
|
| 1077 |
|
| 1078 |
if ( array_key_exists( 'do_backup_pings', $message ) )
|
| 1079 |
+
$this->update_option( 'do_not_send_backup_pings', ( false === $message['do_backup_pings'] ) || ( '0' === $message['do_backup_pings'] ) );
|
| 1080 |
}
|
| 1081 |
|
| 1082 |
function check_connection( $force_check = false ) {
|
| 2258 |
* Sync the VaultPress options to WordPress.com if the Jetpack plugin is active.
|
| 2259 |
*/
|
| 2260 |
function sync_jetpack_options() {
|
| 2261 |
+
if ( class_exists( 'Jetpack_Sync' ) && method_exists( 'Jetpack_Sync', 'sync_options' ) && defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '4.1', '<' ) ) {
|
| 2262 |
Jetpack_Sync::sync_options( __FILE__, $this->auto_register_option, $this->option_name );
|
| 2263 |
}
|
| 2264 |
}
|
| 2284 |
* This should only be run when the option is updated from the Jetpack/WP.com
|
| 2285 |
* API call, and only if the new key is different than the old key.
|
| 2286 |
*
|
| 2287 |
+
* @param mixed $old_value The old option value, or the option name (if add_option).
|
| 2288 |
* @param mixed $value The new option value.
|
| 2289 |
*/
|
| 2290 |
function updated_auto_register_option( $old_value, $value ) {
|
| 2293 |
return;
|
| 2294 |
}
|
| 2295 |
|
| 2296 |
+
remove_action( "update_option_{$this->auto_register_option}", array( $this, 'updated_auto_register_option' ) );
|
| 2297 |
+
|
| 2298 |
+
$defaults = array(
|
| 2299 |
+
'key' => false,
|
| 2300 |
+
'action' => 'register', // or `response`
|
| 2301 |
+
'status' => 'working',
|
| 2302 |
+
'error' => false,
|
| 2303 |
+
);
|
| 2304 |
+
|
| 2305 |
+
// `wp_parse_args` uses arrays, might as well be explicit about it.
|
| 2306 |
+
$registration = (array) json_decode( $value );
|
| 2307 |
+
$registration = wp_parse_args( $registration, $defaults );
|
| 2308 |
+
|
| 2309 |
+
// If we have a working connection, don't update the key.
|
| 2310 |
+
if ( $this->check_connection( true ) ) {
|
| 2311 |
+
$registration['action'] = 'response';
|
| 2312 |
+
$registration['error'] = 'VaultPress is already registered on this site.';
|
| 2313 |
+
update_option( $this->auto_register_option, json_encode( $registration ) );
|
| 2314 |
+
return;
|
| 2315 |
+
}
|
| 2316 |
+
|
| 2317 |
+
if ( ! $registration['key'] ) {
|
| 2318 |
+
return;
|
| 2319 |
+
}
|
| 2320 |
+
|
| 2321 |
+
$registration['action'] = 'response';
|
| 2322 |
+
|
| 2323 |
+
$response = $this->register( $registration['key'] );
|
| 2324 |
+
if ( is_wp_error( $response ) ) {
|
| 2325 |
+
$registration['status'] = 'broken';
|
| 2326 |
+
$registration['error'] = $response->get_error_message();
|
| 2327 |
+
} else if ( $this->get_option( 'connection_error_code' ) ) {
|
| 2328 |
+
$registration['status'] = 'broken';
|
| 2329 |
+
$registration['error'] = $this->get_option( 'connection_error_message' );
|
| 2330 |
+
} else {
|
| 2331 |
+
$registration['error'] = false;
|
| 2332 |
+
}
|
| 2333 |
+
|
| 2334 |
+
update_option( $this->auto_register_option, json_encode( $registration ) );
|
| 2335 |
}
|
| 2336 |
|
| 2337 |
function add_global_actions_and_filters() {
|
