The WP Remote WordPress Plugin - Version 2.4.13

Version Description

Download this release

Release Info

Developer willmot
Plugin Icon 128x128 The WP Remote WordPress Plugin
Version 2.4.13
Comparing to
See all releases

Code changes from version 2.4.12 to 2.4.13

Files changed (5) hide show
  1. plugin.php +1 -1
  2. readme.txt +1 -1
  3. wprp.admin.php +1 -1
  4. wprp.backups.php +31 -2
  5. wprp.plugins.php +22 -1
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.4.12
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.4.13
7
  Author: Human Made Limited
8
  Author URI: http://hmn.md/
9
  */
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.5
6
- Stable tag: 2.4.12
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
 
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 2.9
5
  Tested up to: 3.5
6
+ Stable tag: 2.4.13
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
 
wprp.admin.php CHANGED
@@ -62,7 +62,7 @@ function wprp_api_key_added_admin_notice() {
62
  return; ?>
63
 
64
  <div id="wprp-message" class="updated">
65
- <p><strong>WP Remote API Key successfully added</strong>, close this page to go back to <a href="https://wpremote.com/app/">WP Remote</a>.</p>
66
  </div>
67
 
68
  <?php }
62
  return; ?>
63
 
64
  <div id="wprp-message" class="updated">
65
+ <p><strong>WP Remote API Key successfully added</strong>, close this window to go back to <a href="https://wpremote.com/app/">WP Remote</a>.</p>
66
  </div>
67
 
68
  <?php }
wprp.backups.php CHANGED
@@ -40,6 +40,8 @@ class WPRP_Backups {
40
  */
41
  public function getBackup() {
42
 
 
 
43
  $schedule = $this->getManualBackupSchedule();
44
 
45
  if ( $status = $schedule->get_status() )
@@ -47,9 +49,25 @@ class WPRP_Backups {
47
 
48
  $backup = reset( $schedule->get_backups() );
49
 
50
- if ( file_exists( $backup ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  return str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $backup );
52
 
 
 
53
  return new WP_Error( 'backup-failed', 'No backup was found' );
54
  }
55
 
@@ -171,15 +189,26 @@ class WPRP_Backup_Service extends HMBKP_Service {
171
  */
172
  public function action( $action ) {
173
 
 
 
174
  if ( $action == 'hmbkp_backup_complete' && strpos( $this->schedule->get_id(), 'wpremote' ) !== false ) {
175
 
176
  $file = $this->schedule->get_archive_filepath();
177
  $file_url = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $file );
178
  $api_url = WPR_API_URL . 'backups/upload';
179
 
180
- if ( ( require_once( ABSPATH . '/wp-admin/includes/misc.php' ) ) && got_mod_rewrite() && defined( 'HMBKP_SECURE_KEY' ) && HMBKP_SECURE_KEY )
 
181
  $file_url = add_query_arg( 'key', HMBKP_SECURE_KEY, $file_url );
182
 
 
 
 
 
 
 
 
 
183
  $args = array(
184
  'api_key' => get_option( 'wpr_api_key' ),
185
  'backup_url'=> $file_url,
40
  */
41
  public function getBackup() {
42
 
43
+ global $is_apache;
44
+
45
  $schedule = $this->getManualBackupSchedule();
46
 
47
  if ( $status = $schedule->get_status() )
49
 
50
  $backup = reset( $schedule->get_backups() );
51
 
52
+ if ( file_exists( $backup ) ) {
53
+
54
+ // Append the secret key on apache servers
55
+ if ( $is_apache && defined( 'HMBKP_SECURE_KEY' ) && HMBKP_SECURE_KEY ) {
56
+
57
+ $backup = add_query_arg( 'key', HMBKP_SECURE_KEY, $backup );
58
+
59
+ // Force the .htaccess to be rebuilt
60
+ if ( file_exists( hmbkp_path() . '/.htaccess' ) )
61
+ unlink( hmbkp_path() . '/.htaccess' );
62
+
63
+ hmbkp_path();
64
+
65
+ }
66
+
67
  return str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $backup );
68
 
69
+ }
70
+
71
  return new WP_Error( 'backup-failed', 'No backup was found' );
72
  }
73
 
189
  */
190
  public function action( $action ) {
191
 
192
+ global $is_apache;
193
+
194
  if ( $action == 'hmbkp_backup_complete' && strpos( $this->schedule->get_id(), 'wpremote' ) !== false ) {
195
 
196
  $file = $this->schedule->get_archive_filepath();
197
  $file_url = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $file );
198
  $api_url = WPR_API_URL . 'backups/upload';
199
 
200
+ if ( $is_apache && defined( 'HMBKP_SECURE_KEY' ) && HMBKP_SECURE_KEY ) {
201
+
202
  $file_url = add_query_arg( 'key', HMBKP_SECURE_KEY, $file_url );
203
 
204
+ // Force the .htaccess to be rebuilt
205
+ if ( file_exists( hmbkp_path() . '/.htaccess' ) )
206
+ unlink( hmbkp_path() . '/.htaccess' );
207
+
208
+ hmbkp_path();
209
+
210
+ }
211
+
212
  $args = array(
213
  'api_key' => get_option( 'wpr_api_key' ),
214
  'backup_url'=> $file_url,
wprp.plugins.php CHANGED
@@ -192,7 +192,8 @@ function _wprp_get_non_extend_plugins_data() {
192
 
193
  return array(
194
  'gravity_forms' => '_wpr_get_gravity_form_plugin_data',
195
- 'backupbuddy' => '_wpr_get_backupbuddy_plugin_data'
 
196
  );
197
 
198
  }
@@ -243,4 +244,24 @@ function _wpr_get_backupbuddy_plugin_data() {
243
 
244
  return $update_data;
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  }
192
 
193
  return array(
194
  'gravity_forms' => '_wpr_get_gravity_form_plugin_data',
195
+ 'backupbuddy' => '_wpr_get_backupbuddy_plugin_data',
196
+ 'tribe_events_pro' => '_wpr_get_tribe_events_pro_plugin_data'
197
  );
198
 
199
  }
244
 
245
  return $update_data;
246
 
247
+ }
248
+
249
+ function _wpr_get_tribe_events_pro_plugin_data() {
250
+
251
+ if ( !class_exists( 'TribeEventsPro' ) || ! class_exists( 'PluginUpdateEngineChecker' ) )
252
+ return false;
253
+
254
+ $events = TribeEventsPro::instance();
255
+ $updater = new PluginUpdateEngineChecker( $events->updateUrl, $events->pluginSlug, array(), plugin_basename( $events->pluginPath . 'events-calendar-pro.php' ) );
256
+ $state = get_option( $updater->optionName );
257
+
258
+ if ( !is_a( $state->update, 'PluginUpdateUtility' ) )
259
+ return false;
260
+
261
+ if ( version_compare( $state->update->version, $updater->getInstalledVersion(), '<=' ) )
262
+ return false;
263
+
264
+ $update_data = $state->update->toWpFormat();
265
+ $update_data->plugin_location = $updater->pluginFile; // needed in _wpr_add_non_extend_plugin_support()
266
+
267
  }