The WP Remote WordPress Plugin - Version 2.2.4

Version Description

Download this release

Release Info

Developer joehoyle
Plugin Icon 128x128 The WP Remote WordPress Plugin
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.2.3 to 2.2.4

Files changed (4) hide show
  1. hm-backup/hm-backup.php +6 -6
  2. plugin.php +64 -22
  3. readme.txt +7 -1
  4. wprp.backups.php +4 -1
hm-backup/hm-backup.php CHANGED
@@ -608,7 +608,7 @@ class WPR_HM_Backup {
608
  */
609
  public function backup() {
610
 
611
- $this->do_action( 'hmbkp_backup_started' );
612
 
613
  // Backup database
614
  if ( $this->get_type() !== 'file' )
@@ -617,7 +617,7 @@ class WPR_HM_Backup {
617
  // Zip everything up
618
  $this->archive();
619
 
620
- $this->do_action( 'hmbkp_backup_complete' );
621
 
622
  }
623
 
@@ -631,7 +631,7 @@ class WPR_HM_Backup {
631
  */
632
  public function dump_database() {
633
 
634
- $this->do_action( 'hmbkp_mysqldump_started' );
635
 
636
  if ( $this->get_mysqldump_command_path() )
637
  $this->mysqldump();
@@ -639,7 +639,7 @@ class WPR_HM_Backup {
639
  if ( empty( $this->mysqldump_verified ) )
640
  $this->mysqldump_fallback();
641
 
642
- $this->do_action( 'hmbkp_mysqldump_finished' );
643
 
644
  }
645
 
@@ -741,7 +741,7 @@ class WPR_HM_Backup {
741
  */
742
  public function archive() {
743
 
744
- $this->do_action( 'hmbkp_archive_started' );
745
 
746
  // Do we have the path to the zip command
747
  if ( $this->get_zip_command_path() )
@@ -759,7 +759,7 @@ class WPR_HM_Backup {
759
  if ( file_exists( $this->get_database_dump_filepath() ) )
760
  unlink( $this->get_database_dump_filepath() );
761
 
762
- $this->do_action( 'hmbkp_archive_finished' );
763
 
764
  }
765
 
608
  */
609
  public function backup() {
610
 
611
+ $this->do_action( 'wprhmbkp_backup_started' );
612
 
613
  // Backup database
614
  if ( $this->get_type() !== 'file' )
617
  // Zip everything up
618
  $this->archive();
619
 
620
+ $this->do_action( 'wprhmbkp_backup_complete' );
621
 
622
  }
623
 
631
  */
632
  public function dump_database() {
633
 
634
+ $this->do_action( 'wprhmbkp_mysqldump_started' );
635
 
636
  if ( $this->get_mysqldump_command_path() )
637
  $this->mysqldump();
639
  if ( empty( $this->mysqldump_verified ) )
640
  $this->mysqldump_fallback();
641
 
642
+ $this->do_action( 'wprhmbkp_mysqldump_finished' );
643
 
644
  }
645
 
741
  */
742
  public function archive() {
743
 
744
+ $this->do_action( 'wprhmbkp_archive_started' );
745
 
746
  // Do we have the path to the zip command
747
  if ( $this->get_zip_command_path() )
759
  if ( file_exists( $this->get_database_dump_filepath() ) )
760
  unlink( $this->get_database_dump_filepath() );
761
 
762
+ $this->do_action( 'wprhmbkp_archive_finished' );
763
 
764
  }
765
 
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>. Deactivate to clear your API Key.
6
- Version: 2.2.3
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  */
@@ -42,7 +42,7 @@ if ( version_compare( phpversion(), '5.2.4', '<' ) ) {
42
  require_once( WPRP_PLUGIN_PATH .'/wprp.admin.php' );
43
 
44
  // Backups require 3.1
45
- if ( version_compare( get_bloginfo( 'version' ), '3.1', '>=' ) && ! class_exists( 'HM_Backup' ) )
46
  require( WPRP_PLUGIN_PATH . '/hm-backup/hm-backup.php' );
47
 
48
  // Don't include when doing a core update
@@ -63,21 +63,13 @@ if ( empty( $_GET['action'] ) || $_GET['action'] != 'do-core-upgrade' ) :
63
  $this->feedback = $feedback;
64
  }
65
 
66
- function before() {
67
 
68
- }
69
-
70
- function after() {
71
 
72
- }
73
 
74
- function header() {
75
-
76
- }
77
-
78
- function footer() {
79
-
80
- }
81
 
82
  }
83
 
@@ -94,22 +86,37 @@ if ( empty( $_GET['action'] ) || $_GET['action'] != 'do-core-upgrade' ) :
94
  $this->feedback = $feedback;
95
  }
96
 
97
- function before() {
98
 
99
- }
100
 
101
- function after() {
102
 
103
- }
104
 
105
- function header() {
106
 
107
- }
108
 
109
- function footer() {
 
110
 
 
 
111
  }
112
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  }
114
 
115
  endif;
@@ -133,4 +140,39 @@ function wprp_catch_api_call() {
133
  exit;
134
 
135
  }
136
- add_action( 'init', 'wprp_catch_api_call', 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /*
4
  Plugin Name: WP Remote
5
  Description: Manage your WordPress site with <a href="https://wpremote.com/">WP Remote</a>. Deactivate to clear your API Key.
6
+ Version: 2.2.4
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  */
42
  require_once( WPRP_PLUGIN_PATH .'/wprp.admin.php' );
43
 
44
  // Backups require 3.1
45
+ if ( version_compare( get_bloginfo( 'version' ), '3.1', '>=' ) && ! class_exists( 'WPR_HM_Backup' ) )
46
  require( WPRP_PLUGIN_PATH . '/hm-backup/hm-backup.php' );
47
 
48
  // Don't include when doing a core update
63
  $this->feedback = $feedback;
64
  }
65
 
66
+ function before() { }
67
 
68
+ function after() { }
 
 
69
 
70
+ function header() { }
71
 
72
+ function footer() { }
 
 
 
 
 
 
73
 
74
  }
75
 
86
  $this->feedback = $feedback;
87
  }
88
 
89
+ function before() { }
90
 
91
+ function after() { }
92
 
93
+ function header() { }
94
 
95
+ function footer() { }
96
 
97
+ }
98
 
99
+ class WPRP_Core_Upgrader_Skin extends WP_Upgrader_Skin {
100
 
101
+ var $feedback;
102
+ var $error;
103
 
104
+ function error( $error ) {
105
+ $this->error = $error;
106
  }
107
 
108
+ function feedback( $feedback ) {
109
+ $this->feedback = $feedback;
110
+ }
111
+
112
+ function before() { }
113
+
114
+ function after() { }
115
+
116
+ function header() { }
117
+
118
+ function footer() { }
119
+
120
  }
121
 
122
  endif;
140
  exit;
141
 
142
  }
143
+ add_action( 'init', 'wprp_catch_api_call', 1 );
144
+
145
+ function _wprp_upgrade_core() {
146
+
147
+ include_once ( ABSPATH . 'wp-admin/includes/admin.php' );
148
+ include_once ( ABSPATH . 'wp-admin/includes/upgrade.php' );
149
+ include_once ( ABSPATH . 'wp-includes/update.php' );
150
+
151
+ $updates = get_core_updates();
152
+
153
+ if ( is_wp_error( $updates ) || ! $updates )
154
+ return new WP_Error( 'no-update-available' );
155
+
156
+ $update = reset( $updates );
157
+
158
+ if ( ! $update )
159
+ return new WP_Error( 'no-update-available' );
160
+
161
+ $skin = new WPRP_Core_Upgrader_Skin();
162
+
163
+ $upgrader = new Core_Upgrader( $skin );
164
+ $result = $upgrader->upgrade($update);
165
+
166
+ if ( is_wp_error( $result ) )
167
+ return $result;
168
+
169
+ global $wp_current_db_version, $wp_db_version;
170
+
171
+ // we have to include version.php so $wp_db_version
172
+ // will take the version of the updated version of wordpress
173
+ require( ABSPATH . WPINC . '/version.php' );
174
+
175
+ wp_upgrade();
176
+
177
+ return true;
178
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: humanmade, joehoyle, mattheu, tcrsavage, willmot
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 2.9
5
  Tested up to: 3.4.1
6
- Stable tag: 2.2.3
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
 
@@ -31,6 +31,12 @@ You can email us at support@wpremote.com for support.
31
 
32
  == Changelog ==
33
 
 
 
 
 
 
 
34
  #### 2.2.3
35
 
36
  * Use WPR_HM_Backup instead of HM_Backup (fixes compatibilty with backupwordpress)
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 2.9
5
  Tested up to: 3.4.1
6
+ Stable tag: 2.2.4
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
 
31
 
32
  == Changelog ==
33
 
34
+ #### 2.2.4
35
+
36
+ * Fixed excludes for backups directories
37
+ * Started on remote core upgrades
38
+ * Fix memory limit in WP 3.1
39
+
40
  #### 2.2.3
41
 
42
  * Use WPR_HM_Backup instead of HM_Backup (fixes compatibilty with backupwordpress)
wprp.backups.php CHANGED
@@ -66,8 +66,11 @@ function _wprp_backups_api_call( $action ) {
66
  if ( ! empty( $_REQUEST['backup_excludes'] ) ) {
67
 
68
  $excludes = array_map( 'urldecode', (array) $_REQUEST['backup_excludes'] );
69
- $backup->set_excludes( $excludes );
70
  }
 
 
 
71
 
72
  $backup->backup();
73
 
66
  if ( ! empty( $_REQUEST['backup_excludes'] ) ) {
67
 
68
  $excludes = array_map( 'urldecode', (array) $_REQUEST['backup_excludes'] );
69
+ $backup->set_excludes( $excludes, true );
70
  }
71
+
72
+ if ( function_exists( 'hmbkp_path' ) )
73
+ $backup->set_excludes( array( hmbkp_path() ), true );
74
 
75
  $backup->backup();
76