Changeset 11714
- Timestamp:
- 07/14/2009 08:34:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/update.php
r11585 r11714 202 202 $time_not_changed = isset( $current_theme->last_checked ) && $timeout > ( time( ) - $current_theme->last_checked ); 203 203 204 if( $time_not_changed ) 204 $themes = array(); 205 $checked = array(); 206 $themes['current_theme'] = (array) $current_theme; 207 foreach( (array) $installed_themes as $theme_title => $theme ) { 208 $themes[$theme['Stylesheet']] = array(); 209 $checked[$theme['Stylesheet']] = $theme['Version']; 210 211 foreach( (array) $theme as $key => $value ) { 212 $themes[$theme['Stylesheet']][$key] = $value; 213 } 214 } 215 216 $theme_changed = false; 217 foreach ( $checked as $slug => $v ) { 218 $new_option->checked[ $slug ] = $v; 219 220 if ( !isset( $current_theme->checked[ $slug ] ) || strval($current_theme->checked[ $slug ]) !== strval($v) ) 221 $theme_changed = true; 222 } 223 224 if ( isset ( $current_theme->response ) && is_array( $current_theme->response ) ) { 225 foreach ( $current_theme->response as $slug => $update_details ) { 226 if ( ! isset($checked[ $slug ]) ) { 227 $theme_changed = true; 228 break; 229 } 230 } 231 } 232 233 if( $time_not_changed && !$theme_changed ) 205 234 return false; 206 235 … … 210 239 211 240 $current_theme->template = get_option( 'template' ); 212 213 $themes = array( );214 $themes['current_theme'] = (array) $current_theme;215 foreach( (array) $installed_themes as $theme_title => $theme ) {216 $themes[$theme['Stylesheet']] = array( );217 218 foreach( (array) $theme as $key => $value ) {219 $themes[$theme['Stylesheet']][$key] = $value;220 }221 }222 241 223 242 $options = array( … … 236 255 237 256 $response = unserialize( $raw_response['body'] ); 238 if( $response ) 257 if( $response ) { 258 $new_option->checked = $checked; 239 259 $new_option->response = $response; 260 } 240 261 241 262 set_transient( 'update_themes', $new_option );
Note: See TracChangeset
for help on using the changeset viewer.