Changeset 12097 for trunk/wp-admin/update-core.php
- Timestamp:
- 10/23/2009 09:49:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-core.php
r12093 r12097 286 286 } 287 287 288 function no_update_actions($actions) { 289 return ''; 290 } 291 288 292 function do_plugin_upgrade() { 289 293 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 290 294 291 $plugins = (array) $_POST['checked']; 292 $url = 'update-core.php'; 293 294 foreach ( $plugins as $plugin ) { 295 $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); 296 $upgrader->upgrade($plugin); 297 } 295 if ( isset($_GET['plugins']) ) { 296 $plugins = explode(',', $_GET['plugins']); 297 } else { 298 $plugins = (array) $_POST['checked']; 299 } 300 $url = 'update-core.php?action=do-plugin-upgrade&plugins=' . urlencode(join(',', $plugins)); 301 $title = __('Upgrade Plugins'); 302 $nonce = 'upgrade-core'; 303 add_filter('update_plugin_complete_actions', 'no_update_actions'); 304 305 $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) ); 306 $upgrader->bulk_upgrade($plugins); 298 307 } 299 308
Note: See TracChangeset
for help on using the changeset viewer.