Changeset 12157 for trunk/wp-admin/includes/class-wp-upgrader.php
- Timestamp:
- 11/09/2009 06:53:21 PM (16 years ago)
- File:
-
- 1 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>',
Note: See TracChangeset
for help on using the changeset viewer.