Changeset 14879
- Timestamp:
- 05/25/2010 01:57:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r14819 r14879 467 467 } 468 468 469 $this->skin->feedback('bulk_upgrade_start'); 469 $this->skin->bulk_header(); 470 470 471 $this->maintenance_mode(true); 471 472 … … 511 512 512 513 $this->maintenance_mode(false); 513 $this->skin->feedback('bulk_upgrade_end'); 514 515 $this->skin->bulk_footer(); 514 516 515 517 $this->skin->footer(); … … 709 711 } 710 712 711 $this->skin->feedback('bulk_upgrade_start'); 713 $this->skin->bulk_header(); 714 712 715 $this->maintenance_mode(true); 713 716 … … 753 756 754 757 $this->maintenance_mode(false); 755 $this->skin->feedback('bulk_upgrade_end'); 758 759 $this->skin->bulk_footer(); 760 756 761 $this->skin->footer(); 757 762 … … 1088 1093 else 1089 1094 echo "<p>$string</p>\n"; 1095 $this->flush_output(); 1090 1096 } 1091 1097 … … 1110 1116 $this->error = implode(', ', $messages); 1111 1117 } 1112 echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 1118 } 1119 1120 function bulk_header() { 1121 $this->feedback('bulk_upgrade_start'); 1122 } 1123 1124 function bulk_footer() { 1125 $this->feedback('bulk_upgrade_end'); 1113 1126 } 1114 1127 1115 1128 function before($title = '') { 1116 1129 $this->in_loop = true; 1117 printf( '<h4>' . $this->upgrader->strings['skin_before_update_header'] . ' <img alt="" src="' . admin_url( 'images/wpspin_light.gif' ) . '" class="hidden waiting-' . $this->upgrader->update_current . '" style="vertical-align:middle;"></h4>', $title, $this->upgrader->update_current, $this->upgrader->update_count); 1118 echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').show();</script>'; 1119 echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>'; 1130 printf( '<h4>' . $this->upgrader->strings['skin_before_update_header'] . '</h4>', $title, $this->upgrader->update_current, $this->upgrader->update_count); 1131 echo '<div class="update-messages" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>'; 1120 1132 $this->flush_output(); 1121 1133 } … … 1132 1144 } 1133 1145 if ( !empty($this->result) && !is_wp_error($this->result) ) { 1134 echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>'; 1135 echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 1136 } 1146 echo '<div class="updated" id="finished-' . $this->upgrader->update_current . '"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>'; 1147 1148 if ( $this->upgrader->update_count > 1 ) // Only hide the update steps if multiple items are being updated. 1149 echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 1150 else 1151 echo '<script type="text/javascript">jQuery(\'#finished-' . esc_js($this->upgrader->update_current) . '\ span\').toggle();</script>'; 1152 } 1153 1137 1154 $this->reset(); 1138 1155 $this->flush_output(); … … 1168 1185 parent::after($this->plugin_info['Title']); 1169 1186 } 1187 function bulk_footer() { 1188 parent::bulk_footer(); 1189 $update_actions = array( 1190 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>', 1191 'updates_page' => '<a href="' . admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 1192 ); 1193 1194 $update_actions = apply_filters('update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info); 1195 if ( ! empty($update_actions) ) 1196 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1197 } 1170 1198 } 1171 1199 … … 1187 1215 function after() { 1188 1216 parent::after($this->theme_info['Name']); 1217 } 1218 function bulk_footer() { 1219 parent::bulk_footer(); 1220 $update_actions = array( 1221 'themes_page' => '<a href="' . admin_url('themes.php') . '" title="' . esc_attr__('Goto themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>', 1222 'updates_page' => '<a href="' . admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 1223 ); 1224 1225 $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info); 1226 if ( ! empty($update_actions) ) 1227 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1189 1228 } 1190 1229 } … … 1342 1381 function after() { 1343 1382 1383 $update_actions = array(); 1344 1384 if ( !empty($this->upgrader->result['destination_name']) && 1345 1385 ($theme_info = $this->upgrader->theme_info()) && … … 1353 1393 $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); 1354 1394 1355 $update_actions = array( 1356 'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>', 1357 'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>', 1358 ); 1395 $update_actions['preview'] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>'; 1396 $update_actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'; 1397 1359 1398 if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() ) 1360 1399 unset($update_actions['preview'], $update_actions['activate']);
Note: See TracChangeset
for help on using the changeset viewer.