Make WordPress Core


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

Start roughing in GUU. see #10973

File:
1 edited

Legend:

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

    r11933 r12066  
    146146}
    147147
     148function get_plugin_updates() {
     149        $all_plugins = get_plugins();
     150        $upgrade_plugins = array();
     151        $current = get_transient( 'update_plugins' );
     152        foreach ( (array)$all_plugins as $plugin_file => $plugin_data) {
     153                if ( isset( $current->response[ $plugin_file ] ) ) {
     154                        $upgrade_plugins[ $plugin_file ] = (object) $plugin_data;
     155                        $upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ];
     156                }
     157        }
     158
     159        return $upgrade_plugins;
     160}
     161
    148162function wp_plugin_update_rows() {
    149163        $plugins = get_transient( 'update_plugins' );
    … …  
    192206}
    193207
     208function get_theme_updates() {
     209        $themes = get_themes();
     210        $current = get_transient('update_themes');
     211        $update_themes = array();
     212
     213        foreach ( $themes as $theme ) {
     214                $theme = (object) $theme;
     215                if ( isset($current->response[ $theme->Stylesheet ]) ) {
     216                        $update_themes[$theme->Stylesheet] = $theme;
     217                        $update_themes[$theme->Stylesheet]->update = $current->response[ $theme->Stylesheet ];
     218                }
     219        }
     220
     221        return $update_themes;
     222}
     223
    194224function wp_update_theme($theme, $feedback = '') {
    195225
Note: See TracChangeset for help on using the changeset viewer.