Changeset 13604 for trunk/wp-admin/update-core.php
- Timestamp:
- 03/06/2010 09:12:49 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/update-core.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-core.php
r13602 r13604 153 153 154 154 list_plugin_updates(); 155 //list_theme_updates();155 list_theme_updates(); 156 156 do_action('core_upgrade_preamble'); 157 157 echo '</div>'; … … 240 240 if ( empty($themes) ) 241 241 return; 242 243 $form_action = 'update-core.php?action=do-theme-upgrade'; 244 242 245 ?> 243 246 <h3><?php _e('Themes'); ?></h3> 247 <p><?php _e('The following themes have new versions available. Check the ones you want to update and then click "Update Themes".'); ?></p> 248 <p><?php _e('<strong>Please Note:</strong> Any customizations you have made to the Themes files will be lost. Please consider using <a href="%s">Child Themes</a> for modifications.'); ?></p> 249 <form method="post" action="<?php echo $form_action; ?>" name="upgrade-themes" class="upgrade"> 250 <?php wp_nonce_field('upgrade-core'); ?> 251 <p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 244 252 <table class="widefat" cellspacing="0" id="update-themes-table"> 245 253 <thead> 246 254 <tr> 247 255 <th scope="col" class="manage-column check-column"><input type="checkbox" /></th> 248 <th scope="col" class="manage-column"><?php _e(' Name'); ?></th>256 <th scope="col" class="manage-column"><?php _e('Theme'); ?></th> 249 257 </tr> 250 258 </thead> … … 253 261 <tr> 254 262 <th scope="col" class="manage-column check-column"><input type="checkbox" /></th> 255 <th scope="col" class="manage-column"><?php _e(' Name'); ?></th>263 <th scope="col" class="manage-column"><?php _e('Theme'); ?></th> 256 264 </tr> 257 265 </tfoot> … … 259 267 <?php 260 268 foreach ( (array) $themes as $stylesheet => $theme_data) { 269 $screenshot = $theme_data->{'Theme Root URI'} . '/' . $stylesheet . '/' . $theme_data->Screenshot; 270 261 271 echo " 262 272 <tr class='active'> 263 273 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($stylesheet) . "' /></th> 264 <td class='plugin-title'>< strong>{$theme_data->Name}</strong></td>274 <td class='plugin-title'><img src='$screenshot' width='64' height='64' style='float:left; padding: 5px' /><strong>{$theme_data->Name}</strong>" . sprintf(__('You are running version %1$s. Update to %2$s.'), $theme_data->Version, $theme_data->update['new_version']) . "</td> 265 275 </tr>"; 266 276 } … … 268 278 </tbody> 269 279 </table> 280 <p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 281 </form> 270 282 <?php 271 283 } … … 394 406 $plugins = (array) $_POST['checked']; 395 407 } else { 396 wp_redirect(' plugins.php');408 wp_redirect('update-core.php'); 397 409 exit; 398 410 } … … 409 421 echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; 410 422 echo '</div>'; 423 } elseif ( 'do-theme-upgrade' == $action ) { 424 check_admin_referer('upgrade-core'); 425 426 if ( isset( $_GET['themes'] ) ) { 427 $themes = explode( ',', $_GET['themes'] ); 428 } elseif ( isset( $_POST['checked'] ) ) { 429 $themes = (array) $_POST['checked']; 430 } else { 431 wp_redirect('update-core.php'); 432 exit; 433 } 434 435 $url = 'update.php?action=update-selected-themes&themes=' . urlencode(implode(',', $themes)); 436 $url = wp_nonce_url($url, 'bulk-update-themes'); 437 438 $title = __('Update Themes'); 439 440 require_once('admin-header.php'); 441 echo '<div class="wrap">'; 442 screen_icon('themes'); 443 echo '<h2>' . esc_html__('Update Themes') . '</h2>'; 444 echo "<p>@TODO: Sorry, This part of the functionality hasnt been written yet.</p>"; 445 echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; 446 echo '</div>'; 411 447 } 412 448
Note: See TracChangeset
for help on using the changeset viewer.