<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12899] trunk/wp-includes/update.php: Code style cleanups</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12899">12899</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-29 18:53:32 +0000 (Fri, 29 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Code style cleanups</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesupdatephp">trunk/wp-includes/update.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/update.php (12898 => 12899)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/update.php        2010-01-29 18:26:33 UTC (rev 12898)
+++ trunk/wp-includes/update.php        2010-01-29 18:53:32 UTC (rev 12899)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">         $body = trim( $response['body'] );
</span><span class="cx">         $body = str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;), &quot;\n&quot;, $body);
</span><span class="cx">         $new_options = array();
</span><del>-        foreach( explode( &quot;\n\n&quot;, $body ) as $entry) {
</del><ins>+        foreach ( explode( &quot;\n\n&quot;, $body ) as $entry ) {
</ins><span class="cx">                 $returns = explode(&quot;\n&quot;, $entry);
</span><span class="cx">                 $new_option = new stdClass();
</span><span class="cx">                 $new_option-&gt;response = esc_attr( $returns[0] );
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">         if ( is_wp_error( $raw_response ) )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if( 200 != $raw_response['response']['code'] )
</del><ins>+        if ( 200 != $raw_response['response']['code'] )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         $response = unserialize( $raw_response['body'] );
</span><span class="lines">@@ -189,10 +189,10 @@
</span><span class="cx"> function wp_update_themes( ) {
</span><span class="cx">         global $wp_version;
</span><span class="cx"> 
</span><del>-        if( defined( 'WP_INSTALLING' ) )
</del><ins>+        if ( defined( 'WP_INSTALLING' ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if( !function_exists( 'get_themes' ) )
</del><ins>+        if ( !function_exists( 'get_themes' ) )
</ins><span class="cx">                 require_once( ABSPATH . 'wp-includes/theme.php' );
</span><span class="cx"> 
</span><span class="cx">         $installed_themes = get_themes( );
</span><span class="lines">@@ -208,13 +208,12 @@
</span><span class="cx">         $themes = array();
</span><span class="cx">         $checked = array();
</span><span class="cx">         $themes['current_theme'] = (array) $current_theme;
</span><del>-        foreach( (array) $installed_themes as $theme_title =&gt; $theme ) {
</del><ins>+        foreach ( (array) $installed_themes as $theme_title =&gt; $theme ) {
</ins><span class="cx">                 $themes[$theme['Stylesheet']] = array();
</span><span class="cx">                 $checked[$theme['Stylesheet']] = $theme['Version'];
</span><span class="cx"> 
</span><del>-                foreach( (array) $theme as $key =&gt; $value ) {
</del><ins>+                foreach ( (array) $theme as $key =&gt; $value )
</ins><span class="cx">                         $themes[$theme['Stylesheet']][$key] = $value;
</span><del>-                }
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $theme_changed = false;
</span><span class="lines">@@ -234,7 +233,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if( $time_not_changed &amp;&amp; !$theme_changed )
</del><ins>+        if ( $time_not_changed &amp;&amp; !$theme_changed )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         // Update last_checked for current to prevent multiple blocking requests if request hangs
</span><span class="lines">@@ -251,14 +250,14 @@
</span><span class="cx"> 
</span><span class="cx">         $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options );
</span><span class="cx"> 
</span><del>-        if( is_wp_error( $raw_response ) )
</del><ins>+        if ( is_wp_error( $raw_response ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if( 200 != $raw_response['response']['code'] )
</del><ins>+        if ( 200 != $raw_response['response']['code'] )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         $response = unserialize( $raw_response['body'] );
</span><del>-        if( $response ) {
</del><ins>+        if ( $response ) {
</ins><span class="cx">                 $new_option-&gt;checked = $checked;
</span><span class="cx">                 $new_option-&gt;response = $response;
</span><span class="cx">         }
</span><span class="lines">@@ -307,7 +306,7 @@
</span><span class="cx">  */
</span><span class="cx"> function _maybe_update_themes( ) {
</span><span class="cx">         $current = get_site_transient( 'update_themes' );
</span><del>-        if( isset( $current-&gt;last_checked ) &amp;&amp; 43200 &gt; ( time( ) - $current-&gt;last_checked ) )
</del><ins>+        if ( isset( $current-&gt;last_checked ) &amp;&amp; 43200 &gt; ( time( ) - $current-&gt;last_checked ) )
</ins><span class="cx">                 return;
</span><span class="cx"> 
</span><span class="cx">         wp_update_themes();
</span></span></pre>
</div>
</div>

</body>
</html>