diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index e373d9dd74..0d2ece3833 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -432,7 +432,7 @@ class Plugin_Upgrader extends WP_Upgrader { ) )); - //Cleanup our hooks, incase something else does a upgrade on this connection. + // Cleanup our hooks, incase something else does a upgrade on this connection. remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); @@ -451,10 +451,19 @@ class Plugin_Upgrader extends WP_Upgrader { $current = get_transient( 'update_plugins' ); - add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2); add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->maintenance_mode(true); + $all = count($plugins); $i = 1; foreach ( $plugins as $plugin ) { @@ -492,10 +501,10 @@ class Plugin_Upgrader extends WP_Upgrader { if ( false === $result ) break; } + $this->maintenance_mode(false); $this->skin->footer(); - //Cleanup our hooks, incase something else does a upgrade on this connection. - remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); + // Cleanup our hooks, incase something else does a upgrade on this connection. remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); // Force refresh of plugin update information @@ -899,11 +908,15 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { } function after() { + if ( $this->upgrader->bulk ) + return; + $this->plugin = $this->upgrader->plugin_info(); if( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ show_message(__('Attempting reactivation of the plugin')); echo ''; } + $update_actions = array( 'activate_plugin' => '' . __('Activate Plugin') . '', 'plugins_page' => '' . __('Return to Plugins page') . '' diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index b897a6a284..c8196a02bd 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -133,6 +133,11 @@ function core_upgrade_preamble() { } function list_plugin_updates() { + global $wp_version; + + $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); + + require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); $plugins = get_plugin_updates(); if ( empty($plugins) ) return; @@ -160,10 +165,17 @@ function list_plugin_updates() {
$plugin_data) { + $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); + if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { + $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; + $compat = ' ' . sprintf(__('Compatibility: %1$d%% (%2$d "works" votes out of %3$d total)'), $compat[0], $compat[2], $compat[1]); + } else { + $compat = ''; + } echo "