VaultPress - Version 1.8.1

Version Description

  • 29 Mar 2016 =
  • Improved support for WooCommerce live backups.
  • Bugfix: Avoid cloning the 'vaultpress' option between Multisite instances.
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 VaultPress
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8.0 to 1.8.1

Files changed (3) hide show
  1. class.vaultpress-database.php +7 -2
  2. readme.txt +6 -2
  3. vaultpress.php +20 -6
class.vaultpress-database.php CHANGED
@@ -32,8 +32,13 @@ class VaultPress_Database {
32
  $table = esc_sql( $this->table );
33
  $results = $wpdb->get_row( "SHOW CREATE TABLE `$table`" );
34
  $want = 'Create Table';
35
- if ( $results )
36
- $results = $results->$want;
 
 
 
 
 
37
  return $results;
38
  }
39
 
32
  $table = esc_sql( $this->table );
33
  $results = $wpdb->get_row( "SHOW CREATE TABLE `$table`" );
34
  $want = 'Create Table';
35
+ if ( $results ) {
36
+ if ( isset( $results->$want ) ) {
37
+ $results = $results->$want;
38
+ } else {
39
+ $results = false;
40
+ }
41
+ }
42
  return $results;
43
  }
44
 
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.4
6
- Stable tag: 1.7.9
7
  License: GPLv2
8
 
9
  VaultPress is a subscription service offering realtime backup, automated security scanning, and support from WordPress experts.
@@ -51,6 +51,10 @@ 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.0 - 7 Mar 2016 =
55
  * Add support for an upcoming ability to have the Jetpack plugin manage registering the VaultPress plugin and entering the required API key. Gone will be the days of needing to copy/paste it!
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.5
6
+ Stable tag: 1.8.1
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.1 - 29 Mar 2016 =
55
+ * Improved support for WooCommerce live backups.
56
+ * Bugfix: Avoid cloning the 'vaultpress' option between Multisite instances.
57
+
58
  = 1.8.0 - 7 Mar 2016 =
59
  * Add support for an upcoming ability to have the Jetpack plugin manage registering the VaultPress plugin and entering the required API key. Gone will be the days of needing to copy/paste it!
60
 
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&amp;utm_medium=plugin-description&amp;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&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">Need some help?</a>
6
- * Version: 1.8.0
7
  * Author: Automattic
8
  * Author URI: http://vaultpress.com/?utm_source=author-uri&amp;utm_medium=plugin-description&amp;utm_campaign=1.0
9
  * License: GPL2+
@@ -18,12 +18,13 @@ 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.0';
22
 
23
  function __construct() {
24
  register_activation_hook( __FILE__, array( $this, 'activate' ) );
25
  register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
26
 
 
27
  $options = get_option( $this->option_name );
28
  if ( !is_array( $options ) )
29
  $options = array();
@@ -194,6 +195,11 @@ class VaultPress {
194
  }
195
 
196
  function update_options() {
 
 
 
 
 
197
  update_option( $this->option_name, $this->options );
198
  }
199
 
@@ -820,7 +826,11 @@ class VaultPress {
820
  }
821
 
822
  // WooCommerce notifications
823
- function woocommerce_tax_rate_handler( $id ) { $this->generic_change_handler( 'woocommerce_tax_rates', array( 'tax_rate_id' => $id ) ); }
 
 
 
 
824
  function woocommerce_order_item_handler( $id ) { $this->generic_change_handler( 'woocommerce_order_items', array( 'order_item_id' => $id ) ); }
825
  function woocommerce_order_item_meta_handler( $id ) { $this->generic_change_handler( 'woocommerce_order_itemmeta', array( 'meta_id' => $id ) ); }
826
  function woocommerce_attribute_handler( $id ) { $this->generic_change_handler( 'woocommerce_attribute_taxonomies', array( 'attribute_id' => $id ) ); }
@@ -828,6 +838,10 @@ class VaultPress {
828
  function generic_change_handler( $table, $key ) {
829
  $this->add_ping( 'db', array( $table => $key ) );
830
  }
 
 
 
 
831
 
832
  function verify_table( $table ) {
833
  global $wpdb;
@@ -1770,9 +1784,9 @@ JS;
1770
  $args['cause_user_id'] = -1;
1771
  $args['cause_user_login'] = '';
1772
  }
1773
- $args['cause_ip'] = $_SERVER['REMOTE_ADDR'];
1774
- $args['cause_uri'] = $_SERVER['REQUEST_URI'];
1775
- $args['cause_method'] = $_SERVER['REQUEST_METHOD'];
1776
  // End audit trail breadcrumbs
1777
 
1778
  $args['version'] = $this->plugin_version;
3
  * Plugin Name: VaultPress
4
  * Plugin URI: http://vaultpress.com/?utm_source=plugin-uri&amp;utm_medium=plugin-description&amp;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&amp;utm_medium=plugin-description&amp;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&amp;utm_medium=plugin-description&amp;utm_campaign=1.0" rel="nofollow">Need some help?</a>
6
+ * Version: 1.8.1
7
  * Author: Automattic
8
  * Author URI: http://vaultpress.com/?utm_source=author-uri&amp;utm_medium=plugin-description&amp;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.1';
22
 
23
  function __construct() {
24
  register_activation_hook( __FILE__, array( $this, 'activate' ) );
25
  register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
26
 
27
+ $this->options_blog_id = get_current_blog_id();
28
  $options = get_option( $this->option_name );
29
  if ( !is_array( $options ) )
30
  $options = array();
195
  }
196
 
197
  function update_options() {
198
+ // Avoid overwriting the VaultPress option if current blog_id has changed since reading it
199
+ if ( get_current_blog_id() !== $this->options_blog_id ) {
200
+ return;
201
+ }
202
+
203
  update_option( $this->option_name, $this->options );
204
  }
205
 
826
  }
827
 
828
  // WooCommerce notifications
829
+ function woocommerce_tax_rate_handler( $id ) {
830
+ $this->generic_change_handler( 'woocommerce_tax_rates', array( 'tax_rate_id' => $id ) );
831
+ $this->block_change_handler( 'woocommerce_tax_rate_locations', array( 'tax_rate_id' => $id ) );
832
+ }
833
+
834
  function woocommerce_order_item_handler( $id ) { $this->generic_change_handler( 'woocommerce_order_items', array( 'order_item_id' => $id ) ); }
835
  function woocommerce_order_item_meta_handler( $id ) { $this->generic_change_handler( 'woocommerce_order_itemmeta', array( 'meta_id' => $id ) ); }
836
  function woocommerce_attribute_handler( $id ) { $this->generic_change_handler( 'woocommerce_attribute_taxonomies', array( 'attribute_id' => $id ) ); }
838
  function generic_change_handler( $table, $key ) {
839
  $this->add_ping( 'db', array( $table => $key ) );
840
  }
841
+
842
+ function block_change_handler( $table, $query ) {
843
+ $this->add_ping( 'db', array( "bulk~{$table}" => $query ) );
844
+ }
845
 
846
  function verify_table( $table ) {
847
  global $wpdb;
1784
  $args['cause_user_id'] = -1;
1785
  $args['cause_user_login'] = '';
1786
  }
1787
+ $args['cause_ip'] = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null ;
1788
+ $args['cause_uri'] = isset( $_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
1789
+ $args['cause_method'] = isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : null;
1790
  // End audit trail breadcrumbs
1791
 
1792
  $args['version'] = $this->plugin_version;