Version Description
Download this release
Release Info
| Developer | willmot |
| Plugin | |
| Version | 0.6.5 |
| Comparing to | |
| See all releases | |
Code changes from version 0.6 to 0.6.5
- plugin.php +1 -1
- readme.txt +1 -1
- wpr.api.php +11 -0
plugin.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/*
|
| 4 |
Plugin Name: WP Remote
|
| 5 |
Description: Extends the functionality of <a href="http://www.wpremote.com">WP Remote</a>.
|
| 6 |
-
Version: 0.6
|
| 7 |
Author: willmot
|
| 8 |
Author URI: http://humanmade.co.uk/
|
| 9 |
*/
|
| 3 |
/*
|
| 4 |
Plugin Name: WP Remote
|
| 5 |
Description: Extends the functionality of <a href="http://www.wpremote.com">WP Remote</a>.
|
| 6 |
+
Version: 0.6.5
|
| 7 |
Author: willmot
|
| 8 |
Author URI: http://humanmade.co.uk/
|
| 9 |
*/
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: willmot, joehoyle
|
|
| 3 |
Tags: wpremote, remote, xmlrpc
|
| 4 |
Requires at least: 2.7
|
| 5 |
Tested up to: 3.0.4
|
| 6 |
-
Stable tag: 0.6
|
| 7 |
|
| 8 |
Adds extra functionality for use with WP Remote
|
| 9 |
|
| 3 |
Tags: wpremote, remote, xmlrpc
|
| 4 |
Requires at least: 2.7
|
| 5 |
Tested up to: 3.0.4
|
| 6 |
+
Stable tag: 0.6.5
|
| 7 |
|
| 8 |
Adds extra functionality for use with WP Remote
|
| 9 |
|
wpr.api.php
CHANGED
|
@@ -97,6 +97,7 @@ function _wpr_upgrade_plugin( $plugin ) {
|
|
| 97 |
|
| 98 |
$skin = new WPR_Upgrader_Skin();
|
| 99 |
$upgrader = new Plugin_Upgrader( $skin );
|
|
|
|
| 100 |
|
| 101 |
ob_start();
|
| 102 |
$result = $upgrader->upgrade( $plugin );
|
|
@@ -111,12 +112,22 @@ function _wpr_upgrade_plugin( $plugin ) {
|
|
| 111 |
|
| 112 |
if( $skin->error )
|
| 113 |
return array( 'status' => 'error', 'error' => $skin->error );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
return array( 'status' => 'success' );
|
| 116 |
|
| 117 |
}
|
| 118 |
|
| 119 |
function _wpr_supports_plugin_upgrade() {
|
|
|
|
|
|
|
| 120 |
return class_exists( 'Plugin_Upgrader' );
|
| 121 |
|
| 122 |
}
|
| 97 |
|
| 98 |
$skin = new WPR_Upgrader_Skin();
|
| 99 |
$upgrader = new Plugin_Upgrader( $skin );
|
| 100 |
+
$is_active = is_plugin_active( $plugin );
|
| 101 |
|
| 102 |
ob_start();
|
| 103 |
$result = $upgrader->upgrade( $plugin );
|
| 112 |
|
| 113 |
if( $skin->error )
|
| 114 |
return array( 'status' => 'error', 'error' => $skin->error );
|
| 115 |
+
|
| 116 |
+
//if the plugin was activited, we have to re-activate it
|
| 117 |
+
if( $is_active ) {
|
| 118 |
+
$current = get_option( 'active_plugins', array() );
|
| 119 |
+
$current[] = plugin_basename( trim( $plugin ) );;
|
| 120 |
+
sort($current);
|
| 121 |
+
update_option('active_plugins', $current);
|
| 122 |
+
}
|
| 123 |
|
| 124 |
return array( 'status' => 'success' );
|
| 125 |
|
| 126 |
}
|
| 127 |
|
| 128 |
function _wpr_supports_plugin_upgrade() {
|
| 129 |
+
|
| 130 |
+
include_once ( ABSPATH . 'wp-admin/includes/admin.php' );
|
| 131 |
return class_exists( 'Plugin_Upgrader' );
|
| 132 |
|
| 133 |
}
|
