Changeset 12107 for trunk/wp-admin/includes/class-wp-upgrader.php
- Timestamp:
- 10/26/2009 07:04:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r12097 r12107 272 272 'clear_destination' => false, 273 273 'clear_working' => true, 274 'is_multi' => false, 274 275 'hook_extra' => array() //Pass any extra $hook_extra args here, this will be passed to any hooked filters. 275 276 ); … … 288 289 } 289 290 290 $this->skin->header(); 291 if ( !$is_multi ) // call $this->header separately if running multiple times 292 $this->skin->header(); 293 291 294 $this->skin->before(); 292 295 … … 322 325 } 323 326 $this->skin->after(); 324 $this->skin->footer(); 327 328 if ( !$is_multi ) 329 $this->skin->footer(); 330 325 331 return $result; 326 332 } … … 356 362 var $result; 357 363 var $bulk = true; 364 var $show_before = ''; 358 365 359 366 function upgrade_strings() { … … 448 455 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); 449 456 457 $this->skin->header(); 458 $all = count($plugins); 459 $i = 1; 450 460 foreach ( $plugins as $plugin ) { 461 462 $this->show_before = sprintf( '<h4>' . __('Updating plugin %d of %d...') . '</h4>', $i, $all ); 463 $i++; 464 451 465 if ( !isset( $current->response[ $plugin ] ) ) { 452 466 $this->skin->set_result(false); … … 467 481 'clear_destination' => true, 468 482 'clear_working' => true, 483 'is_multi' => true, 469 484 'hook_extra' => array( 470 485 'plugin' => $plugin 471 486 ) 472 487 )); 473 488 474 489 $results[$plugin] = $this->result; 475 490 … … 478 493 break; 479 494 } 495 $this->skin->footer(); 480 496 481 497 //Cleanup our hooks, incase something else does a upgrade on this connection. … … 903 919 } 904 920 905 function footer() {906 if ( $this->upgrader-> bulk )907 return;908 909 echo '</div>';921 function before() { 922 if ( $this->upgrader->show_before ) { 923 echo $this->upgrader->show_before; 924 $this->upgrader->show_before = ''; 925 } 910 926 } 911 927 }
Note: See TracChangeset
for help on using the changeset viewer.