Changeset 12157
- Timestamp:
- 11/09/2009 06:53:21 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r12107 r12157 433 433 )); 434 434 435 // Cleanup our hooks, incase something else does a upgrade on this connection.435 // Cleanup our hooks, incase something else does a upgrade on this connection. 436 436 remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); 437 437 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); … … 452 452 $current = get_transient( 'update_plugins' ); 453 453 454 add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);455 454 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); 456 455 457 456 $this->skin->header(); 457 458 // Connect to the Filesystem first. 459 $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); 460 if ( ! $res ) { 461 $this->skin->footer(); 462 return false; 463 } 464 465 $this->maintenance_mode(true); 466 458 467 $all = count($plugins); 459 468 $i = 1; … … 493 502 break; 494 503 } 504 $this->maintenance_mode(false); 495 505 $this->skin->footer(); 496 506 497 //Cleanup our hooks, incase something else does a upgrade on this connection. 498 remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); 507 // Cleanup our hooks, incase something else does a upgrade on this connection. 499 508 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); 500 509 … … 900 909 901 910 function after() { 911 if ( $this->upgrader->bulk ) 912 return; 913 902 914 $this->plugin = $this->upgrader->plugin_info(); 903 915 if( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ … … 905 917 echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) .'"></iframe>'; 906 918 } 919 907 920 $update_actions = array( 908 921 'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>', -
trunk/wp-admin/update-core.php
r12107 r12157 134 134 135 135 function list_plugin_updates() { 136 global $wp_version; 137 138 $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); 139 140 require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); 136 141 $plugins = get_plugin_updates(); 137 142 if ( empty($plugins) ) … … 161 166 <?php 162 167 foreach ( (array) $plugins as $plugin_file => $plugin_data) { 168 $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); 169 if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { 170 $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; 171 $compat = ' ' . sprintf(__('Compatibility: %1$d%% (%2$d "works" votes out of %3$d total)'), $compat[0], $compat[2], $compat[1]); 172 } else { 173 $compat = ''; 174 } 163 175 echo " 164 176 <tr class='active'> 165 177 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th> 166 <td class='plugin-title'><strong>{$plugin_data->Name}</strong>" . sprintf(__('You are running version %1$s. Upgrade to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . "</td>178 <td class='plugin-title'><strong>{$plugin_data->Name}</strong>" . sprintf(__('You are running version %1$s. Upgrade to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . $compat . "</td> 167 179 </tr>"; 168 180 } … … 301 313 $title = __('Upgrade Plugins'); 302 314 $nonce = 'upgrade-core'; 303 add_filter('update_plugin_complete_actions', 'no_update_actions');304 305 315 $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); 306 316 $upgrader->bulk_upgrade($plugins); -
trunk/wp-includes/update.php
r11829 r12157 315 315 add_action( 'load-plugins.php', 'wp_update_plugins' ); 316 316 add_action( 'load-update.php', 'wp_update_plugins' ); 317 add_action( 'load-update-core.php', 'wp_update_plugins' ); 317 318 add_action( 'admin_init', '_maybe_update_plugins' ); 318 319 add_action( 'wp_update_plugins', 'wp_update_plugins' );
Note: See TracChangeset
for help on using the changeset viewer.