The WP Remote WordPress Plugin - Version 2.6.7

Version Description

Download this release

Release Info

Developer danielbachhuber
Plugin Icon 128x128 The WP Remote WordPress Plugin
Version 2.6.7
Comparing to
See all releases

Code changes from version 2.6.6 to 2.6.7

Files changed (5) hide show
  1. plugin.php +1 -1
  2. readme.txt +6 -1
  3. wprp.api.php +21 -2
  4. wprp.backups.php +2 -28
  5. wprp.plugins.php +2 -4
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: WP Remote
5
  Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>. <strong>Deactivate to clear your API Key.</strong>
6
- Version: 2.6.6
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  */
3
  /*
4
  Plugin Name: WP Remote
5
  Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>. <strong>Deactivate to clear your API Key.</strong>
6
+ Version: 2.6.7
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  */
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: humanmade, willmot, joehoyle, danielbachhuber, mattheu, pauldewout
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 3.0
5
  Tested up to: 3.7
6
- Stable tag: 2.6.6
7
 
8
  WP Remote is a free web app that enables you to easily manage all of your WordPress powered sites from one place.
9
 
@@ -37,6 +37,11 @@ You can email us at support@wpremote.com for support.
37
 
38
  == Changelog ==
39
 
 
 
 
 
 
40
  #### 2.6.6 (23 October 2013)
41
 
42
  * Bug fix: Due to some files moving around, WP Remote wasn't able to properly update the current version of the plugin.
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 3.0
5
  Tested up to: 3.7
6
+ Stable tag: 2.6.7
7
 
8
  WP Remote is a free web app that enables you to easily manage all of your WordPress powered sites from one place.
9
 
37
 
38
  == Changelog ==
39
 
40
+ #### 2.6.7 (27 October 2013)
41
+
42
+ * API improvement: specify database- and file-only backups
43
+ * Bug fix: Make the backup download URL accessible on Apache servers again. The protective .htaccess was being generated with the wrong key.
44
+
45
  #### 2.6.6 (23 October 2013)
46
 
47
  * Bug fix: Due to some files moving around, WP Remote wasn't able to properly update the current version of the plugin.
wprp.api.php CHANGED
@@ -210,10 +210,29 @@ foreach( WPR_API_Request::get_actions() as $action ) {
210
  break;
211
 
212
  case 'do_backup' :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  case 'delete_backup' :
 
 
 
 
 
214
  case 'supports_backups' :
215
- case 'get_backup' :
216
- $actions[$action] = function_exists( '_wprp_get_backups_info' ) ? _wprp_backups_api_call( $action ) : 'not-implemented';
217
 
218
  break;
219
 
210
  break;
211
 
212
  case 'do_backup' :
213
+
214
+ if ( in_array( WPR_API_Request::get_arg( 'backup_type' ), array( 'complete', 'database', 'file' ) ) )
215
+ WPRP_Backups::get_instance()->set_type( WPR_API_Request::get_arg( 'backup_type' ) );
216
+
217
+ $actions[$action] = WPRP_Backups::get_instance()->do_backup();
218
+
219
+ break;
220
+
221
+ case 'get_backup' :
222
+
223
+ $actions[$action] = WPRP_Backups::get_instance()->get_backup();
224
+
225
+ break;
226
+
227
  case 'delete_backup' :
228
+
229
+ $actions[$action] = WPRP_Backups::get_instance()->cleanup();
230
+
231
+ break;
232
+
233
  case 'supports_backups' :
234
+
235
+ $actions[$action] = true;
236
 
237
  break;
238
 
wprp.backups.php CHANGED
@@ -365,8 +365,8 @@ class WPRP_Backups extends WPRP_HM_Backup {
365
 
366
  shuffle( $key );
367
 
368
- return md5( serialize( $key ) );
369
-
370
  }
371
 
372
  /**
@@ -475,32 +475,6 @@ class WPRP_Backups extends WPRP_HM_Backup {
475
 
476
  }
477
 
478
- /**
479
- * Handle the backups API calls
480
- *
481
- * @param string $action
482
- * @return bool|string|true|void|WP_Error
483
- */
484
- function _wprp_backups_api_call( $action ) {
485
-
486
- switch( $action ) {
487
-
488
- case 'supports_backups' :
489
- return true;
490
-
491
- case 'do_backup' :
492
- return WPRP_Backups::get_instance()->do_backup();
493
-
494
- case 'get_backup' :
495
- return WPRP_Backups::get_instance()->get_backup();
496
-
497
- case 'delete_backup' :
498
- return WPRP_Backups::get_instance()->cleanup();
499
-
500
- }
501
-
502
- }
503
-
504
  /**
505
  * Return an array of back meta information
506
  *
365
 
366
  shuffle( $key );
367
 
368
+ $this->key = md5( serialize( $key ) );
369
+ return $this->key;
370
  }
371
 
372
  /**
475
 
476
  }
477
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  /**
479
  * Return an array of back meta information
480
  *
wprp.plugins.php CHANGED
@@ -167,10 +167,8 @@ function _wprp_deactivate_plugin( $plugin ) {
167
 
168
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
169
 
170
- $result = deactivate_plugins( $plugin );
171
-
172
- if ( is_wp_error( $result ) )
173
- return array( 'status' => 'error', 'error' => $result->get_error_code() );
174
 
175
  return array( 'status' => 'success' );
176
  }
167
 
168
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
169
 
170
+ if ( is_plugin_active( $plugin ) )
171
+ deactivate_plugins( $plugin );
 
 
172
 
173
  return array( 'status' => 'success' );
174
  }