The WP Remote WordPress Plugin - Version 2.7.9

Version Description

Download this release

Release Info

Developer bmett
Plugin Icon 128x128 The WP Remote WordPress Plugin
Version 2.7.9
Comparing to
See all releases

Code changes from version 2.7.8 to 2.7.9

Files changed (3) hide show
  1. plugin.php +1 -1
  2. readme.txt +7 -3
  3. wprp.api.php +9 -2
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.7.8
7
  Author: maekit
8
  Author URI: https://maek.it/
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.7.9
7
  Author: maekit
8
  Author URI: https://maek.it/
9
  */
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === The WP Remote WordPress Plugin ===
2
- Contributors: jeramynirodha, humanmade, willmot, joehoyle, danielbachhuber, mattheu, pauldewouters, cuvelier, tcrsavage
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 3.0
5
- Tested up to: 4.8
6
- Stable tag: 2.7.8
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
 
@@ -72,6 +72,10 @@ You can email us at support@wpremote.com for support.
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  #### 2.7.8 (20 July 2017)
76
 
77
  * Replaced mysql class and functions with mysqli
1
  === The WP Remote WordPress Plugin ===
2
+ Contributors: jeramynirodha, bmett, humanmade, willmot, joehoyle, danielbachhuber, mattheu, pauldewouters, cuvelier, tcrsavage
3
  Tags: wpremote, remote administration, multiple wordpress
4
  Requires at least: 3.0
5
+ Tested up to: 4.8.1
6
+ Stable tag: 2.7.9
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
 
72
 
73
  == Changelog ==
74
 
75
+ #### 2.7.9 (22 August 2017)
76
+
77
+ * Query DB to find an admin user to run updates
78
+
79
  #### 2.7.8 (20 July 2017)
80
 
81
  * Replaced mysql class and functions with mysqli
wprp.api.php CHANGED
@@ -84,8 +84,15 @@ global $wprp_noauth_nonce;
84
  $wprp_noauth_nonce = wp_create_nonce( 'wprp_calculate_backup_size' );
85
 
86
  // Log in as admin
87
- // TODO what about if admin use doesn't exists?
88
- wp_set_current_user( 1 );
 
 
 
 
 
 
 
89
 
90
  include_once ( ABSPATH . 'wp-admin/includes/admin.php' );
91
 
84
  $wprp_noauth_nonce = wp_create_nonce( 'wprp_calculate_backup_size' );
85
 
86
  // Log in as admin
87
+ $users_query = new WP_User_Query( array(
88
+ 'role' => 'administrator',
89
+ 'orderby' => 'ID'
90
+ ) );
91
+ foreach ($users_query->get_results() as $user) {
92
+ if (!$user) continue;
93
+ wp_set_current_user( $user->ID );
94
+ break;
95
+ }
96
 
97
  include_once ( ABSPATH . 'wp-admin/includes/admin.php' );
98