Make WordPress Core


Ignore:
Timestamp:
10/20/2009 04:11:59 PM (15 years ago)
Author:
ryan
Message:

Start roughing in GUU. see #10973

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/update-core.php

    r11669 r12066  
    128128    dismissed_updates();
    129129    echo '</div>';
    130 }
    131 
     130
     131    list_plugin_updates();
     132    list_theme_updates();
     133}
     134
     135function list_plugin_updates() {
     136    $plugins = get_plugin_updates();
     137    if ( empty($plugins) )
     138        return;
     139?>
     140<h3><?php _e('Plugins'); ?></h3>
     141<table class="widefat" cellspacing="0" id="update-plugins-table">
     142    <thead>
     143    <tr>
     144        <th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
     145        <th scope="col" class="manage-column"><?php _e('Name'); ?></th>
     146    </tr>
     147    </thead>
     148
     149    <tfoot>
     150    <tr>
     151        <th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
     152        <th scope="col" class="manage-column"><?php _e('Name'); ?></th>
     153    </tr>
     154    </tfoot>
     155    <tbody class="plugins">
     156<?php
     157    foreach ( (array) $plugins as $plugin_file => $plugin_data) {
     158        echo "
     159    <tr class='active'>
     160        <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th>
     161        <td class='plugin-title'><strong>{$plugin_data->Name}</strong></td>
     162    </tr>";
     163    }
     164?>
     165    </tbody>
     166</table>
     167<?php
     168}
     169
     170function list_theme_updates() {
     171    $themes = get_theme_updates();
     172    if ( empty($themes) )
     173        return;
     174?>
     175<h3><?php _e('Themes'); ?></h3>
     176<table class="widefat" cellspacing="0" id="update-themes-table">
     177    <thead>
     178    <tr>
     179        <th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
     180        <th scope="col" class="manage-column"><?php _e('Name'); ?></th>
     181    </tr>
     182    </thead>
     183
     184    <tfoot>
     185    <tr>
     186        <th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
     187        <th scope="col" class="manage-column"><?php _e('Name'); ?></th>
     188    </tr>
     189    </tfoot>
     190    <tbody class="plugins">
     191<?php
     192    foreach ( (array) $themes as $stylesheet => $theme_data) {
     193        echo "
     194    <tr class='active'>
     195        <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($stylesheet) . "' /></th>
     196        <td class='plugin-title'><strong>{$theme_data->Name}</strong></td>
     197    </tr>";
     198    }
     199?>
     200    </tbody>
     201</table>
     202<?php
     203}
    132204
    133205/**
Note: See TracChangeset for help on using the changeset viewer.