Index: src/index.php
===================================================================
--- src/index.php	(revision 40901)
+++ src/index.php	(working copy)
@@ -11,7 +11,7 @@
  *
  * @var bool
  */
-define('WP_USE_THEMES', true);
+define( 'WP_USE_THEMES', true );
 
 /** Loads the WordPress Environment and Template */
 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Index: src/wp-activate.php
===================================================================
--- src/wp-activate.php	(revision 40901)
+++ src/wp-activate.php	(working copy)
@@ -9,17 +9,18 @@
 define( 'WP_INSTALLING', true );
 
 /** Sets up the WordPress Environment. */
-require( dirname(__FILE__) . '/wp-load.php' );
+require( dirname( __FILE__ ) . '/wp-load.php' );
 
 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 
-if ( !is_multisite() ) {
+if ( ! is_multisite() ) {
 	wp_redirect( wp_registration_url() );
 	die();
 }
 
-if ( is_object( $wp_object_cache ) )
+if ( is_object( $wp_object_cache ) ) {
 	$wp_object_cache->cache_enabled = false;
+}
 
 // Fix for page title
 $wp_query->is_404 = false;
@@ -43,10 +44,10 @@
 	 * Fires before the Site Activation page is loaded.
 	 *
 	 * Fires on the {@see 'wp_head'} action.
-     *
-     * @since 3.0.0
-     */
-    do_action( 'activate_wp_head' );
+	 *
+	 * @since 3.0.0
+	 */
+	do_action( 'activate_wp_head' );
 }
 add_action( 'wp_head', 'do_activate_header' );
 
@@ -73,28 +74,28 @@
 
 <div id="signup-content" class="widecolumn">
 	<div class="wp-activate-container">
-	<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
+	<?php if ( empty( $_GET['key'] ) && empty( $_POST['key'] ) ) { ?>
 
-		<h2><?php _e('Activation Key Required') ?></h2>
-		<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
+		<h2><?php _e( 'Activation Key Required' ) ?></h2>
+		<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( 'wp-activate.php' ); ?>">
 			<p>
-			    <label for="key"><?php _e('Activation Key:') ?></label>
-			    <br /><input type="text" name="key" id="key" value="" size="50" />
+				<label for="key"><?php _e( 'Activation Key:' ) ?></label>
+				<br /><input type="text" name="key" id="key" value="" size="50" />
 			</p>
 			<p class="submit">
-			    <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
+				<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e( 'Activate' ) ?>" />
 			</p>
 		</form>
 
 	<?php } else {
 
-		$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
+		$key = ! empty( $_GET['key'] ) ? $_GET['key'] : $_POST['key'];
 		$result = wpmu_activate_signup( $key );
-		if ( is_wp_error($result) ) {
-			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
-				$signup = $result->get_error_data();
-				?>
-				<h2><?php _e('Your account is now active!'); ?></h2>
+	if ( is_wp_error( $result ) ) {
+		if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
+			$signup = $result->get_error_data();
+			?>
+			<h2><?php _e( 'Your account is now active!' ); ?></h2>
 				<?php
 				echo '<p class="lead-in">';
 				if ( $signup->domain . $signup->path == '' ) {
@@ -118,24 +119,24 @@
 					);
 				}
 				echo '</p>';
-			} else {
-				?>
-				<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
-				<p><?php echo $result->get_error_message(); ?></p>
-				<?php
-			}
 		} else {
-			$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
-			$user = get_userdata( (int) $result['user_id'] );
 			?>
-			<h2><?php _e('Your account is now active!'); ?></h2>
-
-			<div id="signup-welcome">
-				<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
-				<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
-			</div>
+			<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
+			<p><?php echo $result->get_error_message(); ?></p>
+			<?php
+		}
+	} else {
+		$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
+		$user = get_userdata( (int) $result['user_id'] );
+		?>
+		<h2><?php _e( 'Your account is now active!' ); ?></h2>
+
+		<div id="signup-welcome">
+		<p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo $user->user_login ?></p>
+		<p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo $result['password']; ?></p>
+		</div>
 
-			<?php if ( $url && $url != network_home_url( '', 'http' ) ) :
+		<?php if ( $url && $url != network_home_url( '', 'http' ) ) :
 				switch_to_blog( (int) $result['blog_id'] );
 				$login_url = wp_login_url();
 				restore_current_blog();
@@ -144,14 +145,14 @@
 					/* translators: 1: site URL, 2: login URL */
 					printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) );
 				?></p>
-			<?php else: ?>
+			<?php else : ?>
 				<p class="view"><?php
 					/* translators: 1: login URL, 2: network home URL */
 					printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
 				?></p>
 			<?php endif;
-		}
-	}
+	}// End if().
+}// End if().
 	?>
 	</div>
 </div>
Index: src/wp-blog-header.php
===================================================================
--- src/wp-blog-header.php	(revision 40901)
+++ src/wp-blog-header.php	(working copy)
@@ -5,12 +5,12 @@
  * @package WordPress
  */
 
-if ( !isset($wp_did_header) ) {
+if ( ! isset( $wp_did_header ) ) {
 
 	$wp_did_header = true;
 
 	// Load the WordPress library.
-	require_once( dirname(__FILE__) . '/wp-load.php' );
+	require_once( dirname( __FILE__ ) . '/wp-load.php' );
 
 	// Set up the WordPress query.
 	wp();
Index: src/wp-comments-post.php
===================================================================
--- src/wp-comments-post.php	(revision 40901)
+++ src/wp-comments-post.php	(working copy)
@@ -11,14 +11,14 @@
 		$protocol = 'HTTP/1.0';
 	}
 
-	header('Allow: POST');
-	header("$protocol 405 Method Not Allowed");
-	header('Content-Type: text/plain');
+	header( 'Allow: POST' );
+	header( "$protocol 405 Method Not Allowed" );
+	header( 'Content-Type: text/plain' );
 	exit;
 }
 
 /** Sets up the WordPress Environment. */
-require( dirname(__FILE__) . '/wp-load.php' );
+require( dirname( __FILE__ ) . '/wp-load.php' );
 
 nocache_headers();
 
@@ -26,7 +26,10 @@
 if ( is_wp_error( $comment ) ) {
 	$data = intval( $comment->get_error_data() );
 	if ( ! empty( $data ) ) {
-		wp_die( '<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array( 'response' => $data, 'back_link' => true ) );
+		wp_die( '<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array(
+			'response' => $data,
+			'back_link' => true,
+		) );
 	} else {
 		exit;
 	}
Index: src/wp-cron.php
===================================================================
--- src/wp-cron.php	(revision 40901)
+++ src/wp-cron.php	(working copy)
@@ -9,19 +9,20 @@
  * @package WordPress
  */
 
-ignore_user_abort(true);
+ignore_user_abort( true );
 
-if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
+if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) {
 	die();
+}
 
 /**
  * Tell WordPress we are doing the CRON task.
  *
  * @var bool
  */
-define('DOING_CRON', true);
+define( 'DOING_CRON', true );
 
-if ( !defined('ABSPATH') ) {
+if ( ! defined( 'ABSPATH' ) ) {
 	/** Set up WordPress environment */
 	require_once( dirname( __FILE__ ) . '/wp-load.php' );
 }
@@ -48,21 +49,24 @@
 		$value = wp_cache_get( 'doing_cron', 'transient', true );
 	} else {
 		$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", '_transient_doing_cron' ) );
-		if ( is_object( $row ) )
+		if ( is_object( $row ) ) {
 			$value = $row->option_value;
+		}
 	}
 
 	return $value;
 }
 
-if ( false === $crons = _get_cron_array() )
+if ( false === $crons = _get_cron_array() ) {
 	die();
+}
 
 $keys = array_keys( $crons );
 $gmt_time = microtime( true );
 
-if ( isset($keys[0]) && $keys[0] > $gmt_time )
+if ( isset( $keys[0] ) && $keys[0] > $gmt_time ) {
 	die();
+}
 
 
 // The cron lock: a unix timestamp from when the cron was spawned.
@@ -70,14 +74,15 @@
 
 // Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock.
 if ( empty( $doing_wp_cron ) ) {
-	if ( empty( $_GET[ 'doing_wp_cron' ] ) ) {
+	if ( empty( $_GET['doing_wp_cron'] ) ) {
 		// Called from external script/job. Try setting a lock.
-		if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) )
+		if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) ) {
 			return;
+		}
 		$doing_cron_transient = $doing_wp_cron = sprintf( '%.22F', microtime( true ) );
 		set_transient( 'doing_cron', $doing_wp_cron );
 	} else {
-		$doing_wp_cron = $_GET[ 'doing_wp_cron' ];
+		$doing_wp_cron = $_GET['doing_wp_cron'];
 	}
 }
 
@@ -85,12 +90,14 @@
  * The cron lock (a unix timestamp set when the cron was spawned),
  * must match $doing_wp_cron (the "key").
  */
-if ( $doing_cron_transient != $doing_wp_cron )
+if ( $doing_cron_transient != $doing_wp_cron ) {
 	return;
+}
 
 foreach ( $crons as $timestamp => $cronhooks ) {
-	if ( $timestamp > $gmt_time )
+	if ( $timestamp > $gmt_time ) {
 		break;
+	}
 
 	foreach ( $cronhooks as $hook => $keys ) {
 
@@ -99,8 +106,8 @@
 			$schedule = $v['schedule'];
 
 			if ( $schedule != false ) {
-				$new_args = array($timestamp, $schedule, $hook, $v['args']);
-				call_user_func_array('wp_reschedule_event', $new_args);
+				$new_args = array( $timestamp, $schedule, $hook, $v['args'] );
+				call_user_func_array( 'wp_reschedule_event', $new_args );
 			}
 
 			wp_unschedule_event( $timestamp, $hook, $v['args'] );
@@ -114,16 +121,18 @@
 			 * @param string $hook Name of the hook that was scheduled to be fired.
 			 * @param array  $args The arguments to be passed to the hook.
 			 */
- 			do_action_ref_array( $hook, $v['args'] );
+			 do_action_ref_array( $hook, $v['args'] );
 
 			// If the hook ran too long and another cron process stole the lock, quit.
-			if ( _get_cron_lock() != $doing_wp_cron )
+			if ( _get_cron_lock() != $doing_wp_cron ) {
 				return;
+			}
 		}
 	}
-}
+}// End foreach().
 
-if ( _get_cron_lock() == $doing_wp_cron )
+if ( _get_cron_lock() == $doing_wp_cron ) {
 	delete_transient( 'doing_cron' );
+}
 
 die();
Index: src/wp-links-opml.php
===================================================================
--- src/wp-links-opml.php	(revision 40901)
+++ src/wp-links-opml.php	(working copy)
@@ -14,23 +14,24 @@
 
 require_once( dirname( __FILE__ ) . '/wp-load.php' );
 
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
 $link_cat = '';
-if ( !empty($_GET['link_cat']) ) {
+if ( ! empty( $_GET['link_cat'] ) ) {
 	$link_cat = $_GET['link_cat'];
-	if ( !in_array($link_cat, array('all', '0')) )
-		$link_cat = absint( (string)urldecode($link_cat) );
+	if ( ! in_array( $link_cat, array( 'all', '0' ) ) ) {
+		$link_cat = absint( (string) urldecode( $link_cat ) );
+	}
 }
 
-echo '<?xml version="1.0"?'.">\n";
+echo '<?xml version="1.0"?' . ">\n";
 ?>
 <opml version="1.0">
 	<head>
 		<title><?php
 			/* translators: 1: Site name */
-			printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) );
+			printf( __( 'Links for %s' ), esc_attr( get_bloginfo( 'name', 'display' ) ) );
 		?></title>
-		<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
+		<dateCreated><?php echo gmdate( 'D, d M Y H:i:s' ); ?> GMT</dateCreated>
 		<?php
 		/**
 		 * Fires in the OPML header.
@@ -42,12 +43,19 @@
 	</head>
 	<body>
 <?php
-if ( empty($link_cat) )
-	$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0));
-else
-	$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
+if ( empty( $link_cat ) ) {
+	$cats = get_categories( array(
+		'taxonomy' => 'link_category',
+		'hierarchical' => 0,
+	) );
+} else { $cats = get_categories( array(
+	'taxonomy' => 'link_category',
+	'hierarchical' => 0,
+	'include' => $link_cat,
+) );
+}
 
-foreach ( (array)$cats as $cat ) :
+foreach ( (array) $cats as $cat ) :
 	/**
 	 * Filters the OPML outline link category name.
 	 *
@@ -58,20 +66,22 @@
 	$catname = apply_filters( 'link_category', $cat->name );
 
 ?>
-<outline type="category" title="<?php echo esc_attr($catname); ?>">
+<outline type="category" title="<?php echo esc_attr( $catname ); ?>">
 <?php
-	$bookmarks = get_bookmarks(array("category" => $cat->term_id));
-	foreach ( (array)$bookmarks as $bookmark ) :
-		/**
+	$bookmarks = get_bookmarks( array(
+		'category' => $cat->term_id,
+	) );
+foreach ( (array) $bookmarks as $bookmark ) :
+	/**
 		 * Filters the OPML outline link title text.
 		 *
 		 * @since 2.2.0
 		 *
 		 * @param string $title The OPML outline title text.
 		 */
-		$title = apply_filters( 'link_title', $bookmark->link_name );
+	$title = apply_filters( 'link_title', $bookmark->link_name );
 ?>
-	<outline text="<?php echo esc_attr($title); ?>" type="link" xmlUrl="<?php echo esc_attr($bookmark->link_rss); ?>" htmlUrl="<?php echo esc_attr($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
+<outline text="<?php echo esc_attr( $title ); ?>" type="link" xmlUrl="<?php echo esc_attr( $bookmark->link_rss ); ?>" htmlUrl="<?php echo esc_attr( $bookmark->link_url ); ?>" updated="<?php if ( '0000-00-00 00:00:00' != $bookmark->link_updated ) { echo $bookmark->link_updated;} ?>" />
 <?php
 	endforeach; // $bookmarks
 ?>
Index: src/wp-load.php
===================================================================
--- src/wp-load.php	(revision 40901)
+++ src/wp-load.php	(working copy)
@@ -31,7 +31,7 @@
  *
  * If neither set of conditions is true, initiate loading the setup process.
  */
-if ( file_exists( ABSPATH . 'wp-config.php') ) {
+if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
 
 	/** The config file resides in ABSPATH */
 	require_once( ABSPATH . 'wp-config.php' );
@@ -87,7 +87,7 @@
 		__( "You can create a %s file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ),
 		'<code>wp-config.php</code>'
 	) . '</p>';
-	$die .= '<p><a href="' . $path . '" class="button button-large">' . __( "Create a Configuration File" ) . '</a>';
+	$die .= '<p><a href="' . $path . '" class="button button-large">' . __( 'Create a Configuration File' ) . '</a>';
 
 	wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
-}
+}// End if().
Index: src/wp-login.php
===================================================================
--- src/wp-login.php	(revision 40901)
+++ src/wp-login.php	(working copy)
@@ -9,11 +9,11 @@
  */
 
 /** Make sure that the WordPress bootstrap has run before continuing. */
-require( dirname(__FILE__) . '/wp-load.php' );
+require( dirname( __FILE__ ) . '/wp-load.php' );
 
 // Redirect to https login if forced to use SSL
 if ( force_ssl_admin() && ! is_ssl() ) {
-	if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
+	if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
 		wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
 		exit();
 	} else {
@@ -38,8 +38,9 @@
 
 	add_action( 'login_head', 'wp_login_viewport_meta' );
 
-	if ( empty($wp_error) )
+	if ( empty( $wp_error ) ) {
 		$wp_error = new WP_Error();
+	}
 
 	// Shake it!
 	$shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
@@ -52,8 +53,9 @@
 	 */
 	$shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
 
-	if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
+	if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) {
 		add_action( 'login_head', 'wp_shake_js', 12 );
+	}
 
 	$separator = is_rtl() ? ' &rsaquo; ' : ' &lsaquo; ';
 
@@ -65,7 +67,7 @@
 		<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
 	<!--<![endif]-->
 	<head>
-	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
 	<title><?php echo get_bloginfo( 'name', 'display' ) . $separator . $title; ?></title>
 	<?php
 
@@ -123,18 +125,20 @@
 	$login_header_title = apply_filters( 'login_headertitle', $login_header_title );
 
 	$classes = array( 'login-action-' . $action, 'wp-core-ui' );
-	if ( is_rtl() )
+	if ( is_rtl() ) {
 		$classes[] = 'rtl';
+	}
 	if ( $interim_login ) {
 		$classes[] = 'interim-login';
 		?>
 		<style type="text/css">html{background-color: transparent;}</style>
 		<?php
 
-		if ( 'success' ===  $interim_login )
+		if ( 'success' === $interim_login ) {
 			$classes[] = 'interim-login-success';
+		}
 	}
-	$classes[] =' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
+	$classes[] = ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
 
 	/**
 	 * Filters the login page body classes.
@@ -171,13 +175,14 @@
 	 * @param string $message Login message text.
 	 */
 	$message = apply_filters( 'login_message', $message );
-	if ( !empty( $message ) )
+	if ( ! empty( $message ) ) {
 		echo $message . "\n";
+	}
 
 	// In case a plugin uses $error rather than the $wp_errors object
-	if ( !empty( $error ) ) {
-		$wp_error->add('error', $error);
-		unset($error);
+	if ( ! empty( $error ) ) {
+		$wp_error->add( 'error', $error );
+		unset( $error );
 	}
 
 	if ( $wp_error->get_error_code() ) {
@@ -186,10 +191,10 @@
 		foreach ( $wp_error->get_error_codes() as $code ) {
 			$severity = $wp_error->get_error_data( $code );
 			foreach ( $wp_error->get_error_messages( $code ) as $error_message ) {
-				if ( 'message' == $severity )
+				if ( 'message' == $severity ) {
 					$messages .= '	' . $error_message . "<br />\n";
-				else
-					$errors .= '	' . $error_message . "<br />\n";
+				} else { $errors .= '	' . $error_message . "<br />\n";
+				}
 			}
 		}
 		if ( ! empty( $errors ) ) {
@@ -220,11 +225,11 @@
  *
  * @param string $input_id Which input to auto-focus
  */
-function login_footer($input_id = '') {
+function login_footer( $input_id = '' ) {
 	global $interim_login;
 
 	// Don't allow interim logins to navigate away from the page.
-	if ( ! $interim_login ): ?>
+	if ( ! $interim_login ) : ?>
 	<p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php
 		/* translators: %s: site title */
 		printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
@@ -233,7 +238,7 @@
 
 	</div>
 
-	<?php if ( !empty($input_id) ) : ?>
+	<?php if ( ! empty( $input_id ) ) : ?>
 	<script type="text/javascript">
 	try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
 	if(typeof wpOnload=='function')wpOnload();
@@ -286,14 +291,15 @@
 	$errors = new WP_Error();
 
 	if ( empty( $_POST['user_login'] ) ) {
-		$errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or email address.'));
+		$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Enter a username or email address.' ) );
 	} elseif ( strpos( $_POST['user_login'], '@' ) ) {
 		$user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
-		if ( empty( $user_data ) )
-			$errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));
+		if ( empty( $user_data ) ) {
+			$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no user registered with that email address.' ) );
+		}
 	} else {
-		$login = trim($_POST['user_login']);
-		$user_data = get_user_by('login', $login);
+		$login = trim( $_POST['user_login'] );
+		$user_data = get_user_by( 'login', $login );
 	}
 
 	/**
@@ -307,11 +313,12 @@
 	 */
 	do_action( 'lostpassword_post', $errors );
 
-	if ( $errors->get_error_code() )
+	if ( $errors->get_error_code() ) {
 		return $errors;
+	}
 
-	if ( !$user_data ) {
-		$errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or email.'));
+	if ( ! $user_data ) {
+		$errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: Invalid username or email.' ) );
 		return $errors;
 	}
 
@@ -324,12 +331,12 @@
 		return $key;
 	}
 
-	$message = __('Someone has requested a password reset for the following account:') . "\r\n\r\n";
+	$message = __( 'Someone has requested a password reset for the following account:' ) . "\r\n\r\n";
 	$message .= network_home_url( '/' ) . "\r\n\r\n";
-	$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
-	$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
-	$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
-	$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
+	$message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
+	$message .= __( 'If this was a mistake, just ignore this email and nothing will happen.' ) . "\r\n\r\n";
+	$message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
+	$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">\r\n";
 
 	if ( is_multisite() ) {
 		$blogname = get_network()->site_name;
@@ -338,11 +345,11 @@
 		 * The blogname option is escaped with esc_html on the way into the database
 		 * in sanitize_option we want to reverse this for the plain text arena of emails.
 		 */
-		$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
+		$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
 	}
 
 	/* translators: Password reset email subject. 1: Site name */
-	$title = sprintf( __('[%s] Password Reset'), $blogname );
+	$title = sprintf( __( '[%s] Password Reset' ), $blogname );
 
 	/**
 	 * Filters the subject of the password reset email.
@@ -371,8 +378,9 @@
 	 */
 	$message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
 
-	if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) )
-		wp_die( __('The email could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );
+	if ( $message && ! wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) {
+		wp_die( __( 'The email could not be sent.' ) . "<br />\n" . __( 'Possible reason: your host may have disabled the mail() function.' ) );
+	}
 
 	return true;
 }
@@ -381,34 +389,39 @@
 // Main
 //
 
-$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';
+$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login';
 $errors = new WP_Error();
 
-if ( isset($_GET['key']) )
+if ( isset( $_GET['key'] ) ) {
 	$action = 'resetpass';
+}
 
 // validate action so as to default to the login screen
-if ( !in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login' ), true ) && false === has_filter( 'login_form_' . $action ) )
+if ( ! in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login' ), true ) && false === has_filter( 'login_form_' . $action ) ) {
 	$action = 'login';
+}
 
 nocache_headers();
 
-header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
+header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
 
 if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
-	if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
+	if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) {
 		$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
+	}
 
-	$url = dirname( set_url_scheme( 'http://' .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
-	if ( $url != get_option( 'siteurl' ) )
+	$url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
+	if ( $url != get_option( 'siteurl' ) ) {
 		update_option( 'siteurl', $url );
+	}
 }
 
 //Set a cookie now to see if they are supported by the browser.
 $secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) );
 setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure );
-if ( SITECOOKIEPATH != COOKIEPATH )
+if ( SITECOOKIEPATH != COOKIEPATH ) {
 	setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
+}
 
 /**
  * Fires when the login form is initialized.
@@ -428,20 +441,20 @@
 do_action( "login_form_{$action}" );
 
 $http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
-$interim_login = isset($_REQUEST['interim-login']);
+$interim_login = isset( $_REQUEST['interim-login'] );
 
-switch ($action) {
+switch ( $action ) {
 
-case 'postpass' :
-	if ( ! array_key_exists( 'post_password', $_POST ) ) {
-		wp_safe_redirect( wp_get_referer() );
-		exit();
-	}
+	case 'postpass' :
+		if ( ! array_key_exists( 'post_password', $_POST ) ) {
+			wp_safe_redirect( wp_get_referer() );
+			exit();
+		}
 
-	require_once ABSPATH . WPINC . '/class-phpass.php';
-	$hasher = new PasswordHash( 8, true );
+		require_once ABSPATH . WPINC . '/class-phpass.php';
+		$hasher = new PasswordHash( 8, true );
 
-	/**
+		/**
 	 * Filters the life span of the post password cookie.
 	 *
 	 * By default, the cookie expires 10 days from creation. To turn this
@@ -451,33 +464,33 @@
 	 *
 	 * @param int $expires The expiry time, as passed to setcookie().
 	 */
-	$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
-	$referer = wp_get_referer();
-	if ( $referer ) {
-		$secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) );
-	} else {
-		$secure = false;
-	}
-	setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
+		$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
+		$referer = wp_get_referer();
+		if ( $referer ) {
+			$secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) );
+		} else {
+			$secure = false;
+		}
+			setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
 
-	wp_safe_redirect( wp_get_referer() );
+			wp_safe_redirect( wp_get_referer() );
 	exit();
 
-case 'logout' :
-	check_admin_referer('log-out');
+	case 'logout' :
+		check_admin_referer( 'log-out' );
 
-	$user = wp_get_current_user();
+		$user = wp_get_current_user();
 
-	wp_logout();
+		wp_logout();
 
-	if ( ! empty( $_REQUEST['redirect_to'] ) ) {
-		$redirect_to = $requested_redirect_to = $_REQUEST['redirect_to'];
-	} else {
-		$redirect_to = 'wp-login.php?loggedout=true';
-		$requested_redirect_to = '';
-	}
+		if ( ! empty( $_REQUEST['redirect_to'] ) ) {
+			$redirect_to = $requested_redirect_to = $_REQUEST['redirect_to'];
+		} else {
+			$redirect_to = 'wp-login.php?loggedout=true';
+			$requested_redirect_to = '';
+		}
 
-	/**
+			/**
 	 * Filters the log out redirect URL.
 	 *
 	 * @since 4.2.0
@@ -486,57 +499,57 @@
 	 * @param string  $requested_redirect_to The requested redirect destination URL passed as a parameter.
 	 * @param WP_User $user                  The WP_User object for the user that's logging out.
 	 */
-	$redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
-	wp_safe_redirect( $redirect_to );
+			$redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
+			wp_safe_redirect( $redirect_to );
 	exit();
 
-case 'lostpassword' :
-case 'retrievepassword' :
+	case 'lostpassword' :
+	case 'retrievepassword' :
 
-	if ( $http_post ) {
-		$errors = retrieve_password();
-		if ( !is_wp_error($errors) ) {
-			$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm';
-			wp_safe_redirect( $redirect_to );
-			exit();
+		if ( $http_post ) {
+			$errors = retrieve_password();
+			if ( ! is_wp_error( $errors ) ) {
+				$redirect_to = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm';
+				wp_safe_redirect( $redirect_to );
+				exit();
+			}
 		}
-	}
 
-	if ( isset( $_GET['error'] ) ) {
-		if ( 'invalidkey' == $_GET['error'] ) {
-			$errors->add( 'invalidkey', __( 'Your password reset link appears to be invalid. Please request a new link below.' ) );
-		} elseif ( 'expiredkey' == $_GET['error'] ) {
-			$errors->add( 'expiredkey', __( 'Your password reset link has expired. Please request a new link below.' ) );
+		if ( isset( $_GET['error'] ) ) {
+			if ( 'invalidkey' == $_GET['error'] ) {
+				$errors->add( 'invalidkey', __( 'Your password reset link appears to be invalid. Please request a new link below.' ) );
+			} elseif ( 'expiredkey' == $_GET['error'] ) {
+				$errors->add( 'expiredkey', __( 'Your password reset link has expired. Please request a new link below.' ) );
+			}
 		}
-	}
 
-	$lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
-	/**
+		$lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
+		/**
 	 * Filters the URL redirected to after submitting the lostpassword/retrievepassword form.
 	 *
 	 * @since 3.0.0
 	 *
 	 * @param string $lostpassword_redirect The redirect destination URL.
 	 */
-	$redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
+		$redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
 
-	/**
+		/**
 	 * Fires before the lost password form.
 	 *
 	 * @since 1.5.1
 	 */
-	do_action( 'lost_password' );
+		do_action( 'lost_password' );
 
-	login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors);
+		login_header( __( 'Lost Password' ), '<p class="message">' . __( 'Please enter your username or email address. You will receive a link to create a new password via email.' ) . '</p>', $errors );
 
-	$user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : '';
+		$user_login = isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : '';
 
-?>
+		?>
 
-<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
+		<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
 	<p>
 		<label for="user_login" ><?php _e( 'Username or Email Address' ); ?><br />
-		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
+		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>
 	</p>
 	<?php
 	/**
@@ -545,62 +558,63 @@
 	 * @since 2.1.0
 	 */
 	do_action( 'lostpassword_form' ); ?>
-	<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
-	<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Get New Password'); ?>" /></p>
-</form>
+			<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
+			<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /></p>
+		</form>
 
-<p id="nav">
-<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a>
-<?php
-if ( get_option( 'users_can_register' ) ) :
-	$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
+		<p id="nav">
+		<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ) ?></a>
+		<?php
+		if ( get_option( 'users_can_register' ) ) :
+			$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
 
-	/** This filter is documented in wp-includes/general-template.php */
-	echo ' | ' . apply_filters( 'register', $registration_url );
-endif;
-?>
-</p>
+			/** This filter is documented in wp-includes/general-template.php */
+			echo ' | ' . apply_filters( 'register', $registration_url );
+		endif;
+		?>
+		</p>
 
-<?php
-login_footer('user_login');
+		<?php
+		login_footer( 'user_login' );
 break;
 
-case 'resetpass' :
-case 'rp' :
-	list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
-	$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
-	if ( isset( $_GET['key'] ) ) {
-		$value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
-		setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
-		wp_safe_redirect( remove_query_arg( array( 'key', 'login' ) ) );
-		exit;
-	}
-
-	if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
-		list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
-		$user = check_password_reset_key( $rp_key, $rp_login );
-		if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
+	case 'resetpass' :
+	case 'rp' :
+		list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
+		$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
+		if ( isset( $_GET['key'] ) ) {
+			$value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
+			setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
+			wp_safe_redirect( remove_query_arg( array( 'key', 'login' ) ) );
+			exit;
+		}
+
+		if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
+			list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
+			$user = check_password_reset_key( $rp_key, $rp_login );
+			if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
+				$user = false;
+			}
+		} else {
 			$user = false;
 		}
-	} else {
-		$user = false;
-	}
 
-	if ( ! $user || is_wp_error( $user ) ) {
-		setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
-		if ( $user && $user->get_error_code() === 'expired_key' )
-			wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
-		else
-			wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=invalidkey' ) );
-		exit;
-	}
+		if ( ! $user || is_wp_error( $user ) ) {
+			setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
+			if ( $user && $user->get_error_code() === 'expired_key' ) {
+				wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
+			} else { wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=invalidkey' ) );
+			}
+			exit;
+		}
 
-	$errors = new WP_Error();
+			$errors = new WP_Error();
 
-	if ( isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2'] )
-		$errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) );
+		if ( isset( $_POST['pass1'] ) && $_POST['pass1'] != $_POST['pass2'] ) {
+			$errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) );
+		}
 
-	/**
+			/**
 	 * Fires before the password reset procedure is validated.
 	 *
 	 * @since 3.5.0
@@ -608,23 +622,23 @@
 	 * @param object           $errors WP Error object.
 	 * @param WP_User|WP_Error $user   WP_User object if the login and reset key match. WP_Error object otherwise.
 	 */
-	do_action( 'validate_password_reset', $errors, $user );
+			do_action( 'validate_password_reset', $errors, $user );
 
-	if ( ( ! $errors->get_error_code() ) && isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) {
-		reset_password($user, $_POST['pass1']);
-		setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
-		login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log in' ) . '</a></p>' );
-		login_footer();
-		exit;
-	}
+		if ( ( ! $errors->get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
+			reset_password( $user, $_POST['pass1'] );
+			setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
+			login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log in' ) . '</a></p>' );
+			login_footer();
+			exit;
+		}
 
-	wp_enqueue_script('utils');
-	wp_enqueue_script('user-profile');
+			wp_enqueue_script( 'utils' );
+			wp_enqueue_script( 'user-profile' );
 
-	login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
+			login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password below.' ) . '</p>', $errors );
 
-?>
-<form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off">
+		?>
+		<form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off">
 	<input type="hidden" id="user_login" value="<?php echo esc_attr( $rp_login ); ?>" autocomplete="off" />
 
 	<div class="user-pass1-wrap">
@@ -659,74 +673,74 @@
 	do_action( 'resetpass_form', $user );
 	?>
 	<input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
-	<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" /></p>
-</form>
+	<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" /></p>
+	</form>
 
-<p id="nav">
-<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
-<?php
-if ( get_option( 'users_can_register' ) ) :
-	$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
+	<p id="nav">
+	<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
+	<?php
+	if ( get_option( 'users_can_register' ) ) :
+		$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
 
-	/** This filter is documented in wp-includes/general-template.php */
-	echo ' | ' . apply_filters( 'register', $registration_url );
-endif;
-?>
-</p>
+		/** This filter is documented in wp-includes/general-template.php */
+		echo ' | ' . apply_filters( 'register', $registration_url );
+		endif;
+	?>
+	</p>
 
-<?php
-login_footer('user_pass');
+	<?php
+	login_footer( 'user_pass' );
 break;
 
-case 'register' :
-	if ( is_multisite() ) {
-		/**
+	case 'register' :
+		if ( is_multisite() ) {
+			/**
 		 * Filters the Multisite sign up URL.
 		 *
 		 * @since 3.0.0
 		 *
 		 * @param string $sign_up_url The sign up URL.
 		 */
-		wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
-		exit;
-	}
-
-	if ( !get_option('users_can_register') ) {
-		wp_redirect( site_url('wp-login.php?registration=disabled') );
-		exit();
-	}
+			wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
+			exit;
+		}
 
-	$user_login = '';
-	$user_email = '';
-	if ( $http_post ) {
-		$user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : '';
-		$user_email = isset( $_POST['user_email'] ) ? wp_unslash( $_POST['user_email'] ) : '';
-		$errors = register_new_user($user_login, $user_email);
-		if ( !is_wp_error($errors) ) {
-			$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
-			wp_safe_redirect( $redirect_to );
+		if ( ! get_option( 'users_can_register' ) ) {
+			wp_redirect( site_url( 'wp-login.php?registration=disabled' ) );
 			exit();
 		}
-	}
 
-	$registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
-	/**
+		$user_login = '';
+		$user_email = '';
+		if ( $http_post ) {
+			$user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : '';
+			$user_email = isset( $_POST['user_email'] ) ? wp_unslash( $_POST['user_email'] ) : '';
+			$errors = register_new_user( $user_login, $user_email );
+			if ( ! is_wp_error( $errors ) ) {
+				$redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
+				wp_safe_redirect( $redirect_to );
+				exit();
+			}
+		}
+
+		$registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
+		/**
 	 * Filters the registration redirect URL.
 	 *
 	 * @since 3.0.0
 	 *
 	 * @param string $registration_redirect The redirect destination URL.
 	 */
-	$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
-	login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
-?>
-<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
+		$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
+		login_header( __( 'Registration Form' ), '<p class="message register">' . __( 'Register For This Site' ) . '</p>', $errors );
+		?>
+		<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
 	<p>
-		<label for="user_login"><?php _e('Username') ?><br />
-		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
+		<label for="user_login"><?php _e( 'Username' ) ?><br />
+		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" /></label>
 	</p>
 	<p>
-		<label for="user_email"><?php _e('Email') ?><br />
+		<label for="user_email"><?php _e( 'Email' ) ?><br />
 		<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label>
 	</p>
 	<?php
@@ -740,70 +754,72 @@
 	<p id="reg_passmail"><?php _e( 'Registration confirmation will be emailed to you.' ); ?></p>
 	<br class="clear" />
 	<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
-	<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>" /></p>
-</form>
+	<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Register' ); ?>" /></p>
+	</form>
 
-<p id="nav">
-<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
-<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
-</p>
+	<p id="nav">
+	<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
+	<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
+	</p>
 
-<?php
-login_footer('user_login');
+	<?php
+	login_footer( 'user_login' );
 break;
 
-case 'login' :
-default:
-	$secure_cookie = '';
-	$customize_login = isset( $_REQUEST['customize-login'] );
-	if ( $customize_login )
-		wp_enqueue_script( 'customize-base' );
+	case 'login' :
+	default:
+		$secure_cookie = '';
+		$customize_login = isset( $_REQUEST['customize-login'] );
+		if ( $customize_login ) {
+			wp_enqueue_script( 'customize-base' );
+		}
 
-	// If the user wants ssl but the session is not ssl, force a secure cookie.
-	if ( !empty($_POST['log']) && !force_ssl_admin() ) {
-		$user_name = sanitize_user($_POST['log']);
-		$user = get_user_by( 'login', $user_name );
+		// If the user wants ssl but the session is not ssl, force a secure cookie.
+		if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) {
+			$user_name = sanitize_user( $_POST['log'] );
+			$user = get_user_by( 'login', $user_name );
 
-		if ( ! $user && strpos( $user_name, '@' ) ) {
-			$user = get_user_by( 'email', $user_name );
-		}
+			if ( ! $user && strpos( $user_name, '@' ) ) {
+				$user = get_user_by( 'email', $user_name );
+			}
 
-		if ( $user ) {
-			if ( get_user_option('use_ssl', $user->ID) ) {
-				$secure_cookie = true;
-				force_ssl_admin(true);
+			if ( $user ) {
+				if ( get_user_option( 'use_ssl', $user->ID ) ) {
+					$secure_cookie = true;
+					force_ssl_admin( true );
+				}
 			}
 		}
-	}
 
-	if ( isset( $_REQUEST['redirect_to'] ) ) {
-		$redirect_to = $_REQUEST['redirect_to'];
-		// Redirect to https if user wants ssl
-		if ( $secure_cookie && false !== strpos($redirect_to, 'wp-admin') )
-			$redirect_to = preg_replace('|^http://|', 'https://', $redirect_to);
-	} else {
-		$redirect_to = admin_url();
-	}
+		if ( isset( $_REQUEST['redirect_to'] ) ) {
+			$redirect_to = $_REQUEST['redirect_to'];
+			// Redirect to https if user wants ssl
+			if ( $secure_cookie && false !== strpos( $redirect_to, 'wp-admin' ) ) {
+				$redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to );
+			}
+		} else {
+			$redirect_to = admin_url();
+		}
 
-	$reauth = empty($_REQUEST['reauth']) ? false : true;
+			$reauth = empty( $_REQUEST['reauth'] ) ? false : true;
 
-	$user = wp_signon( array(), $secure_cookie );
+			$user = wp_signon( array(), $secure_cookie );
 
-	if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
-		if ( headers_sent() ) {
-			/* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
-			$user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
+		if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
+			if ( headers_sent() ) {
+				/* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
+				$user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
 				__( 'https://codex.wordpress.org/Cookies' ), __( 'https://wordpress.org/support/' ) ) );
-		} elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
-			// If cookies are disabled we can't log in even with a valid user+pass
-			/* translators: 1: Browser cookie documentation URL */
-			$user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
+			} elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
+				// If cookies are disabled we can't log in even with a valid user+pass
+				/* translators: 1: Browser cookie documentation URL */
+				$user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
 				__( 'https://codex.wordpress.org/Cookies' ) ) );
+			}
 		}
-	}
 
-	$requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
-	/**
+			$requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
+			/**
 	 * Filters the login redirect URL.
 	 *
 	 * @since 3.0.0
@@ -812,65 +828,69 @@
 	 * @param string           $requested_redirect_to The requested redirect destination URL passed as a parameter.
 	 * @param WP_User|WP_Error $user                  WP_User object if login was successful, WP_Error object otherwise.
 	 */
-	$redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
+			$redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
 
-	if ( !is_wp_error($user) && !$reauth ) {
-		if ( $interim_login ) {
-			$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
-			$interim_login = 'success';
-			login_header( '', $message ); ?>
-			</div>
-			<?php
-			/** This action is documented in wp-login.php */
-			do_action( 'login_footer' ); ?>
-			<?php if ( $customize_login ) : ?>
+		if ( ! is_wp_error( $user ) && ! $reauth ) {
+			if ( $interim_login ) {
+				$message = '<p class="message">' . __( 'You have logged in successfully.' ) . '</p>';
+				$interim_login = 'success';
+				login_header( '', $message ); ?>
+					</div>
+					<?php
+					/** This action is documented in wp-login.php */
+					do_action( 'login_footer' ); ?>
+					<?php if ( $customize_login ) : ?>
 				<script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
 			<?php endif; ?>
-			</body></html>
-<?php		exit;
-		}
+					</body></html>
+		<?php		exit;
+			}
 
-		if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
-			// If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
-			if ( is_multisite() && !get_active_blog_for_user($user->ID) && !is_super_admin( $user->ID ) )
-				$redirect_to = user_admin_url();
-			elseif ( is_multisite() && !$user->has_cap('read') )
-				$redirect_to = get_dashboard_url( $user->ID );
-			elseif ( !$user->has_cap('edit_posts') )
-				$redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
+			if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
+				// If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
+				if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) {
+					$redirect_to = user_admin_url();
+				} elseif ( is_multisite() && ! $user->has_cap( 'read' ) ) {
+					$redirect_to = get_dashboard_url( $user->ID );
+				} elseif ( ! $user->has_cap( 'edit_posts' ) ) {
+					$redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
+				}
 
-			wp_redirect( $redirect_to );
+				wp_redirect( $redirect_to );
+				exit();
+			}
+			wp_safe_redirect( $redirect_to );
 			exit();
 		}
-		wp_safe_redirect($redirect_to);
-		exit();
-	}
 
-	$errors = $user;
-	// Clear errors if loggedout is set.
-	if ( !empty($_GET['loggedout']) || $reauth )
-		$errors = new WP_Error();
+			$errors = $user;
+			// Clear errors if loggedout is set.
+		if ( ! empty( $_GET['loggedout'] ) || $reauth ) {
+			$errors = new WP_Error();
+		}
 
-	if ( $interim_login ) {
-		if ( ! $errors->get_error_code() )
-			$errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' );
-	} else {
-		// Some parts of this script use the main login form to display a message
-		if		( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
-			$errors->add('loggedout', __('You are now logged out.'), 'message');
-		elseif	( isset($_GET['registration']) && 'disabled' == $_GET['registration'] )
-			$errors->add('registerdisabled', __('User registration is currently not allowed.'));
-		elseif	( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] )
-			$errors->add('confirm', __('Check your email for the confirmation link.'), 'message');
-		elseif	( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] )
-			$errors->add('newpass', __('Check your email for your new password.'), 'message');
-		elseif	( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )
-			$errors->add('registered', __('Registration complete. Please check your email.'), 'message');
-		elseif ( strpos( $redirect_to, 'about.php?updated' ) )
-			$errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what&#8217;s new.' ), 'message' );
-	}
+		if ( $interim_login ) {
+			if ( ! $errors->get_error_code() ) {
+				$errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' );
+			}
+		} else {
+			// Some parts of this script use the main login form to display a message
+			if ( isset( $_GET['loggedout'] ) && true == $_GET['loggedout'] ) {
+				$errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' );
+			} elseif ( isset( $_GET['registration'] ) && 'disabled' == $_GET['registration'] ) {
+				$errors->add( 'registerdisabled', __( 'User registration is currently not allowed.' ) );
+			} elseif ( isset( $_GET['checkemail'] ) && 'confirm' == $_GET['checkemail'] ) {
+				$errors->add( 'confirm', __( 'Check your email for the confirmation link.' ), 'message' );
+			} elseif ( isset( $_GET['checkemail'] ) && 'newpass' == $_GET['checkemail'] ) {
+				$errors->add( 'newpass', __( 'Check your email for your new password.' ), 'message' );
+			} elseif ( isset( $_GET['checkemail'] ) && 'registered' == $_GET['checkemail'] ) {
+				$errors->add( 'registered', __( 'Registration complete. Please check your email.' ), 'message' );
+			} elseif ( strpos( $redirect_to, 'about.php?updated' ) ) {
+				$errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what&#8217;s new.' ), 'message' );
+			}
+		}
 
-	/**
+			/**
 	 * Filters the login page errors.
 	 *
 	 * @since 3.6.0
@@ -878,26 +898,28 @@
 	 * @param object $errors      WP Error object.
 	 * @param string $redirect_to Redirect destination URL.
 	 */
-	$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
+			$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
 
-	// Clear any stale cookies.
-	if ( $reauth )
-		wp_clear_auth_cookie();
+			// Clear any stale cookies.
+		if ( $reauth ) {
+			wp_clear_auth_cookie();
+		}
 
-	login_header(__('Log In'), '', $errors);
+			login_header( __( 'Log In' ), '', $errors );
 
-	if ( isset($_POST['log']) )
-		$user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(wp_unslash($_POST['log'])) : '';
-	$rememberme = ! empty( $_POST['rememberme'] );
+		if ( isset( $_POST['log'] ) ) {
+			$user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr( wp_unslash( $_POST['log'] ) ) : '';
+		}
+			$rememberme = ! empty( $_POST['rememberme'] );
 
-	if ( ! empty( $errors->errors ) ) {
-		$aria_describedby_error = ' aria-describedby="login_error"';
-	} else {
-		$aria_describedby_error = '';
-	}
-?>
+		if ( ! empty( $errors->errors ) ) {
+			$aria_describedby_error = ' aria-describedby="login_error"';
+		} else {
+			$aria_describedby_error = '';
+		}
+		?>
 
-<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
+		<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
 	<p>
 		<label for="user_login"><?php _e( 'Username or Email Address' ); ?><br />
 		<input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>
@@ -916,79 +938,79 @@
 	?>
 	<p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></p>
 	<p class="submit">
-		<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Log In'); ?>" />
-<?php	if ( $interim_login ) { ?>
+		<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" />
+	<?php	if ( $interim_login ) { ?>
 		<input type="hidden" name="interim-login" value="1" />
-<?php	} else { ?>
-		<input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect_to); ?>" />
-<?php 	} ?>
-<?php   if ( $customize_login ) : ?>
+	<?php	} else { ?>
+		<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
+	<?php 	} ?>
+	<?php   if ( $customize_login ) : ?>
 		<input type="hidden" name="customize-login" value="1" />
-<?php   endif; ?>
+	<?php   endif; ?>
 		<input type="hidden" name="testcookie" value="1" />
 	</p>
-</form>
-
-<?php if ( ! $interim_login ) { ?>
-<p id="nav">
-<?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
-	if ( get_option( 'users_can_register' ) ) :
-		$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
+	</form>
 
-		/** This filter is documented in wp-includes/general-template.php */
-		echo apply_filters( 'register', $registration_url ) . ' | ';
-	endif;
-	?>
-	<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
-<?php endif; ?>
-</p>
-<?php } ?>
+	<?php if ( ! $interim_login ) { ?>
+	<p id="nav">
+	<?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
+		if ( get_option( 'users_can_register' ) ) :
+			$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
+
+			/** This filter is documented in wp-includes/general-template.php */
+			echo apply_filters( 'register', $registration_url ) . ' | ';
+		endif;
+		?>
+		<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
+	<?php endif; ?>
+	</p>
+	<?php } ?>
 
-<script type="text/javascript">
-function wp_attempt_focus(){
-setTimeout( function(){ try{
-<?php if ( $user_login ) { ?>
-d = document.getElementById('user_pass');
-d.value = '';
-<?php } else { ?>
-d = document.getElementById('user_login');
-<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
-if( d.value != '' )
-d.value = '';
-<?php
+		<script type="text/javascript">
+		function wp_attempt_focus(){
+		setTimeout( function(){ try{
+		<?php if ( $user_login ) { ?>
+	d = document.getElementById('user_pass');
+	d.value = '';
+	<?php } else { ?>
+	d = document.getElementById('user_login');
+	<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
+	if( d.value != '' )
+	d.value = '';
+	<?php
 }
 }?>
-d.focus();
-d.select();
-} catch(e){}
-}, 200);
-}
+		d.focus();
+		d.select();
+		} catch(e){}
+		}, 200);
+		}
 
-/**
- * Filters whether to print the call to `wp_attempt_focus()` on the login screen.
- *
- * @since 4.8.0
- *
- * @param bool $print Whether to print the function call. Default true.
- */
-<?php if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?>
-wp_attempt_focus();
-<?php } ?>
-if(typeof wpOnload=='function')wpOnload();
-<?php if ( $interim_login ) { ?>
-(function(){
-try {
+		/**
+		 * Filters whether to print the call to `wp_attempt_focus()` on the login screen.
+		 *
+		 * @since 4.8.0
+		 *
+		 * @param bool $print Whether to print the function call. Default true.
+		 */
+		<?php if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?>
+	wp_attempt_focus();
+	<?php } ?>
+		if(typeof wpOnload=='function')wpOnload();
+		<?php if ( $interim_login ) { ?>
+	(function(){
+	try {
 	var i, links = document.getElementsByTagName('a');
 	for ( i in links ) {
 		if ( links[i].href )
 			links[i].target = '_blank';
 	}
-} catch(e){}
-}());
-<?php } ?>
-</script>
+	} catch(e){}
+	}());
+	<?php } ?>
+		</script>
 
-<?php
-login_footer();
+		<?php
+		login_footer();
 break;
-} // end action switch
+} // End switch().
Index: src/wp-mail.php
===================================================================
--- src/wp-mail.php	(revision 40901)
+++ src/wp-mail.php	(working copy)
@@ -8,11 +8,12 @@
  */
 
 /** Make sure that the WordPress bootstrap has run before continuing. */
-require(dirname(__FILE__) . '/wp-load.php');
+require( dirname( __FILE__ ) . '/wp-load.php' );
 
 /** This filter is documented in wp-admin/options.php */
-if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
+if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) {
 	wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
+}
 
 $mailserver_url = get_option( 'mailserver_url' );
 
@@ -31,38 +32,42 @@
 require_once( ABSPATH . WPINC . '/class-pop3.php' );
 
 /** Only check at this interval for new messages. */
-if ( !defined('WP_MAIL_INTERVAL') )
-	define('WP_MAIL_INTERVAL', 300); // 5 minutes
+if ( ! defined( 'WP_MAIL_INTERVAL' ) ) {
+	define( 'WP_MAIL_INTERVAL', 300 ); // 5 minutes
+}
 
-$last_checked = get_transient('mailserver_last_checked');
+$last_checked = get_transient( 'mailserver_last_checked' );
 
-if ( $last_checked )
-	wp_die(__('Slow down cowboy, no need to check for new mails so often!'));
+if ( $last_checked ) {
+	wp_die( __( 'Slow down cowboy, no need to check for new mails so often!' ) );
+}
 
-set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
+set_transient( 'mailserver_last_checked', true, WP_MAIL_INTERVAL );
 
-$time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS;
+$time_difference = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
 
 $phone_delim = '::';
 
 $pop3 = new POP3();
 
-if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
+if ( ! $pop3->connect( get_option( 'mailserver_url' ), get_option( 'mailserver_port' ) ) || ! $pop3->user( get_option( 'mailserver_login' ) ) ) {
 	wp_die( esc_html( $pop3->ERROR ) );
+}
 
-$count = $pop3->pass( get_option('mailserver_pass') );
+$count = $pop3->pass( get_option( 'mailserver_pass' ) );
 
-if( false === $count )
+if ( false === $count ) {
 	wp_die( esc_html( $pop3->ERROR ) );
+}
 
-if( 0 === $count ) {
+if ( 0 === $count ) {
 	$pop3->quit();
-	wp_die( __('There doesn&#8217;t seem to be any new mail.') );
+	wp_die( __( 'There doesn&#8217;t seem to be any new mail.' ) );
 }
 
 for ( $i = 1; $i <= $count; $i++ ) {
 
-	$message = $pop3->get($i);
+	$message = $pop3->get( $i );
 
 	$bodysignal = false;
 	$boundary = '';
@@ -72,44 +77,45 @@
 	$content_transfer_encoding = '';
 	$post_author = 1;
 	$author_found = false;
-	foreach ($message as $line) {
+	foreach ( $message as $line ) {
 		// Body signal.
-		if ( strlen($line) < 3 )
+		if ( strlen( $line ) < 3 ) {
 			$bodysignal = true;
+		}
 		if ( $bodysignal ) {
 			$content .= $line;
 		} else {
-			if ( preg_match('/Content-Type: /i', $line) ) {
-				$content_type = trim($line);
-				$content_type = substr($content_type, 14, strlen($content_type) - 14);
-				$content_type = explode(';', $content_type);
+			if ( preg_match( '/Content-Type: /i', $line ) ) {
+				$content_type = trim( $line );
+				$content_type = substr( $content_type, 14, strlen( $content_type ) - 14 );
+				$content_type = explode( ';', $content_type );
 				if ( ! empty( $content_type[1] ) ) {
-					$charset = explode('=', $content_type[1]);
-					$charset = ( ! empty( $charset[1] ) ) ? trim($charset[1]) : '';
+					$charset = explode( '=', $content_type[1] );
+					$charset = ( ! empty( $charset[1] ) ) ? trim( $charset[1] ) : '';
 				}
 				$content_type = $content_type[0];
 			}
-			if ( preg_match('/Content-Transfer-Encoding: /i', $line) ) {
-				$content_transfer_encoding = trim($line);
-				$content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding) - 27);
-				$content_transfer_encoding = explode(';', $content_transfer_encoding);
+			if ( preg_match( '/Content-Transfer-Encoding: /i', $line ) ) {
+				$content_transfer_encoding = trim( $line );
+				$content_transfer_encoding = substr( $content_transfer_encoding, 27, strlen( $content_transfer_encoding ) - 27 );
+				$content_transfer_encoding = explode( ';', $content_transfer_encoding );
 				$content_transfer_encoding = $content_transfer_encoding[0];
 			}
-			if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos($line, 'boundary="') ) && ( '' == $boundary ) ) {
-				$boundary = trim($line);
-				$boundary = explode('"', $boundary);
+			if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' == $boundary ) ) {
+				$boundary = trim( $line );
+				$boundary = explode( '"', $boundary );
 				$boundary = $boundary[1];
 			}
-			if (preg_match('/Subject: /i', $line)) {
-				$subject = trim($line);
-				$subject = substr($subject, 9, strlen($subject) - 9);
+			if ( preg_match( '/Subject: /i', $line ) ) {
+				$subject = trim( $line );
+				$subject = substr( $subject, 9, strlen( $subject ) - 9 );
 				// Captures any text in the subject before $phone_delim as the subject
-				if ( function_exists('iconv_mime_decode') ) {
-					$subject = iconv_mime_decode($subject, 2, get_option('blog_charset'));
+				if ( function_exists( 'iconv_mime_decode' ) ) {
+					$subject = iconv_mime_decode( $subject, 2, get_option( 'blog_charset' ) );
 				} else {
-					$subject = wp_iso_descrambler($subject);
+					$subject = wp_iso_descrambler( $subject );
 				}
-				$subject = explode($phone_delim, $subject);
+				$subject = explode( $phone_delim, $subject );
 				$subject = $subject[0];
 			}
 
@@ -118,15 +124,15 @@
 			 * otherwise use the site admin.
 			 */
 			if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) {
-				if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) )
+				if ( preg_match( '|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches ) ) {
 					$author = $matches[0];
-				else
-					$author = trim($line);
-				$author = sanitize_email($author);
-				if ( is_email($author) ) {
+				} else { $author = trim( $line );
+				}
+				$author = sanitize_email( $author );
+				if ( is_email( $author ) ) {
 					/* translators: Post author email address */
-					echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>';
-					$userdata = get_user_by('email', $author);
+					echo '<p>' . sprintf( __( 'Author is %s' ), $author ) . '</p>';
+					$userdata = get_user_by( 'email', $author );
 					if ( ! empty( $userdata ) ) {
 						$post_author = $userdata->ID;
 						$author_found = true;
@@ -141,32 +147,32 @@
 				$post_date = gmdate( 'Y-m-d H:i:s', $ddate_U + $time_difference );
 				$post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_U );
 			}
-		}
-	}
+		}// End if().
+	}// End foreach().
 
 	// Set $post_status based on $author_found and on author's publish_posts capability
 	if ( $author_found ) {
-		$user = new WP_User($post_author);
-		$post_status = ( $user->has_cap('publish_posts') ) ? 'publish' : 'pending';
+		$user = new WP_User( $post_author );
+		$post_status = ( $user->has_cap( 'publish_posts' ) ) ? 'publish' : 'pending';
 	} else {
 		// Author not found in DB, set status to pending. Author already set to admin.
 		$post_status = 'pending';
 	}
 
-	$subject = trim($subject);
+	$subject = trim( $subject );
 
 	if ( $content_type == 'multipart/alternative' ) {
-		$content = explode('--'.$boundary, $content);
+		$content = explode( '--' . $boundary, $content );
 		$content = $content[2];
 
 		// Match case-insensitive content-transfer-encoding.
-		if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim) ) {
-			$content = explode($delim[0], $content);
+		if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim ) ) {
+			$content = explode( $delim[0], $content );
 			$content = $content[1];
 		}
-		$content = strip_tags($content, '<img><p><br><i><b><u><em><strong><strike><font><span><div>');
+		$content = strip_tags( $content, '<img><p><br><i><b><u><em><strong><strike><font><span><div>' );
 	}
-	$content = trim($content);
+	$content = trim( $content );
 
 	/**
 	 * Filters the original content of the email.
@@ -180,19 +186,19 @@
 	 */
 	$content = apply_filters( 'wp_mail_original_content', $content );
 
-	if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) {
-		$content = quoted_printable_decode($content);
+	if ( false !== stripos( $content_transfer_encoding, 'quoted-printable' ) ) {
+		$content = quoted_printable_decode( $content );
 	}
 
-	if ( function_exists('iconv') && ! empty( $charset ) ) {
-		$content = iconv($charset, get_option('blog_charset'), $content);
+	if ( function_exists( 'iconv' ) && ! empty( $charset ) ) {
+		$content = iconv( $charset, get_option( 'blog_charset' ), $content );
 	}
 
 	// Captures any text in the body after $phone_delim as the body
-	$content = explode($phone_delim, $content);
+	$content = explode( $phone_delim, $content );
 	$content = empty( $content[1] ) ? $content[0] : $content[1];
 
-	$content = trim($content);
+	$content = trim( $content );
 
 	/**
 	 * Filters the content of the post submitted by email before saving.
@@ -203,22 +209,25 @@
 	 */
 	$post_content = apply_filters( 'phone_content', $content );
 
-	$post_title = xmlrpc_getposttitle($content);
+	$post_title = xmlrpc_getposttitle( $content );
 
-	if ($post_title == '') $post_title = $subject;
+	if ( $post_title == '' ) { $post_title = $subject;
+	}
 
-	$post_category = array(get_option('default_email_category'));
+	$post_category = array( get_option( 'default_email_category' ) );
 
-	$post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
-	$post_data = wp_slash($post_data);
+	$post_data = compact( 'post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status' );
+	$post_data = wp_slash( $post_data );
 
-	$post_ID = wp_insert_post($post_data);
-	if ( is_wp_error( $post_ID ) )
+	$post_ID = wp_insert_post( $post_data );
+	if ( is_wp_error( $post_ID ) ) {
 		echo "\n" . $post_ID->get_error_message();
+	}
 
 	// We couldn't post, for whatever reason. Better move forward to the next email.
-	if ( empty( $post_ID ) )
+	if ( empty( $post_ID ) ) {
 		continue;
+	}
 
 	/**
 	 * Fires after a post submitted by email is published.
@@ -232,7 +241,7 @@
 	echo "\n<p><strong>" . __( 'Author:' ) . '</strong> ' . esc_html( $post_author ) . '</p>';
 	echo "\n<p><strong>" . __( 'Posted title:' ) . '</strong> ' . esc_html( $post_title ) . '</p>';
 
-	if(!$pop3->delete($i)) {
+	if ( ! $pop3->delete( $i ) ) {
 		echo '<p>' . sprintf(
 			/* translators: %s: POP3 error */
 			__( 'Oops: %s' ),
@@ -247,7 +256,6 @@
 			'<strong>' . $i . '</strong>'
 		) . '</p>';
 	}
-
-}
+}// End for().
 
 $pop3->quit();
Index: src/wp-settings.php
===================================================================
--- src/wp-settings.php	(revision 40901)
+++ src/wp-settings.php	(working copy)
@@ -128,8 +128,9 @@
 register_shutdown_function( 'shutdown_action_hook' );
 
 // Stop most of WordPress from being loaded if we just want the basics.
-if ( SHORTINIT )
+if ( SHORTINIT ) {
 	return false;
+}
 
 // Load the L10n library.
 require_once( ABSPATH . WPINC . '/l10n.php' );
@@ -277,8 +278,9 @@
  */
 do_action( 'muplugins_loaded' );
 
-if ( is_multisite() )
-	ms_cookie_constants(  );
+if ( is_multisite() ) {
+	ms_cookie_constants( );
+}
 
 // Define constants after multisite is loaded.
 wp_cookie_constants();
@@ -312,8 +314,9 @@
 wp_set_internal_encoding();
 
 // Run wp_cache_postload() if object cache is enabled and the function exists.
-if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
+if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
 	wp_cache_postload();
+}
 
 /**
  * Fires once activated plugins have loaded.
@@ -388,15 +391,16 @@
 do_action( 'setup_theme' );
 
 // Define the template related constants.
-wp_templating_constants(  );
+wp_templating_constants( );
 
 // Load the default text localization domain.
 load_default_textdomain();
 
 $locale = get_locale();
 $locale_file = WP_LANG_DIR . "/$locale.php";
-if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
+if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
 	require( $locale_file );
+}
 unset( $locale_file );
 
 /**
@@ -418,10 +422,12 @@
 
 // Load the functions for the active theme, for both parent and child theme if applicable.
 if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
-	if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
+	if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) {
 		include( STYLESHEETPATH . '/functions.php' );
-	if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
+	}
+	if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) {
 		include( TEMPLATEPATH . '/functions.php' );
+	}
 }
 
 /**
@@ -453,7 +459,7 @@
 		require( $file );
 		die();
 	}
-	unset($file);
+	unset( $file );
 }
 
 /**
Index: src/wp-signup.php
===================================================================
--- src/wp-signup.php	(revision 40901)
+++ src/wp-signup.php	(working copy)
@@ -1,13 +1,13 @@
 <?php
 
 /** Sets up the WordPress Environment. */
-require( dirname(__FILE__) . '/wp-load.php' );
+require( dirname( __FILE__ ) . '/wp-load.php' );
 
 add_action( 'wp_head', 'wp_no_robots' );
 
 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 
-if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) ) {
+if ( is_array( get_site_option( 'illegal_names' ) ) && isset( $_GET['new'] ) && in_array( $_GET['new'], get_site_option( 'illegal_names' ) ) ) {
 	wp_redirect( network_home_url() );
 	die();
 }
@@ -27,12 +27,12 @@
 }
 add_action( 'wp_head', 'do_signup_header' );
 
-if ( !is_multisite() ) {
+if ( ! is_multisite() ) {
 	wp_redirect( wp_registration_url() );
 	die();
 }
 
-if ( !is_main_site() ) {
+if ( ! is_main_site() ) {
 	wp_redirect( network_site_url( 'wp-signup.php' ) );
 	die();
 }
@@ -102,19 +102,19 @@
 
 	$current_network = get_network();
 	// Blog name
-	if ( !is_subdomain_install() )
-		echo '<label for="blogname">' . __('Site Name:') . '</label>';
-	else
-		echo '<label for="blogname">' . __('Site Domain:') . '</label>';
+	if ( ! is_subdomain_install() ) {
+		echo '<label for="blogname">' . __( 'Site Name:' ) . '</label>';
+	} else { echo '<label for="blogname">' . __( 'Site Domain:' ) . '</label>';
+	}
 
-	if ( $errmsg = $errors->get_error_message('blogname') ) { ?>
+	if ( $errmsg = $errors->get_error_message( 'blogname' ) ) { ?>
 		<p class="error"><?php echo $errmsg ?></p>
 	<?php }
 
-	if ( !is_subdomain_install() )
-		echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" /><br />';
-	else
-		echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_network->domain ) ) . '</span><br />';
+	if ( ! is_subdomain_install() ) {
+		echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" /><br />';
+	} else { echo '<input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_network->domain ) ) . '</span><br />';
+	}
 
 	if ( ! is_user_logged_in() ) {
 		if ( ! is_subdomain_install() ) {
@@ -129,11 +129,11 @@
 
 	// Blog Title
 	?>
-	<label for="blog_title"><?php _e('Site Title:') ?></label>
-	<?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?>
+	<label for="blog_title"><?php _e( 'Site Title:' ) ?></label>
+	<?php if ( $errmsg = $errors->get_error_message( 'blog_title' ) ) { ?>
 		<p class="error"><?php echo $errmsg ?></p>
 	<?php }
-	echo '<input name="blog_title" type="text" id="blog_title" value="'.esc_attr($blog_title).'" />';
+	echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" />';
 	?>
 
 	<?php
@@ -169,19 +169,19 @@
 	<?php endif; // Languages. ?>
 
 	<div id="privacy">
-        <p class="privacy-intro">
-            <label for="blog_public_on"><?php _e('Privacy:') ?></label>
-            <?php _e( 'Allow search engines to index this site.' ); ?>
-            <br style="clear:both" />
-            <label class="checkbox" for="blog_public_on">
-                <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
-                <strong><?php _e( 'Yes' ); ?></strong>
-            </label>
-            <label class="checkbox" for="blog_public_off">
-                <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> />
-                <strong><?php _e( 'No' ); ?></strong>
-            </label>
-        </p>
+		<p class="privacy-intro">
+			<label for="blog_public_on"><?php _e( 'Privacy:' ) ?></label>
+			<?php _e( 'Allow search engines to index this site.' ); ?>
+			<br style="clear:both" />
+			<label class="checkbox" for="blog_public_on">
+				<input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( ! isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
+				<strong><?php _e( 'Yes' ); ?></strong>
+			</label>
+			<label class="checkbox" for="blog_public_off">
+				<input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> />
+				<strong><?php _e( 'No' ); ?></strong>
+			</label>
+		</p>
 	</div>
 
 	<?php
@@ -204,10 +204,11 @@
  */
 function validate_blog_form() {
 	$user = '';
-	if ( is_user_logged_in() )
+	if ( is_user_logged_in() ) {
 		$user = wp_get_current_user();
+	}
 
-	return wpmu_validate_blog_signup($_POST['blogname'], $_POST['blog_title'], $user);
+	return wpmu_validate_blog_signup( $_POST['blogname'], $_POST['blog_title'], $user );
 }
 
 /**
@@ -219,27 +220,27 @@
  * @param string          $user_email The entered email address.
  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
-function show_user_form($user_name = '', $user_email = '', $errors = '') {
+function show_user_form( $user_name = '', $user_email = '', $errors = '' ) {
 	if ( ! is_wp_error( $errors ) ) {
 		$errors = new WP_Error();
 	}
 
 	// User name
-	echo '<label for="user_name">' . __('Username:') . '</label>';
-	if ( $errmsg = $errors->get_error_message('user_name') ) {
-		echo '<p class="error">'.$errmsg.'</p>';
+	echo '<label for="user_name">' . __( 'Username:' ) . '</label>';
+	if ( $errmsg = $errors->get_error_message( 'user_name' ) ) {
+		echo '<p class="error">' . $errmsg . '</p>';
 	}
-	echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr( $user_name ) .'" autocapitalize="none" autocorrect="off" maxlength="60" /><br />';
+	echo '<input name="user_name" type="text" id="user_name" value="' . esc_attr( $user_name ) . '" autocapitalize="none" autocorrect="off" maxlength="60" /><br />';
 	_e( '(Must be at least 4 characters, letters and numbers only.)' );
 	?>
 
 	<label for="user_email"><?php _e( 'Email&nbsp;Address:' ) ?></label>
-	<?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
+	<?php if ( $errmsg = $errors->get_error_message( 'user_email' ) ) { ?>
 		<p class="error"><?php echo $errmsg ?></p>
 	<?php } ?>
-	<input name="user_email" type="email" id="user_email" value="<?php  echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?>
+	<input name="user_email" type="email" id="user_email" value="<?php  echo esc_attr( $user_email ) ?>" maxlength="200" /><br /><?php _e( 'We send your registration email to this address. (Double-check your email address before continuing.)' ) ?>
 	<?php
-	if ( $errmsg = $errors->get_error_message('generic') ) {
+	if ( $errmsg = $errors->get_error_message( 'generic' ) ) {
 		echo '<p class="error">' . $errmsg . '</p>';
 	}
 	/**
@@ -260,7 +261,7 @@
  * @return array Contains username, email, and error messages.
  */
 function validate_user_form() {
-	return wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
+	return wpmu_validate_user_signup( $_POST['user_name'], $_POST['user_email'] );
 }
 
 /**
@@ -275,14 +276,14 @@
 function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
 	$current_user = wp_get_current_user();
 
-	if ( ! is_wp_error($errors) ) {
+	if ( ! is_wp_error( $errors ) ) {
 		$errors = new WP_Error();
 	}
 
 	$signup_defaults = array(
 		'blogname'   => $blogname,
 		'blog_title' => $blog_title,
-		'errors'     => $errors
+		'errors'     => $errors,
 	);
 
 	/**
@@ -313,15 +314,15 @@
 	<p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ) ?></p>
 
 	<?php
-	$blogs = get_blogs_of_user($current_user->ID);
-	if ( !empty($blogs) ) { ?>
+	$blogs = get_blogs_of_user( $current_user->ID );
+	if ( ! empty( $blogs ) ) { ?>
 
 			<p><?php _e( 'Sites you are already a member of:' ) ?></p>
 			<ul>
 				<?php foreach ( $blogs as $blog ) {
 					$home_url = get_home_url( $blog->userblog_id );
 					echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>';
-				} ?>
+} ?>
 			</ul>
 	<?php } ?>
 
@@ -339,7 +340,7 @@
 		 */
 		do_action( 'signup_hidden_fields', 'create-another-site' );
 		?>
-		<?php show_blog_form($blogname, $blog_title, $errors); ?>
+		<?php show_blog_form( $blogname, $blog_title, $errors ); ?>
 		<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p>
 	</form>
 	<?php
@@ -370,7 +371,7 @@
 	$errors = $result['errors'];
 
 	if ( $errors->get_error_code() ) {
-		signup_another_blog($blogname, $blog_title, $errors);
+		signup_another_blog( $blogname, $blog_title, $errors );
 		return false;
 	}
 
@@ -378,7 +379,7 @@
 
 	$blog_meta_defaults = array(
 		'lang_id' => 1,
-		'public'  => $public
+		'public'  => $public,
 	);
 
 	// Handle the language setting for the new site.
@@ -393,7 +394,6 @@
 				$blog_meta_defaults['WPLANG'] = $language;
 			}
 		}
-
 	}
 
 	/**
@@ -499,10 +499,11 @@
 function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
 	global $active_signup;
 
-	if ( !is_wp_error($errors) )
+	if ( ! is_wp_error( $errors ) ) {
 		$errors = new WP_Error();
+	}
 
-	$signup_for = isset( $_POST[ 'signup_for' ] ) ? esc_html( $_POST[ 'signup_for' ] ) : 'blog';
+	$signup_for = isset( $_POST['signup_for'] ) ? esc_html( $_POST['signup_for'] ) : 'blog';
 
 	$signup_user_defaults = array(
 		'user_name'  => $user_name,
@@ -540,7 +541,7 @@
 		/** This action is documented in wp-signup.php */
 		do_action( 'signup_hidden_fields', 'validate-user' );
 		?>
-		<?php show_user_form($user_name, $user_email, $errors); ?>
+		<?php show_user_form( $user_name, $user_email, $errors ); ?>
 
 		<p>
 		<?php if ( $active_signup == 'blog' ) { ?>
@@ -549,14 +550,14 @@
 			<input id="signupblog" type="hidden" name="signup_for" value="user" />
 		<?php } else { ?>
 			<input id="signupblog" type="radio" name="signup_for" value="blog" <?php checked( $signup_for, 'blog' ); ?> />
-			<label class="checkbox" for="signupblog"><?php _e('Gimme a site!') ?></label>
+			<label class="checkbox" for="signupblog"><?php _e( 'Gimme a site!' ) ?></label>
 			<br />
 			<input id="signupuser" type="radio" name="signup_for" value="user" <?php checked( $signup_for, 'user' ); ?> />
-			<label class="checkbox" for="signupuser"><?php _e('Just a username, please.') ?></label>
+			<label class="checkbox" for="signupuser"><?php _e( 'Just a username, please.' ) ?></label>
 		<?php } ?>
 		</p>
 
-		<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next') ?>" /></p>
+		<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Next' ) ?>" /></p>
 	</form>
 	<?php
 }
@@ -575,19 +576,19 @@
 	$errors = $result['errors'];
 
 	if ( $errors->get_error_code() ) {
-		signup_user($user_name, $user_email, $errors);
+		signup_user( $user_name, $user_email, $errors );
 		return false;
 	}
 
 	if ( 'blog' == $_POST['signup_for'] ) {
-		signup_blog($user_name, $user_email);
+		signup_blog( $user_name, $user_email );
 		return false;
 	}
 
 	/** This filter is documented in wp-signup.php */
 	wpmu_signup_user( $user_name, $user_email, apply_filters( 'add_signup_meta', array() ) );
 
-	confirm_user_signup($user_name, $user_email);
+	confirm_user_signup( $user_name, $user_email );
 	return true;
 }
 
@@ -599,10 +600,10 @@
  * @param string $user_name The username
  * @param string $user_email The user's email address
  */
-function confirm_user_signup($user_name, $user_email) {
+function confirm_user_signup( $user_name, $user_email ) {
 	?>
 	<h2><?php /* translators: %s: username */
-	printf( __( '%s is your new username' ), $user_name) ?></h2>
+	printf( __( '%s is your new username' ), $user_name ) ?></h2>
 	<p><?php _e( 'But, before you can start using your new username, <strong>you must activate it</strong>.' ) ?></p>
 	<p><?php /* translators: %s: email address */
 	printf( __( 'Check your inbox at %s and click the link given.' ), '<strong>' . $user_email . '</strong>' ); ?></p>
@@ -623,16 +624,17 @@
  * @param string          $blog_title The site title.
  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
-function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
-	if ( !is_wp_error($errors) )
+function signup_blog( $user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '' ) {
+	if ( ! is_wp_error( $errors ) ) {
 		$errors = new WP_Error();
+	}
 
 	$signup_blog_defaults = array(
 		'user_name'  => $user_name,
 		'user_email' => $user_email,
 		'blogname'   => $blogname,
 		'blog_title' => $blog_title,
-		'errors'     => $errors
+		'errors'     => $errors,
 	);
 
 	/**
@@ -658,19 +660,20 @@
 	$blog_title = $filtered_results['blog_title'];
 	$errors = $filtered_results['errors'];
 
-	if ( empty($blogname) )
+	if ( empty( $blogname ) ) {
 		$blogname = $user_name;
+	}
 	?>
 	<form id="setupform" method="post" action="wp-signup.php">
 		<input type="hidden" name="stage" value="validate-blog-signup" />
-		<input type="hidden" name="user_name" value="<?php echo esc_attr($user_name) ?>" />
-		<input type="hidden" name="user_email" value="<?php echo esc_attr($user_email) ?>" />
+		<input type="hidden" name="user_name" value="<?php echo esc_attr( $user_name ) ?>" />
+		<input type="hidden" name="user_email" value="<?php echo esc_attr( $user_email ) ?>" />
 		<?php
 		/** This action is documented in wp-signup.php */
 		do_action( 'signup_hidden_fields', 'validate-site' );
 		?>
-		<?php show_blog_form($blogname, $blog_title, $errors); ?>
-		<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Signup') ?>" /></p>
+		<?php show_blog_form( $blogname, $blog_title, $errors ); ?>
+		<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Signup' ) ?>" /></p>
 	</form>
 	<?php
 }
@@ -702,12 +705,15 @@
 	$errors = $result['errors'];
 
 	if ( $errors->get_error_code() ) {
-		signup_blog($user_name, $user_email, $blogname, $blog_title, $errors);
+		signup_blog( $user_name, $user_email, $blogname, $blog_title, $errors );
 		return false;
 	}
 
 	$public = (int) $_POST['blog_public'];
-	$signup_meta = array ('lang_id' => 1, 'public' => $public);
+	$signup_meta = array(
+		'lang_id' => 1,
+		'public' => $public,
+	);
 
 	// Handle the language setting for the new site.
 	if ( ! empty( $_POST['WPLANG'] ) ) {
@@ -721,14 +727,13 @@
 				$signup_meta['WPLANG'] = $language;
 			}
 		}
-
 	}
 
 	/** This filter is documented in wp-signup.php */
 	$meta = apply_filters( 'add_signup_meta', $signup_meta );
 
-	wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
-	confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
+	wpmu_signup_blog( $domain, $path, $blog_title, $user_name, $user_email, $meta );
+	confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email, $meta );
 	return true;
 }
 
@@ -843,12 +848,12 @@
 	echo '</div>';
 }
 
-$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
+$newblogname = isset( $_GET['new'] ) ? strtolower( preg_replace( '/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'] ) ) : null;
 
 $current_user = wp_get_current_user();
 if ( $active_signup == 'none' ) {
 	_e( 'Registration has been disabled.' );
-} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
+} elseif ( $active_signup == 'blog' && ! is_user_logged_in() ) {
 	$login_url = wp_login_url( network_site_url( 'wp-signup.php' ) );
 	/* translators: %s: login URL */
 	printf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
@@ -856,55 +861,56 @@
 	$stage = isset( $_POST['stage'] ) ?  $_POST['stage'] : 'default';
 	switch ( $stage ) {
 		case 'validate-user-signup' :
-			if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
+			if ( $active_signup == 'all' || $_POST['signup_for'] == 'blog' && $active_signup == 'blog' || $_POST['signup_for'] == 'user' && $active_signup == 'user' ) {
 				validate_user_signup();
-			else
-				_e( 'User registration has been disabled.' );
+			} else { _e( 'User registration has been disabled.' );
+			}
 		break;
 		case 'validate-blog-signup':
-			if ( $active_signup == 'all' || $active_signup == 'blog' )
+			if ( $active_signup == 'all' || $active_signup == 'blog' ) {
 				validate_blog_signup();
-			else
-				_e( 'Site registration has been disabled.' );
+			} else { _e( 'Site registration has been disabled.' );
+			}
 			break;
 		case 'gimmeanotherblog':
 			validate_another_blog_signup();
 			break;
 		case 'default':
 		default :
-			$user_email = isset( $_POST[ 'user_email' ] ) ? $_POST[ 'user_email' ] : '';
+			$user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : '';
 			/**
 			 * Fires when the site sign-up form is sent.
 			 *
 			 * @since 3.0.0
 			 */
 			do_action( 'preprocess_signup_form' );
-			if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
-				signup_another_blog($newblogname);
-			elseif ( ! is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'user' ) )
+			if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) ) {
+				signup_another_blog( $newblogname );
+			} elseif ( ! is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'user' ) ) {
 				signup_user( $newblogname, $user_email );
-			elseif ( ! is_user_logged_in() && ( $active_signup == 'blog' ) )
+			} elseif ( ! is_user_logged_in() && ( $active_signup == 'blog' ) ) {
 				_e( 'Sorry, new registrations are not allowed at this time.' );
-			else
-				_e( 'You are logged in already. No need to register again!' );
+			} else { _e( 'You are logged in already. No need to register again!' );
+			}
 
 			if ( $newblogname ) {
 				$newblog = get_blogaddress_by_name( $newblogname );
 
-				if ( $active_signup == 'blog' || $active_signup == 'all' )
+				if ( $active_signup == 'blog' || $active_signup == 'all' ) {
 					/* translators: %s: site address */
 					printf( '<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
 						'<strong>' . $newblog . '</strong>'
 					);
-				else
-					/* translators: %s: site address */
+				} else { // End if().
+
 					printf( '<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
 						'<strong>' . $newblog . '</strong>'
 					);
+				}
 			}
 			break;
-	}
-}
+	}// End switch().
+}// End if().
 ?>
 </div>
 </div>
Index: src/wp-trackback.php
===================================================================
--- src/wp-trackback.php	(revision 40901)
+++ src/wp-trackback.php	(working copy)
@@ -8,9 +8,11 @@
  * @subpackage Trackbacks
  */
 
-if (empty($wp)) {
+if ( empty( $wp ) ) {
 	require_once( dirname( __FILE__ ) . '/wp-load.php' );
-	wp( array( 'tb' => '1' ) );
+	wp( array(
+		'tb' => '1',
+	) );
 }
 
 /**
@@ -24,73 +26,76 @@
  *                              Default '0'. Accepts '0' or '1', true or false.
  * @param string $error_message Error message if an error occurred.
  */
-function trackback_response($error = 0, $error_message = '') {
-	header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
-	if ($error) {
-		echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
+function trackback_response( $error = 0, $error_message = '' ) {
+	header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
+	if ( $error ) {
+		echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
 		echo "<response>\n";
 		echo "<error>1</error>\n";
 		echo "<message>$error_message</message>\n";
-		echo "</response>";
+		echo '</response>';
 		die();
 	} else {
-		echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
+		echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
 		echo "<response>\n";
 		echo "<error>0</error>\n";
-		echo "</response>";
+		echo '</response>';
 	}
 }
 
 // Trackback is done by a POST.
 $request_array = 'HTTP_POST_VARS';
 
-if ( !isset($_GET['tb_id']) || !$_GET['tb_id'] ) {
-	$tb_id = explode('/', $_SERVER['REQUEST_URI']);
-	$tb_id = intval( $tb_id[ count($tb_id) - 1 ] );
+if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) {
+	$tb_id = explode( '/', $_SERVER['REQUEST_URI'] );
+	$tb_id = intval( $tb_id[ count( $tb_id ) - 1 ] );
 }
 
-$tb_url  = isset($_POST['url'])     ? $_POST['url']     : '';
-$charset = isset($_POST['charset']) ? $_POST['charset'] : '';
+$tb_url  = isset( $_POST['url'] )     ? $_POST['url']     : '';
+$charset = isset( $_POST['charset'] ) ? $_POST['charset'] : '';
 
 // These three are stripslashed here so they can be properly escaped after mb_convert_encoding().
-$title     = isset($_POST['title'])     ? wp_unslash($_POST['title'])      : '';
-$excerpt   = isset($_POST['excerpt'])   ? wp_unslash($_POST['excerpt'])    : '';
-$blog_name = isset($_POST['blog_name']) ? wp_unslash($_POST['blog_name'])  : '';
-
-if ($charset)
-	$charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
-else
-	$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
+$title     = isset( $_POST['title'] )     ? wp_unslash( $_POST['title'] )      : '';
+$excerpt   = isset( $_POST['excerpt'] )   ? wp_unslash( $_POST['excerpt'] )    : '';
+$blog_name = isset( $_POST['blog_name'] ) ? wp_unslash( $_POST['blog_name'] )  : '';
+
+if ( $charset ) {
+	$charset = str_replace( array( ',', ' ' ), '', strtoupper( trim( $charset ) ) );
+} else { $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
+}
 
 // No valid uses for UTF-7.
-if ( false !== strpos($charset, 'UTF-7') )
+if ( false !== strpos( $charset, 'UTF-7' ) ) {
 	die;
+}
 
 // For international trackbacks.
-if ( function_exists('mb_convert_encoding') ) {
-	$title     = mb_convert_encoding($title, get_option('blog_charset'), $charset);
-	$excerpt   = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset);
-	$blog_name = mb_convert_encoding($blog_name, get_option('blog_charset'), $charset);
+if ( function_exists( 'mb_convert_encoding' ) ) {
+	$title     = mb_convert_encoding( $title, get_option( 'blog_charset' ), $charset );
+	$excerpt   = mb_convert_encoding( $excerpt, get_option( 'blog_charset' ), $charset );
+	$blog_name = mb_convert_encoding( $blog_name, get_option( 'blog_charset' ), $charset );
 }
 
 // Now that mb_convert_encoding() has been given a swing, we need to escape these three.
-$title     = wp_slash($title);
-$excerpt   = wp_slash($excerpt);
-$blog_name = wp_slash($blog_name);
+$title     = wp_slash( $title );
+$excerpt   = wp_slash( $excerpt );
+$blog_name = wp_slash( $blog_name );
 
-if ( is_single() || is_page() )
+if ( is_single() || is_page() ) {
 	$tb_id = $posts[0]->ID;
+}
 
-if ( !isset($tb_id) || !intval( $tb_id ) )
+if ( ! isset( $tb_id ) || ! intval( $tb_id ) ) {
 	trackback_response( 1, __( 'I really need an ID for this to work.' ) );
+}
 
-if (empty($title) && empty($tb_url) && empty($blog_name)) {
+if ( empty( $title ) && empty( $tb_url ) && empty( $blog_name ) ) {
 	// If it doesn't look like a trackback at all.
-	wp_redirect(get_permalink($tb_id));
+	wp_redirect( get_permalink( $tb_id ) );
 	exit;
 }
 
-if ( !empty($tb_url) && !empty($title) ) {
+if ( ! empty( $tb_url ) && ! empty( $title ) ) {
 	/**
 	* Fires before the trackback is added to a post.
 	*
@@ -105,12 +110,13 @@
 	*/
 	do_action( 'pre_trackback_post', $tb_id, $tb_url, $charset, $title, $excerpt, $blog_name );
 
-	header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
+	header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
 
-	if ( !pings_open($tb_id) )
+	if ( ! pings_open( $tb_id ) ) {
 		trackback_response( 1, __( 'Sorry, trackbacks are closed for this item.' ) );
+	}
 
-	$title =  wp_html_excerpt( $title, 250, '&#8230;' );
+	$title = wp_html_excerpt( $title, 250, '&#8230;' );
 	$excerpt = wp_html_excerpt( $excerpt, 252, '&#8230;' );
 
 	$comment_post_ID = (int) $tb_id;
@@ -120,13 +126,14 @@
 	$comment_content = "<strong>$title</strong>\n\n$excerpt";
 	$comment_type = 'trackback';
 
-	$dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) );
-	if ( $dupe )
+	$dupe = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url ) );
+	if ( $dupe ) {
 		trackback_response( 1, __( 'We already have a ping from that URL for this post.' ) );
+	}
 
-	$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
+	$commentdata = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type' );
 
-	wp_new_comment($commentdata);
+	wp_new_comment( $commentdata );
 	$trackback_id = $wpdb->insert_id;
 
 	/**
@@ -138,4 +145,4 @@
 	 */
 	do_action( 'trackback_post', $trackback_id );
 	trackback_response( 0 );
-}
+}// End if().
Index: src/xmlrpc.php
===================================================================
--- src/xmlrpc.php	(revision 40901)
+++ src/xmlrpc.php	(working copy)
@@ -10,65 +10,66 @@
  *
  * @var bool
  */
-define('XMLRPC_REQUEST', true);
+define( 'XMLRPC_REQUEST', true );
 
 // Some browser-embedded clients send cookies. We don't want them.
 $_COOKIE = array();
 
 // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
 // but we can do it ourself.
-if ( !isset( $HTTP_RAW_POST_DATA ) ) {
+if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
 	$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
 }
 
 // fix for mozBlog and other cases where '<?xml' isn't on the very first line
-if ( isset($HTTP_RAW_POST_DATA) )
-	$HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
+if ( isset( $HTTP_RAW_POST_DATA ) ) {
+	$HTTP_RAW_POST_DATA = trim( $HTTP_RAW_POST_DATA );
+}
 
 /** Include the bootstrap for setting up WordPress environment */
 include( dirname( __FILE__ ) . '/wp-load.php' );
 
 if ( isset( $_GET['rsd'] ) ) { // http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+	header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
 ?>
-<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
+<?php echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
 <rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
   <service>
-    <engineName>WordPress</engineName>
-    <engineLink>https://wordpress.org/</engineLink>
-    <homePageLink><?php bloginfo_rss('url') ?></homePageLink>
-    <apis>
-      <api name="WordPress" blogID="1" preferred="true" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
-      <api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
-      <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
-      <api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
-      <?php
-      /**
-       * Add additional APIs to the Really Simple Discovery (RSD) endpoint.
-       *
-       * @link http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
+	<engineName>WordPress</engineName>
+	<engineLink>https://wordpress.org/</engineLink>
+	<homePageLink><?php bloginfo_rss( 'url' ) ?></homePageLink>
+	<apis>
+	  <api name="WordPress" blogID="1" preferred="true" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ) ?>" />
+	  <api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ) ?>" />
+	  <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ) ?>" />
+	  <api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ) ?>" />
+		<?php
+		/**
+	   * Add additional APIs to the Really Simple Discovery (RSD) endpoint.
+	   *
+	   * @link http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
 	   *
-       * @since 3.5.0
-       */
-      do_action( 'xmlrpc_rsd_apis' );
-      ?>
-    </apis>
+	   * @since 3.5.0
+	   */
+		do_action( 'xmlrpc_rsd_apis' );
+		?>
+	</apis>
   </service>
 </rsd>
 <?php
 exit;
 }
 
-include_once(ABSPATH . 'wp-admin/includes/admin.php');
-include_once(ABSPATH . WPINC . '/class-IXR.php');
-include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); 
+include_once( ABSPATH . 'wp-admin/includes/admin.php' );
+include_once( ABSPATH . WPINC . '/class-IXR.php' );
+include_once( ABSPATH . WPINC . '/class-wp-xmlrpc-server.php' );
 
 /**
  * Posts submitted via the XML-RPC interface get that title
  * @name post_default_title
  * @var string
  */
-$post_default_title = "";
+$post_default_title = '';
 
 /**
  * Filters the class used for handling XML-RPC requests.
@@ -96,6 +97,7 @@
  */
 function logIO( $io, $msg ) {
 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
-	if ( ! empty( $GLOBALS['xmlrpc_logging'] ) )
+	if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) {
 		error_log( $io . ' - ' . $msg );
-}
\ No newline at end of file
+	}
+}
