Changeset 12066 for trunk/wp-admin/includes/update.php
- Timestamp:
- 10/20/2009 04:11:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r11933 r12066 146 146 } 147 147 148 function 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 148 162 function wp_plugin_update_rows() { 149 163 $plugins = get_transient( 'update_plugins' ); … … 192 206 } 193 207 208 function 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 194 224 function wp_update_theme($theme, $feedback = '') { 195 225
Note: See TracChangeset
for help on using the changeset viewer.