WordPress.org

Make WordPress Core

Changeset 12899


Ignore:
Timestamp:
01/29/2010 06:53:32 PM (10 years ago)
Author:
ryan
Message:

Code style cleanups

File:
1 edited

Legend:

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

    r12848 r12899  
    6363    $body = str_replace(array("\r\n", "\r"), "\n", $body);
    6464    $new_options = array();
    65     foreach( explode( "\n\n", $body ) as $entry) {
     65    foreach ( explode( "\n\n", $body ) as $entry ) {
    6666        $returns = explode("\n", $entry);
    6767        $new_option = new stdClass();
     
    161161        return false;
    162162
    163     if( 200 != $raw_response['response']['code'] )
     163    if ( 200 != $raw_response['response']['code'] )
    164164        return false;
    165165
     
    190190    global $wp_version;
    191191
    192     if( defined( 'WP_INSTALLING' ) )
    193         return false;
    194 
    195     if( !function_exists( 'get_themes' ) )
     192    if ( defined( 'WP_INSTALLING' ) )
     193        return false;
     194
     195    if ( !function_exists( 'get_themes' ) )
    196196        require_once( ABSPATH . 'wp-includes/theme.php' );
    197197
     
    209209    $checked = array();
    210210    $themes['current_theme'] = (array) $current_theme;
    211     foreach( (array) $installed_themes as $theme_title => $theme ) {
     211    foreach ( (array) $installed_themes as $theme_title => $theme ) {
    212212        $themes[$theme['Stylesheet']] = array();
    213213        $checked[$theme['Stylesheet']] = $theme['Version'];
    214214
    215         foreach( (array) $theme as $key => $value ) {
     215        foreach ( (array) $theme as $key => $value )
    216216            $themes[$theme['Stylesheet']][$key] = $value;
    217         }
    218217    }
    219218
     
    235234    }
    236235
    237     if( $time_not_changed && !$theme_changed )
     236    if ( $time_not_changed && !$theme_changed )
    238237        return false;
    239238
     
    252251    $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options );
    253252
    254     if( is_wp_error( $raw_response ) )
    255         return false;
    256 
    257     if( 200 != $raw_response['response']['code'] )
     253    if ( is_wp_error( $raw_response ) )
     254        return false;
     255
     256    if ( 200 != $raw_response['response']['code'] )
    258257        return false;
    259258
    260259    $response = unserialize( $raw_response['body'] );
    261     if( $response ) {
     260    if ( $response ) {
    262261        $new_option->checked = $checked;
    263262        $new_option->response = $response;
     
    308307function _maybe_update_themes( ) {
    309308    $current = get_site_transient( 'update_themes' );
    310     if( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )
     309    if ( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )
    311310        return;
    312311
Note: See TracChangeset for help on using the changeset viewer.