Index: src/wp-admin/about.php
===================================================================
--- src/wp-admin/about.php	(revision 40901)
+++ src/wp-admin/about.php	(working copy)
@@ -245,15 +245,15 @@
 
 /* translators: 1: WordPress version number, 2: plural number of bugs. */
 _n_noop( '<strong>Version %1$s</strong> addressed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed %2$s bugs.' );
+'<strong>Version %1$s</strong> addressed %2$s bugs.' );
 
 /* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */
 _n_noop( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' );
+'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' );
 
 /* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
 _n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' );
+'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' );
 
 /* translators: %s: Codex URL */
 __( 'For more information, see <a href="%s">the release notes</a>.' );
Index: src/wp-admin/admin-ajax.php
===================================================================
--- src/wp-admin/admin-ajax.php	(revision 40901)
+++ src/wp-admin/admin-ajax.php	(working copy)
@@ -25,8 +25,9 @@
 send_origin_headers();
 
 // Require an action parameter
-if ( empty( $_REQUEST['action'] ) )
+if ( empty( $_REQUEST['action'] ) ) {
 	die( '0' );
+}
 
 /** Load WordPress Administration APIs */
 require_once( ABSPATH . 'wp-admin/includes/admin.php' );
@@ -44,38 +45,104 @@
 do_action( 'admin_init' );
 
 $core_actions_get = array(
-	'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache',
-	'autocomplete-user', 'dashboard-widgets', 'logged-in',
+	'fetch-list',
+'ajax-tag-search',
+'wp-compression-test',
+'imgedit-preview',
+'oembed-cache',
+	'autocomplete-user',
+'dashboard-widgets',
+'logged-in',
 );
 
 $core_actions_post = array(
-	'oembed-cache', 'image-editor', 'delete-comment', 'delete-tag', 'delete-link',
-	'delete-meta', 'delete-post', 'trash-post', 'untrash-post', 'delete-page', 'dim-comment',
-	'add-link-category', 'add-tag', 'get-tagcloud', 'get-comments', 'replyto-comment',
-	'edit-comment', 'add-menu-item', 'add-meta', 'add-user', 'closed-postboxes',
-	'hidden-columns', 'update-welcome-panel', 'menu-get-metabox', 'wp-link-ajax',
-	'menu-locations-save', 'menu-quick-search', 'meta-box-order', 'get-permalink',
-	'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order',
-	'save-widget', 'delete-inactive-widgets', 'set-post-thumbnail', 'date_format', 'time_format',
-	'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
-	'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
-	'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
-	'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
-	'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
-	'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
-	'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
-	'install-theme', 'get-post-thumbnail-html', 'get-community-events',
+	'oembed-cache',
+'image-editor',
+'delete-comment',
+'delete-tag',
+'delete-link',
+	'delete-meta',
+'delete-post',
+'trash-post',
+'untrash-post',
+'delete-page',
+'dim-comment',
+	'add-link-category',
+'add-tag',
+'get-tagcloud',
+'get-comments',
+'replyto-comment',
+	'edit-comment',
+'add-menu-item',
+'add-meta',
+'add-user',
+'closed-postboxes',
+	'hidden-columns',
+'update-welcome-panel',
+'menu-get-metabox',
+'wp-link-ajax',
+	'menu-locations-save',
+'menu-quick-search',
+'meta-box-order',
+'get-permalink',
+	'sample-permalink',
+'inline-save',
+'inline-save-tax',
+'find_posts',
+'widgets-order',
+	'save-widget',
+'delete-inactive-widgets',
+'set-post-thumbnail',
+'date_format',
+'time_format',
+	'wp-remove-post-lock',
+'dismiss-wp-pointer',
+'upload-attachment',
+'get-attachment',
+	'query-attachments',
+'save-attachment',
+'save-attachment-compat',
+'send-link-to-editor',
+	'send-attachment-to-editor',
+'save-attachment-order',
+'heartbeat',
+'get-revision-diffs',
+	'save-user-color-scheme',
+'update-widget',
+'query-themes',
+'parse-embed',
+'set-attachment-thumbnail',
+	'parse-media-shortcode',
+'destroy-sessions',
+'install-plugin',
+'update-plugin',
+'press-this-save-post',
+	'press-this-add-category',
+'crop-image',
+'generate-password',
+'save-wporg-username',
+'delete-plugin',
+	'search-plugins',
+'search-install-plugins',
+'activate-plugin',
+'update-theme',
+'delete-theme',
+	'install-theme',
+'get-post-thumbnail-html',
+'get-community-events',
 );
 
 // Deprecated
 $core_actions_post[] = 'wp-fullscreen-save-post';
 
 // Register core Ajax calls.
-if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) )
+if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) ) {
 	add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
+}
 
-if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) )
+if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) ) {
 	add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 );
+}
 
 add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
 
Index: src/wp-admin/admin-footer.php
===================================================================
--- src/wp-admin/admin-footer.php	(revision 40901)
+++ src/wp-admin/admin-footer.php	(working copy)
@@ -7,8 +7,9 @@
  */
 
 // don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
+if ( ! defined( 'ABSPATH' ) ) {
+	die( '-1' );
+}
 
 /**
  * @global string $hook_suffix
@@ -99,9 +100,10 @@
 do_action( "admin_footer-{$hook_suffix}" );
 
 // get_site_option() won't exist when auto upgrading from <= 2.7
-if ( function_exists('get_site_option') ) {
-	if ( false === get_site_option('can_compress_scripts') )
+if ( function_exists( 'get_site_option' ) ) {
+	if ( false === get_site_option( 'can_compress_scripts' ) ) {
 		compression_test();
+	}
 }
 
 ?>
Index: src/wp-admin/admin-functions.php
===================================================================
--- src/wp-admin/admin-functions.php	(revision 40901)
+++ src/wp-admin/admin-functions.php	(working copy)
@@ -9,7 +9,7 @@
  * @subpackage Administration
  */
 
-_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/admin.php' );
+_deprecated_file( basename( __FILE__ ), '2.5.0', 'wp-admin/includes/admin.php' );
 
 /** WordPress Administration API: Includes all Administration functions. */
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
+require_once( ABSPATH . 'wp-admin/includes/admin.php' );
Index: src/wp-admin/admin-header.php
===================================================================
--- src/wp-admin/admin-header.php	(revision 40901)
+++ src/wp-admin/admin-header.php	(working copy)
@@ -6,9 +6,10 @@
  * @subpackage Administration
  */
 
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
-if ( ! defined( 'WP_ADMIN' ) )
+@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
+if ( ! defined( 'WP_ADMIN' ) ) {
 	require_once( dirname( __FILE__ ) . '/admin.php' );
+}
 
 /**
  * In case admin-header.php is included in a function.
@@ -26,8 +27,9 @@
 	$update_title, $total_update_count, $parent_file;
 
 // Catch plugins that include admin-header.php before admin.php completes.
-if ( empty( $current_screen ) )
+if ( empty( $current_screen ) ) {
 	set_current_screen();
+}
 
 get_admin_page_title();
 $title = esc_html( strip_tags( $title ) );
@@ -69,10 +71,10 @@
 
 wp_enqueue_style( 'colors' );
 wp_enqueue_style( 'ie' );
-wp_enqueue_script('utils');
+wp_enqueue_script( 'utils' );
 wp_enqueue_script( 'svg-painter' );
 
-$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
+$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
 ?>
 <script type="text/javascript">
 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
@@ -141,37 +143,46 @@
  */
 do_action( 'admin_head' );
 
-if ( get_user_setting('mfold') == 'f' )
+if ( get_user_setting( 'mfold' ) == 'f' ) {
 	$admin_body_class .= ' folded';
+}
 
-if ( !get_user_setting('unfold') )
+if ( ! get_user_setting( 'unfold' ) ) {
 	$admin_body_class .= ' auto-fold';
+}
 
-if ( is_admin_bar_showing() )
+if ( is_admin_bar_showing() ) {
 	$admin_body_class .= ' admin-bar';
+}
 
-if ( is_rtl() )
+if ( is_rtl() ) {
 	$admin_body_class .= ' rtl';
+}
 
-if ( $current_screen->post_type )
+if ( $current_screen->post_type ) {
 	$admin_body_class .= ' post-type-' . $current_screen->post_type;
+}
 
-if ( $current_screen->taxonomy )
+if ( $current_screen->taxonomy ) {
 	$admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
+}
 
 $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
 $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
 $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
-if ( wp_is_mobile() )
+if ( wp_is_mobile() ) {
 	$admin_body_class .= ' mobile';
+}
 
-if ( is_multisite() )
+if ( is_multisite() ) {
 	$admin_body_class .= ' multisite';
+}
 
-if ( is_network_admin() )
+if ( is_network_admin() ) {
 	$admin_body_class .= ' network-admin';
+}
 
 $admin_body_class .= ' no-customize-support no-svg';
 
@@ -207,7 +218,7 @@
 ?>
 
 <div id="wpwrap">
-<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
+<?php require( ABSPATH . 'wp-admin/menu-header.php' ); ?>
 <div id="wpcontent">
 
 <?php
@@ -221,13 +232,13 @@
 
 <div id="wpbody" role="main">
 <?php
-unset($title_class, $blog_name, $total_update_count, $update_title);
+unset( $title_class, $blog_name, $total_update_count, $update_title );
 
 $current_screen->set_parentage( $parent_file );
 
 ?>
 
-<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
+<div id="wpbody-content" aria-label="<?php esc_attr_e( 'Main content' ); ?>" tabindex="0">
 <?php
 
 $current_screen->render_screen_meta();
@@ -262,5 +273,6 @@
  */
 do_action( 'all_admin_notices' );
 
-if ( $parent_file == 'options-general.php' )
-	require(ABSPATH . 'wp-admin/options-head.php');
+if ( $parent_file == 'options-general.php' ) {
+	require( ABSPATH . 'wp-admin/options-head.php' );
+}
Index: src/wp-admin/admin-post.php
===================================================================
--- src/wp-admin/admin-post.php	(revision 40901)
+++ src/wp-admin/admin-post.php	(working copy)
@@ -13,15 +13,15 @@
 	define( 'WP_ADMIN', true );
 }
 
-if ( defined('ABSPATH') )
-	require_once(ABSPATH . 'wp-load.php');
-else
-	require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
+if ( defined( 'ABSPATH' ) ) {
+	require_once( ABSPATH . 'wp-load.php' );
+} else { require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
+}
 
 /** Allow for cross-domain requests (from the front end). */
 send_origin_headers();
 
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
+require_once( ABSPATH . 'wp-admin/includes/admin.php' );
 
 nocache_headers();
 
@@ -68,4 +68,4 @@
 		 */
 		do_action( "admin_post_{$action}" );
 	}
-}
+}// End if().
Index: src/wp-admin/admin.php
===================================================================
--- src/wp-admin/admin.php	(revision 40901)
+++ src/wp-admin/admin.php	(working copy)
@@ -15,24 +15,27 @@
 	define( 'WP_ADMIN', true );
 }
 
-if ( ! defined('WP_NETWORK_ADMIN') )
-	define('WP_NETWORK_ADMIN', false);
+if ( ! defined( 'WP_NETWORK_ADMIN' ) ) {
+	define( 'WP_NETWORK_ADMIN', false );
+}
 
-if ( ! defined('WP_USER_ADMIN') )
-	define('WP_USER_ADMIN', false);
+if ( ! defined( 'WP_USER_ADMIN' ) ) {
+	define( 'WP_USER_ADMIN', false );
+}
 
 if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
-	define('WP_BLOG_ADMIN', true);
+	define( 'WP_BLOG_ADMIN', true );
 }
 
-if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
-	define('WP_LOAD_IMPORTERS', true);
+if ( isset( $_GET['import'] ) && ! defined( 'WP_LOAD_IMPORTERS' ) ) {
+	define( 'WP_LOAD_IMPORTERS', true );
+}
 
-require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
+require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
 
 nocache_headers();
 
-if ( get_option('db_upgraded') ) {
+if ( get_option( 'db_upgraded' ) ) {
 	flush_rewrite_rules();
 	update_option( 'db_upgraded',  false );
 
@@ -42,12 +45,12 @@
 	 * @since 2.8.0
 	 */
 	do_action( 'after_db_upgrade' );
-} elseif ( get_option('db_version') != $wp_db_version && empty($_POST) ) {
-	if ( !is_multisite() ) {
+} elseif ( get_option( 'db_version' ) != $wp_db_version && empty( $_POST ) ) {
+	if ( ! is_multisite() ) {
 		wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
 		exit;
 
-	/**
+		/**
 	 * Filters whether to attempt to perform the multisite DB upgrade routine.
 	 *
 	 * In single site, the user would be redirected to wp-admin/upgrade.php.
@@ -68,24 +71,28 @@
 		 * If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load:
 		 * attempt to do no more than threshold value, with some +/- allowed.
 		 */
-		if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
+		if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) {
 			require_once( ABSPATH . WPINC . '/http.php' );
-			$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
+			$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array(
+				'timeout' => 120,
+				'httpversion' => '1.1',
+			) );
 			/** This action is documented in wp-admin/network/upgrade.php */
 			do_action( 'after_mu_upgrade', $response );
-			unset($response);
+			unset( $response );
 		}
-		unset($c);
-	}
-}
+		unset( $c );
+	}// End if().
+}// End if().
 
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
+require_once( ABSPATH . 'wp-admin/includes/admin.php' );
 
 auth_redirect();
 
 // Schedule trash collection
-if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
-	wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
+if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) {
+	wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' );
+}
 
 set_screen_options();
 
@@ -115,27 +122,27 @@
 
 $editing = false;
 
-if ( isset($_GET['page']) ) {
+if ( isset( $_GET['page'] ) ) {
 	$plugin_page = wp_unslash( $_GET['page'] );
-	$plugin_page = plugin_basename($plugin_page);
+	$plugin_page = plugin_basename( $plugin_page );
 }
 
-if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
+if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) {
 	$typenow = $_REQUEST['post_type'];
-else
-	$typenow = '';
+} else { $typenow = '';
+}
 
-if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
+if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) ) {
 	$taxnow = $_REQUEST['taxonomy'];
-else
-	$taxnow = '';
+} else { $taxnow = '';
+}
 
-if ( WP_NETWORK_ADMIN )
-	require(ABSPATH . 'wp-admin/network/menu.php');
-elseif ( WP_USER_ADMIN )
-	require(ABSPATH . 'wp-admin/user/menu.php');
-else
-	require(ABSPATH . 'wp-admin/menu.php');
+if ( WP_NETWORK_ADMIN ) {
+	require( ABSPATH . 'wp-admin/network/menu.php' );
+} elseif ( WP_USER_ADMIN ) {
+	require( ABSPATH . 'wp-admin/user/menu.php' );
+} else { require( ABSPATH . 'wp-admin/menu.php' );
+}
 
 if ( current_user_can( 'manage_options' ) ) {
 	wp_raise_memory_limit( 'admin' );
@@ -153,26 +160,26 @@
  */
 do_action( 'admin_init' );
 
-if ( isset($plugin_page) ) {
-	if ( !empty($typenow) )
+if ( isset( $plugin_page ) ) {
+	if ( ! empty( $typenow ) ) {
 		$the_parent = $pagenow . '?post_type=' . $typenow;
-	else
-		$the_parent = $pagenow;
-	if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) {
-		$page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
+	} else { $the_parent = $pagenow;
+	}
+	if ( ! $page_hook = get_plugin_page_hook( $plugin_page, $the_parent ) ) {
+		$page_hook = get_plugin_page_hook( $plugin_page, $plugin_page );
 
 		// Back-compat for plugins using add_management_page().
-		if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
+		if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook( $plugin_page, 'tools.php' ) ) {
 			// There could be plugin specific params on the URL, so we need the whole query string
-			if ( !empty($_SERVER[ 'QUERY_STRING' ]) )
-				$query_string = $_SERVER[ 'QUERY_STRING' ];
-			else
-				$query_string = 'page=' . $plugin_page;
-			wp_redirect( admin_url('tools.php?' . $query_string) );
+			if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
+				$query_string = $_SERVER['QUERY_STRING'];
+			} else { $query_string = 'page=' . $plugin_page;
+			}
+			wp_redirect( admin_url( 'tools.php?' . $query_string ) );
 			exit;
 		}
 	}
-	unset($the_parent);
+	unset( $the_parent );
 }
 
 $hook_suffix = '';
@@ -187,7 +194,7 @@
 set_current_screen();
 
 // Handle plugin admin pages.
-if ( isset($plugin_page) ) {
+if ( isset( $plugin_page ) ) {
 	if ( $page_hook ) {
 		/**
 		 * Fires before a particular screen is loaded.
@@ -210,8 +217,9 @@
 		 * @since 2.1.0
 		 */
 		do_action( "load-{$page_hook}" );
-		if (! isset($_GET['noheader']))
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! isset( $_GET['noheader'] ) ) {
+			require_once( ABSPATH . 'wp-admin/admin-header.php' );
+		}
 
 		/**
 		 * Used to call the registered callback for a plugin screen.
@@ -225,8 +233,9 @@
 			wp_die( __( 'Invalid plugin page.' ) );
 		}
 
-		if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) )
-			wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
+		if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) && ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) ) {
+			wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) );
+		}
 
 		/**
 		 * Fires before a particular screen is loaded.
@@ -242,16 +251,17 @@
 		 */
 		do_action( "load-{$plugin_page}" );
 
-		if ( !isset($_GET['noheader']))
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! isset( $_GET['noheader'] ) ) {
+			require_once( ABSPATH . 'wp-admin/admin-header.php' );
+		}
 
-		if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") )
-			include(WPMU_PLUGIN_DIR . "/$plugin_page");
-		else
-			include(WP_PLUGIN_DIR . "/$plugin_page");
-	}
+		if ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) {
+			include( WPMU_PLUGIN_DIR . "/$plugin_page" );
+		} else { include( WP_PLUGIN_DIR . "/$plugin_page" );
+		}
+	}// End if().
 
-	include(ABSPATH . 'wp-admin/admin-footer.php');
+	include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	exit();
 } elseif ( isset( $_GET['import'] ) ) {
@@ -262,12 +272,12 @@
 		wp_die( __( 'Sorry, you are not allowed to import content.' ) );
 	}
 
-	if ( validate_file($importer) ) {
+	if ( validate_file( $importer ) ) {
 		wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
 		exit;
 	}
 
-	if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) {
+	if ( ! isset( $wp_importers[ $importer ] ) || ! is_callable( $wp_importers[ $importer ][2] ) ) {
 		wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
 		exit;
 	}
@@ -283,14 +293,15 @@
 
 	$parent_file = 'tools.php';
 	$submenu_file = 'import.php';
-	$title = __('Import');
+	$title = __( 'Import' );
 
-	if (! isset($_GET['noheader']))
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+	if ( ! isset( $_GET['noheader'] ) ) {
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
+	}
 
-	require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
+	require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 
-	define('WP_IMPORTING', true);
+	define( 'WP_IMPORTING', true );
 
 	/**
 	 * Whether to filter imported data through kses on import.
@@ -306,12 +317,12 @@
 		kses_init_filters();  // Always filter imported data with kses on multisite.
 	}
 
-	call_user_func($wp_importers[$importer][2]);
+	call_user_func( $wp_importers[ $importer ][2] );
 
-	include(ABSPATH . 'wp-admin/admin-footer.php');
+	include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	// Make sure rules are flushed
-	flush_rewrite_rules(false);
+	flush_rewrite_rules( false );
 
 	exit();
 } else {
@@ -334,19 +345,21 @@
 	 * In all other cases, 'load-' . $pagenow should be used instead.
 	 */
 	if ( $typenow == 'page' ) {
-		if ( $pagenow == 'post-new.php' )
+		if ( $pagenow == 'post-new.php' ) {
 			do_action( 'load-page-new.php' );
-		elseif ( $pagenow == 'post.php' )
+		} elseif ( $pagenow == 'post.php' ) {
 			do_action( 'load-page.php' );
-	}  elseif ( $pagenow == 'edit-tags.php' ) {
-		if ( $taxnow == 'category' )
+		}
+	} elseif ( $pagenow == 'edit-tags.php' ) {
+		if ( $taxnow == 'category' ) {
 			do_action( 'load-categories.php' );
-		elseif ( $taxnow == 'link_category' )
+		} elseif ( $taxnow == 'link_category' ) {
 			do_action( 'load-edit-link-categories.php' );
-	} elseif( 'term.php' === $pagenow ) {
+		}
+	} elseif ( 'term.php' === $pagenow ) {
 		do_action( 'load-edit-tags.php' );
 	}
-}
+}// End if().
 
 if ( ! empty( $_REQUEST['action'] ) ) {
 	/**
Index: src/wp-admin/async-upload.php
===================================================================
--- src/wp-admin/async-upload.php	(revision 40901)
+++ src/wp-admin/async-upload.php	(working copy)
@@ -14,20 +14,22 @@
 	define( 'WP_ADMIN', true );
 }
 
-if ( defined('ABSPATH') )
-	require_once(ABSPATH . 'wp-load.php');
-else
-	require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
+if ( defined( 'ABSPATH' ) ) {
+	require_once( ABSPATH . 'wp-load.php' );
+} else { require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
+}
 
 if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
 	// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
-	if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
-		$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
-	elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
-		$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
-	if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
-		$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
-	unset($current_user);
+	if ( is_ssl() && empty( $_COOKIE[ SECURE_AUTH_COOKIE ] ) && ! empty( $_REQUEST['auth_cookie'] ) ) {
+		$_COOKIE[ SECURE_AUTH_COOKIE ] = $_REQUEST['auth_cookie'];
+	} elseif ( empty( $_COOKIE[ AUTH_COOKIE ] ) && ! empty( $_REQUEST['auth_cookie'] ) ) {
+		$_COOKIE[ AUTH_COOKIE ] = $_REQUEST['auth_cookie'];
+	}
+	if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) && ! empty( $_REQUEST['logged_in_cookie'] ) ) {
+		$_COOKIE[ LOGGED_IN_COOKIE ] = $_REQUEST['logged_in_cookie'];
+	}
+	unset( $current_user );
 }
 
 require_once( ABSPATH . 'wp-admin/admin.php' );
@@ -49,17 +51,20 @@
 }
 
 // just fetch the detail form for that attachment
-if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
+if ( isset( $_REQUEST['attachment_id'] ) && ($id = intval( $_REQUEST['attachment_id'] )) && $_REQUEST['fetch'] ) {
 	$post = get_post( $id );
-	if ( 'attachment' != $post->post_type )
+	if ( 'attachment' != $post->post_type ) {
 		wp_die( __( 'Invalid post type.' ) );
-	if ( ! current_user_can( 'edit_post', $id ) )
+	}
+	if ( ! current_user_can( 'edit_post', $id ) ) {
 		wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
+	}
 
 	switch ( $_REQUEST['fetch'] ) {
 		case 3 :
-			if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) )
+			if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) {
 				echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
+			}
 			echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
 
 			// Title shouldn't ever be empty, but use filename just in case.
@@ -68,32 +73,36 @@
 			echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60, '&hellip;' ) ) . '</span></div>';
 			break;
 		case 2 :
-			add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
-			echo get_media_item($id, array( 'send' => false, 'delete' => true ));
+			add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
+			echo get_media_item( $id, array(
+				'send' => false,
+				'delete' => true,
+			) );
 			break;
 		default:
-			add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
-			echo get_media_item($id);
+			add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 );
+			echo get_media_item( $id );
 			break;
 	}
 	exit;
 }
 
-check_admin_referer('media-form');
+check_admin_referer( 'media-form' );
 
 $post_id = 0;
 if ( isset( $_REQUEST['post_id'] ) ) {
 	$post_id = absint( $_REQUEST['post_id'] );
-	if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) )
+	if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) {
 		$post_id = 0;
+	}
 }
 
 $id = media_handle_upload( 'async-upload', $post_id );
-if ( is_wp_error($id) ) {
+if ( is_wp_error( $id ) ) {
 	echo '<div class="error-div error">
-	<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
-	<strong>' . sprintf(__('&#8220;%s&#8221; has failed to upload.'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
-	esc_html($id->get_error_message()) . '</div>';
+	<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __( 'Dismiss' ) . '</a>
+	<strong>' . sprintf( __( '&#8220;%s&#8221; has failed to upload.' ), esc_html( $_FILES['async-upload']['name'] ) ) . '</strong><br />' .
+	esc_html( $id->get_error_message() ) . '</div>';
 	exit;
 }
 
Index: src/wp-admin/comment.php
===================================================================
--- src/wp-admin/comment.php	(revision 40901)
+++ src/wp-admin/comment.php	(working copy)
@@ -16,152 +16,158 @@
  * @global string $action
  */
 global $action;
-wp_reset_vars( array('action') );
+wp_reset_vars( array( 'action' ) );
 
-if ( isset( $_POST['deletecomment'] ) )
+if ( isset( $_POST['deletecomment'] ) ) {
 	$action = 'deletecomment';
+}
 
-if ( 'cdc' == $action )
+if ( 'cdc' == $action ) {
 	$action = 'delete';
-elseif ( 'mac' == $action )
+} elseif ( 'mac' == $action ) {
 	$action = 'approve';
+}
 
 if ( isset( $_GET['dt'] ) ) {
-	if ( 'spam' == $_GET['dt'] )
+	if ( 'spam' == $_GET['dt'] ) {
 		$action = 'spam';
-	elseif ( 'trash' == $_GET['dt'] )
+	} elseif ( 'trash' == $_GET['dt'] ) {
 		$action = 'trash';
+	}
 }
 
-switch( $action ) {
+switch ( $action ) {
 
-case 'editcomment' :
-	$title = __('Edit Comment');
+	case 'editcomment' :
+		$title = __( 'Edit Comment' );
 
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __('Overview'),
-		'content' =>
+		get_current_screen()->add_help_tab( array(
+			'id'      => 'overview',
+			'title'   => __( 'Overview' ),
+			'content' =>
 			'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
-			'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>'
-	) );
+			'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>',
+		) );
 
-	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
-	);
+			get_current_screen()->set_help_sidebar(
+				'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+				'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
+				'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
+			);
 
-	wp_enqueue_script('comment');
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
+			wp_enqueue_script( 'comment' );
+			require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-	$comment_id = absint( $_GET['c'] );
+			$comment_id = absint( $_GET['c'] );
 
-	if ( !$comment = get_comment( $comment_id ) )
-		comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
+		if ( ! $comment = get_comment( $comment_id ) ) {
+			comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) );
+		}
 
-	if ( !current_user_can( 'edit_comment', $comment_id ) )
-		comment_footer_die( __('Sorry, you are not allowed to edit this comment.') );
+		if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
+			comment_footer_die( __( 'Sorry, you are not allowed to edit this comment.' ) );
+		}
 
-	if ( 'trash' == $comment->comment_approved )
-		comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
+		if ( 'trash' == $comment->comment_approved ) {
+			comment_footer_die( __( 'This comment is in the Trash. Please move it out of the Trash if you want to edit it.' ) );
+		}
 
-	$comment = get_comment_to_edit( $comment_id );
+			$comment = get_comment_to_edit( $comment_id );
 
-	include( ABSPATH . 'wp-admin/edit-form-comment.php' );
+			include( ABSPATH . 'wp-admin/edit-form-comment.php' );
 
 	break;
 
-case 'delete'  :
-case 'approve' :
-case 'trash'   :
-case 'spam'    :
-
-	$title = __('Moderate Comment');
-
-	$comment_id = absint( $_GET['c'] );
-
-	if ( ! $comment = get_comment( $comment_id ) ) {
-		wp_redirect( admin_url('edit-comments.php?error=1') );
-		die();
-	}
+	case 'delete'  :
+	case 'approve' :
+	case 'trash'   :
+	case 'spam'    :
+
+		$title = __( 'Moderate Comment' );
+
+		$comment_id = absint( $_GET['c'] );
+
+		if ( ! $comment = get_comment( $comment_id ) ) {
+			wp_redirect( admin_url( 'edit-comments.php?error=1' ) );
+			die();
+		}
 
-	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) {
-		wp_redirect( admin_url('edit-comments.php?error=2') );
-		die();
-	}
+		if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
+			wp_redirect( admin_url( 'edit-comments.php?error=2' ) );
+			die();
+		}
 
-	// No need to re-approve/re-trash/re-spam a comment.
-	if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) {
-		wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
-		die();
- 	}
+		// No need to re-approve/re-trash/re-spam a comment.
+		if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) {
+			wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
+			die();
+		}
 
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-	$formaction    = $action . 'comment';
-	$nonce_action  = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
-	$nonce_action .= $comment_id;
+		$formaction    = $action . 'comment';
+		$nonce_action  = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
+		$nonce_action .= $comment_id;
 
-?>
-<div class="wrap">
+		?>
+		<div class="wrap">
 
-<h1><?php echo esc_html( $title ); ?></h1>
+		<h1><?php echo esc_html( $title ); ?></h1>
 
-<?php
-switch ( $action ) {
-	case 'spam' :
-		$caution_msg = __('You are about to mark the following comment as spam:');
-		$button      = _x( 'Mark as Spam', 'comment' );
-		break;
-	case 'trash' :
-		$caution_msg = __('You are about to move the following comment to the Trash:');
-		$button      = __('Move to Trash');
-		break;
-	case 'delete' :
-		$caution_msg = __('You are about to delete the following comment:');
-		$button      = __('Permanently Delete Comment');
-		break;
-	default :
-		$caution_msg = __('You are about to approve the following comment:');
-		$button      = __('Approve Comment');
-		break;
-}
-
-if ( $comment->comment_approved != '0' ) { // if not unapproved
-	$message = '';
-	switch ( $comment->comment_approved ) {
-		case '1' :
-			$message = __('This comment is currently approved.');
-			break;
+	<?php
+	switch ( $action ) {
 		case 'spam' :
-			$message  = __('This comment is currently marked as spam.');
+			$caution_msg = __( 'You are about to mark the following comment as spam:' );
+			$button      = _x( 'Mark as Spam', 'comment' );
 			break;
 		case 'trash' :
-			$message  = __('This comment is currently in the Trash.');
+			$caution_msg = __( 'You are about to move the following comment to the Trash:' );
+			$button      = __( 'Move to Trash' );
+			break;
+		case 'delete' :
+			$caution_msg = __( 'You are about to delete the following comment:' );
+			$button      = __( 'Permanently Delete Comment' );
+			break;
+		default :
+			$caution_msg = __( 'You are about to approve the following comment:' );
+			$button      = __( 'Approve Comment' );
 			break;
 	}
-	if ( $message ) {
-		echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
+
+	if ( $comment->comment_approved != '0' ) { // if not unapproved
+		$message = '';
+		switch ( $comment->comment_approved ) {
+			case '1' :
+				$message = __( 'This comment is currently approved.' );
+				break;
+			case 'spam' :
+				$message  = __( 'This comment is currently marked as spam.' );
+				break;
+			case 'trash' :
+				$message  = __( 'This comment is currently in the Trash.' );
+				break;
+		}
+		if ( $message ) {
+			echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
+		}
 	}
-}
-?>
-<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
+	?>
+	<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
 
 <table class="form-table comment-ays">
 <tr>
-<th scope="row"><?php _e('Author'); ?></th>
+<th scope="row"><?php _e( 'Author' ); ?></th>
 <td><?php comment_author( $comment ); ?></td>
 </tr>
 <?php if ( get_comment_author_email( $comment ) ) { ?>
 <tr>
-<th scope="row"><?php _e('Email'); ?></th>
+<th scope="row"><?php _e( 'Email' ); ?></th>
 <td><?php comment_author_email( $comment ); ?></td>
 </tr>
 <?php } ?>
 <?php if ( get_comment_author_url( $comment ) ) { ?>
 <tr>
-<th scope="row"><?php _e('URL'); ?></th>
+<th scope="row"><?php _e( 'URL' ); ?></th>
 <td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
 </tr>
 <?php } ?>
@@ -170,28 +176,28 @@
 	<td>
 	<?php
 		$post_id = $comment->comment_post_ID;
-		if ( current_user_can( 'edit_post', $post_id ) ) {
-			$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
-			$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
-		} else {
-			$post_link = esc_html( get_the_title( $post_id ) );
-		}
+	if ( current_user_can( 'edit_post', $post_id ) ) {
+		$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
+		$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
+	} else {
+		$post_link = esc_html( get_the_title( $post_id ) );
+	}
 		echo $post_link;
 
-		if ( $comment->comment_parent ) {
-			$parent      = get_comment( $comment->comment_parent );
-			$parent_link = esc_url( get_comment_link( $parent ) );
-			$name        = get_comment_author( $parent );
-			printf(
-				/* translators: %s: comment link */
-				' | ' . __( 'In reply to %s.' ),
-				'<a href="' . $parent_link . '">' . $name . '</a>'
-			);
-		}
+	if ( $comment->comment_parent ) {
+		$parent      = get_comment( $comment->comment_parent );
+		$parent_link = esc_url( get_comment_link( $parent ) );
+		$name        = get_comment_author( $parent );
+		printf(
+			/* translators: %s: comment link */
+			' | ' . __( 'In reply to %s.' ),
+			'<a href="' . $parent_link . '">' . $name . '</a>'
+		);
+	}
 	?>
 	</td>
-</tr>
-<tr>
+	</tr>
+	<tr>
 	<th scope="row"><?php _e( 'Submitted on' ); ?></th>
 	<td>
 	<?php
@@ -201,118 +207,136 @@
 			get_comment_date( __( 'Y/m/d' ), $comment ),
 			get_comment_date( __( 'g:i a' ), $comment )
 		);
-		if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
-			echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
-		} else {
-			echo $submitted;
-		}
-	?>
-	</td>
-</tr>
-<tr>
-<th scope="row"><?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?></th>
-<td class="comment-content">
-	<?php comment_text( $comment ); ?>
-	<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
-</td>
-</tr>
-</table>
+	if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
+		echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
+	} else {
+		echo $submitted;
+	}
+		?>
+		</td>
+		</tr>
+		<tr>
+		<th scope="row"><?php /* translators: field name in comment form */ _ex( 'Comment', 'noun' ); ?></th>
+		<td class="comment-content">
+		<?php comment_text( $comment ); ?>
+		<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
+		</td>
+		</tr>
+		</table>
+
+		<form action="comment.php" method="get" class="comment-ays-submit">
+
+		<p>
+		<?php submit_button( $button, 'primary', 'submit', false ); ?>
+		<a href="<?php echo admin_url( 'edit-comments.php' ); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
+		</p>
+
+		<?php wp_nonce_field( $nonce_action ); ?>
+		<input type="hidden" name="action" value="<?php echo esc_attr( $formaction ); ?>" />
+		<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
+		<input type="hidden" name="noredir" value="1" />
+		</form>
+
+		</div>
+		<?php
+	break;
 
-<form action="comment.php" method="get" class="comment-ays-submit">
+	case 'deletecomment'    :
+	case 'trashcomment'     :
+	case 'untrashcomment'   :
+	case 'spamcomment'      :
+	case 'unspamcomment'    :
+	case 'approvecomment'   :
+	case 'unapprovecomment' :
+		$comment_id = absint( $_REQUEST['c'] );
+
+		if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) ) {
+			check_admin_referer( 'approve-comment_' . $comment_id );
+		} else { check_admin_referer( 'delete-comment_' . $comment_id );
+		}
 
-<p>
-	<?php submit_button( $button, 'primary', 'submit', false ); ?>
-	<a href="<?php echo admin_url('edit-comments.php'); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
-</p>
-
-<?php wp_nonce_field( $nonce_action ); ?>
-<input type="hidden" name="action" value="<?php echo esc_attr($formaction); ?>" />
-<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID); ?>" />
-<input type="hidden" name="noredir" value="1" />
-</form>
+		$noredir = isset( $_REQUEST['noredir'] );
 
-</div>
-<?php
-	break;
+		if ( ! $comment = get_comment( $comment_id ) ) {
+			comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'edit-comments.php' ) );
+		}
+		if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
+			comment_footer_die( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
+		}
 
-case 'deletecomment'    :
-case 'trashcomment'     :
-case 'untrashcomment'   :
-case 'spamcomment'      :
-case 'unspamcomment'    :
-case 'approvecomment'   :
-case 'unapprovecomment' :
-	$comment_id = absint( $_REQUEST['c'] );
-
-	if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) )
-		check_admin_referer( 'approve-comment_' . $comment_id );
-	else
-		check_admin_referer( 'delete-comment_' . $comment_id );
-
-	$noredir = isset($_REQUEST['noredir']);
-
-	if ( !$comment = get_comment($comment_id) )
-		comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
-	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
-		comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
-
-	if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
-		$redir = wp_get_referer();
-	elseif ( '' != wp_get_original_referer() && ! $noredir )
-		$redir = wp_get_original_referer();
-	elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) )
-		$redir = admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) );
-	else
-		$redir = admin_url('edit-comments.php');
+		if ( '' != wp_get_referer() && ! $noredir && false === strpos( wp_get_referer(), 'comment.php' ) ) {
+			$redir = wp_get_referer();
+		} elseif ( '' != wp_get_original_referer() && ! $noredir ) {
+			$redir = wp_get_original_referer();
+		} elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) ) {
+			$redir = admin_url( 'edit-comments.php?p=' . absint( $comment->comment_post_ID ) );
+		} else { $redir = admin_url( 'edit-comments.php' );
+		}
 
-	$redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids', 'approved', 'unapproved'), $redir );
+		$redir = remove_query_arg( array( 'spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids', 'approved', 'unapproved' ), $redir );
 
-	switch ( $action ) {
-		case 'deletecomment' :
-			wp_delete_comment( $comment );
-			$redir = add_query_arg( array('deleted' => '1'), $redir );
-			break;
-		case 'trashcomment' :
-			wp_trash_comment( $comment );
-			$redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir );
-			break;
-		case 'untrashcomment' :
-			wp_untrash_comment( $comment );
-			$redir = add_query_arg( array('untrashed' => '1'), $redir );
-			break;
-		case 'spamcomment' :
-			wp_spam_comment( $comment );
-			$redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir );
-			break;
-		case 'unspamcomment' :
-			wp_unspam_comment( $comment );
-			$redir = add_query_arg( array('unspammed' => '1'), $redir );
-			break;
-		case 'approvecomment' :
-			wp_set_comment_status( $comment, 'approve' );
-			$redir = add_query_arg( array( 'approved' => 1 ), $redir );
-			break;
-		case 'unapprovecomment' :
-			wp_set_comment_status( $comment, 'hold' );
-			$redir = add_query_arg( array( 'unapproved' => 1 ), $redir );
-			break;
-	}
+		switch ( $action ) {
+			case 'deletecomment' :
+				wp_delete_comment( $comment );
+				$redir = add_query_arg( array(
+					'deleted' => '1',
+				), $redir );
+				break;
+			case 'trashcomment' :
+				wp_trash_comment( $comment );
+				$redir = add_query_arg( array(
+					'trashed' => '1',
+					'ids' => $comment_id,
+				), $redir );
+				break;
+			case 'untrashcomment' :
+				wp_untrash_comment( $comment );
+				$redir = add_query_arg( array(
+					'untrashed' => '1',
+				), $redir );
+				break;
+			case 'spamcomment' :
+				wp_spam_comment( $comment );
+				$redir = add_query_arg( array(
+					'spammed' => '1',
+					'ids' => $comment_id,
+				), $redir );
+				break;
+			case 'unspamcomment' :
+				wp_unspam_comment( $comment );
+				$redir = add_query_arg( array(
+					'unspammed' => '1',
+				), $redir );
+				break;
+			case 'approvecomment' :
+				wp_set_comment_status( $comment, 'approve' );
+				$redir = add_query_arg( array(
+					'approved' => 1,
+				), $redir );
+				break;
+			case 'unapprovecomment' :
+				wp_set_comment_status( $comment, 'hold' );
+				$redir = add_query_arg( array(
+					'unapproved' => 1,
+				), $redir );
+				break;
+		}// End switch().
 
-	wp_redirect( $redir );
+		wp_redirect( $redir );
 	die;
 
-case 'editedcomment' :
+	case 'editedcomment' :
 
-	$comment_id = absint( $_POST['comment_ID'] );
-	$comment_post_id = absint( $_POST['comment_post_ID'] );
+		$comment_id = absint( $_POST['comment_ID'] );
+		$comment_post_id = absint( $_POST['comment_post_ID'] );
 
-	check_admin_referer( 'update-comment_' . $comment_id );
+		check_admin_referer( 'update-comment_' . $comment_id );
 
-	edit_comment();
+		edit_comment();
 
-	$location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
+		$location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
 
-	/**
+		/**
 	 * Filters the URI the user is redirected to after editing a comment in the admin.
 	 *
 	 * @since 2.1.0
@@ -320,14 +344,14 @@
 	 * @param string $location The URI the user will be redirected to.
 	 * @param int $comment_id The ID of the comment being edited.
 	 */
-	$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );
-	wp_redirect( $location );
+		$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );
+		wp_redirect( $location );
 
 	exit();
 
-default:
-	wp_die( __('Unknown action.') );
+	default:
+		wp_die( __( 'Unknown action.' ) );
 
-} // end switch
+} // End switch().
 
 include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/credits.php
===================================================================
--- src/wp-admin/credits.php	(revision 40901)
+++ src/wp-admin/credits.php	(working copy)
@@ -63,8 +63,9 @@
 		echo '<h3 class="wp-people-group">' . esc_html( $title ) . "</h3>\n";
 	}
 
-	if ( ! empty( $group_data['shuffle'] ) )
+	if ( ! empty( $group_data['shuffle'] ) ) {
 		shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
+	}
 
 	switch ( $group_data['type'] ) {
 		case 'list' :
@@ -83,19 +84,24 @@
 				echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
 				echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
 				$size = 'compact' == $group_data['type'] ? 30 : 60;
-				$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
+				$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array(
+					'size' => $size,
+				) );
 				$size *= 2;
-				$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
+				$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array(
+					'size' => $size,
+				) );
 				echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
 				echo esc_html( $person_data[0] ) . "</a>\n\t";
-				if ( ! $compact )
+				if ( ! $compact ) {
 					echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
+				}
 				echo "</li>\n";
 			}
 			echo "</ul>\n";
 		break;
 	}
-}
+}// End foreach().
 
 ?>
 <p class="clear"><?php
Index: src/wp-admin/custom-background.php
===================================================================
--- src/wp-admin/custom-background.php	(revision 40901)
+++ src/wp-admin/custom-background.php	(working copy)
@@ -47,7 +47,7 @@
 	 * @param callable $admin_header_callback
 	 * @param callable $admin_image_div_callback Optional custom image div output callback.
 	 */
-	public function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
+	public function __construct( $admin_header_callback = '', $admin_image_div_callback = '' ) {
 		$this->admin_header_callback = $admin_header_callback;
 		$this->admin_image_div_callback = $admin_image_div_callback;
 
@@ -87,12 +87,12 @@
 	public function admin_load() {
 		get_current_screen()->add_help_tab( array(
 			'id'      => 'overview',
-			'title'   => __('Overview'),
+			'title'   => __( 'Overview' ),
 			'content' =>
 				'<p>' . __( 'You can customize the look of your site without touching any of your theme&#8217;s code by using a custom background. Your background can be an image or a color.' ) . '</p>' .
 				'<p>' . __( 'To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the &#8220;Choose Image&#8221; button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '</p>' .
 				'<p>' . __( 'You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. &#8220;#ff0000&#8221; for red, or by choosing a color using the color picker.' ) . '</p>' .
-				'<p>' . __( 'Don&#8217;t forget to click on the Save Changes button when you are finished.' ) . '</p>'
+				'<p>' . __( 'Don&#8217;t forget to click on the Save Changes button when you are finished.' ) . '</p>',
 		) );
 
 		get_current_screen()->set_help_sidebar(
@@ -102,8 +102,8 @@
 		);
 
 		wp_enqueue_media();
-		wp_enqueue_script('custom-background');
-		wp_enqueue_style('wp-color-picker');
+		wp_enqueue_script( 'custom-background' );
+		wp_enqueue_style( 'wp-color-picker' );
 	}
 
 	/**
@@ -112,22 +112,23 @@
 	 * @since 3.0.0
 	 */
 	public function take_action() {
-		if ( empty($_POST) )
+		if ( empty( $_POST ) ) {
 			return;
+		}
 
-		if ( isset($_POST['reset-background']) ) {
-			check_admin_referer('custom-background-reset', '_wpnonce-custom-background-reset');
-			remove_theme_mod('background_image');
-			remove_theme_mod('background_image_thumb');
+		if ( isset( $_POST['reset-background'] ) ) {
+			check_admin_referer( 'custom-background-reset', '_wpnonce-custom-background-reset' );
+			remove_theme_mod( 'background_image' );
+			remove_theme_mod( 'background_image_thumb' );
 			$this->updated = true;
 			return;
 		}
 
-		if ( isset($_POST['remove-background']) ) {
+		if ( isset( $_POST['remove-background'] ) ) {
 			// @TODO: Uploaded files are not removed here.
-			check_admin_referer('custom-background-remove', '_wpnonce-custom-background-remove');
-			set_theme_mod('background_image', '');
-			set_theme_mod('background_image_thumb', '');
+			check_admin_referer( 'custom-background-remove', '_wpnonce-custom-background-remove' );
+			set_theme_mod( 'background_image', '' );
+			set_theme_mod( 'background_image_thumb', '' );
 			$this->updated = true;
 			wp_safe_redirect( $_POST['_wp_http_referer'] );
 			return;
@@ -202,13 +203,13 @@
 			set_theme_mod( 'background_attachment', $attachment );
 		}
 
-		if ( isset($_POST['background-color']) ) {
-			check_admin_referer('custom-background');
-			$color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']);
-			if ( strlen($color) == 6 || strlen($color) == 3 )
-				set_theme_mod('background_color', $color);
-			else
-				set_theme_mod('background_color', '');
+		if ( isset( $_POST['background-color'] ) ) {
+			check_admin_referer( 'custom-background' );
+			$color = preg_replace( '/[^0-9a-fA-F]/', '', $_POST['background-color'] );
+			if ( strlen( $color ) == 6 || strlen( $color ) == 3 ) {
+				set_theme_mod( 'background_color', $color );
+			} else { set_theme_mod( 'background_color', '' );
+			}
 		}
 
 		$this->updated = true;
@@ -255,8 +256,9 @@
 		call_user_func( $this->admin_image_div_callback );
 	} else {
 		$background_styles = '';
-		if ( $bgcolor = get_background_color() )
+		if ( $bgcolor = get_background_color() ) {
 			$background_styles .= 'background-color: #' . $bgcolor . ';';
+		}
 
 		$background_image_thumb = get_background_image();
 		if ( $background_image_thumb ) {
@@ -287,12 +289,12 @@
 
 <?php if ( get_background_image() ) : ?>
 <tr>
-<th scope="row"><?php _e('Remove Image'); ?></th>
+<th scope="row"><?php _e( 'Remove Image' ); ?></th>
 <td>
 <form method="post">
-<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
+<?php wp_nonce_field( 'custom-background-remove', '_wpnonce-custom-background-remove' ); ?>
 <?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
-<?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
+<?php _e( 'This will remove the background image. You will not be able to restore any customizations.' ) ?>
 </form>
 </td>
 </tr>
@@ -301,20 +303,20 @@
 <?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
 <?php if ( $default_image && get_background_image() != $default_image ) : ?>
 <tr>
-<th scope="row"><?php _e('Restore Original Image'); ?></th>
+<th scope="row"><?php _e( 'Restore Original Image' ); ?></th>
 <td>
 <form method="post">
-<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
+<?php wp_nonce_field( 'custom-background-reset', '_wpnonce-custom-background-reset' ); ?>
 <?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
-<?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
+<?php _e( 'This will restore the original background image. You will not be able to restore any customizations.' ) ?>
 </form>
 </td>
 </tr>
 <?php endif; ?>
 
-<?php if ( current_user_can( 'upload_files' ) ): ?>
+<?php if ( current_user_can( 'upload_files' ) ) : ?>
 <tr>
-<th scope="row"><?php _e('Select Image'); ?></th>
+<th scope="row"><?php _e( 'Select Image' ); ?></th>
 <td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
 	<p>
 		<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
@@ -352,19 +354,46 @@
 
 $background_position_options = array(
 	array(
-		'left top'   => array( 'label' => __( 'Top Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
-		'center top' => array( 'label' => __( 'Top' ), 'icon' => 'dashicons dashicons-arrow-up-alt' ),
-		'right top'  => array( 'label' => __( 'Top Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+		'left top'   => array(
+			'label' => __( 'Top Left' ),
+			'icon' => 'dashicons dashicons-arrow-left-alt',
+		),
+		'center top' => array(
+			'label' => __( 'Top' ),
+			'icon' => 'dashicons dashicons-arrow-up-alt',
+		),
+		'right top'  => array(
+			'label' => __( 'Top Right' ),
+			'icon' => 'dashicons dashicons-arrow-right-alt',
+		),
 	),
 	array(
-		'left center'   => array( 'label' => __( 'Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
-		'center center' => array( 'label' => __( 'Center' ), 'icon' => 'background-position-center-icon' ),
-		'right center'  => array( 'label' => __( 'Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+		'left center'   => array(
+			'label' => __( 'Left' ),
+			'icon' => 'dashicons dashicons-arrow-left-alt',
+		),
+		'center center' => array(
+			'label' => __( 'Center' ),
+			'icon' => 'background-position-center-icon',
+		),
+		'right center'  => array(
+			'label' => __( 'Right' ),
+			'icon' => 'dashicons dashicons-arrow-right-alt',
+		),
 	),
 	array(
-		'left bottom'   => array( 'label' => __( 'Bottom Left' ), 'icon' => 'dashicons dashicons-arrow-left-alt' ),
-		'center bottom' => array( 'label' => __( 'Bottom' ), 'icon' => 'dashicons dashicons-arrow-down-alt' ),
-		'right bottom'  => array( 'label' => __( 'Bottom Right' ), 'icon' => 'dashicons dashicons-arrow-right-alt' ),
+		'left bottom'   => array(
+			'label' => __( 'Bottom Left' ),
+			'icon' => 'dashicons dashicons-arrow-left-alt',
+		),
+		'center bottom' => array(
+			'label' => __( 'Bottom' ),
+			'icon' => 'dashicons dashicons-arrow-down-alt',
+		),
+		'right bottom'  => array(
+			'label' => __( 'Bottom Right' ),
+			'icon' => 'dashicons dashicons-arrow-right-alt',
+		),
 	),
 );
 ?>
@@ -419,8 +448,9 @@
 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>
 <?php
 $default_color = '';
-if ( current_theme_supports( 'custom-background', 'default-color' ) )
+if ( current_theme_supports( 'custom-background', 'default-color' ) ) {
 	$default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"';
+}
 ?>
 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color ?>>
 </fieldset></td>
@@ -428,7 +458,7 @@
 </tbody>
 </table>
 
-<?php wp_nonce_field('custom-background'); ?>
+<?php wp_nonce_field( 'custom-background' ); ?>
 <?php submit_button( null, 'primary', 'save-background-options' ); ?>
 </form>
 
@@ -442,26 +472,31 @@
 	 * @since 3.0.0
 	 */
 	public function handle_upload() {
-		if ( empty($_FILES) )
+		if ( empty( $_FILES ) ) {
 			return;
+		}
 
-		check_admin_referer('custom-background-upload', '_wpnonce-custom-background-upload');
-		$overrides = array('test_form' => false);
+		check_admin_referer( 'custom-background-upload', '_wpnonce-custom-background-upload' );
+		$overrides = array(
+			'test_form' => false,
+		);
 
 		$uploaded_file = $_FILES['import'];
 		$wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'] );
-		if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) )
+		if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) {
 			wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) );
+		}
 
-		$file = wp_handle_upload($uploaded_file, $overrides);
+		$file = wp_handle_upload( $uploaded_file, $overrides );
 
-		if ( isset($file['error']) )
+		if ( isset( $file['error'] ) ) {
 			wp_die( $file['error'] );
+		}
 
 		$url = $file['url'];
 		$type = $file['type'];
 		$file = $file['file'];
-		$filename = basename($file);
+		$filename = basename( $file );
 
 		// Construct the object array
 		$object = array(
@@ -469,20 +504,20 @@
 			'post_content' => $url,
 			'post_mime_type' => $type,
 			'guid' => $url,
-			'context' => 'custom-background'
+			'context' => 'custom-background',
 		);
 
 		// Save the data
-		$id = wp_insert_attachment($object, $file);
+		$id = wp_insert_attachment( $object, $file );
 
 		// Add the meta-data
 		wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
-		update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) );
+		update_post_meta( $id, '_wp_attachment_is_custom_background', get_option( 'stylesheet' ) );
 
-		set_theme_mod('background_image', esc_url_raw($url));
+		set_theme_mod( 'background_image', esc_url_raw( $url ) );
 
 		$thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
-		set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) );
+		set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );
 
 		/** This action is documented in wp-admin/custom-header.php */
 		do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication
@@ -544,15 +579,22 @@
 	 * @deprecated 3.5.0
 	 */
 	public function wp_set_background_image() {
-		if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit;
-		$attachment_id = absint($_POST['attachment_id']);
+		if ( ! current_user_can( 'edit_theme_options' ) || ! isset( $_POST['attachment_id'] ) ) { exit;
+		}
+		$attachment_id = absint( $_POST['attachment_id'] );
 		/** This filter is documented in wp-admin/includes/media.php */
-		$sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) ));
+		$sizes = array_keys( apply_filters( 'image_size_names_choose', array(
+			'thumbnail' => __( 'Thumbnail' ),
+			'medium' => __( 'Medium' ),
+			'large' => __( 'Large' ),
+			'full' => __( 'Full Size' ),
+		) ) );
 		$size = 'thumbnail';
-		if ( in_array( $_POST['size'], $sizes ) )
+		if ( in_array( $_POST['size'], $sizes ) ) {
 			$size = esc_attr( $_POST['size'] );
+		}
 
-		update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) );
+		update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', get_option( 'stylesheet' ) );
 		$url = wp_get_attachment_image_src( $attachment_id, $size );
 		$thumbnail = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
 		set_theme_mod( 'background_image', esc_url_raw( $url[0] ) );
Index: src/wp-admin/custom-header.php
===================================================================
--- src/wp-admin/custom-header.php	(revision 40901)
+++ src/wp-admin/custom-header.php	(working copy)
@@ -56,16 +56,16 @@
 	 * @param callable $admin_header_callback
 	 * @param callable $admin_image_div_callback Optional custom image div output callback.
 	 */
-	public function __construct($admin_header_callback, $admin_image_div_callback = '') {
+	public function __construct( $admin_header_callback, $admin_image_div_callback = '' ) {
 		$this->admin_header_callback = $admin_header_callback;
 		$this->admin_image_div_callback = $admin_image_div_callback;
 
 		add_action( 'admin_menu', array( $this, 'init' ) );
 
 		add_action( 'customize_save_after',         array( $this, 'customize_set_last_used' ) );
-		add_action( 'wp_ajax_custom-header-crop',   array( $this, 'ajax_header_crop'        ) );
-		add_action( 'wp_ajax_custom-header-add',    array( $this, 'ajax_header_add'         ) );
-		add_action( 'wp_ajax_custom-header-remove', array( $this, 'ajax_header_remove'      ) );
+		add_action( 'wp_ajax_custom-header-crop',   array( $this, 'ajax_header_crop' ) );
+		add_action( 'wp_ajax_custom-header-add',    array( $this, 'ajax_header_add' ) );
+		add_action( 'wp_ajax_custom-header-remove', array( $this, 'ajax_header_remove' ) );
 	}
 
 	/**
@@ -97,29 +97,29 @@
 	public function help() {
 		get_current_screen()->add_help_tab( array(
 			'id'      => 'overview',
-			'title'   => __('Overview'),
+			'title'   => __( 'Overview' ),
 			'content' =>
-				'<p>' . __( 'This screen is used to customize the header section of your theme.') . '</p>' .
-				'<p>' . __( 'You can choose from the theme&#8217;s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.') . '<p>'
+				'<p>' . __( 'This screen is used to customize the header section of your theme.' ) . '</p>' .
+				'<p>' . __( 'You can choose from the theme&#8217;s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.' ) . '<p>',
 		) );
 
 		get_current_screen()->add_help_tab( array(
 			'id'      => 'set-header-image',
-			'title'   => __('Header Image'),
+			'title'   => __( 'Header Image' ),
 			'content' =>
 				'<p>' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. Alternatively, you can use an image that has already been uploaded to your Media Library by clicking the &#8220;Choose Image&#8221; button.' ) . '</p>' .
 				'<p>' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you&#8217;d like and click the &#8220;Save Changes&#8221; button.' ) . '</p>' .
-				'<p>' . __( 'If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the &#8220;Random&#8221; radio button next to the Uploaded Images or Default Images section to enable this feature.') . '</p>' .
-				'<p>' . __( 'If you don&#8217;t want a header image to be displayed on your site at all, click the &#8220;Remove Header Image&#8221; button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click &#8220;Save Changes&#8221;.') . '</p>'
+				'<p>' . __( 'If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the &#8220;Random&#8221; radio button next to the Uploaded Images or Default Images section to enable this feature.' ) . '</p>' .
+				'<p>' . __( 'If you don&#8217;t want a header image to be displayed on your site at all, click the &#8220;Remove Header Image&#8221; button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click &#8220;Save Changes&#8221;.' ) . '</p>',
 		) );
 
 		get_current_screen()->add_help_tab( array(
 			'id'      => 'set-header-text',
-			'title'   => __('Header Text'),
+			'title'   => __( 'Header Text' ),
 			'content' =>
 				'<p>' . sprintf( __( 'For most themes, the header text is your Site Title and Tagline, as defined in the <a href="%1$s">General Settings</a> section.' ), admin_url( 'options-general.php' ) ) . '<p>' .
 				'<p>' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. &#8220;#ff0000&#8221; for red, or by choosing a color using the color picker.' ) . '</p>' .
-				'<p>' . __( 'Don&#8217;t forget to click &#8220;Save Changes&#8221; when you&#8217;re done!') . '</p>'
+				'<p>' . __( 'Don&#8217;t forget to click &#8220;Save Changes&#8221; when you&#8217;re done!' ) . '</p>',
 		) );
 
 		get_current_screen()->set_help_sidebar(
@@ -137,15 +137,17 @@
 	 * @return int Current step
 	 */
 	public function step() {
-		if ( ! isset( $_GET['step'] ) )
+		if ( ! isset( $_GET['step'] ) ) {
 			return 1;
+		}
 
 		$step = (int) $_GET['step'];
 		if ( $step < 1 || 3 < $step ||
 			( 2 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce-custom-header-upload'], 'custom-header-upload' ) ) ||
 			( 3 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'custom-header-crop-image' ) )
-		)
+		) {
 			return 1;
+		}
 
 		return $step;
 	}
@@ -161,10 +163,11 @@
 		if ( ( 1 == $step || 3 == $step ) ) {
 			wp_enqueue_media();
 			wp_enqueue_script( 'custom-header' );
-			if ( current_theme_supports( 'custom-header', 'header-text' ) )
+			if ( current_theme_supports( 'custom-header', 'header-text' ) ) {
 				wp_enqueue_script( 'wp-color-picker' );
+			}
 		} elseif ( 2 == $step ) {
-			wp_enqueue_script('imgareaselect');
+			wp_enqueue_script( 'imgareaselect' );
 		}
 	}
 
@@ -176,10 +179,11 @@
 	public function css_includes() {
 		$step = $this->step();
 
-		if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
+		if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) {
 			wp_enqueue_style( 'wp-color-picker' );
-		elseif ( 2 == $step )
-			wp_enqueue_style('imgareaselect');
+		} elseif ( 2 == $step ) {
+			wp_enqueue_style( 'imgareaselect' );
+		}
 	}
 
 	/**
@@ -188,11 +192,13 @@
 	 * @since 2.6.0
 	 */
 	public function take_action() {
-		if ( ! current_user_can('edit_theme_options') )
+		if ( ! current_user_can( 'edit_theme_options' ) ) {
 			return;
+		}
 
-		if ( empty( $_POST ) )
+		if ( empty( $_POST ) ) {
 			return;
+		}
 
 		$this->updated = true;
 
@@ -214,11 +220,12 @@
 		} elseif ( isset( $_POST['text-color'] ) ) {
 			check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
 			$_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] );
-			$color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']);
-			if ( strlen($color) == 6 || strlen($color) == 3 )
-				set_theme_mod('header_textcolor', $color);
-			elseif ( ! $color )
+			$color = preg_replace( '/[^0-9a-fA-F]/', '', $_POST['text-color'] );
+			if ( strlen( $color ) == 6 || strlen( $color ) == 3 ) {
+				set_theme_mod( 'header_textcolor', $color );
+			} elseif ( ! $color ) {
 				set_theme_mod( 'header_textcolor', 'blank' );
+			}
 		}
 
 		if ( isset( $_POST['default-header'] ) ) {
@@ -238,8 +245,9 @@
 	public function process_default_headers() {
 		global $_wp_default_headers;
 
-		if ( !isset($_wp_default_headers) )
+		if ( ! isset( $_wp_default_headers ) ) {
 			return;
+		}
 
 		if ( ! empty( $this->default_headers ) ) {
 			return;
@@ -248,9 +256,9 @@
 		$this->default_headers = $_wp_default_headers;
 		$template_directory_uri = get_template_directory_uri();
 		$stylesheet_directory_uri = get_stylesheet_directory_uri();
-		foreach ( array_keys($this->default_headers) as $header ) {
-			$this->default_headers[$header]['url'] =  sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri );
-			$this->default_headers[$header]['thumbnail_url'] =  sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri );
+		foreach ( array_keys( $this->default_headers ) as $header ) {
+			$this->default_headers[ $header ]['url'] = sprintf( $this->default_headers[ $header ]['url'], $template_directory_uri, $stylesheet_directory_uri );
+			$this->default_headers[ $header ]['thumbnail_url'] = sprintf( $this->default_headers[ $header ]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri );
 		}
 	}
 
@@ -289,9 +297,10 @@
 			echo '<div class="default-header">';
 			echo '<label><input name="default-header" type="radio" value="' . esc_attr( $header_key ) . '" ' . checked( $header_url, get_theme_mod( 'header_image' ), false ) . ' />';
 			$width = '';
-			if ( !empty( $header['attachment_id'] ) )
+			if ( ! empty( $header['attachment_id'] ) ) {
 				$width = ' width="230"';
-			echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_alt_text ) .'"' . $width . ' /></label>';
+			}
+			echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_alt_text ) . '"' . $width . ' /></label>';
 			echo '</div>';
 		}
 		echo '<div class="clear"></div></div>';
@@ -304,10 +313,11 @@
 	 */
 	public function js() {
 		$step = $this->step();
-		if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
+		if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) {
 			$this->js_1();
-		elseif ( 2 == $step )
+		} elseif ( 2 == $step ) {
 			$this->js_2();
+		}
 	}
 
 	/**
@@ -376,7 +386,8 @@
 	 *
 	 * @since 2.6.0
 	 */
-	public function js_2() { ?>
+	public function js_2() {
+	?>
 <script type="text/javascript">
 	function onEndCrop( coords ) {
 		jQuery( '#x1' ).val(coords.x);
@@ -492,23 +503,25 @@
 
 		if ( $header_image ) {
 			$header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');';
-		}  else {
+		} else {
 			$header_image_style = '';
 		}
 
-		if ( $custom_header->width )
+		if ( $custom_header->width ) {
 			$header_image_style .= 'max-width:' . $custom_header->width . 'px;';
-		if ( $custom_header->height )
+		}
+		if ( $custom_header->height ) {
 			$header_image_style .= 'height:' . $custom_header->height . 'px;';
+		}
 	?>
 	<div id="headimg" style="<?php echo $header_image_style; ?>">
 		<?php
-		if ( display_header_text() )
+		if ( display_header_text() ) {
 			$style = ' style="color:#' . get_header_textcolor() . ';"';
-		else
-			$style = ' style="display:none;"';
+		} else { $style = ' style="display:none;"';
+		}
 		?>
-		<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
+		<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo( 'url' ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
 		<div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
 	</div>
 	<?php } ?>
@@ -525,7 +538,7 @@
 	if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
 		printf( __( 'Images of exactly <strong>%1$d &times; %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
 	} elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
-		if ( ! current_theme_supports( 'custom-header', 'flex-width' ) )
+		if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
 			printf(
 				/* translators: %s: size in pixels */
 				__( 'Images should be at least %s wide.' ) . ' ',
@@ -535,8 +548,9 @@
 					get_theme_support( 'custom-header', 'width' )
 				)
 			);
+		}
 	} elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
-		if ( ! current_theme_supports( 'custom-header', 'flex-height' ) )
+		if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
 			printf(
 				/* translators: %s: size in pixels */
 				__( 'Images should be at least %s tall.' ) . ' ',
@@ -546,9 +560,10 @@
 					get_theme_support( 'custom-header', 'height' )
 				)
 			);
+		}
 	}
 	if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
-		if ( current_theme_supports( 'custom-header', 'width' ) )
+		if ( current_theme_supports( 'custom-header', 'width' ) ) {
 			printf(
 				/* translators: %s: size in pixels */
 				__( 'Suggested width is %s.' ) . ' ',
@@ -558,7 +573,8 @@
 					get_theme_support( 'custom-header', 'width' )
 				)
 			);
-		if ( current_theme_supports( 'custom-header', 'height' ) )
+		}
+		if ( current_theme_supports( 'custom-header', 'height' ) ) {
 			printf(
 				/* translators: %s: size in pixels */
 				__( 'Suggested height is %s.' ) . ' ',
@@ -568,6 +584,7 @@
 					get_theme_support( 'custom-header', 'height' )
 				)
 			);
+		}
 	}
 	?></p>
 	<form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="<?php echo esc_url( add_query_arg( 'step', 2 ) ) ?>">
@@ -582,8 +599,8 @@
 		$modal_update_href = esc_url( add_query_arg( array(
 			'page' => 'custom-header',
 			'step' => 2,
-			'_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'),
-		), admin_url('themes.php') ) );
+			'_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ),
+		), admin_url( 'themes.php' ) ) );
 	?>
 	<p>
 		<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
@@ -614,22 +631,22 @@
 </td>
 </tr>
 	<?php endif;
-	if ( ! empty( $this->default_headers ) ) : ?>
+if ( ! empty( $this->default_headers ) ) : ?>
 <tr>
 <th scope="row"><?php _e( 'Default Images' ); ?></th>
 <td>
 <?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
 	<p><?php _e( 'If you don&lsquo;t want to upload your own image, you can use one of these cool headers, or show a random one.' ) ?></p>
-<?php else: ?>
+<?php else : ?>
 	<p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ) ?></p>
 <?php endif; ?>
 	<?php
-		$this->show_header_selector( 'default' );
+	$this->show_header_selector( 'default' );
 	?>
 </td>
 </tr>
 	<?php endif;
-	if ( get_header_image() ) : ?>
+if ( get_header_image() ) : ?>
 <tr>
 <th scope="row"><?php _e( 'Remove Image' ); ?></th>
 <td>
@@ -640,7 +657,7 @@
 	<?php endif;
 
 	$default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
-	if ( $default_image && get_header_image() != $default_image ) : ?>
+if ( $default_image && get_header_image() != $default_image ) : ?>
 <tr>
 <th scope="row"><?php _e( 'Reset Image' ); ?></th>
 <td>
@@ -720,7 +737,7 @@
 	 * @since 2.1.0
 	 */
 	public function step_2() {
-		check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
+		check_admin_referer( 'custom-header-upload', '_wpnonce-custom-header-upload' );
 		if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) {
 			wp_die(
 				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
@@ -745,27 +762,29 @@
 			list( $width, $height, $type, $attr ) = getimagesize( $file );
 		} else {
 			$data = wp_get_attachment_metadata( $attachment_id );
-			$height = isset( $data[ 'height' ] ) ? $data[ 'height' ] : 0;
-			$width = isset( $data[ 'width' ] ) ? $data[ 'width' ] : 0;
+			$height = isset( $data['height'] ) ? $data['height'] : 0;
+			$width = isset( $data['width'] ) ? $data['width'] : 0;
 			unset( $data );
 		}
 
 		$max_width = 0;
 		// For flex, limit size of image displayed to 1500px unless theme says otherwise
-		if ( current_theme_supports( 'custom-header', 'flex-width' ) )
+		if ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
 			$max_width = 1500;
+		}
 
-		if ( current_theme_supports( 'custom-header', 'max-width' ) )
+		if ( current_theme_supports( 'custom-header', 'max-width' ) ) {
 			$max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) );
+		}
 		$max_width = max( $max_width, get_theme_support( 'custom-header', 'width' ) );
 
 		// If flexible height isn't supported and the image is the exact right size
 		if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' )
-			&& $width == get_theme_support( 'custom-header', 'width' ) && $height == get_theme_support( 'custom-header', 'height' ) )
-		{
+			&& $width == get_theme_support( 'custom-header', 'width' ) && $height == get_theme_support( 'custom-header', 'height' ) ) {
 			// Add the meta-data
-			if ( file_exists( $file ) )
+			if ( file_exists( $file ) ) {
 				wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
+			}
 
 			$this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
 
@@ -782,14 +801,15 @@
 			return $this->finished();
 		} elseif ( $width > $max_width ) {
 			$oitar = $width / $max_width;
-			$image = wp_crop_image($attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
-			if ( ! $image || is_wp_error( $image ) )
+			$image = wp_crop_image( $attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace( basename( $file ), 'midsize-' . basename( $file ), $file ) );
+			if ( ! $image || is_wp_error( $image ) ) {
 				wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
+			}
 
 			/** This filter is documented in wp-admin/custom-header.php */
 			$image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication
 
-			$url = str_replace(basename($url), basename($image), $url);
+			$url = str_replace( basename( $url ), basename( $image ), $url );
 			$width = $width / $oitar;
 			$height = $height / $oitar;
 		} else {
@@ -800,9 +820,9 @@
 <div class="wrap">
 <h1><?php _e( 'Crop Header Image' ); ?></h1>
 
-<form method="post" action="<?php echo esc_url(add_query_arg('step', 3)); ?>">
-	<p class="hide-if-no-js"><?php _e('Choose the part of the image you want to use as your header.'); ?></p>
-	<p class="hide-if-js"><strong><?php _e( 'You need JavaScript to choose a part of the image.'); ?></strong></p>
+<form method="post" action="<?php echo esc_url( add_query_arg( 'step', 3 ) ); ?>">
+	<p class="hide-if-no-js"><?php _e( 'Choose the part of the image you want to use as your header.' ); ?></p>
+	<p class="hide-if-js"><strong><?php _e( 'You need JavaScript to choose a part of the image.' ); ?></strong></p>
 
 	<div id="crop_image" style="position: relative">
 		<img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" alt="" />
@@ -822,8 +842,9 @@
 	<p class="submit">
 	<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
 	<?php
-	if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
+	if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
 		submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false );
+	}
 	?>
 	</p>
 </form>
@@ -838,22 +859,26 @@
 	 * @since 3.4.0
 	 */
 	public function step_2_manage_upload() {
-		$overrides = array('test_form' => false);
+		$overrides = array(
+			'test_form' => false,
+		);
 
 		$uploaded_file = $_FILES['import'];
 		$wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'] );
-		if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) )
+		if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) {
 			wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) );
+		}
 
-		$file = wp_handle_upload($uploaded_file, $overrides);
+		$file = wp_handle_upload( $uploaded_file, $overrides );
 
-		if ( isset($file['error']) )
+		if ( isset( $file['error'] ) ) {
 			wp_die( $file['error'],  __( 'Image Upload Error' ) );
+		}
 
 		$url = $file['url'];
 		$type = $file['type'];
 		$file = $file['file'];
-		$filename = basename($file);
+		$filename = basename( $file );
 
 		// Construct the object array
 		$object = array(
@@ -861,7 +886,7 @@
 			'post_content'   => $url,
 			'post_mime_type' => $type,
 			'guid'           => $url,
-			'context'        => 'custom-header'
+			'context'        => 'custom-header',
 		);
 
 		// Save the data
@@ -903,7 +928,7 @@
 		}
 
 		$attachment_id = absint( $_POST['attachment_id'] );
-		$original = get_attached_file($attachment_id);
+		$original = get_attached_file( $attachment_id );
 
 		$dimensions = $this->get_header_dimensions( array(
 			'height' => $_POST['height'],
@@ -912,23 +937,25 @@
 		$height = $dimensions['dst_height'];
 		$width = $dimensions['dst_width'];
 
-		if ( empty( $_POST['skip-cropping'] ) )
+		if ( empty( $_POST['skip-cropping'] ) ) {
 			$cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], $width, $height );
-		elseif ( ! empty( $_POST['create-new-attachment'] ) )
+		} elseif ( ! empty( $_POST['create-new-attachment'] ) ) {
 			$cropped = _copy_image_file( $attachment_id );
-		else
-			$cropped = get_attached_file( $attachment_id );
+		} else { $cropped = get_attached_file( $attachment_id );
+		}
 
-		if ( ! $cropped || is_wp_error( $cropped ) )
+		if ( ! $cropped || is_wp_error( $cropped ) ) {
 			wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
+		}
 
 		/** This filter is documented in wp-admin/custom-header.php */
 		$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication
 
 		$object = $this->create_attachment_object( $cropped, $attachment_id );
 
-		if ( ! empty( $_POST['create-new-attachment'] ) )
+		if ( ! empty( $_POST['create-new-attachment'] ) ) {
 			unset( $object['ID'] );
+		}
 
 		// Update the attachment
 		$attachment_id = $this->insert_attachment( $object, $cropped );
@@ -965,15 +992,16 @@
 	 * @since 2.1.0
 	 */
 	public function admin_page() {
-		if ( ! current_user_can('edit_theme_options') )
-			wp_die(__('Sorry, you are not allowed to customize headers.'));
+		if ( ! current_user_can( 'edit_theme_options' ) ) {
+			wp_die( __( 'Sorry, you are not allowed to customize headers.' ) );
+		}
 		$step = $this->step();
-		if ( 2 == $step )
+		if ( 2 == $step ) {
 			$this->step_2();
-		elseif ( 3 == $step )
+		} elseif ( 3 == $step ) {
 			$this->step_3();
-		else
-			$this->step_1();
+		} else { $this->step_1();
+		}
 	}
 
 	/**
@@ -1015,8 +1043,9 @@
 	final public function set_header_image( $choice ) {
 		if ( is_array( $choice ) || is_object( $choice ) ) {
 			$choice = (array) $choice;
-			if ( ! isset( $choice['attachment_id'] ) || ! isset( $choice['url'] ) )
+			if ( ! isset( $choice['attachment_id'] ) || ! isset( $choice['url'] ) ) {
 				return;
+			}
 
 			$choice['url'] = esc_url_raw( $choice['url'] );
 
@@ -1046,10 +1075,10 @@
 
 		} else {
 			$this->process_default_headers();
-			if ( isset( $this->default_headers[ $choice ] ) )
+			if ( isset( $this->default_headers[ $choice ] ) ) {
 				$header_image_data = $this->default_headers[ $choice ];
-			else
-				return;
+			} else { return;
+			}
 		}
 
 		set_theme_mod( 'header_image', esc_url_raw( $header_image_data['url'] ) );
@@ -1110,8 +1139,11 @@
 		$theme_width = get_theme_support( 'custom-header', 'width' );
 		$has_flex_width = current_theme_supports( 'custom-header', 'flex-width' );
 		$has_flex_height = current_theme_supports( 'custom-header', 'flex-height' );
-		$has_max_width = current_theme_supports( 'custom-header', 'max-width' ) ;
-		$dst = array( 'dst_height' => null, 'dst_width' => null );
+		$has_max_width = current_theme_supports( 'custom-header', 'max-width' );
+		$dst = array(
+			'dst_height' => null,
+			'dst_width' => null,
+		);
 
 		// For flex, limit size of image displayed to 1500px unless theme says otherwise
 		if ( $has_flex_width ) {
@@ -1125,21 +1157,17 @@
 
 		if ( $has_flex_height && ( ! $has_flex_width || $width > $max_width ) ) {
 			$dst['dst_height'] = absint( $height * ( $max_width / $width ) );
-		}
-		elseif ( $has_flex_height && $has_flex_width ) {
+		} elseif ( $has_flex_height && $has_flex_width ) {
 			$dst['dst_height'] = $height;
-		}
-		else {
+		} else {
 			$dst['dst_height'] = $theme_height;
 		}
 
 		if ( $has_flex_width && ( ! $has_flex_height || $width > $max_width ) ) {
 			$dst['dst_width'] = absint( $width * ( $max_width / $width ) );
-		}
-		elseif ( $has_flex_width && $has_flex_height ) {
+		} elseif ( $has_flex_width && $has_flex_height ) {
 			$dst['dst_width'] = $width;
-		}
-		else {
+		} else {
 			$dst['dst_width'] = $theme_width;
 		}
 
@@ -1165,10 +1193,10 @@
 
 		$object = array(
 			'ID' => $parent_attachment_id,
-			'post_title' => basename($cropped),
+			'post_title' => basename( $cropped ),
 			'post_mime_type' => $image_type,
 			'guid' => $url,
-			'context' => 'custom-header'
+			'context' => 'custom-header',
 		);
 
 		return $object;
@@ -1237,7 +1265,9 @@
 		);
 
 		if ( ! $cropped || is_wp_error( $cropped ) ) {
-			wp_send_json_error( array( 'message' => __( 'Image could not be processed. Please go back and try again.' ) ) );
+			wp_send_json_error( array(
+				'message' => __( 'Image could not be processed. Please go back and try again.' ),
+			) );
 		}
 
 		/** This filter is documented in wp-admin/custom-header.php */
@@ -1250,7 +1280,8 @@
 		$new_attachment_id = $this->insert_attachment( $object, $cropped );
 
 		$object['attachment_id'] = $new_attachment_id;
-		$object['url']           = wp_get_attachment_url( $new_attachment_id );;
+		$object['url']           = wp_get_attachment_url( $new_attachment_id );
+		;
 		$object['width']         = $dimensions['dst_width'];
 		$object['height']        = $dimensions['dst_height'];
 
@@ -1368,7 +1399,7 @@
 		$header_images['default'] = array(
 			'url'           => $default,
 			'thumbnail_url' => $default,
-			'description'   => 'Default'
+			'description'   => 'Default',
 		);
 
 		// The rest of the set comes after.
Index: src/wp-admin/customize.php
===================================================================
--- src/wp-admin/customize.php	(revision 40901)
+++ src/wp-admin/customize.php	(working copy)
@@ -61,7 +61,7 @@
 $wp_scripts->registered = $registered;
 
 add_action( 'customize_controls_print_scripts',        'print_head_scripts', 20 );
-add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts'     );
+add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' );
 add_action( 'customize_controls_print_styles',         'print_admin_styles', 20 );
 
 /**
@@ -82,7 +82,7 @@
 do_action( 'customize_controls_enqueue_scripts' );
 
 // Let's roll.
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 
 wp_user_settings();
 _wp_admin_html_begin();
Index: src/wp-admin/edit-comments.php
===================================================================
--- src/wp-admin/edit-comments.php	(revision 40901)
+++ src/wp-admin/edit-comments.php	(working copy)
@@ -16,7 +16,7 @@
 	);
 }
 
-$wp_list_table = _get_list_table('WP_Comments_List_Table');
+$wp_list_table = _get_list_table( 'WP_Comments_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 $doaction = $wp_list_table->current_action();
@@ -24,7 +24,7 @@
 if ( $doaction ) {
 	check_admin_referer( 'bulk-comments' );
 
-	if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) {
+	if ( 'delete_all' == $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) {
 		$comment_status = wp_unslash( $_REQUEST['comment_status'] );
 		$delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] );
 		$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) );
@@ -47,8 +47,9 @@
 	wp_defer_comment_counting( true );
 
 	foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
-		if ( !current_user_can( 'edit_comment', $comment_id ) )
+		if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
 			continue;
+		}
 
 		switch ( $doaction ) {
 			case 'approve' :
@@ -80,7 +81,7 @@
 				$deleted++;
 				break;
 		}
-	}
+	}// End foreach().
 
 	if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
 		$screen = get_current_screen()->id;
@@ -104,33 +105,41 @@
 
 	wp_defer_comment_counting( false );
 
-	if ( $approved )
+	if ( $approved ) {
 		$redirect_to = add_query_arg( 'approved', $approved, $redirect_to );
-	if ( $unapproved )
+	}
+	if ( $unapproved ) {
 		$redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to );
-	if ( $spammed )
+	}
+	if ( $spammed ) {
 		$redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to );
-	if ( $unspammed )
+	}
+	if ( $unspammed ) {
 		$redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to );
-	if ( $trashed )
+	}
+	if ( $trashed ) {
 		$redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to );
-	if ( $untrashed )
+	}
+	if ( $untrashed ) {
 		$redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to );
-	if ( $deleted )
+	}
+	if ( $deleted ) {
 		$redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
-	if ( $trashed || $spammed )
+	}
+	if ( $trashed || $spammed ) {
 		$redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
+	}
 
 	wp_safe_redirect( $redirect_to );
 	exit;
 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
 	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
 	 exit;
-}
+}// End if().
 
 $wp_list_table->prepare_items();
 
-wp_enqueue_script('admin-comments');
+wp_enqueue_script( 'admin-comments' );
 enqueue_comment_hotkeys_js();
 
 if ( $post_id ) {
@@ -163,21 +172,21 @@
 add_screen_option( 'per_page' );
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>'
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'moderating-comments',
-'title'		=> __('Moderating Comments'),
-'content'	=>
+	'id'		=> 'moderating-comments',
+	'title'		=> __( 'Moderating Comments' ),
+	'content'	=>
 		'<p>' . __( 'A red bar on the left means the comment is waiting for you to moderate it.' ) . '</p>' .
 		'<p>' . __( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
 		'<p>' . __( 'In the <strong>Comment</strong> column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
 		'<p>' . __( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.' ) . '</p>' .
 		'<p>' . __( 'In the <strong>Submitted On</strong> column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.' ) . '</p>' .
-		'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>'
+		'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
@@ -213,7 +222,7 @@
 ?></h1>
 
 <?php
-if ( isset($_REQUEST['s']) && strlen( $_REQUEST['s'] ) ) {
+if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
 	echo '<span class="subtitle">';
 	/* translators: %s: search keywords */
 	printf( __( 'Search results for &#8220;%s&#8221;' ),
@@ -237,16 +246,17 @@
 			$error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
 			break;
 	}
-	if ( $error_msg )
+	if ( $error_msg ) {
 		echo '<div id="moderated" class="error"><p>' . $error_msg . '</p></div>';
+	}
 }
 
-if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) || isset($_REQUEST['spammed']) || isset($_REQUEST['unspammed']) || isset($_REQUEST['same']) ) {
-	$approved  = isset( $_REQUEST['approved']  ) ? (int) $_REQUEST['approved']  : 0;
-	$deleted   = isset( $_REQUEST['deleted']   ) ? (int) $_REQUEST['deleted']   : 0;
-	$trashed   = isset( $_REQUEST['trashed']   ) ? (int) $_REQUEST['trashed']   : 0;
+if ( isset( $_REQUEST['approved'] ) || isset( $_REQUEST['deleted'] ) || isset( $_REQUEST['trashed'] ) || isset( $_REQUEST['untrashed'] ) || isset( $_REQUEST['spammed'] ) || isset( $_REQUEST['unspammed'] ) || isset( $_REQUEST['same'] ) ) {
+	$approved  = isset( $_REQUEST['approved'] ) ? (int) $_REQUEST['approved']  : 0;
+	$deleted   = isset( $_REQUEST['deleted'] ) ? (int) $_REQUEST['deleted']   : 0;
+	$trashed   = isset( $_REQUEST['trashed'] ) ? (int) $_REQUEST['trashed']   : 0;
 	$untrashed = isset( $_REQUEST['untrashed'] ) ? (int) $_REQUEST['untrashed'] : 0;
-	$spammed   = isset( $_REQUEST['spammed']   ) ? (int) $_REQUEST['spammed']   : 0;
+	$spammed   = isset( $_REQUEST['spammed'] ) ? (int) $_REQUEST['spammed']   : 0;
 	$unspammed = isset( $_REQUEST['unspammed'] ) ? (int) $_REQUEST['unspammed'] : 0;
 	$same      = isset( $_REQUEST['same'] )      ? (int) $_REQUEST['same']      : 0;
 
@@ -257,9 +267,9 @@
 		}
 
 		if ( $spammed > 0 ) {
-			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
+			$ids = isset( $_REQUEST['ids'] ) ? $_REQUEST['ids'] : 0;
 			/* translators: %s: number of comments marked as spam */
-			$messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
+			$messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", 'bulk-comments' ) ) . '">' . __( 'Undo' ) . '</a><br />';
 		}
 
 		if ( $unspammed > 0 ) {
@@ -268,9 +278,9 @@
 		}
 
 		if ( $trashed > 0 ) {
-			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
+			$ids = isset( $_REQUEST['ids'] ) ? $_REQUEST['ids'] : 0;
 			/* translators: %s: number of comments moved to the Trash */
-			$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
+			$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", 'bulk-comments' ) ) . '">' . __( 'Undo' ) . '</a><br />';
 		}
 
 		if ( $untrashed > 0 ) {
@@ -286,7 +296,7 @@
 		if ( $same > 0 && $comment = get_comment( $same ) ) {
 			switch ( $comment->comment_approved ) {
 				case '1' :
-					$messages[] = __('This comment is already approved.') . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
+					$messages[] = __( 'This comment is already approved.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
 					break;
 				case 'trash' :
 					$messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>';
@@ -298,8 +308,8 @@
 		}
 
 		echo '<div id="moderated" class="updated notice is-dismissible"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
-	}
-}
+	}// End if().
+}// End if().
 ?>
 
 <?php $wp_list_table->views(); ?>
@@ -311,14 +321,14 @@
 <?php if ( $post_id ) : ?>
 <input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
 <?php endif; ?>
-<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
-<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
+<input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" />
+<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', 1 ) ); ?>" />
 
-<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('total_items') ); ?>" />
-<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('per_page') ); ?>" />
-<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" />
+<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'total_items' ) ); ?>" />
+<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'per_page' ) ); ?>" />
+<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'page' ) ); ?>" />
 
-<?php if ( isset($_REQUEST['paged']) ) { ?>
+<?php if ( isset( $_REQUEST['paged'] ) ) { ?>
 	<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
 <?php } ?>
 
@@ -329,6 +339,6 @@
 <div id="ajax-response"></div>
 
 <?php
-wp_comment_reply('-1', true, 'detail');
+wp_comment_reply( '-1', true, 'detail' );
 wp_comment_trashnotice();
 include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: src/wp-admin/edit-form-advanced.php
===================================================================
--- src/wp-admin/edit-form-advanced.php	(revision 40901)
+++ src/wp-admin/edit-form-advanced.php	(working copy)
@@ -7,8 +7,9 @@
  */
 
 // don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
+if ( ! defined( 'ABSPATH' ) ) {
+	die( '-1' );
+}
 
 /**
  * @global string       $post_type
@@ -17,7 +18,7 @@
  */
 global $post_type, $post_type_object, $post;
 
-wp_enqueue_script('post');
+wp_enqueue_script( 'post' );
 $_wp_editor_expand = $_content_editor_dfw = false;
 
 /**
@@ -33,22 +34,23 @@
 	 ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
 	 apply_filters( 'wp_editor_expand', true, $post_type ) ) {
 
-	wp_enqueue_script('editor-expand');
+	wp_enqueue_script( 'editor-expand' );
 	$_content_editor_dfw = true;
 	$_wp_editor_expand = ( get_user_setting( 'editor_expand', 'on' ) === 'on' );
 }
 
-if ( wp_is_mobile() )
+if ( wp_is_mobile() ) {
 	wp_enqueue_script( 'jquery-touch-punch' );
+}
 
 /**
  * Post ID global
  * @name $post_ID
  * @var int
  */
-$post_ID = isset($post_ID) ? (int) $post_ID : 0;
-$user_ID = isset($user_ID) ? (int) $user_ID : 0;
-$action = isset($action) ? $action : '';
+$post_ID = isset( $post_ID ) ? (int) $post_ID : 0;
+$user_ID = isset( $user_ID ) ? (int) $user_ID : 0;
+$action = isset( $action ) ? $action : '';
 
 if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) {
 	add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
@@ -66,7 +68,9 @@
 
 if ( $thumbnail_support ) {
 	add_thickbox();
-	wp_enqueue_media( array( 'post' => $post_ID ) );
+	wp_enqueue_media( array(
+		'post' => $post_ID,
+	) );
 }
 
 // Add the local autosave notice HTML
@@ -127,7 +131,7 @@
 		__( 'View page' )
 	);
 
-}
+}// End if().
 
 /* translators: Publish box date format, see https://secure.php.net/date */
 $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
@@ -139,7 +143,7 @@
 	 3 => __( 'Custom field deleted.' ),
 	 4 => __( 'Post updated.' ),
 	/* translators: %s: date and time of the revision */
-	 5 => isset($_GET['revision']) ? sprintf( __( 'Post restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
+	 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Post restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
 	 6 => __( 'Post published.' ) . $view_post_link_html,
 	 7 => __( 'Post saved.' ),
 	 8 => __( 'Post submitted.' ) . $preview_post_link_html,
@@ -153,7 +157,7 @@
 	 3 => __( 'Custom field deleted.' ),
 	 4 => __( 'Page updated.' ),
 	/* translators: %s: date and time of the revision */
-	 5 => isset($_GET['revision']) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
+	 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
 	 6 => __( 'Page published.' ) . $view_page_link_html,
 	 7 => __( 'Page saved.' ),
 	 8 => __( 'Page submitted.' ) . $preview_page_link_html,
@@ -172,19 +176,21 @@
 $messages = apply_filters( 'post_updated_messages', $messages );
 
 $message = false;
-if ( isset($_GET['message']) ) {
+if ( isset( $_GET['message'] ) ) {
 	$_GET['message'] = absint( $_GET['message'] );
-	if ( isset($messages[$post_type][$_GET['message']]) )
-		$message = $messages[$post_type][$_GET['message']];
-	elseif ( !isset($messages[$post_type]) && isset($messages['post'][$_GET['message']]) )
-		$message = $messages['post'][$_GET['message']];
+	if ( isset( $messages[ $post_type ][ $_GET['message'] ] ) ) {
+		$message = $messages[ $post_type ][ $_GET['message'] ];
+	} elseif ( ! isset( $messages[ $post_type ] ) && isset( $messages['post'][ $_GET['message'] ] ) ) {
+		$message = $messages['post'][ $_GET['message'] ];
+	}
 }
 
 $notice = false;
 $form_extra = '';
 if ( 'auto-draft' == $post->post_status ) {
-	if ( 'edit' == $action )
+	if ( 'edit' == $action ) {
 		$post->post_title = '';
+	}
 	$autosave = false;
 	$form_extra .= "<input type='hidden' id='auto_draft' name='auto_draft' value='1' />";
 } else {
@@ -193,7 +199,7 @@
 
 $form_action = 'editpost';
 $nonce_action = 'update-post_' . $post_ID;
-$form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr($post_ID) . "' />";
+$form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr( $post_ID ) . "' />";
 
 // Detect if there exists an autosave newer than the post and if that autosave is different than the post
 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
@@ -204,33 +210,37 @@
 		}
 	}
 	// If this autosave isn't different from the current post, begone.
-	if ( ! $notice )
+	if ( ! $notice ) {
 		wp_delete_post_revision( $autosave->ID );
-	unset($autosave_field, $_autosave_field);
+	}
+	unset( $autosave_field, $_autosave_field );
 }
 
-$post_type_object = get_post_type_object($post_type);
+$post_type_object = get_post_type_object( $post_type );
 
 // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
 require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' );
 
 
 $publish_callback_args = null;
-if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status ) {
+if ( post_type_supports( $post_type, 'revisions' ) && 'auto-draft' != $post->post_status ) {
 	$revisions = wp_get_post_revisions( $post_ID );
 
 	// We should aim to show the revisions meta box only when there are revisions.
 	if ( count( $revisions ) > 1 ) {
 		reset( $revisions ); // Reset pointer for key()
-		$publish_callback_args = array( 'revisions_count' => count( $revisions ), 'revision_id' => key( $revisions ) );
-		add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core');
+		$publish_callback_args = array(
+			'revisions_count' => count( $revisions ),
+			'revision_id' => key( $revisions ),
+		);
+		add_meta_box( 'revisionsdiv', __( 'Revisions' ), 'post_revisions_meta_box', null, 'normal', 'core' );
 	}
 }
 
 if ( 'attachment' == $post_type ) {
 	wp_enqueue_script( 'image-edit' );
 	wp_enqueue_style( 'imgareaselect' );
-	add_meta_box( 'submitdiv', __('Save'), 'attachment_submit_meta_box', null, 'side', 'core' );
+	add_meta_box( 'submitdiv', __( 'Save' ), 'attachment_submit_meta_box', null, 'side', 'core' );
 	add_action( 'edit_form_after_title', 'edit_form_image_editor' );
 
 	if ( wp_attachment_is( 'audio', $post ) ) {
@@ -240,40 +250,48 @@
 	add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', null, 'side', 'core', $publish_callback_args );
 }
 
-if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) )
+if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) ) {
 	add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', null, 'side', 'core' );
+}
 
 // all taxonomies
 foreach ( get_object_taxonomies( $post ) as $tax_name ) {
 	$taxonomy = get_taxonomy( $tax_name );
-	if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb )
+	if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb ) {
 		continue;
+	}
 
 	$label = $taxonomy->labels->name;
 
-	if ( ! is_taxonomy_hierarchical( $tax_name ) )
+	if ( ! is_taxonomy_hierarchical( $tax_name ) ) {
 		$tax_meta_box_id = 'tagsdiv-' . $tax_name;
-	else
-		$tax_meta_box_id = $tax_name . 'div';
+	} else { $tax_meta_box_id = $tax_name . 'div';
+	}
 
-	add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
+	add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array(
+		'taxonomy' => $tax_name,
+	) );
 }
 
 if ( post_type_supports( $post_type, 'page-attributes' ) || count( get_page_templates( $post ) ) > 0 ) {
 	add_meta_box( 'pageparentdiv', $post_type_object->labels->attributes, 'page_attributes_meta_box', null, 'side', 'core' );
 }
 
-if ( $thumbnail_support && current_user_can( 'upload_files' ) )
-	add_meta_box('postimagediv', esc_html( $post_type_object->labels->featured_image ), 'post_thumbnail_meta_box', null, 'side', 'low');
+if ( $thumbnail_support && current_user_can( 'upload_files' ) ) {
+	add_meta_box( 'postimagediv', esc_html( $post_type_object->labels->featured_image ), 'post_thumbnail_meta_box', null, 'side', 'low' );
+}
 
-if ( post_type_supports($post_type, 'excerpt') )
-	add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core');
+if ( post_type_supports( $post_type, 'excerpt' ) ) {
+	add_meta_box( 'postexcerpt', __( 'Excerpt' ), 'post_excerpt_meta_box', null, 'normal', 'core' );
+}
 
-if ( post_type_supports($post_type, 'trackbacks') )
-	add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core');
+if ( post_type_supports( $post_type, 'trackbacks' ) ) {
+	add_meta_box( 'trackbacksdiv', __( 'Send Trackbacks' ), 'post_trackback_meta_box', null, 'normal', 'core' );
+}
 
-if ( post_type_supports($post_type, 'custom-fields') )
-	add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core');
+if ( post_type_supports( $post_type, 'custom-fields' ) ) {
+	add_meta_box( 'postcustom', __( 'Custom Fields' ), 'post_custom_meta_box', null, 'normal', 'core' );
+}
 
 /**
  * Fires in the middle of built-in meta box registration.
@@ -291,7 +309,9 @@
 	add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core' );
 }
 
-$stati = get_post_stati( array( 'public' => true ) );
+$stati = get_post_stati( array(
+	'public' => true,
+) );
 if ( empty( $stati ) ) {
 	$stati = array( 'publish' );
 }
@@ -305,8 +325,9 @@
 	}
 }
 
-if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) )
-	add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core');
+if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) {
+	add_meta_box( 'slugdiv', __( 'Slug' ), 'post_slug_meta_box', null, 'normal', 'core' );
+}
 
 if ( post_type_supports( $post_type, 'author' ) && current_user_can( $post_type_object->cap->edit_others_posts ) ) {
 	add_meta_box( 'authordiv', __( 'Author' ), 'post_author_meta_box', null, 'normal', 'core' );
@@ -350,18 +371,21 @@
 /** This action is documented in wp-admin/edit-form-advanced.php */
 do_action( 'do_meta_boxes', $post_type, 'side', $post );
 
-add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
+add_screen_option( 'layout_columns', array(
+	'max' => 2,
+	'default' => 2,
+) );
 
 if ( 'post' == $post_type ) {
-	$customize_display = '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>';
+	$customize_display = '<p>' . __( 'The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.' ) . '</p>';
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'customize-display',
-		'title'   => __('Customizing This Display'),
+		'title'   => __( 'Customizing This Display' ),
 		'content' => $customize_display,
 	) );
 
-	$title_and_editor  = '<p>' . __('<strong>Title</strong> &mdash; Enter a title for your post. After you enter a title, you&#8217;ll see the permalink below, which you can edit.') . '</p>';
+	$title_and_editor  = '<p>' . __( '<strong>Title</strong> &mdash; Enter a title for your post. After you enter a title, you&#8217;ll see the permalink below, which you can edit.' ) . '</p>';
 	$title_and_editor .= '<p>' . __( '<strong>Post editor</strong> &mdash; Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab.' ) . '</p>';
 	$title_and_editor .= '<p>' . __( 'Visual mode gives you an editor that is similar to a word processor. Click the Toolbar Toggle button to get a second row of controls.' ) . '</p>';
 	$title_and_editor .= '<p>' . __( 'The Text mode allows you to enter HTML along with your post text. Note that &lt;p&gt; and &lt;br&gt; tags are converted to line breaks when switching to the Text editor to make it less cluttered. When you type, a single line break can be used instead of typing &lt;br&gt;, and two line breaks instead of paragraph tags. The line breaks are converted back to tags automatically.' ) . '</p>';
@@ -371,49 +395,49 @@
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'title-post-editor',
-		'title'   => __('Title and Post Editor'),
+		'title'   => __( 'Title and Post Editor' ),
 		'content' => $title_and_editor,
 	) );
 
 	get_current_screen()->set_help_sidebar(
-			'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'tools.php') . '</p>' .
-			'<p><strong>' . __('For more information:') . '</strong></p>' .
-			'<p>' . __('<a href="https://codex.wordpress.org/Posts_Add_New_Screen">Documentation on Writing and Editing Posts</a>') . '</p>' .
-			'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p>' . sprintf( __( 'You can also create posts with the <a href="%s">Press This bookmarklet</a>.' ), 'tools.php' ) . '</p>' .
+			'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+			'<p>' . __( '<a href="https://codex.wordpress.org/Posts_Add_New_Screen">Documentation on Writing and Editing Posts</a>' ) . '</p>' .
+			'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
 } elseif ( 'page' == $post_type ) {
-	$about_pages = '<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>' .
-		'<p>' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.') . '</p>';
+	$about_pages = '<p>' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.' ) . '</p>' .
+		'<p>' . __( 'Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.' ) . '</p>';
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'about-pages',
-		'title'   => __('About Pages'),
+		'title'   => __( 'About Pages' ),
 		'content' => $about_pages,
 	) );
 
 	get_current_screen()->set_help_sidebar(
-			'<p><strong>' . __('For more information:') . '</strong></p>' .
-			'<p>' . __('<a href="https://codex.wordpress.org/Pages_Add_New_Screen">Documentation on Adding New Pages</a>') . '</p>' .
-			'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages">Documentation on Editing Pages</a>') . '</p>' .
-			'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+			'<p>' . __( '<a href="https://codex.wordpress.org/Pages_Add_New_Screen">Documentation on Adding New Pages</a>' ) . '</p>' .
+			'<p>' . __( '<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages">Documentation on Editing Pages</a>' ) . '</p>' .
+			'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
 } elseif ( 'attachment' == $post_type ) {
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'overview',
-		'title'   => __('Overview'),
+		'title'   => __( 'Overview' ),
 		'content' =>
-			'<p>' . __('This screen allows you to edit four fields for metadata in a file within the media library.') . '</p>' .
-			'<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
-			'<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
-			'<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>'
+			'<p>' . __( 'This screen allows you to edit four fields for metadata in a file within the media library.' ) . '</p>' .
+			'<p>' . __( 'For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.' ) . '</p>' .
+			'<p>' . __( 'Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.' ) . '</p>' .
+			'<p>' . __( 'Remember to click Update Media to save metadata entered or changed.' ) . '</p>',
 	) );
 
 	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+		'<p>' . __( '<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>' ) . '</p>' .
+		'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
-}
+}// End if().
 
 if ( 'post' == $post_type || 'page' == $post_type ) {
 	$inserting_media = '<p>' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the &#8220;Create a new gallery&#8221; button.' ) . '</p>';
@@ -427,7 +451,7 @@
 }
 
 if ( 'post' == $post_type ) {
-	$publish_box = '<p>' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '</p>';
+	$publish_box = '<p>' . __( 'Several boxes on this screen contain settings for how your content will be published, including:' ) . '</p>';
 	$publish_box .= '<ul><li>' .
 		__( '<strong>Publish</strong> &mdash; You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). The Password protected option allows you to set an arbitrary password for each post. The Private option hides the post from everyone except editors and administrators. Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.' ) .
 	'</li>';
@@ -445,29 +469,29 @@
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'publish-box',
-		'title'   => __('Publish Settings'),
+		'title'   => __( 'Publish Settings' ),
 		'content' => $publish_box,
 	) );
 
-	$discussion_settings  = '<p>' . __('<strong>Send Trackbacks</strong> &mdash; Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
-	$discussion_settings .= '<p>' . __('<strong>Discussion</strong> &mdash; You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '</p>';
+	$discussion_settings  = '<p>' . __( '<strong>Send Trackbacks</strong> &mdash; Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.' ) . '</p>';
+	$discussion_settings .= '<p>' . __( '<strong>Discussion</strong> &mdash; You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.' ) . '</p>';
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'discussion-settings',
-		'title'   => __('Discussion Settings'),
+		'title'   => __( 'Discussion Settings' ),
 		'content' => $discussion_settings,
 	) );
 } elseif ( 'page' == $post_type ) {
-	$page_attributes = '<p>' . __('<strong>Parent</strong> &mdash; You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how many levels you can nest pages.') . '</p>' .
-		'<p>' . __('<strong>Template</strong> &mdash; Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them in this dropdown menu.') . '</p>' .
-		'<p>' . __('<strong>Order</strong> &mdash; Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>';
+	$page_attributes = '<p>' . __( '<strong>Parent</strong> &mdash; You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how many levels you can nest pages.' ) . '</p>' .
+		'<p>' . __( '<strong>Template</strong> &mdash; Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them in this dropdown menu.' ) . '</p>' .
+		'<p>' . __( '<strong>Order</strong> &mdash; Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.' ) . '</p>';
 
 	get_current_screen()->add_help_tab( array(
 		'id' => 'page-attributes',
-		'title' => __('Page Attributes'),
+		'title' => __( 'Page Attributes' ),
 		'content' => $page_attributes,
 	) );
-}
+}// End if().
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
@@ -508,20 +532,21 @@
 
 $referer = wp_get_referer();
 ?>>
-<?php wp_nonce_field($nonce_action); ?>
+<?php wp_nonce_field( $nonce_action ); ?>
 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
 <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" />
 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ) ?>" />
 <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
 <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ) ?>" />
-<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status) ?>" />
+<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ) ?>" />
 <input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
 <?php if ( ! empty( $active_post_lock ) ) { ?>
 <input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
 <?php
 }
-if ( 'draft' != get_post_status( $post ) )
-	wp_original_referer_field(true, 'previous');
+if ( 'draft' != get_post_status( $post ) ) {
+	wp_original_referer_field( true, 'previous' );
+}
 
 echo $form_extra;
 
@@ -545,7 +570,7 @@
 <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
 <div id="post-body-content">
 
-<?php if ( post_type_supports($post_type, 'title') ) { ?>
+<?php if ( post_type_supports( $post_type, 'title' ) ) { ?>
 <div id="titlediv">
 <div id="titlewrap">
 	<?php
@@ -575,28 +600,29 @@
 <div class="inside">
 <?php
 if ( $viewable ) :
-$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : '';
+	$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html( $post->ID ) : '';
 
-// As of 4.4, the Get Shortlink button is hidden by default.
-if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
-	$shortlink = wp_get_shortlink($post->ID, 'post');
+	// As of 4.4, the Get Shortlink button is hidden by default.
+	if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
+		$shortlink = wp_get_shortlink( $post->ID, 'post' );
 
-	if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) {
-		$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
+		if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
+			$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
+		}
 	}
-}
 
-if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) {
-	$has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
-?>
-	<div id="edit-slug-box" class="hide-if-no-js">
-	<?php
-		if ( $has_sample_permalink )
+	if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) {
+		$has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
+		?>
+		<div id="edit-slug-box" class="hide-if-no-js">
+		<?php
+		if ( $has_sample_permalink ) {
 			echo $sample_permalink_html;
-	?>
-	</div>
-<?php
-}
+		}
+		?>
+		</div>
+		<?php
+	}
 endif;
 ?>
 </div>
@@ -605,7 +631,7 @@
 ?>
 </div><!-- /titlediv -->
 <?php
-}
+}// End if().
 /**
  * Fires after the title field.
  *
@@ -615,7 +641,7 @@
  */
 do_action( 'edit_form_after_title', $post );
 
-if ( post_type_supports($post_type, 'editor') ) {
+if ( post_type_supports( $post_type, 'editor' ) ) {
 ?>
 <div id="postdivrich" class="postarea<?php if ( $_wp_editor_expand ) { echo ' wp-editor-expand'; } ?>">
 
@@ -635,23 +661,23 @@
 	<td class="autosave-info">
 	<span class="autosave-message">&nbsp;</span>
 <?php
-	if ( 'auto-draft' != $post->post_status ) {
-		echo '<span id="last-edit">';
-		if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
-			/* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */
-			printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
-		} else {
-			/* translators: 1: Post edited date, 2: Post edited time */
-			printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
-		}
-		echo '</span>';
-	} ?>
+if ( 'auto-draft' != $post->post_status ) {
+	echo '<span id="last-edit">';
+	if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
+		/* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */
+		printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
+	} else {
+		/* translators: 1: Post edited date, 2: Post edited time */
+		printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
+	}
+	echo '</span>';
+} ?>
 	</td>
 	<td id="content-resize-handle" class="hide-if-no-js"><br /></td>
 </tr></tbody></table>
 
 </div>
-<?php }
+<?php }// End if().
 /**
  * Fires after the content editor.
  *
@@ -677,8 +703,7 @@
 	 * @param WP_Post $post Post object.
 	 */
 	do_action( 'submitpage_box', $post );
-}
-else {
+} else {
 	/**
 	 * Fires before meta boxes with 'side' context are output for all post types other than 'page'.
 	 *
@@ -692,14 +717,14 @@
 }
 
 
-do_meta_boxes($post_type, 'side', $post);
+do_meta_boxes( $post_type, 'side', $post );
 
 ?>
 </div>
 <div id="postbox-container-2" class="postbox-container">
 <?php
 
-do_meta_boxes(null, 'normal', $post);
+do_meta_boxes( null, 'normal', $post );
 
 if ( 'page' == $post_type ) {
 	/**
@@ -710,8 +735,7 @@
 	 * @param WP_Post $post Post object.
 	 */
 	do_action( 'edit_page_form', $post );
-}
-else {
+} else {
 	/**
 	 * Fires after 'normal' context meta boxes have been output for all post types other than 'page'.
 	 *
@@ -723,7 +747,7 @@
 }
 
 
-do_meta_boxes(null, 'advanced', $post);
+do_meta_boxes( null, 'advanced', $post );
 
 ?>
 </div>
@@ -745,8 +769,9 @@
 </div>
 
 <?php
-if ( post_type_supports( $post_type, 'comments' ) )
+if ( post_type_supports( $post_type, 'comments' ) ) {
 	wp_comment_reply();
+}
 ?>
 
 <?php if ( ! wp_is_mobile() && post_type_supports( $post_type, 'title' ) && '' === $post->post_title ) : ?>
Index: src/wp-admin/edit-form-comment.php
===================================================================
--- src/wp-admin/edit-form-comment.php	(revision 40901)
+++ src/wp-admin/edit-form-comment.php	(working copy)
@@ -7,11 +7,12 @@
  */
 
 // don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
+if ( ! defined( 'ABSPATH' ) ) {
+	die( '-1' );
+}
 ?>
 <form name="post" action="comment.php" method="post" id="post">
-<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
+<?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ) ?>
 <div class="wrap">
 <h1><?php _e( 'Edit Comment' ); ?></h1>
 
@@ -52,7 +53,7 @@
 <tr>
 	<td class="first"><label for="newcomment_author_url"><?php _e( 'URL:' ); ?></label></td>
 	<td>
-		<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" />
+		<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr( $comment->comment_author_url ); ?>" />
 	</td>
 </tr>
 </tbody>
@@ -65,8 +66,14 @@
 <div id="postdiv" class="postarea">
 <?php
 	echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
-	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
-	wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
+	$quicktags_settings = array(
+		'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close',
+	);
+	wp_editor( $comment->comment_content, 'content', array(
+		'media_buttons' => false,
+		'tinymce' => false,
+		'quicktags' => $quicktags_settings,
+	) );
 	wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
 </div>
 </div><!-- /post-body-content -->
@@ -159,7 +166,7 @@
 
 <div id="major-publishing-actions">
 <div id="delete-action">
-<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
+<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url( 'comment.php?action=' . ( ! EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode( wp_get_referer() ), 'delete-comment_' . $comment->comment_ID ) . "'>" . ( ! EMPTY_TRASH_DAYS ? __( 'Delete Permanently' ) : __( 'Move to Trash' ) ) . "</a>\n"; ?>
 </div>
 <div id="publishing-action">
 <?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?>
@@ -185,16 +192,16 @@
  */
 do_action( 'add_meta_boxes_comment', $comment );
 
-do_meta_boxes(null, 'normal', $comment);
+do_meta_boxes( null, 'normal', $comment );
 
 $referer = wp_get_referer();
 ?>
 </div>
 
-<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
-<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
+<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ) ?>" />
+<input type="hidden" name="p" value="<?php echo esc_attr( $comment->comment_post_ID ) ?>" />
 <input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
-<?php wp_original_referer_field(true, 'previous'); ?>
+<?php wp_original_referer_field( true, 'previous' ); ?>
 <input type="hidden" name="noredir" value="1" />
 
 </div><!-- /post-body -->
Index: src/wp-admin/edit-link-form.php
===================================================================
--- src/wp-admin/edit-link-form.php	(revision 40901)
+++ src/wp-admin/edit-link-form.php	(working copy)
@@ -7,28 +7,29 @@
  */
 
 // don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
+if ( ! defined( 'ABSPATH' ) ) {
+	die( '-1' );
+}
 
-if ( ! empty($link_id) ) {
+if ( ! empty( $link_id ) ) {
 	$heading = sprintf( __( '<a href="%s">Links</a> / Edit Link' ), 'link-manager.php' );
-	$submit_text = __('Update Link');
+	$submit_text = __( 'Update Link' );
 	$form_name = 'editlink';
 	$nonce_action = 'update-bookmark_' . $link_id;
 } else {
 	$heading = sprintf( __( '<a href="%s">Links</a> / Add New Link' ), 'link-manager.php' );
-	$submit_text = __('Add Link');
+	$submit_text = __( 'Add Link' );
 	$form_name = 'addlink';
 	$nonce_action = 'add-bookmark';
 }
 
 require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' );
 
-add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', null, 'side', 'core');
-add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', null, 'normal', 'core');
-add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', null, 'normal', 'core');
-add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', null, 'normal', 'core');
-add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', null, 'normal', 'core');
+add_meta_box( 'linksubmitdiv', __( 'Save' ), 'link_submit_meta_box', null, 'side', 'core' );
+add_meta_box( 'linkcategorydiv', __( 'Categories' ), 'link_categories_meta_box', null, 'normal', 'core' );
+add_meta_box( 'linktargetdiv', __( 'Target' ), 'link_target_meta_box', null, 'normal', 'core' );
+add_meta_box( 'linkxfndiv', __( 'Link Relationship (XFN)' ), 'link_xfn_meta_box', null, 'normal', 'core' );
+add_meta_box( 'linkadvanceddiv', __( 'Advanced' ), 'link_advanced_meta_box', null, 'normal', 'core' );
 
 /** This action is documented in wp-admin/edit-form-advanced.php */
 do_action( 'add_meta_boxes', 'link', $link );
@@ -49,15 +50,18 @@
 /** This action is documented in wp-admin/edit-form-advanced.php */
 do_action( 'do_meta_boxes', 'link', 'side', $link );
 
-add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
+add_screen_option( 'layout_columns', array(
+	'max' => 2,
+	'default' => 2,
+) );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
 	'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
 	'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
-	'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
+	'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
@@ -79,7 +83,7 @@
 <hr class="wp-header-end">
 
 <?php if ( isset( $_GET['added'] ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
+<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Link added.' ); ?></p></div>
 <?php endif; ?>
 
 <form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
@@ -99,24 +103,24 @@
 <div id="namediv" class="stuffbox">
 <h2><label for="link_name"><?php _ex( 'Name', 'link name' ) ?></label></h2>
 <div class="inside">
-	<input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
-	<p><?php _e('Example: Nifty blogging software'); ?></p>
+	<input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr( $link->link_name ); ?>" id="link_name" />
+	<p><?php _e( 'Example: Nifty blogging software' ); ?></p>
 </div>
 </div>
 
 <div id="addressdiv" class="stuffbox">
 <h2><label for="link_url"><?php _e( 'Web Address' ) ?></label></h2>
 <div class="inside">
-	<input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
-	<p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
+	<input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr( $link->link_url ); ?>" id="link_url" />
+	<p><?php _e( 'Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>' ); ?></p>
 </div>
 </div>
 
 <div id="descriptiondiv" class="stuffbox">
 <h2><label for="link_description"><?php _e( 'Description' ) ?></label></h2>
 <div class="inside">
-	<input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
-	<p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
+	<input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset( $link->link_description ) ? esc_attr( $link->link_description ) : ''; ?>" id="link_description" />
+	<p><?php _e( 'This will be shown when someone hovers over the link in the blogroll, or optionally below the link.' ); ?></p>
 </div>
 </div>
 </div><!-- /post-body-content -->
@@ -133,9 +137,9 @@
 <div id="postbox-container-2" class="postbox-container">
 <?php
 
-do_meta_boxes(null, 'normal', $link);
+do_meta_boxes( null, 'normal', $link );
 
-do_meta_boxes(null, 'advanced', $link);
+do_meta_boxes( null, 'advanced', $link );
 
 ?>
 </div>
@@ -145,7 +149,7 @@
 <input type="hidden" name="action" value="save" />
 <input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
 <input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
-<?php else: ?>
+<?php else : ?>
 <input type="hidden" name="action" value="add" />
 <?php endif; ?>
 
Index: src/wp-admin/edit-tag-form.php
===================================================================
--- src/wp-admin/edit-tag-form.php	(revision 40901)
+++ src/wp-admin/edit-tag-form.php	(working copy)
@@ -14,7 +14,7 @@
 // Back compat hooks
 if ( 'category' == $taxonomy ) {
 	/**
- 	 * Fires before the Edit Category form.
+	  * Fires before the Edit Category form.
 	 *
 	 * @since 2.1.0
 	 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
@@ -118,10 +118,10 @@
 	<table class="form-table">
 		<tr class="form-field form-required term-name-wrap">
 			<th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
-			<td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />
-			<p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td>
+			<td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) { echo esc_attr( $tag->name );} ?>" size="40" aria-required="true" />
+			<p class="description"><?php _e( 'The name is how it appears on your site.' ); ?></p></td>
 		</tr>
-<?php if ( !global_terms_enabled() ) { ?>
+<?php if ( ! global_terms_enabled() ) { ?>
 		<tr class="form-field term-slug-wrap">
 			<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
 			<?php
@@ -141,10 +141,10 @@
 			$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
 			?>
 			<td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
-			<p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
+			<p class="description"><?php _e( 'The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p></td>
 		</tr>
 <?php } ?>
-<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
+<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
 		<tr class="form-field term-parent-wrap">
 			<th scope="row"><label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label></th>
 			<td>
@@ -175,7 +175,7 @@
 		<tr class="form-field term-description-wrap">
 			<th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
 			<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
-			<p class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p></td>
+			<p class="description"><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p></td>
 		</tr>
 		<?php
 		// Back compat hooks
Index: src/wp-admin/edit-tags.php
===================================================================
--- src/wp-admin/edit-tags.php	(revision 40901)
+++ src/wp-admin/edit-tags.php	(working copy)
@@ -9,16 +9,20 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! $taxnow )
+if ( ! $taxnow ) {
 	wp_die( __( 'Invalid taxonomy.' ) );
+}
 
 $tax = get_taxonomy( $taxnow );
 
-if ( ! $tax )
+if ( ! $tax ) {
 	wp_die( __( 'Invalid taxonomy.' ) );
+}
 
-if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
-   wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
+if ( ! in_array( $tax->name, get_taxonomies( array(
+	'show_ui' => true,
+) ) ) ) {
+	wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
 }
 
 if ( ! current_user_can( $tax->cap->manage_terms ) ) {
@@ -36,7 +40,7 @@
  */
 global $post_type;
 
-$wp_list_table = _get_list_table('WP_Terms_List_Table');
+$wp_list_table = _get_list_table( 'WP_Terms_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 $title = $tax->labels->name;
@@ -52,7 +56,10 @@
 	$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
 }
 
-add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
+add_screen_option( 'per_page', array(
+	'default' => 20,
+	'option' => 'edit_' . $tax->name . '_per_page',
+) );
 
 get_current_screen()->set_screen_reader_content( array(
 	'heading_pagination' => $tax->labels->items_list_navigation,
@@ -67,119 +74,126 @@
 $referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message', 'paged' ), $referer );
 switch ( $wp_list_table->current_action() ) {
 
-case 'add-tag':
-	check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
+	case 'add-tag':
+		check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
 
-	if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
-			403
-		);
-	}
-
-	$ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
-	if ( $ret && !is_wp_error( $ret ) )
-		$location = add_query_arg( 'message', 1, $referer );
-	else
-		$location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer );
+		if ( ! current_user_can( $tax->cap->edit_terms ) ) {
+			wp_die(
+				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+				'<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
+				403
+			);
+		}
+
+		$ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
+		if ( $ret && ! is_wp_error( $ret ) ) {
+			$location = add_query_arg( 'message', 1, $referer );
+		} else { $location = add_query_arg( array(
+			'error' => true,
+			'message' => 4,
+		), $referer );
+		}
 
 	break;
 
-case 'delete':
-	if ( ! isset( $_REQUEST['tag_ID'] ) ) {
-		break;
-	}
-
-	$tag_ID = (int) $_REQUEST['tag_ID'];
-	check_admin_referer( 'delete-tag_' . $tag_ID );
-
-	if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
-			403
-		);
-	}
+	case 'delete':
+		if ( ! isset( $_REQUEST['tag_ID'] ) ) {
+			break;
+		}
+
+		$tag_ID = (int) $_REQUEST['tag_ID'];
+		check_admin_referer( 'delete-tag_' . $tag_ID );
+
+		if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
+			wp_die(
+				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+				'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
+				403
+			);
+		}
 
-	wp_delete_term( $tag_ID, $taxonomy );
+		wp_delete_term( $tag_ID, $taxonomy );
 
-	$location = add_query_arg( 'message', 2, $referer );
+		$location = add_query_arg( 'message', 2, $referer );
 
-	// When deleting a term, prevent the action from redirecting back to a term that no longer exists.
-	$location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
+		// When deleting a term, prevent the action from redirecting back to a term that no longer exists.
+		$location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
 
 	break;
 
-case 'bulk-delete':
-	check_admin_referer( 'bulk-tags' );
+	case 'bulk-delete':
+		check_admin_referer( 'bulk-tags' );
 
-	if ( ! current_user_can( $tax->cap->delete_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
-			403
-		);
-	}
+		if ( ! current_user_can( $tax->cap->delete_terms ) ) {
+			wp_die(
+				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+				'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
+				403
+			);
+		}
+
+		$tags = (array) $_REQUEST['delete_tags'];
+		foreach ( $tags as $tag_ID ) {
+			wp_delete_term( $tag_ID, $taxonomy );
+		}
 
-	$tags = (array) $_REQUEST['delete_tags'];
-	foreach ( $tags as $tag_ID ) {
-		wp_delete_term( $tag_ID, $taxonomy );
-	}
-
-	$location = add_query_arg( 'message', 6, $referer );
+		$location = add_query_arg( 'message', 6, $referer );
 
 	break;
 
-case 'edit':
-	if ( ! isset( $_REQUEST['tag_ID'] ) ) {
-		break;
-	}
-
-	$term_id = (int) $_REQUEST['tag_ID'];
-	$term    = get_term( $term_id );
-
-	if ( ! $term instanceof WP_Term ) {
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-	}
+	case 'edit':
+		if ( ! isset( $_REQUEST['tag_ID'] ) ) {
+			break;
+		}
+
+		$term_id = (int) $_REQUEST['tag_ID'];
+		$term    = get_term( $term_id );
+
+		if ( ! $term instanceof WP_Term ) {
+			wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+		}
 
-	wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
+		wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
 	exit;
 
-case 'editedtag':
-	$tag_ID = (int) $_POST['tag_ID'];
-	check_admin_referer( 'update-tag_' . $tag_ID );
-
-	if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
-			403
-		);
-	}
-
-	$tag = get_term( $tag_ID, $taxonomy );
-	if ( ! $tag )
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-
-	$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
-
-	if ( $ret && ! is_wp_error( $ret ) ) {
-		$location = add_query_arg( 'message', 3, $referer );
-	} else {
-		$location = add_query_arg( array( 'error' => true, 'message' => 5 ), $referer );
-	}
+	case 'editedtag':
+		$tag_ID = (int) $_POST['tag_ID'];
+		check_admin_referer( 'update-tag_' . $tag_ID );
+
+		if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
+			wp_die(
+				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
+				'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
+				403
+			);
+		}
+
+		$tag = get_term( $tag_ID, $taxonomy );
+		if ( ! $tag ) {
+			wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+		}
+
+		$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
+
+		if ( $ret && ! is_wp_error( $ret ) ) {
+			$location = add_query_arg( 'message', 3, $referer );
+		} else {
+			$location = add_query_arg( array(
+				'error' => true,
+				'message' => 5,
+			), $referer );
+		}
 	break;
-default:
-	if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
-		break;
-	}
-	check_admin_referer( 'bulk-tags' );
-	$tags = (array) $_REQUEST['delete_tags'];
-	/** This action is documented in wp-admin/edit-comments.php */
-	$location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags );
+	default:
+		if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
+			break;
+		}
+		check_admin_referer( 'bulk-tags' );
+		$tags = (array) $_REQUEST['delete_tags'];
+		/** This action is documented in wp-admin/edit-comments.php */
+		$location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags );
 	break;
-}
+}// End switch().
 
 if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
 	$location = remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) );
@@ -210,44 +224,47 @@
 	exit;
 }
 
-wp_enqueue_script('admin-tags');
-if ( current_user_can($tax->cap->edit_terms) )
-	wp_enqueue_script('inline-edit-tax');
-
-if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy  ) {
-	$help ='';
-	if ( 'category' == $taxonomy )
-		$help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
-	elseif ( 'link_category' == $taxonomy )
+wp_enqueue_script( 'admin-tags' );
+if ( current_user_can( $tax->cap->edit_terms ) ) {
+	wp_enqueue_script( 'inline-edit-tax' );
+}
+
+if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy ) {
+	$help = '';
+	if ( 'category' == $taxonomy ) {
+		$help = '<p>' . sprintf( __( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
+	} elseif ( 'link_category' == $taxonomy ) {
 		$help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
-	else
-		$help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
+	} else { $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
+	}
 
-	if ( 'link_category' == $taxonomy )
+	if ( 'link_category' == $taxonomy ) {
 		$help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>';
-	else
-		$help .='<p>' . __( 'What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
+	} else { $help .= '<p>' . __( 'What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
+	}
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'overview',
-		'title'   => __('Overview'),
+		'title'   => __( 'Overview' ),
 		'content' => $help,
 	) );
 
 	if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) {
-		if ( 'category' == $taxonomy )
+		if ( 'category' == $taxonomy ) {
 			$help = '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
-		else
-			$help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
+		} else { $help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
+		}
 
 		$help .= '<ul>' .
 		'<li>' . __( '<strong>Name</strong> &mdash; The name is how it appears on your site.' ) . '</li>';
 
-		if ( ! global_terms_enabled() )
+		if ( ! global_terms_enabled() ) {
 			$help .= '<li>' . __( '<strong>Slug</strong> &mdash; The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
+		}
 
-		if ( 'category' == $taxonomy )
+		if ( 'category' == $taxonomy ) {
 			$help .= '<li>' . __( '<strong>Parent</strong> &mdash; Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
+		}
 
 		$help .= '<li>' . __( '<strong>Description</strong> &mdash; The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
 		'</ul>' .
@@ -262,19 +279,19 @@
 
 	$help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
 
-	if ( 'category' == $taxonomy )
+	if ( 'category' == $taxonomy ) {
 		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen">Documentation on Categories</a>' ) . '</p>';
-	elseif ( 'link_category' == $taxonomy )
+	} elseif ( 'link_category' == $taxonomy ) {
 		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>';
-	else
-		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen">Documentation on Tags</a>' ) . '</p>';
+	} else { $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen">Documentation on Tags</a>' ) . '</p>';
+	}
 
-	$help .= '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>';
+	$help .= '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>';
 
 	get_current_screen()->set_help_sidebar( $help );
 
 	unset( $help );
-}
+}// End if().
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
@@ -310,8 +327,8 @@
 <div id="ajax-response"></div>
 
 <form class="search-form wp-clearfix" method="get">
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
+<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
+<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
 
 <?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
 
@@ -324,17 +341,19 @@
 
 <?php
 
-if ( current_user_can($tax->cap->edit_terms) ) {
+if ( current_user_can( $tax->cap->edit_terms ) ) {
 	if ( 'category' == $taxonomy ) {
 		/**
- 		 * Fires before the Add Category form.
+		  * Fires before the Add Category form.
 		 *
 		 * @since 2.1.0
 		 * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
 		 *
 		 * @param object $arg Optional arguments cast to an object.
 		 */
-		do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) );
+		do_action( 'add_category_form_pre', (object) array(
+			'parent' => 0,
+		) );
 	} elseif ( 'link_category' == $taxonomy ) {
 		/**
 		 * Fires before the link category form.
@@ -344,7 +363,9 @@
 		 *
 		 * @param object $arg Optional arguments cast to an object.
 		 */
-		do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) );
+		do_action( 'add_link_category_form_pre', (object) array(
+			'parent' => 0,
+		) );
 	} else {
 		/**
 		 * Fires before the Add Tag form.
@@ -382,24 +403,24 @@
 do_action( "{$taxonomy}_term_new_form_tag" );
 ?>>
 <input type="hidden" name="action" value="add-tag" />
-<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
-<?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?>
+<input type="hidden" name="screen" value="<?php echo esc_attr( $current_screen->id ); ?>" />
+<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
+<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
+<?php wp_nonce_field( 'add-tag', '_wpnonce_add-tag' ); ?>
 
 <div class="form-field form-required term-name-wrap">
 	<label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
 	<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
-	<p><?php _e('The name is how it appears on your site.'); ?></p>
+	<p><?php _e( 'The name is how it appears on your site.' ); ?></p>
 </div>
 <?php if ( ! global_terms_enabled() ) : ?>
 <div class="form-field term-slug-wrap">
 	<label for="tag-slug"><?php _e( 'Slug' ); ?></label>
 	<input name="slug" id="tag-slug" type="text" value="" size="40" />
-	<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
+	<p><?php _e( 'The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p>
 </div>
 <?php endif; // global_terms_enabled() ?>
-<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
+<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
 <div class="form-field term-parent-wrap">
 	<label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label>
 	<?php
@@ -448,7 +469,7 @@
 <div class="form-field term-description-wrap">
 	<label for="tag-description"><?php _e( 'Description' ); ?></label>
 	<textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
-	<p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
+	<p><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p>
 </div>
 
 <?php
@@ -485,7 +506,9 @@
 	 *
 	 * @param object $arg Optional arguments cast to an object.
 	 */
-	do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
+	do_action( 'edit_category_form', (object) array(
+		'parent' => 0,
+	) );
 } elseif ( 'link_category' == $taxonomy ) {
 	/**
 	 * Fires at the end of the Edit Link form.
@@ -495,7 +518,9 @@
 	 *
 	 * @param object $arg Optional arguments cast to an object.
 	 */
-	do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
+	do_action( 'edit_link_category_form', (object) array(
+		'parent' => 0,
+	) );
 } else {
 	/**
 	 * Fires at the end of the Add Tag form.
@@ -520,7 +545,8 @@
 do_action( "{$taxonomy}_add_form", $taxonomy );
 ?>
 </form></div>
-<?php } ?>
+<?php }// End if().
+	?>
 
 </div>
 </div><!-- /col-left -->
@@ -544,7 +570,7 @@
 		/* translators: %s: default category */
 		__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
 		/** This filter is documented in wp-includes/category-template.php */
-		'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
+		'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category' ) ) ) . '</strong>'
 	);
 	?>
 </p>
@@ -554,7 +580,7 @@
 </div>
 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
 <div class="form-wrap edit-term-notes">
-<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
+<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) );?></p>
 </div>
 <?php endif;
 
Index: src/wp-admin/edit.php
===================================================================
--- src/wp-admin/edit.php	(revision 40901)
+++ src/wp-admin/edit.php	(working copy)
@@ -9,10 +9,13 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! $typenow )
+if ( ! $typenow ) {
 	wp_die( __( 'Invalid post type.' ) );
+}
 
-if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
+if ( ! in_array( $typenow, get_post_types( array(
+	'show_ui' => true,
+) ) ) ) {
 	wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
 }
 
@@ -31,8 +34,9 @@
 $post_type = $typenow;
 $post_type_object = get_post_type_object( $post_type );
 
-if ( ! $post_type_object )
+if ( ! $post_type_object ) {
 	wp_die( __( 'Invalid post type.' ) );
+}
 
 if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
 	wp_die(
@@ -42,7 +46,7 @@
 	);
 }
 
-$wp_list_table = _get_list_table('WP_Posts_List_Table');
+$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 // Back-compat for viewing comments of an entry
@@ -67,18 +71,20 @@
 $doaction = $wp_list_table->current_action();
 
 if ( $doaction ) {
-	check_admin_referer('bulk-posts');
+	check_admin_referer( 'bulk-posts' );
 
-	$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
-	if ( ! $sendback )
+	$sendback = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'locked', 'ids' ), wp_get_referer() );
+	if ( ! $sendback ) {
 		$sendback = admin_url( $parent_file );
+	}
 	$sendback = add_query_arg( 'paged', $pagenum, $sendback );
-	if ( strpos($sendback, 'post.php') !== false )
-		$sendback = admin_url($post_new_file);
+	if ( strpos( $sendback, 'post.php' ) !== false ) {
+		$sendback = admin_url( $post_new_file );
+	}
 
 	if ( 'delete_all' == $doaction ) {
 		// Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
-		$post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']);
+		$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
 		// Validate the post status exists.
 		if ( get_post_status_object( $post_status ) ) {
 			$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) );
@@ -88,11 +94,11 @@
 		$post_ids = $_REQUEST['media'];
 	} elseif ( isset( $_REQUEST['ids'] ) ) {
 		$post_ids = explode( ',', $_REQUEST['ids'] );
-	} elseif ( !empty( $_REQUEST['post'] ) ) {
-		$post_ids = array_map('intval', $_REQUEST['post']);
+	} elseif ( ! empty( $_REQUEST['post'] ) ) {
+		$post_ids = array_map( 'intval', $_REQUEST['post'] );
 	}
 
-	if ( !isset( $post_ids ) ) {
+	if ( ! isset( $post_ids ) ) {
 		wp_redirect( $sendback );
 		exit;
 	}
@@ -102,59 +108,70 @@
 			$trashed = $locked = 0;
 
 			foreach ( (array) $post_ids as $post_id ) {
-				if ( !current_user_can( 'delete_post', $post_id) )
-					wp_die( __('Sorry, you are not allowed to move this item to the Trash.') );
+				if ( ! current_user_can( 'delete_post', $post_id ) ) {
+					wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
+				}
 
 				if ( wp_check_post_lock( $post_id ) ) {
 					$locked++;
 					continue;
 				}
 
-				if ( !wp_trash_post($post_id) )
-					wp_die( __('Error in moving to Trash.') );
+				if ( ! wp_trash_post( $post_id ) ) {
+					wp_die( __( 'Error in moving to Trash.' ) );
+				}
 
 				$trashed++;
 			}
 
-			$sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids), 'locked' => $locked ), $sendback );
+			$sendback = add_query_arg( array(
+				'trashed' => $trashed,
+				'ids' => join( ',', $post_ids ),
+				'locked' => $locked,
+			), $sendback );
 			break;
 		case 'untrash':
 			$untrashed = 0;
 			foreach ( (array) $post_ids as $post_id ) {
-				if ( !current_user_can( 'delete_post', $post_id) )
-					wp_die( __('Sorry, you are not allowed to restore this item from the Trash.') );
+				if ( ! current_user_can( 'delete_post', $post_id ) ) {
+					wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
+				}
 
-				if ( !wp_untrash_post($post_id) )
-					wp_die( __('Error in restoring from Trash.') );
+				if ( ! wp_untrash_post( $post_id ) ) {
+					wp_die( __( 'Error in restoring from Trash.' ) );
+				}
 
 				$untrashed++;
 			}
-			$sendback = add_query_arg('untrashed', $untrashed, $sendback);
+			$sendback = add_query_arg( 'untrashed', $untrashed, $sendback );
 			break;
 		case 'delete':
 			$deleted = 0;
 			foreach ( (array) $post_ids as $post_id ) {
-				$post_del = get_post($post_id);
+				$post_del = get_post( $post_id );
 
-				if ( !current_user_can( 'delete_post', $post_id ) )
-					wp_die( __('Sorry, you are not allowed to delete this item.') );
+				if ( ! current_user_can( 'delete_post', $post_id ) ) {
+					wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
+				}
 
 				if ( $post_del->post_type == 'attachment' ) {
-					if ( ! wp_delete_attachment($post_id) )
-						wp_die( __('Error in deleting.') );
+					if ( ! wp_delete_attachment( $post_id ) ) {
+						wp_die( __( 'Error in deleting.' ) );
+					}
 				} else {
-					if ( !wp_delete_post($post_id) )
-						wp_die( __('Error in deleting.') );
+					if ( ! wp_delete_post( $post_id ) ) {
+						wp_die( __( 'Error in deleting.' ) );
+					}
 				}
 				$deleted++;
 			}
-			$sendback = add_query_arg('deleted', $deleted, $sendback);
+			$sendback = add_query_arg( 'deleted', $deleted, $sendback );
 			break;
 		case 'edit':
-			if ( isset($_REQUEST['bulk_edit']) ) {
-				$done = bulk_edit_posts($_REQUEST);
+			if ( isset( $_REQUEST['bulk_edit'] ) ) {
+				$done = bulk_edit_posts( $_REQUEST );
 
-				if ( is_array($done) ) {
+				if ( is_array( $done ) ) {
 					$done['updated'] = count( $done['updated'] );
 					$done['skipped'] = count( $done['skipped'] );
 					$done['locked'] = count( $done['locked'] );
@@ -166,91 +183,91 @@
 			/** This action is documented in wp-admin/edit-comments.php */
 			$sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids );
 			break;
-	}
+	}// End switch().
 
-	$sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );
+	$sendback = remove_query_arg( array( 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback );
 
-	wp_redirect($sendback);
+	wp_redirect( $sendback );
 	exit();
-} elseif ( ! empty($_REQUEST['_wp_http_referer']) ) {
-	 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) );
+} elseif ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
+	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
 	 exit;
-}
+}// End if().
 
 $wp_list_table->prepare_items();
 
-wp_enqueue_script('inline-edit-post');
-wp_enqueue_script('heartbeat');
+wp_enqueue_script( 'inline-edit-post' );
+wp_enqueue_script( 'heartbeat' );
 
 $title = $post_type_object->labels->name;
 
 if ( 'post' == $post_type ) {
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'overview',
-	'title'		=> __('Overview'),
-	'content'	=>
-		'<p>' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '</p>'
+		'id'		=> 'overview',
+		'title'		=> __( 'Overview' ),
+		'content'	=>
+		'<p>' . __( 'This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.' ) . '</p>',
 	) );
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'screen-content',
-	'title'		=> __('Screen Content'),
-	'content'	=>
-		'<p>' . __('You can customize the display of this screen&#8217;s contents in a number of ways:') . '</p>' .
+		'id'		=> 'screen-content',
+		'title'		=> __( 'Screen Content' ),
+		'content'	=>
+		'<p>' . __( 'You can customize the display of this screen&#8217;s contents in a number of ways:' ) . '</p>' .
 		'<ul>' .
-			'<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' .
+			'<li>' . __( 'You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.' ) . '</li>' .
 			'<li>' . __( 'You can filter the list of posts by post status using the text links above the posts list to only show posts with that status. The default view is to show all posts.' ) . '</li>' .
-			'<li>' . __('You can view posts in a simple title list or with an excerpt using the Screen Options tab.') . '</li>' .
-			'<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' .
-		'</ul>'
+			'<li>' . __( 'You can view posts in a simple title list or with an excerpt using the Screen Options tab.' ) . '</li>' .
+			'<li>' . __( 'You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.' ) . '</li>' .
+		'</ul>',
 	) );
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'action-links',
-	'title'		=> __('Available Actions'),
-	'content'	=>
-		'<p>' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '</p>' .
+		'id'		=> 'action-links',
+		'title'		=> __( 'Available Actions' ),
+		'content'	=>
+		'<p>' . __( 'Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:' ) . '</p>' .
 		'<ul>' .
-			'<li>' . __('<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '</li>' .
-			'<li>' . __('<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '</li>' .
-			'<li>' . __('<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.') . '</li>' .
-			'<li>' . __('<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' .
-		'</ul>'
+			'<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.' ) . '</li>' .
+			'<li>' . __( '<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.' ) . '</li>' .
+			'<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.' ) . '</li>' .
+			'<li>' . __( '<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.' ) . '</li>' .
+		'</ul>',
 	) );
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'bulk-actions',
-	'title'		=> __('Bulk Actions'),
-	'content'	=>
-		'<p>' . __('You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.') . '</p>' .
-				'<p>' . __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>'
+		'id'		=> 'bulk-actions',
+		'title'		=> __( 'Bulk Actions' ),
+		'content'	=>
+		'<p>' . __( 'You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.' ) . '</p>' .
+				'<p>' . __( 'When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.' ) . '</p>',
 	) );
 
 	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen">Documentation on Managing Posts</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+		'<p>' . __( '<a href="https://codex.wordpress.org/Posts_Screen">Documentation on Managing Posts</a>' ) . '</p>' .
+		'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
 
 } elseif ( 'page' == $post_type ) {
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'overview',
-	'title'		=> __('Overview'),
-	'content'	=>
-		'<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>'
+		'id'		=> 'overview',
+		'title'		=> __( 'Overview' ),
+		'content'	=>
+		'<p>' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.' ) . '</p>',
 	) );
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'managing-pages',
-	'title'		=> __('Managing Pages'),
-	'content'	=>
-		'<p>' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '</p>' .
-		'<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.') . '</p>'
+		'id'		=> 'managing-pages',
+		'title'		=> __( 'Managing Pages' ),
+		'content'	=>
+		'<p>' . __( 'Managing pages is very similar to managing posts, and the screens can be customized in the same way.' ) . '</p>' .
+		'<p>' . __( 'You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.' ) . '</p>',
 	) );
 
 	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen">Documentation on Managing Pages</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+		'<p>' . __( '<a href="https://codex.wordpress.org/Pages_Screen">Documentation on Managing Pages</a>' ) . '</p>' .
+		'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
 
-}
+}// End if().
 
 get_current_screen()->set_screen_reader_content( array(
 	'heading_views'      => $post_type_object->labels->filter_items_list,
@@ -258,7 +275,10 @@
 	'heading_list'       => $post_type_object->labels->items_list,
 ) );
 
-add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
+add_screen_option( 'per_page', array(
+	'default' => 20,
+	'option' => 'edit_' . $post_type . '_per_page',
+) );
 
 $bulk_counts = array(
 	'updated'   => isset( $_REQUEST['updated'] )   ? absint( $_REQUEST['updated'] )   : 0,
@@ -272,7 +292,7 @@
 $bulk_messages['post'] = array(
 	'updated'   => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ),
 	'locked'    => ( 1 == $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) :
-	                   _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ),
+					   _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ),
 	'deleted'   => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ),
 	'trashed'   => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ),
 	'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ),
@@ -280,7 +300,7 @@
 $bulk_messages['page'] = array(
 	'updated'   => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ),
 	'locked'    => ( 1 == $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) :
-	                   _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ),
+					   _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ),
 	'deleted'   => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ),
 	'trashed'   => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ),
 	'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ),
@@ -324,19 +344,21 @@
 // If we have a bulk message to issue:
 $messages = array();
 foreach ( $bulk_counts as $message => $count ) {
-	if ( isset( $bulk_messages[ $post_type ][ $message ] ) )
+	if ( isset( $bulk_messages[ $post_type ][ $message ] ) ) {
 		$messages[] = sprintf( $bulk_messages[ $post_type ][ $message ], number_format_i18n( $count ) );
-	elseif ( isset( $bulk_messages['post'][ $message ] ) )
+	} elseif ( isset( $bulk_messages['post'][ $message ] ) ) {
 		$messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) );
+	}
 
 	if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) {
 		$ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] );
-		$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>';
+		$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", 'bulk-posts' ) ) . '">' . __( 'Undo' ) . '</a>';
 	}
 }
 
-if ( $messages )
+if ( $messages ) {
 	echo '<div id="message" class="updated notice is-dismissible"><p>' . join( ' ', $messages ) . '</p></div>';
+}
 unset( $messages );
 
 $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
@@ -348,7 +370,7 @@
 
 <?php $wp_list_table->search_box( $post_type_object->labels->search_items, 'post' ); ?>
 
-<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
+<input type="hidden" name="post_status" class="post_status_page" value="<?php echo ! empty( $_REQUEST['post_status'] ) ? esc_attr( $_REQUEST['post_status'] ) : 'all'; ?>" />
 <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
 
 <?php if ( ! empty( $_REQUEST['author'] ) ) { ?>
@@ -364,8 +386,9 @@
 </form>
 
 <?php
-if ( $wp_list_table->has_items() )
+if ( $wp_list_table->has_items() ) {
 	$wp_list_table->inline_edit();
+}
 ?>
 
 <div id="ajax-response"></div>
Index: src/wp-admin/export.php
===================================================================
--- src/wp-admin/export.php	(revision 40901)
+++ src/wp-admin/export.php	(working copy)
@@ -9,12 +9,13 @@
 /** Load WordPress Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !current_user_can('export') )
-	wp_die(__('Sorry, you are not allowed to export the content of this site.'));
+if ( ! current_user_can( 'export' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to export the content of this site.' ) );
+}
 
 /** Load WordPress export API */
 require_once( ABSPATH . 'wp-admin/includes/export.php' );
-$title = __('Export');
+$title = __( 'Export' );
 
 /**
  * Display JavaScript on the page.
@@ -25,17 +26,17 @@
 ?>
 <script type="text/javascript">
 	jQuery(document).ready(function($){
- 		var form = $('#export-filters'),
- 			filters = form.find('.export-filters');
- 		filters.hide();
- 		form.find('input:radio').change(function() {
+		 var form = $('#export-filters'),
+			 filters = form.find('.export-filters');
+		 filters.hide();
+		 form.find('input:radio').change(function() {
 			filters.slideUp('fast');
 			switch ( $(this).val() ) {
 				case 'attachment': $('#attachment-filters').slideDown(); break;
 				case 'posts': $('#post-filters').slideDown(); break;
 				case 'pages': $('#page-filters').slideDown(); break;
 			}
- 		});
+		 });
 	});
 </script>
 <?php
@@ -44,15 +45,15 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '</p>' .
-		'<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>',
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.' ) . '</p>' .
+		'<p>' . __( 'Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen">Documentation on Export</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Export_Screen">Documentation on Export</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 // If the 'download' URL parameter is set, a WXR export file is baked and returned.
@@ -64,32 +65,37 @@
 	} elseif ( 'posts' == $_GET['content'] ) {
 		$args['content'] = 'post';
 
-		if ( $_GET['cat'] )
+		if ( $_GET['cat'] ) {
 			$args['category'] = (int) $_GET['cat'];
+		}
 
-		if ( $_GET['post_author'] )
+		if ( $_GET['post_author'] ) {
 			$args['author'] = (int) $_GET['post_author'];
+		}
 
 		if ( $_GET['post_start_date'] || $_GET['post_end_date'] ) {
 			$args['start_date'] = $_GET['post_start_date'];
 			$args['end_date'] = $_GET['post_end_date'];
 		}
 
-		if ( $_GET['post_status'] )
+		if ( $_GET['post_status'] ) {
 			$args['status'] = $_GET['post_status'];
+		}
 	} elseif ( 'pages' == $_GET['content'] ) {
 		$args['content'] = 'page';
 
-		if ( $_GET['page_author'] )
+		if ( $_GET['page_author'] ) {
 			$args['author'] = (int) $_GET['page_author'];
+		}
 
 		if ( $_GET['page_start_date'] || $_GET['page_end_date'] ) {
 			$args['start_date'] = $_GET['page_start_date'];
 			$args['end_date'] = $_GET['page_end_date'];
 		}
 
-		if ( $_GET['page_status'] )
+		if ( $_GET['page_status'] ) {
 			$args['status'] = $_GET['page_status'];
+		}
 	} elseif ( 'attachment' == $_GET['content'] ) {
 		$args['content'] = 'attachment';
 
@@ -97,10 +103,9 @@
 			$args['start_date'] = $_GET['attachment_start_date'];
 			$args['end_date'] = $_GET['attachment_end_date'];
 		}
-	}
-	else {
+	} else {
 		$args['content'] = $_GET['content'];
-	}
+	}// End if().
 
 	/**
 	 * Filters the export args.
@@ -113,7 +118,7 @@
 
 	export_wp( $args );
 	die();
-}
+}// End if().
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
@@ -138,12 +143,14 @@
 	", $post_type ) );
 
 	$month_count = count( $months );
-	if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
+	if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {
 		return;
+	}
 
 	foreach ( $months as $date ) {
-		if ( 0 == $date->year )
+		if ( 0 == $date->year ) {
 			continue;
+		}
 
 		$month = zeroise( $date->month, 2 );
 		echo '<option value="' . $date->year . '-' . $month . '">' . $wp_locale->get_month( $month ) . ' ' . $date->year . '</option>';
@@ -154,9 +161,9 @@
 <div class="wrap">
 <h1><?php echo esc_html( $title ); ?></h1>
 
-<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
-<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
-<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.'); ?></p>
+<p><?php _e( 'When you click the button below WordPress will create an XML file for you to save to your computer.' ); ?></p>
+<p><?php _e( 'This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.' ); ?></p>
+<p><?php _e( 'Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.' ); ?></p>
 
 <h2><?php _e( 'Choose what to export' ); ?></h2>
 <form method="get" id="export-filters">
@@ -170,7 +177,9 @@
 <ul id="post-filters" class="export-filters">
 	<li>
 		<label><span class="label-responsive"><?php _e( 'Categories:' ); ?></span>
-		<?php wp_dropdown_categories( array( 'show_option_all' => __('All') ) ); ?>
+		<?php wp_dropdown_categories( array(
+			'show_option_all' => __( 'All' ),
+		) ); ?>
 		</label>
 	</li>
 	<li>
@@ -205,8 +214,10 @@
 		<label for="post-status" class="label-responsive"><?php _e( 'Status:' ); ?></label>
 		<select name="post_status" id="post-status">
 			<option value="0"><?php _e( 'All' ); ?></option>
-			<?php $post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
-			foreach ( $post_stati as $status ) : ?>
+			<?php $post_stati = get_post_stati( array(
+				'internal' => false,
+			), 'objects' );
+foreach ( $post_stati as $status ) : ?>
 			<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
 			<?php endforeach; ?>
 		</select>
@@ -254,7 +265,10 @@
 	</li>
 </ul>
 
-<?php foreach ( get_post_types( array( '_builtin' => false, 'can_export' => true ), 'objects' ) as $post_type ) : ?>
+<?php foreach ( get_post_types( array(
+	'_builtin' => false,
+	'can_export' => true,
+), 'objects' ) as $post_type ) : ?>
 <p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
 <?php endforeach; ?>
 
@@ -287,7 +301,7 @@
 do_action( 'export_filters' );
 ?>
 
-<?php submit_button( __('Download Export File') ); ?>
+<?php submit_button( __( 'Download Export File' ) ); ?>
 </form>
 </div>
 
Index: src/wp-admin/import.php
===================================================================
--- src/wp-admin/import.php	(revision 40901)
+++ src/wp-admin/import.php	(working copy)
@@ -6,7 +6,7 @@
  * @subpackage Administration
  */
 
-define('WP_LOAD_IMPORTERS', true);
+define( 'WP_LOAD_IMPORTERS', true );
 
 /** Load WordPress Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
@@ -15,26 +15,26 @@
 	wp_die( __( 'Sorry, you are not allowed to import content.' ) );
 }
 
-$title = __('Import');
+$title = __( 'Import' );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '</p>' .
-		'<p>' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '</p>',
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.' ) . '</p>' .
+		'<p>' . __( 'In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen">Documentation on Import</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Import_Screen">Documentation on Import</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 if ( current_user_can( 'install_plugins' ) ) {
 	// List of popular importer plugins from the WordPress.org API.
 	$popular_importers = wp_get_popular_importers();
 } else {
- 	$popular_importers = array();
+	 $popular_importers = array();
 }
 
 // Detect and redirect invalid importers like 'movabletype', which is registered as 'mt'
@@ -65,7 +65,7 @@
 		?></p>
 	</div>
 <?php endif; ?>
-<p><?php _e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:'); ?></p>
+<p><?php _e( 'If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:' ); ?></p>
 
 <?php
 // Registered (already installed) importers. They're stored in the global $wp_importers.
@@ -73,17 +73,23 @@
 
 // If a popular importer is not registered, create a dummy registration that links to the plugin installer.
 foreach ( $popular_importers as $pop_importer => $pop_data ) {
-	if ( isset( $importers[ $pop_importer ] ) )
+	if ( isset( $importers[ $pop_importer ] ) ) {
 		continue;
-	if ( isset( $importers[ $pop_data['importer-id'] ] ) )
+	}
+	if ( isset( $importers[ $pop_data['importer-id'] ] ) ) {
 		continue;
+	}
 
 	// Fill the array of registered (already installed) importers with data of the popular importers from the WordPress.org API.
-	$importers[ $pop_data['importer-id'] ] = array( $pop_data['name'], $pop_data['description'], 'install' => $pop_data['plugin-slug'] );
+	$importers[ $pop_data['importer-id'] ] = array(
+		$pop_data['name'],
+		$pop_data['description'],
+		'install' => $pop_data['plugin-slug'],
+	);
 }
 
 if ( empty( $importers ) ) {
-	echo '<p>' . __('No importers are available.') . '</p>'; // TODO: make more helpful
+	echo '<p>' . __( 'No importers are available.' ) . '</p>'; // TODO: make more helpful
 } else {
 	uasort( $importers, '_usort_by_first_member' );
 ?>
@@ -157,7 +163,7 @@
 			);
 
 			$is_plugin_installed = true;
-		}
+		}// End if().
 
 		if ( ! $is_plugin_installed && is_main_site() ) {
 			$url = add_query_arg( array(
@@ -187,14 +193,15 @@
 					<span class='importer-desc'>{$data[1]}</span>
 				</td>
 			</tr>";
-	}
+	}// End foreach().
 	?>
 </table>
 <?php
-}
+}// End if().
 
-if ( current_user_can('install_plugins') )
-	echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>';
+if ( current_user_can( 'install_plugins' ) ) {
+	echo '<p>' . sprintf( __( 'If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.' ), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>';
+}
 ?>
 
 </div>
Index: src/wp-admin/includes/admin-filters.php
===================================================================
--- src/wp-admin/includes/admin-filters.php	(revision 40901)
+++ src/wp-admin/includes/admin-filters.php	(working copy)
@@ -23,7 +23,7 @@
 
 add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
 
-add_action( 'post-html-upload-ui', 'media_upload_html_bypass'  );
+add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );
 
 add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
 add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
@@ -38,10 +38,10 @@
 add_filter( 'media_upload_tabs', 'update_gallery_tab' );
 
 // Misc hooks.
-add_action( 'admin_head', 'wp_admin_canonical_url'   );
+add_action( 'admin_head', 'wp_admin_canonical_url' );
 add_action( 'admin_head', 'wp_color_scheme_settings' );
-add_action( 'admin_head', 'wp_site_icon'             );
-add_action( 'admin_head', '_ipad_meta'               );
+add_action( 'admin_head', 'wp_site_icon' );
+add_action( 'admin_head', '_ipad_meta' );
 
 // Prerendering.
 if ( ! is_customize_preview() ) {
@@ -80,7 +80,7 @@
 add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' );
 
 // Template hooks.
-add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts'                ) );
+add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
 add_action( 'user_register',         array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
 
 // Theme hooks.
@@ -106,7 +106,7 @@
 add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called.
 add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
 
-add_action( 'admin_notices', 'update_nag',      3  );
+add_action( 'admin_notices', 'update_nag',      3 );
 add_action( 'admin_notices', 'maintenance_nag', 10 );
 
 add_filter( 'update_footer', 'core_update_footer' );
Index: src/wp-admin/includes/admin.php
===================================================================
--- src/wp-admin/includes/admin.php	(revision 40901)
+++ src/wp-admin/includes/admin.php	(working copy)
@@ -7,7 +7,7 @@
  * @since 2.3.0
  */
 
-if ( ! defined('WP_ADMIN') ) {
+if ( ! defined( 'WP_ADMIN' ) ) {
 	/*
 	 * This file is being included from a file other than wp-admin/admin.php, so
 	 * some setup was skipped. Make sure the admin message catalog is loaded since
@@ -17,71 +17,71 @@
 }
 
 /** WordPress Administration Hooks */
-require_once(ABSPATH . 'wp-admin/includes/admin-filters.php');
+require_once( ABSPATH . 'wp-admin/includes/admin-filters.php' );
 
 /** WordPress Bookmark Administration API */
-require_once(ABSPATH . 'wp-admin/includes/bookmark.php');
+require_once( ABSPATH . 'wp-admin/includes/bookmark.php' );
 
 /** WordPress Comment Administration API */
-require_once(ABSPATH . 'wp-admin/includes/comment.php');
+require_once( ABSPATH . 'wp-admin/includes/comment.php' );
 
 /** WordPress Administration File API */
-require_once(ABSPATH . 'wp-admin/includes/file.php');
+require_once( ABSPATH . 'wp-admin/includes/file.php' );
 
 /** WordPress Image Administration API */
-require_once(ABSPATH . 'wp-admin/includes/image.php');
+require_once( ABSPATH . 'wp-admin/includes/image.php' );
 
 /** WordPress Media Administration API */
-require_once(ABSPATH . 'wp-admin/includes/media.php');
+require_once( ABSPATH . 'wp-admin/includes/media.php' );
 
 /** WordPress Import Administration API */
-require_once(ABSPATH . 'wp-admin/includes/import.php');
+require_once( ABSPATH . 'wp-admin/includes/import.php' );
 
 /** WordPress Misc Administration API */
-require_once(ABSPATH . 'wp-admin/includes/misc.php');
+require_once( ABSPATH . 'wp-admin/includes/misc.php' );
 
 /** WordPress Options Administration API */
-require_once(ABSPATH . 'wp-admin/includes/options.php');
+require_once( ABSPATH . 'wp-admin/includes/options.php' );
 
 /** WordPress Plugin Administration API */
-require_once(ABSPATH . 'wp-admin/includes/plugin.php');
+require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
 
 /** WordPress Post Administration API */
-require_once(ABSPATH . 'wp-admin/includes/post.php');
+require_once( ABSPATH . 'wp-admin/includes/post.php' );
 
 /** WordPress Administration Screen API */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-screen.php');
-require_once(ABSPATH . 'wp-admin/includes/screen.php');
+require_once( ABSPATH . 'wp-admin/includes/class-wp-screen.php' );
+require_once( ABSPATH . 'wp-admin/includes/screen.php' );
 
 /** WordPress Taxonomy Administration API */
-require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
+require_once( ABSPATH . 'wp-admin/includes/taxonomy.php' );
 
 /** WordPress Template Administration API */
-require_once(ABSPATH . 'wp-admin/includes/template.php');
+require_once( ABSPATH . 'wp-admin/includes/template.php' );
 
 /** WordPress List Table Administration API and base class */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
-require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table-compat.php');
-require_once(ABSPATH . 'wp-admin/includes/list-table.php');
+require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
+require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table-compat.php' );
+require_once( ABSPATH . 'wp-admin/includes/list-table.php' );
 
 /** WordPress Theme Administration API */
-require_once(ABSPATH . 'wp-admin/includes/theme.php');
+require_once( ABSPATH . 'wp-admin/includes/theme.php' );
 
 /** WordPress User Administration API */
-require_once(ABSPATH . 'wp-admin/includes/user.php');
+require_once( ABSPATH . 'wp-admin/includes/user.php' );
 
 /** WordPress Site Icon API */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
+require_once( ABSPATH . 'wp-admin/includes/class-wp-site-icon.php' );
 
 /** WordPress Update Administration API */
-require_once(ABSPATH . 'wp-admin/includes/update.php');
+require_once( ABSPATH . 'wp-admin/includes/update.php' );
 
 /** WordPress Deprecated Administration API */
-require_once(ABSPATH . 'wp-admin/includes/deprecated.php');
+require_once( ABSPATH . 'wp-admin/includes/deprecated.php' );
 
 /** WordPress Multisite support API */
 if ( is_multisite() ) {
-	require_once(ABSPATH . 'wp-admin/includes/ms-admin-filters.php');
-	require_once(ABSPATH . 'wp-admin/includes/ms.php');
-	require_once(ABSPATH . 'wp-admin/includes/ms-deprecated.php');
+	require_once( ABSPATH . 'wp-admin/includes/ms-admin-filters.php' );
+	require_once( ABSPATH . 'wp-admin/includes/ms.php' );
+	require_once( ABSPATH . 'wp-admin/includes/ms-deprecated.php' );
 }
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 40901)
+++ src/wp-admin/includes/ajax-actions.php	(working copy)
@@ -23,12 +23,12 @@
 	$response = array();
 
 	// screen_id is the same as $current_screen->id and the JS global 'pagenow'.
-	if ( ! empty($_POST['screen_id']) )
-		$screen_id = sanitize_key($_POST['screen_id']);
-	else
-		$screen_id = 'front';
+	if ( ! empty( $_POST['screen_id'] ) ) {
+		$screen_id = sanitize_key( $_POST['screen_id'] );
+	} else { $screen_id = 'front';
+	}
 
-	if ( ! empty($_POST['data']) ) {
+	if ( ! empty( $_POST['data'] ) ) {
 		$data = wp_unslash( (array) $_POST['data'] );
 
 		/**
@@ -68,7 +68,7 @@
 	// Send the current time according to the server.
 	$response['server_time'] = time();
 
-	wp_send_json($response);
+	wp_send_json( $response );
 }
 
 //
@@ -84,7 +84,9 @@
 	$list_class = $_GET['list_args']['class'];
 	check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' );
 
-	$wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) );
+	$wp_list_table = _get_list_table( $list_class, array(
+		'screen' => $_GET['list_args']['screen']['id'],
+	) );
 	if ( ! $wp_list_table ) {
 		wp_die( 0 );
 	}
@@ -121,11 +123,12 @@
 	$s = wp_unslash( $_GET['q'] );
 
 	$comma = _x( ',', 'tag delimiter' );
-	if ( ',' !== $comma )
+	if ( ',' !== $comma ) {
 		$s = str_replace( $comma, ',', $s );
+	}
 	if ( false !== strpos( $s, ',' ) ) {
 		$s = explode( ',', $s );
-		$s = $s[count( $s ) - 1];
+		$s = $s[ count( $s ) - 1 ];
 	}
 	$s = trim( $s );
 
@@ -144,11 +147,15 @@
 	 * Require $term_search_min_chars chars for matching (default: 2)
 	 * ensure it's a non-negative, non-zero integer.
 	 */
-	if ( ( $term_search_min_chars == 0 ) || ( strlen( $s ) < $term_search_min_chars ) ){
+	if ( ( $term_search_min_chars == 0 ) || ( strlen( $s ) < $term_search_min_chars ) ) {
 		wp_die();
 	}
 
-	$results = get_terms( $taxonomy, array( 'name__like' => $s, 'fields' => 'names', 'hide_empty' => false ) );
+	$results = get_terms( $taxonomy, array(
+		'name__like' => $s,
+		'fields' => 'names',
+		'hide_empty' => false,
+	) );
 
 	echo join( $results, "\n" );
 	wp_die();
@@ -160,33 +167,35 @@
  * @since 3.1.0
  */
 function wp_ajax_wp_compression_test() {
-	if ( !current_user_can( 'manage_options' ) )
+	if ( ! current_user_can( 'manage_options' ) ) {
 		wp_die( -1 );
+	}
 
-	if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) {
-		update_site_option('can_compress_scripts', 0);
+	if ( ini_get( 'zlib.output_compression' ) || 'ob_gzhandler' == ini_get( 'output_handler' ) ) {
+		update_site_option( 'can_compress_scripts', 0 );
 		wp_die( 0 );
 	}
 
-	if ( isset($_GET['test']) ) {
+	if ( isset( $_GET['test'] ) ) {
 		header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
 		header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
 		header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
-		header('Content-Type: application/javascript; charset=UTF-8');
-		$force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
+		header( 'Content-Type: application/javascript; charset=UTF-8' );
+		$force_gzip = ( defined( 'ENFORCE_GZIP' ) && ENFORCE_GZIP );
 		$test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
 
-		 if ( 1 == $_GET['test'] ) {
-		 	echo $test_str;
-		 	wp_die();
-		 } elseif ( 2 == $_GET['test'] ) {
-			if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
+		if ( 1 == $_GET['test'] ) {
+			 echo $test_str;
+			 wp_die();
+		} elseif ( 2 == $_GET['test'] ) {
+			if ( ! isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
 				wp_die( -1 );
-			if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-				header('Content-Encoding: deflate');
+			}
+			if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate' ) && function_exists( 'gzdeflate' ) && ! $force_gzip ) {
+				header( 'Content-Encoding: deflate' );
 				$out = gzdeflate( $test_str, 1 );
-			} elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-				header('Content-Encoding: gzip');
+			} elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && function_exists( 'gzencode' ) ) {
+				header( 'Content-Encoding: gzip' );
 				$out = gzencode( $test_str, 1 );
 			} else {
 				wp_die( -1 );
@@ -195,10 +204,10 @@
 			wp_die();
 		} elseif ( 'no' == $_GET['test'] ) {
 			check_ajax_referer( 'update_can_compress_scripts' );
-			update_site_option('can_compress_scripts', 0);
+			update_site_option( 'can_compress_scripts', 0 );
 		} elseif ( 'yes' == $_GET['test'] ) {
 			check_ajax_referer( 'update_can_compress_scripts' );
-			update_site_option('can_compress_scripts', 1);
+			update_site_option( 'can_compress_scripts', 1 );
 		}
 	}
 
@@ -211,15 +220,17 @@
  * @since 3.1.0
  */
 function wp_ajax_imgedit_preview() {
-	$post_id = intval($_GET['postid']);
-	if ( empty($post_id) || !current_user_can('edit_post', $post_id) )
+	$post_id = intval( $_GET['postid'] );
+	if ( empty( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) {
 		wp_die( -1 );
+	}
 
 	check_ajax_referer( "image_editor-$post_id" );
 
 	include_once( ABSPATH . 'wp-admin/includes/image-edit.php' );
-	if ( ! stream_preview_image($post_id) )
+	if ( ! stream_preview_image( $post_id ) ) {
 		wp_die( -1 );
+	}
 
 	wp_die();
 }
@@ -242,12 +253,14 @@
  * @since 3.4.0
  */
 function wp_ajax_autocomplete_user() {
-	if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) )
+	if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) ) {
 		wp_die( -1 );
+	}
 
 	/** This filter is documented in wp-admin/user-new.php */
-	if ( ! current_user_can( 'manage_network_users' ) && ! apply_filters( 'autocomplete_users_for_site_admins', false ) )
+	if ( ! current_user_can( 'manage_network_users' ) && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) {
 		wp_die( -1 );
+	}
 
 	$return = array();
 
@@ -274,8 +287,14 @@
 		$id = get_current_blog_id();
 	}
 
-	$include_blog_users = ( $type == 'search' ? get_users( array( 'blog_id' => $id, 'fields' => 'ID' ) ) : array() );
-	$exclude_blog_users = ( $type == 'add' ? get_users( array( 'blog_id' => $id, 'fields' => 'ID' ) ) : array() );
+	$include_blog_users = ( $type == 'search' ? get_users( array(
+		'blog_id' => $id,
+		'fields' => 'ID',
+	) ) : array() );
+	$exclude_blog_users = ( $type == 'add' ? get_users( array(
+		'blog_id' => $id,
+		'fields' => 'ID',
+	) ) : array() );
 
 	$users = get_users( array(
 		'blog_id' => false,
@@ -432,14 +451,15 @@
 					number_format_i18n( $counts->moderated )
 				),
 				'comment_link' => $comment_link,
-			)
+			),
 		) );
 		$x->send();
-	}
+	}// End if().
 
 	$total += $delta;
-	if ( $total < 0 )
+	if ( $total < 0 ) {
 		$total = 0;
+	}
 
 	// Only do the expensive stuff on a page-break, and about 1 other time per page
 	if ( 0 == $total % $per_page || 1 == mt_rand( 1, $per_page ) ) {
@@ -449,24 +469,26 @@
 		$parsed = parse_url( $url );
 		if ( isset( $parsed['query'] ) ) {
 			parse_str( $parsed['query'], $query_vars );
-			if ( !empty( $query_vars['comment_status'] ) )
+			if ( ! empty( $query_vars['comment_status'] ) ) {
 				$status = $query_vars['comment_status'];
-			if ( !empty( $query_vars['p'] ) )
+			}
+			if ( ! empty( $query_vars['p'] ) ) {
 				$post_id = (int) $query_vars['p'];
-			if ( ! empty( $query_vars['comment_type'] ) )
+			}
+			if ( ! empty( $query_vars['comment_type'] ) ) {
 				$type = $query_vars['comment_type'];
+			}
 		}
 
 		if ( empty( $type ) ) {
 			// Only use the comment count if not filtering by a comment_type.
-			$comment_count = wp_count_comments($post_id);
+			$comment_count = wp_count_comments( $post_id );
 
 			// We're looking for a known type of comment count.
 			if ( isset( $comment_count->$status ) ) {
 				$total = $comment_count->$status;
 			}
 		}
-		// Else use the decremented value from above.
 	}
 
 	// The time since the last comment count.
@@ -484,8 +506,8 @@
 			'total_pages' => ceil( $total / $per_page ),
 			'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ),
 			'total' => $total,
-			'time' => $time
-		)
+			'time' => $time,
+		),
 	) );
 	$x->send();
 }
@@ -502,50 +524,61 @@
  */
 function _wp_ajax_add_hierarchical_term() {
 	$action = $_POST['action'];
-	$taxonomy = get_taxonomy(substr($action, 4));
+	$taxonomy = get_taxonomy( substr( $action, 4 ) );
 	check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
-	if ( !current_user_can( $taxonomy->cap->edit_terms ) )
+	if ( ! current_user_can( $taxonomy->cap->edit_terms ) ) {
 		wp_die( -1 );
-	$names = explode(',', $_POST['new'.$taxonomy->name]);
-	$parent = isset($_POST['new'.$taxonomy->name.'_parent']) ? (int) $_POST['new'.$taxonomy->name.'_parent'] : 0;
-	if ( 0 > $parent )
+	}
+	$names = explode( ',', $_POST[ 'new' . $taxonomy->name ] );
+	$parent = isset( $_POST[ 'new' . $taxonomy->name . '_parent' ] ) ? (int) $_POST[ 'new' . $taxonomy->name . '_parent' ] : 0;
+	if ( 0 > $parent ) {
 		$parent = 0;
-	if ( $taxonomy->name == 'category' )
-		$post_category = isset($_POST['post_category']) ? (array) $_POST['post_category'] : array();
-	else
-		$post_category = ( isset($_POST['tax_input']) && isset($_POST['tax_input'][$taxonomy->name]) ) ? (array) $_POST['tax_input'][$taxonomy->name] : array();
+	}
+	if ( $taxonomy->name == 'category' ) {
+		$post_category = isset( $_POST['post_category'] ) ? (array) $_POST['post_category'] : array();
+	} else { $post_category = ( isset( $_POST['tax_input'] ) && isset( $_POST['tax_input'][ $taxonomy->name ] ) ) ? (array) $_POST['tax_input'][ $taxonomy->name ] : array();
+	}
 	$checked_categories = array_map( 'absint', (array) $post_category );
-	$popular_ids = wp_popular_terms_checklist($taxonomy->name, 0, 10, false);
+	$popular_ids = wp_popular_terms_checklist( $taxonomy->name, 0, 10, false );
 
 	foreach ( $names as $cat_name ) {
-		$cat_name = trim($cat_name);
-		$category_nicename = sanitize_title($cat_name);
-		if ( '' === $category_nicename )
+		$cat_name = trim( $cat_name );
+		$category_nicename = sanitize_title( $cat_name );
+		if ( '' === $category_nicename ) {
 			continue;
+		}
 
-		$cat_id = wp_insert_term( $cat_name, $taxonomy->name, array( 'parent' => $parent ) );
+		$cat_id = wp_insert_term( $cat_name, $taxonomy->name, array(
+			'parent' => $parent,
+		) );
 		if ( ! $cat_id || is_wp_error( $cat_id ) ) {
 			continue;
 		} else {
 			$cat_id = $cat_id['term_id'];
 		}
 		$checked_categories[] = $cat_id;
-		if ( $parent ) // Do these all at once in a second
+		if ( $parent ) { // Do these all at once in a second
 			continue;
+		}
 
 		ob_start();
 
-		wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids ));
+		wp_terms_checklist( 0, array(
+			'taxonomy' => $taxonomy->name,
+			'descendants_and_self' => $cat_id,
+			'selected_cats' => $checked_categories,
+			'popular_cats' => $popular_ids,
+		) );
 
 		$data = ob_get_clean();
 
 		$add = array(
 			'what' => $taxonomy->name,
 			'id' => $cat_id,
-			'data' => str_replace( array("\n", "\t"), '', $data),
-			'position' => -1
+			'data' => str_replace( array( "\n", "\t" ), '', $data ),
+			'position' => -1,
 		);
-	}
+	}// End foreach().
 
 	if ( $parent ) { // Foncy - replace the parent and all its children
 		$parent = get_term( $parent, $taxonomy->name );
@@ -553,35 +586,47 @@
 
 		while ( $parent->parent ) { // get the top parent
 			$parent = get_term( $parent->parent, $taxonomy->name );
-			if ( is_wp_error( $parent ) )
+			if ( is_wp_error( $parent ) ) {
 				break;
+			}
 			$term_id = $parent->term_id;
 		}
 
 		ob_start();
 
-		wp_terms_checklist( 0, array('taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids));
+		wp_terms_checklist( 0, array(
+			'taxonomy' => $taxonomy->name,
+			'descendants_and_self' => $term_id,
+			'selected_cats' => $checked_categories,
+			'popular_cats' => $popular_ids,
+		) );
 
 		$data = ob_get_clean();
 
 		$add = array(
 			'what' => $taxonomy->name,
 			'id' => $term_id,
-			'data' => str_replace( array("\n", "\t"), '', $data),
-			'position' => -1
+			'data' => str_replace( array( "\n", "\t" ), '', $data ),
+			'position' => -1,
 		);
 	}
 
 	ob_start();
 
 	wp_dropdown_categories( array(
-		'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name',
-		'hierarchical' => 1, 'show_option_none' => '&mdash; '.$taxonomy->labels->parent_item.' &mdash;'
+		'taxonomy' => $taxonomy->name,
+		'hide_empty' => 0,
+		'name' => 'new' . $taxonomy->name . '_parent',
+		'orderby' => 'name',
+		'hierarchical' => 1,
+		'show_option_none' => '&mdash; ' . $taxonomy->labels->parent_item . ' &mdash;',
 	) );
 
 	$sup = ob_get_clean();
 
-	$add['supplemental'] = array( 'newcat_parent' => $sup );
+	$add['supplemental'] = array(
+		'newcat_parent' => $sup,
+	);
 
 	$x = new WP_Ajax_Response( $add );
 	$x->send();
@@ -595,43 +640,52 @@
 function wp_ajax_delete_comment() {
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
-	if ( !$comment = get_comment( $id ) )
+	if ( ! $comment = get_comment( $id ) ) {
 		wp_die( time() );
-	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
+	}
+	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
 		wp_die( -1 );
+	}
 
 	check_ajax_referer( "delete-comment_$id" );
 	$status = wp_get_comment_status( $comment );
 
 	$delta = -1;
-	if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) {
-		if ( 'trash' == $status )
+	if ( isset( $_POST['trash'] ) && 1 == $_POST['trash'] ) {
+		if ( 'trash' == $status ) {
 			wp_die( time() );
+		}
 		$r = wp_trash_comment( $comment );
-	} elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) {
-		if ( 'trash' != $status )
+	} elseif ( isset( $_POST['untrash'] ) && 1 == $_POST['untrash'] ) {
+		if ( 'trash' != $status ) {
 			wp_die( time() );
+		}
 		$r = wp_untrash_comment( $comment );
-		if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'trash' ) // undo trash, not in trash
+		if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'trash' ) { // undo trash, not in trash
 			$delta = 1;
-	} elseif ( isset($_POST['spam']) && 1 == $_POST['spam'] ) {
-		if ( 'spam' == $status )
+		}
+	} elseif ( isset( $_POST['spam'] ) && 1 == $_POST['spam'] ) {
+		if ( 'spam' == $status ) {
 			wp_die( time() );
+		}
 		$r = wp_spam_comment( $comment );
-	} elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) {
-		if ( 'spam' != $status )
+	} elseif ( isset( $_POST['unspam'] ) && 1 == $_POST['unspam'] ) {
+		if ( 'spam' != $status ) {
 			wp_die( time() );
+		}
 		$r = wp_unspam_comment( $comment );
-		if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'spam' ) // undo spam, not in spam
+		if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'spam' ) { // undo spam, not in spam
 			$delta = 1;
-	} elseif ( isset($_POST['delete']) && 1 == $_POST['delete'] ) {
+		}
+	} elseif ( isset( $_POST['delete'] ) && 1 == $_POST['delete'] ) {
 		$r = wp_delete_comment( $comment );
 	} else {
 		wp_die( -1 );
 	}
 
-	if ( $r ) // Decide if we need to send back '1' or a more complicated response including page links and comment counts
+	if ( $r ) { // Decide if we need to send back '1' or a more complicated response including page links and comment counts
 		_wp_ajax_delete_comment_response( $comment->comment_ID, $delta );
+	}
 	wp_die( 0 );
 }
 
@@ -648,15 +702,16 @@
 		wp_die( -1 );
 	}
 
-	$taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
+	$taxonomy = ! empty( $_POST['taxonomy'] ) ? $_POST['taxonomy'] : 'post_tag';
 	$tag = get_term( $tag_id, $taxonomy );
-	if ( !$tag || is_wp_error( $tag ) )
+	if ( ! $tag || is_wp_error( $tag ) ) {
 		wp_die( 1 );
+	}
 
-	if ( wp_delete_term($tag_id, $taxonomy))
+	if ( wp_delete_term( $tag_id, $taxonomy ) ) {
 		wp_die( 1 );
-	else
-		wp_die( 0 );
+	} else { wp_die( 0 );
+	}
 }
 
 /**
@@ -668,17 +723,19 @@
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
 	check_ajax_referer( "delete-bookmark_$id" );
-	if ( !current_user_can( 'manage_links' ) )
+	if ( ! current_user_can( 'manage_links' ) ) {
 		wp_die( -1 );
+	}
 
 	$link = get_bookmark( $id );
-	if ( !$link || is_wp_error( $link ) )
+	if ( ! $link || is_wp_error( $link ) ) {
 		wp_die( 1 );
+	}
 
-	if ( wp_delete_link( $id ) )
+	if ( wp_delete_link( $id ) ) {
 		wp_die( 1 );
-	else
-		wp_die( 0 );
+	} else { wp_die( 0 );
+	}
 }
 
 /**
@@ -690,13 +747,16 @@
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
 	check_ajax_referer( "delete-meta_$id" );
-	if ( !$meta = get_metadata_by_mid( 'post', $id ) )
+	if ( ! $meta = get_metadata_by_mid( 'post', $id ) ) {
 		wp_die( 1 );
+	}
 
-	if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta',  $meta->post_id, $meta->meta_key ) )
+	if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta',  $meta->post_id, $meta->meta_key ) ) {
 		wp_die( -1 );
-	if ( delete_meta( $meta->meta_id ) )
+	}
+	if ( delete_meta( $meta->meta_id ) ) {
 		wp_die( 1 );
+	}
 	wp_die( 0 );
 }
 
@@ -708,21 +768,24 @@
  * @param string $action Action to perform.
  */
 function wp_ajax_delete_post( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'delete-post';
+	}
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
 	check_ajax_referer( "{$action}_$id" );
-	if ( !current_user_can( 'delete_post', $id ) )
+	if ( ! current_user_can( 'delete_post', $id ) ) {
 		wp_die( -1 );
+	}
 
-	if ( !get_post( $id ) )
+	if ( ! get_post( $id ) ) {
 		wp_die( 1 );
+	}
 
-	if ( wp_delete_post( $id ) )
+	if ( wp_delete_post( $id ) ) {
 		wp_die( 1 );
-	else
-		wp_die( 0 );
+	} else { wp_die( 0 );
+	}
 }
 
 /**
@@ -733,24 +796,28 @@
  * @param string $action Action to perform.
  */
 function wp_ajax_trash_post( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'trash-post';
+	}
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
 	check_ajax_referer( "{$action}_$id" );
-	if ( !current_user_can( 'delete_post', $id ) )
+	if ( ! current_user_can( 'delete_post', $id ) ) {
 		wp_die( -1 );
+	}
 
-	if ( !get_post( $id ) )
+	if ( ! get_post( $id ) ) {
 		wp_die( 1 );
+	}
 
-	if ( 'trash-post' == $action )
+	if ( 'trash-post' == $action ) {
 		$done = wp_trash_post( $id );
-	else
-		$done = wp_untrash_post( $id );
+	} else { $done = wp_untrash_post( $id );
+	}
 
-	if ( $done )
+	if ( $done ) {
 		wp_die( 1 );
+	}
 
 	wp_die( 0 );
 }
@@ -763,8 +830,9 @@
  * @param string $action Action to perform.
  */
 function wp_ajax_untrash_post( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'untrash-post';
+	}
 	wp_ajax_trash_post( $action );
 }
 
@@ -774,21 +842,24 @@
  * @param string $action
  */
 function wp_ajax_delete_page( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'delete-page';
+	}
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
 	check_ajax_referer( "{$action}_$id" );
-	if ( !current_user_can( 'delete_page', $id ) )
+	if ( ! current_user_can( 'delete_page', $id ) ) {
 		wp_die( -1 );
+	}
 
-	if ( ! get_post( $id ) )
+	if ( ! get_post( $id ) ) {
 		wp_die( 1 );
+	}
 
-	if ( wp_delete_post( $id ) )
+	if ( wp_delete_post( $id ) ) {
 		wp_die( 1 );
-	else
-		wp_die( 0 );
+	} else { wp_die( 0 );
+	}
 }
 
 /**
@@ -799,20 +870,22 @@
 function wp_ajax_dim_comment() {
 	$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
 
-	if ( !$comment = get_comment( $id ) ) {
+	if ( ! $comment = get_comment( $id ) ) {
 		$x = new WP_Ajax_Response( array(
 			'what' => 'comment',
-			'id' => new WP_Error('invalid_comment', sprintf(__('Comment %d does not exist'), $id))
+			'id' => new WP_Error( 'invalid_comment', sprintf( __( 'Comment %d does not exist' ), $id ) ),
 		) );
 		$x->send();
 	}
 
-	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && ! current_user_can( 'moderate_comments' ) )
+	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && ! current_user_can( 'moderate_comments' ) ) {
 		wp_die( -1 );
+	}
 
 	$current = wp_get_comment_status( $comment );
-	if ( isset( $_POST['new'] ) && $_POST['new'] == $current )
+	if ( isset( $_POST['new'] ) && $_POST['new'] == $current ) {
 		wp_die( time() );
+	}
 
 	check_ajax_referer( "approve-comment_$id" );
 	if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) {
@@ -821,10 +894,10 @@
 		$result = wp_set_comment_status( $comment, 'hold', true );
 	}
 
-	if ( is_wp_error($result) ) {
+	if ( is_wp_error( $result ) ) {
 		$x = new WP_Ajax_Response( array(
 			'what' => 'comment',
-			'id' => $result
+			'id' => $result,
 		) );
 		$x->send();
 	}
@@ -842,20 +915,22 @@
  * @param string $action Action to perform.
  */
 function wp_ajax_add_link_category( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'add-link-category';
+	}
 	check_ajax_referer( $action );
 	$tax = get_taxonomy( 'link_category' );
 	if ( ! current_user_can( $tax->cap->manage_terms ) ) {
 		wp_die( -1 );
 	}
-	$names = explode(',', wp_unslash( $_POST['newcat'] ) );
+	$names = explode( ',', wp_unslash( $_POST['newcat'] ) );
 	$x = new WP_Ajax_Response();
 	foreach ( $names as $cat_name ) {
-		$cat_name = trim($cat_name);
-		$slug = sanitize_title($cat_name);
-		if ( '' === $slug )
+		$cat_name = trim( $cat_name );
+		$slug = sanitize_title( $cat_name );
+		if ( '' === $slug ) {
 			continue;
+		}
 
 		$cat_id = wp_insert_term( $cat_name, 'link_category' );
 		if ( ! $cat_id || is_wp_error( $cat_id ) ) {
@@ -867,8 +942,8 @@
 		$x->add( array(
 			'what' => 'link-category',
 			'id' => $cat_id,
-			'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='" . esc_attr($cat_id) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
-			'position' => -1
+			'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='" . esc_attr( $cat_id ) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
+			'position' => -1,
 		) );
 	}
 	$x->send();
@@ -881,32 +956,36 @@
  */
 function wp_ajax_add_tag() {
 	check_ajax_referer( 'add-tag', '_wpnonce_add-tag' );
-	$taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
-	$tax = get_taxonomy($taxonomy);
+	$taxonomy = ! empty( $_POST['taxonomy'] ) ? $_POST['taxonomy'] : 'post_tag';
+	$tax = get_taxonomy( $taxonomy );
 
-	if ( !current_user_can( $tax->cap->edit_terms ) )
+	if ( ! current_user_can( $tax->cap->edit_terms ) ) {
 		wp_die( -1 );
+	}
 
 	$x = new WP_Ajax_Response();
 
-	$tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST );
+	$tag = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
 
-	if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) {
-		$message = __('An error has occurred. Please reload the page and try again.');
-		if ( is_wp_error($tag) && $tag->get_error_message() )
+	if ( ! $tag || is_wp_error( $tag ) || ( ! $tag = get_term( $tag['term_id'], $taxonomy )) ) {
+		$message = __( 'An error has occurred. Please reload the page and try again.' );
+		if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
 			$message = $tag->get_error_message();
+		}
 
 		$x->add( array(
 			'what' => 'taxonomy',
-			'data' => new WP_Error('error', $message )
+			'data' => new WP_Error( 'error', $message ),
 		) );
 		$x->send();
 	}
 
-	$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
+	$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array(
+		'screen' => $_POST['screen'],
+	) );
 
 	$level = 0;
-	if ( is_taxonomy_hierarchical($taxonomy) ) {
+	if ( is_taxonomy_hierarchical( $taxonomy ) ) {
 		$level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
 		ob_start();
 		$wp_list_table->single_row( $tag, $level );
@@ -919,12 +998,12 @@
 
 	$x->add( array(
 		'what' => 'taxonomy',
-		'supplemental' => compact('parents', 'noparents')
+		'supplemental' => compact( 'parents', 'noparents' ),
 	) );
 	$x->add( array(
 		'what' => 'term',
 		'position' => $level,
-		'supplemental' => (array) $tag
+		'supplemental' => (array) $tag,
 	) );
 	$x->send();
 }
@@ -949,13 +1028,19 @@
 		wp_die( -1 );
 	}
 
-	$tags = get_terms( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) );
+	$tags = get_terms( $taxonomy, array(
+		'number' => 45,
+		'orderby' => 'count',
+		'order' => 'DESC',
+	) );
 
-	if ( empty( $tags ) )
+	if ( empty( $tags ) ) {
 		wp_die( $tax->labels->not_found );
+	}
 
-	if ( is_wp_error( $tags ) )
+	if ( is_wp_error( $tags ) ) {
 		wp_die( $tags->get_error_message() );
+	}
 
 	foreach ( $tags as $key => $tag ) {
 		$tags[ $key ]->link = '#';
@@ -963,10 +1048,13 @@
 	}
 
 	// We need raw tag names here, so don't filter the output
-	$return = wp_generate_tag_cloud( $tags, array('filter' => 0) );
+	$return = wp_generate_tag_cloud( $tags, array(
+		'filter' => 0,
+	) );
 
-	if ( empty($return) )
+	if ( empty( $return ) ) {
 		wp_die( 0 );
+	}
 
 	echo $return;
 
@@ -1000,7 +1088,9 @@
 		wp_die( -1 );
 	}
 
-	$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+	$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array(
+		'screen' => 'edit-comments',
+	) );
 
 	if ( ! current_user_can( 'edit_post', $post_id ) ) {
 		wp_die( -1 );
@@ -1015,8 +1105,9 @@
 	$x = new WP_Ajax_Response();
 	ob_start();
 	foreach ( $wp_list_table->items as $comment ) {
-		if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && 0 === $comment->comment_approved )
+		if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && 0 === $comment->comment_approved ) {
 			continue;
+		}
 		get_comment( $comment );
 		$wp_list_table->single_row( $comment );
 	}
@@ -1024,7 +1115,7 @@
 
 	$x->add( array(
 		'what' => 'comments',
-		'data' => $comment_list_item
+		'data' => $comment_list_item,
 	) );
 	$x->send();
 }
@@ -1037,23 +1128,27 @@
  * @param string $action Action to perform.
  */
 function wp_ajax_replyto_comment( $action ) {
-	if ( empty( $action ) )
+	if ( empty( $action ) ) {
 		$action = 'replyto-comment';
+	}
 
 	check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
 
 	$comment_post_ID = (int) $_POST['comment_post_ID'];
 	$post = get_post( $comment_post_ID );
-	if ( ! $post )
+	if ( ! $post ) {
 		wp_die( -1 );
+	}
 
-	if ( !current_user_can( 'edit_post', $comment_post_ID ) )
+	if ( ! current_user_can( 'edit_post', $comment_post_ID ) ) {
 		wp_die( -1 );
+	}
 
-	if ( empty( $post->post_status ) )
+	if ( empty( $post->post_status ) ) {
 		wp_die( 1 );
-	elseif ( in_array($post->post_status, array('draft', 'pending', 'trash') ) )
-		wp_die( __('ERROR: you are replying to a comment on a draft post.') );
+	} elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ) ) ) {
+		wp_die( __( 'ERROR: you are replying to a comment on a draft post.' ) );
+	}
 
 	$user = wp_get_current_user();
 	if ( $user->exists() ) {
@@ -1064,8 +1159,9 @@
 		$comment_content      = trim( $_POST['content'] );
 		$comment_type         = isset( $_POST['comment_type'] ) ? trim( $_POST['comment_type'] ) : '';
 		if ( current_user_can( 'unfiltered_html' ) ) {
-			if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) )
+			if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) ) {
 				$_POST['_wp_unfiltered_html_comment'] = '';
+			}
 
 			if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) {
 				kses_remove_filters(); // start with a clean slate
@@ -1076,17 +1172,19 @@
 		wp_die( __( 'Sorry, you must be logged in to reply to a comment.' ) );
 	}
 
-	if ( '' == $comment_content )
+	if ( '' == $comment_content ) {
 		wp_die( __( 'ERROR: please type a comment.' ) );
+	}
 
 	$comment_parent = 0;
-	if ( isset( $_POST['comment_ID'] ) )
+	if ( isset( $_POST['comment_ID'] ) ) {
 		$comment_parent = absint( $_POST['comment_ID'] );
+	}
 	$comment_auto_approved = false;
-	$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
+	$commentdata = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID' );
 
 	// Automatically approve parent comment.
-	if ( !empty($_POST['approve_parent']) ) {
+	if ( ! empty( $_POST['approve_parent'] ) ) {
 		$parent = get_comment( $comment_parent );
 
 		if ( $parent && $parent->comment_approved === '0' && $parent->comment_post_ID == $comment_post_ID ) {
@@ -1094,16 +1192,18 @@
 				wp_die( -1 );
 			}
 
-			if ( wp_set_comment_status( $parent, 'approve' ) )
+			if ( wp_set_comment_status( $parent, 'approve' ) ) {
 				$comment_auto_approved = true;
+			}
 		}
 	}
 
 	$comment_id = wp_new_comment( $commentdata );
-	$comment = get_comment($comment_id);
-	if ( ! $comment ) wp_die( 1 );
+	$comment = get_comment( $comment_id );
+	if ( ! $comment ) { wp_die( 1 );
+	}
 
-	$position = ( isset($_POST['position']) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1';
+	$position = ( isset( $_POST['position'] ) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1';
 
 	ob_start();
 	if ( isset( $_REQUEST['mode'] ) && 'dashboard' == $_REQUEST['mode'] ) {
@@ -1111,19 +1211,23 @@
 		_wp_dashboard_recent_comments_row( $comment );
 	} else {
 		if ( isset( $_REQUEST['mode'] ) && 'single' == $_REQUEST['mode'] ) {
-			$wp_list_table = _get_list_table('WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+			$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table', array(
+				'screen' => 'edit-comments',
+			) );
 		} else {
-			$wp_list_table = _get_list_table('WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+			$wp_list_table = _get_list_table( 'WP_Comments_List_Table', array(
+				'screen' => 'edit-comments',
+			) );
 		}
 		$wp_list_table->single_row( $comment );
 	}
 	$comment_list_item = ob_get_clean();
 
-	$response =  array(
+	$response = array(
 		'what' => 'comment',
 		'id' => $comment->comment_ID,
 		'data' => $comment_list_item,
-		'position' => $position
+		'position' => $position,
 	);
 
 	$counts = wp_count_comments();
@@ -1136,7 +1240,7 @@
 		'i18n_moderation_text' => sprintf(
 			_nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ),
 			number_format_i18n( $counts->moderated )
-		)
+		),
 	);
 
 	if ( $comment_auto_approved ) {
@@ -1158,23 +1262,29 @@
 	check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' );
 
 	$comment_id = (int) $_POST['comment_ID'];
-	if ( ! current_user_can( 'edit_comment', $comment_id ) )
+	if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
 		wp_die( -1 );
+	}
 
-	if ( '' == $_POST['content'] )
+	if ( '' == $_POST['content'] ) {
 		wp_die( __( 'ERROR: please type a comment.' ) );
+	}
 
-	if ( isset( $_POST['status'] ) )
+	if ( isset( $_POST['status'] ) ) {
 		$_POST['comment_status'] = $_POST['status'];
+	}
 	edit_comment();
 
-	$position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1';
-	$checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
-	$wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table', array( 'screen' => 'edit-comments' ) );
+	$position = ( isset( $_POST['position'] ) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1';
+	$checkbox = ( isset( $_POST['checkbox'] ) && true == $_POST['checkbox'] ) ? 1 : 0;
+	$wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table', array(
+		'screen' => 'edit-comments',
+	) );
 
 	$comment = get_comment( $comment_id );
-	if ( empty( $comment->comment_ID ) )
+	if ( empty( $comment->comment_ID ) ) {
 		wp_die( -1 );
+	}
 
 	ob_start();
 	$wp_list_table->single_row( $comment );
@@ -1186,7 +1296,7 @@
 		'what' => 'edit_comment',
 		'id' => $comment->comment_ID,
 		'data' => $comment_list_item,
-		'position' => $position
+		'position' => $position,
 	));
 
 	$x->send();
@@ -1200,8 +1310,9 @@
 function wp_ajax_add_menu_item() {
 	check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' );
 
-	if ( ! current_user_can( 'edit_theme_options' ) )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 
 	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
 
@@ -1215,7 +1326,7 @@
 			'custom' != $menu_item_data['menu-item-type'] &&
 			! empty( $menu_item_data['menu-item-object-id'] )
 		) {
-			switch( $menu_item_data['menu-item-type'] ) {
+			switch ( $menu_item_data['menu-item-type'] ) {
 				case 'post_type' :
 					$_object = get_post( $menu_item_data['menu-item-object-id'] );
 				break;
@@ -1240,8 +1351,9 @@
 	}
 
 	$item_ids = wp_save_nav_menu_items( 0, $menu_items_data );
-	if ( is_wp_error( $item_ids ) )
+	if ( is_wp_error( $item_ids ) ) {
 		wp_die( 0 );
+	}
 
 	$menu_items = array();
 
@@ -1257,8 +1369,9 @@
 	/** This filter is documented in wp-admin/includes/nav-menu.php */
 	$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] );
 
-	if ( ! class_exists( $walker_class_name ) )
+	if ( ! class_exists( $walker_class_name ) ) {
 		wp_die( 0 );
+	}
 
 	if ( ! empty( $menu_items ) ) {
 		$args = array(
@@ -1284,11 +1397,13 @@
 	$pid = (int) $_POST['post_id'];
 	$post = get_post( $pid );
 
-	if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) {
-		if ( !current_user_can( 'edit_post', $pid ) )
+	if ( isset( $_POST['metakeyselect'] ) || isset( $_POST['metakeyinput'] ) ) {
+		if ( ! current_user_can( 'edit_post', $pid ) ) {
 			wp_die( -1 );
-		if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) )
+		}
+		if ( isset( $_POST['metakeyselect'] ) && '#NONE#' == $_POST['metakeyselect'] && empty( $_POST['metakeyinput'] ) ) {
 			wp_die( 1 );
+		}
 
 		// If the post is an autodraft, save the post as a draft and then attempt to save the meta.
 		if ( $post->post_status == 'auto-draft' ) {
@@ -1297,7 +1412,7 @@
 			$post_data['post_ID'] = $pid;
 			$post_data['post_type'] = $post->post_type;
 			$post_data['post_status'] = 'draft';
-			$now = current_time('timestamp', 1);
+			$now = current_time( 'timestamp', 1 );
 			/* translators: 1: Post creation date, 2: Post creation time */
 			$post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) );
 
@@ -1306,13 +1421,14 @@
 				if ( is_wp_error( $pid ) ) {
 					$x = new WP_Ajax_Response( array(
 						'what' => 'meta',
-						'data' => $pid
+						'data' => $pid,
 					) );
 					$x->send();
 				}
 
-				if ( !$mid = add_meta( $pid ) )
+				if ( ! $mid = add_meta( $pid ) ) {
 					wp_die( __( 'Please provide a custom field value.' ) );
+				}
 			} else {
 				wp_die( 0 );
 			}
@@ -1328,39 +1444,49 @@
 			'id' => $mid,
 			'data' => _list_meta_row( $meta, $c ),
 			'position' => 1,
-			'supplemental' => array('postid' => $pid)
+			'supplemental' => array(
+				'postid' => $pid,
+			),
 		) );
 	} else { // Update?
 		$mid = (int) key( $_POST['meta'] );
-		$key = wp_unslash( $_POST['meta'][$mid]['key'] );
-		$value = wp_unslash( $_POST['meta'][$mid]['value'] );
-		if ( '' == trim($key) )
+		$key = wp_unslash( $_POST['meta'][ $mid ]['key'] );
+		$value = wp_unslash( $_POST['meta'][ $mid ]['value'] );
+		if ( '' == trim( $key ) ) {
 			wp_die( __( 'Please provide a custom field name.' ) );
-		if ( '' == trim($value) )
+		}
+		if ( '' == trim( $value ) ) {
 			wp_die( __( 'Please provide a custom field value.' ) );
-		if ( ! $meta = get_metadata_by_mid( 'post', $mid ) )
+		}
+		if ( ! $meta = get_metadata_by_mid( 'post', $mid ) ) {
 			wp_die( 0 ); // if meta doesn't exist
+		}
 		if ( is_protected_meta( $meta->meta_key, 'post' ) || is_protected_meta( $key, 'post' ) ||
 			! current_user_can( 'edit_post_meta', $meta->post_id, $meta->meta_key ) ||
-			! current_user_can( 'edit_post_meta', $meta->post_id, $key ) )
+			! current_user_can( 'edit_post_meta', $meta->post_id, $key ) ) {
 			wp_die( -1 );
+		}
 		if ( $meta->meta_value != $value || $meta->meta_key != $key ) {
-			if ( !$u = update_metadata_by_mid( 'post', $mid, $value, $key ) )
+			if ( ! $u = update_metadata_by_mid( 'post', $mid, $value, $key ) ) {
 				wp_die( 0 ); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
+			}
 		}
 
 		$x = new WP_Ajax_Response( array(
 			'what' => 'meta',
-			'id' => $mid, 'old_id' => $mid,
+			'id' => $mid,
+			'old_id' => $mid,
 			'data' => _list_meta_row( array(
 				'meta_key' => $key,
 				'meta_value' => $value,
-				'meta_id' => $mid
+				'meta_id' => $mid,
 			), $c ),
 			'position' => 0,
-			'supplemental' => array('postid' => $meta->post_id)
+			'supplemental' => array(
+				'postid' => $meta->post_id,
+			),
 		) );
-	}
+	}// End if().
 	$x->send();
 }
 
@@ -1377,20 +1503,21 @@
 	}
 
 	check_ajax_referer( $action );
-	if ( ! current_user_can('create_users') )
+	if ( ! current_user_can( 'create_users' ) ) {
 		wp_die( -1 );
+	}
 	if ( ! $user_id = edit_user() ) {
 		wp_die( 0 );
 	} elseif ( is_wp_error( $user_id ) ) {
 		$x = new WP_Ajax_Response( array(
 			'what' => 'user',
-			'id' => $user_id
+			'id' => $user_id,
 		) );
 		$x->send();
 	}
 	$user_object = get_userdata( $user_id );
 
-	$wp_list_table = _get_list_table('WP_Users_List_Table');
+	$wp_list_table = _get_list_table( 'WP_Users_List_Table' );
 
 	$role = current( $user_object->roles );
 
@@ -1405,7 +1532,7 @@
 				'<a href="#user-' . $user_id . '">' . $user_object->user_login . '</a>'
 			),
 			'role' => $role,
-		)
+		),
 	) );
 	$x->send();
 }
@@ -1417,26 +1544,29 @@
  */
 function wp_ajax_closed_postboxes() {
 	check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' );
-	$closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed']) : array();
-	$closed = array_filter($closed);
+	$closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed'] ) : array();
+	$closed = array_filter( $closed );
 
-	$hidden = isset( $_POST['hidden'] ) ? explode( ',', $_POST['hidden']) : array();
-	$hidden = array_filter($hidden);
+	$hidden = isset( $_POST['hidden'] ) ? explode( ',', $_POST['hidden'] ) : array();
+	$hidden = array_filter( $hidden );
 
 	$page = isset( $_POST['page'] ) ? $_POST['page'] : '';
 
-	if ( $page != sanitize_key( $page ) )
+	if ( $page != sanitize_key( $page ) ) {
 		wp_die( 0 );
+	}
 
-	if ( ! $user = wp_get_current_user() )
+	if ( ! $user = wp_get_current_user() ) {
 		wp_die( -1 );
+	}
 
-	if ( is_array($closed) )
-		update_user_option($user->ID, "closedpostboxes_$page", $closed, true);
+	if ( is_array( $closed ) ) {
+		update_user_option( $user->ID, "closedpostboxes_$page", $closed, true );
+	}
 
-	if ( is_array($hidden) ) {
-		$hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu') ); // postboxes that are always shown
-		update_user_option($user->ID, "metaboxhidden_$page", $hidden, true);
+	if ( is_array( $hidden ) ) {
+		$hidden = array_diff( $hidden, array( 'submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu' ) ); // postboxes that are always shown
+		update_user_option( $user->ID, "metaboxhidden_$page", $hidden, true );
 	}
 
 	wp_die( 1 );
@@ -1451,11 +1581,13 @@
 	check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
 	$page = isset( $_POST['page'] ) ? $_POST['page'] : '';
 
-	if ( $page != sanitize_key( $page ) )
+	if ( $page != sanitize_key( $page ) ) {
 		wp_die( 0 );
+	}
 
-	if ( ! $user = wp_get_current_user() )
+	if ( ! $user = wp_get_current_user() ) {
 		wp_die( -1 );
+	}
 
 	$hidden = ! empty( $_POST['hidden'] ) ? explode( ',', $_POST['hidden'] ) : array();
 	update_user_option( $user->ID, "manage{$page}columnshidden", $hidden, true );
@@ -1471,8 +1603,9 @@
 function wp_ajax_update_welcome_panel() {
 	check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );
 
-	if ( ! current_user_can( 'edit_theme_options' ) )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 
 	update_user_meta( get_current_user_id(), 'show_welcome_panel', empty( $_POST['visible'] ) ? 0 : 1 );
 
@@ -1485,22 +1618,27 @@
  * @since 3.1.0
  */
 function wp_ajax_menu_get_metabox() {
-	if ( ! current_user_can( 'edit_theme_options' ) )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 
 	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
 
 	if ( isset( $_POST['item-type'] ) && 'post_type' == $_POST['item-type'] ) {
 		$type = 'posttype';
 		$callback = 'wp_nav_menu_item_post_type_meta_box';
-		$items = (array) get_post_types( array( 'show_in_nav_menus' => true ), 'object' );
+		$items = (array) get_post_types( array(
+			'show_in_nav_menus' => true,
+		), 'object' );
 	} elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) {
 		$type = 'taxonomy';
 		$callback = 'wp_nav_menu_item_taxonomy_meta_box';
-		$items = (array) get_taxonomies( array( 'show_ui' => true ), 'object' );
+		$items = (array) get_taxonomies( array(
+			'show_ui' => true,
+		), 'object' );
 	}
 
-	if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) {
+	if ( ! empty( $_POST['item-object'] ) && isset( $items[ $_POST['item-object'] ] ) ) {
 		$menus_meta_box_object = $items[ $_POST['item-object'] ];
 
 		/** This filter is documented in wp-admin/includes/nav-menu.php */
@@ -1513,7 +1651,7 @@
 				'title' => $item->labels->name,
 				'callback' => $callback,
 				'args' => $item,
-			)
+			),
 		));
 
 		$markup = ob_get_clean();
@@ -1553,8 +1691,9 @@
 
 	$results = _WP_Editors::wp_link_query( $args );
 
-	if ( ! isset( $results ) )
+	if ( ! isset( $results ) ) {
 		wp_die( 0 );
+	}
 
 	echo wp_json_encode( $results );
 	echo "\n";
@@ -1568,11 +1707,13 @@
  * @since 3.1.0
  */
 function wp_ajax_menu_locations_save() {
-	if ( ! current_user_can( 'edit_theme_options' ) )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 	check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' );
-	if ( ! isset( $_POST['menu-locations'] ) )
+	if ( ! isset( $_POST['menu-locations'] ) ) {
 		wp_die( 0 );
+	}
 	set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_POST['menu-locations'] ) );
 	wp_die( 1 );
 }
@@ -1587,22 +1728,27 @@
 	$order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false;
 	$page_columns = isset( $_POST['page_columns'] ) ? $_POST['page_columns'] : 'auto';
 
-	if ( $page_columns != 'auto' )
+	if ( $page_columns != 'auto' ) {
 		$page_columns = (int) $page_columns;
+	}
 
 	$page = isset( $_POST['page'] ) ? $_POST['page'] : '';
 
-	if ( $page != sanitize_key( $page ) )
+	if ( $page != sanitize_key( $page ) ) {
 		wp_die( 0 );
+	}
 
-	if ( ! $user = wp_get_current_user() )
+	if ( ! $user = wp_get_current_user() ) {
 		wp_die( -1 );
+	}
 
-	if ( $order )
-		update_user_option($user->ID, "meta-box-order_$page", $order, true);
+	if ( $order ) {
+		update_user_option( $user->ID, "meta-box-order_$page", $order, true );
+	}
 
-	if ( $page_columns )
-		update_user_option($user->ID, "screen_layout_$page", $page_columns, true);
+	if ( $page_columns ) {
+		update_user_option( $user->ID, "screen_layout_$page", $page_columns, true );
+	}
 
 	wp_die( 1 );
 }
@@ -1613,8 +1759,9 @@
  * @since 3.1.0
  */
 function wp_ajax_menu_quick_search() {
-	if ( ! current_user_can( 'edit_theme_options' ) )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 
 	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
 
@@ -1630,7 +1777,7 @@
  */
 function wp_ajax_get_permalink() {
 	check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
-	$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
+	$post_id = isset( $_POST['post_id'] )? intval( $_POST['post_id'] ) : 0;
 	wp_die( get_preview_post_link( $post_id ) );
 }
 
@@ -1641,9 +1788,9 @@
  */
 function wp_ajax_sample_permalink() {
 	check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
-	$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
-	$title = isset($_POST['new_title'])? $_POST['new_title'] : '';
-	$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : null;
+	$post_id = isset( $_POST['post_id'] )? intval( $_POST['post_id'] ) : 0;
+	$title = isset( $_POST['new_title'] )? $_POST['new_title'] : '';
+	$slug = isset( $_POST['new_slug'] )? $_POST['new_slug'] : null;
 	wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
 }
 
@@ -1659,15 +1806,18 @@
 
 	check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
 
-	if ( ! isset($_POST['post_ID']) || ! ( $post_ID = (int) $_POST['post_ID'] ) )
+	if ( ! isset( $_POST['post_ID'] ) || ! ( $post_ID = (int) $_POST['post_ID'] ) ) {
 		wp_die();
+	}
 
 	if ( 'page' == $_POST['post_type'] ) {
-		if ( ! current_user_can( 'edit_page', $post_ID ) )
+		if ( ! current_user_can( 'edit_page', $post_ID ) ) {
 			wp_die( __( 'Sorry, you are not allowed to edit this page.' ) );
+		}
 	} else {
-		if ( ! current_user_can( 'edit_post', $post_ID ) )
+		if ( ! current_user_can( 'edit_post', $post_ID ) ) {
 			wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
+		}
 	}
 
 	if ( $last = wp_check_post_lock( $post_ID ) ) {
@@ -1682,7 +1832,7 @@
 	$post = get_post( $post_ID, ARRAY_A );
 
 	// Since it's coming from the database.
-	$post = wp_slash($post);
+	$post = wp_slash( $post );
 
 	$data['content'] = $post['post_content'];
 	$data['excerpt'] = $post['post_excerpt'];
@@ -1690,8 +1840,9 @@
 	// Rename.
 	$data['user_ID'] = get_current_user_id();
 
-	if ( isset($data['post_parent']) )
+	if ( isset( $data['post_parent'] ) ) {
 		$data['parent_id'] = $data['post_parent'];
+	}
 
 	// Status.
 	if ( isset( $data['keep_private'] ) && 'private' == $data['keep_private'] ) {
@@ -1701,10 +1852,12 @@
 		$data['post_status'] = $data['_status'];
 	}
 
-	if ( empty($data['comment_status']) )
+	if ( empty( $data['comment_status'] ) ) {
 		$data['comment_status'] = 'closed';
-	if ( empty($data['ping_status']) )
+	}
+	if ( empty( $data['ping_status'] ) ) {
 		$data['ping_status'] = 'closed';
+	}
 
 	// Exclude terms from taxonomies that are not supposed to appear in Quick Edit.
 	if ( ! empty( $data['tax_input'] ) ) {
@@ -1726,7 +1879,9 @@
 	// Update the post.
 	edit_post();
 
-	$wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) );
+	$wp_list_table = _get_list_table( 'WP_Posts_List_Table', array(
+		'screen' => $_POST['screen'],
+	) );
 
 	$mode = $_POST['post_view'] === 'excerpt' ? 'excerpt' : 'list';
 
@@ -1757,8 +1912,9 @@
 
 	$taxonomy = sanitize_key( $_POST['taxonomy'] );
 	$tax = get_taxonomy( $taxonomy );
-	if ( ! $tax )
+	if ( ! $tax ) {
 		wp_die( 0 );
+	}
 
 	if ( ! isset( $_POST['tax_ID'] ) || ! ( $id = (int) $_POST['tax_ID'] ) ) {
 		wp_die( -1 );
@@ -1768,22 +1924,26 @@
 		wp_die( -1 );
 	}
 
-	$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) );
+	$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array(
+		'screen' => 'edit-' . $taxonomy,
+	) );
 
 	$tag = get_term( $id, $taxonomy );
 	$_POST['description'] = $tag->description;
 
-	$updated = wp_update_term($id, $taxonomy, $_POST);
-	if ( $updated && !is_wp_error($updated) ) {
+	$updated = wp_update_term( $id, $taxonomy, $_POST );
+	if ( $updated && ! is_wp_error( $updated ) ) {
 		$tag = get_term( $updated['term_id'], $taxonomy );
-		if ( !$tag || is_wp_error( $tag ) ) {
-			if ( is_wp_error($tag) && $tag->get_error_message() )
+		if ( ! $tag || is_wp_error( $tag ) ) {
+			if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
 				wp_die( $tag->get_error_message() );
+			}
 			wp_die( __( 'Item not updated.' ) );
 		}
 	} else {
-		if ( is_wp_error($updated) && $updated->get_error_message() )
+		if ( is_wp_error( $updated ) && $updated->get_error_message() ) {
 			wp_die( $updated->get_error_message() );
+		}
 		wp_die( __( 'Item not updated.' ) );
 	}
 	$level = 0;
@@ -1807,7 +1967,9 @@
 function wp_ajax_find_posts() {
 	check_ajax_referer( 'find-posts' );
 
-	$post_types = get_post_types( array( 'public' => true ), 'objects' );
+	$post_types = get_post_types( array(
+		'public' => true,
+	), 'objects' );
 	unset( $post_types['attachment'] );
 
 	$s = wp_unslash( $_POST['ps'] );
@@ -1816,8 +1978,9 @@
 		'post_status' => 'any',
 		'posts_per_page' => 50,
 	);
-	if ( '' !== $s )
+	if ( '' !== $s ) {
 		$args['s'] = $s;
+	}
 
 	$posts = get_posts( $args );
 
@@ -1825,7 +1988,7 @@
 		wp_send_json_error( __( 'No items found.' ) );
 	}
 
-	$html = '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>'.__('Title').'</th><th class="no-break">'.__('Type').'</th><th class="no-break">'.__('Date').'</th><th class="no-break">'.__('Status').'</th></tr></thead><tbody>';
+	$html = '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>' . __( 'Title' ) . '</th><th class="no-break">' . __( 'Type' ) . '</th><th class="no-break">' . __( 'Date' ) . '</th><th class="no-break">' . __( 'Status' ) . '</th></tr></thead><tbody>';
 	$alt = '';
 	foreach ( $posts as $post ) {
 		$title = trim( $post->post_title ) ? $post->post_title : __( '(no title)' );
@@ -1834,16 +1997,16 @@
 		switch ( $post->post_status ) {
 			case 'publish' :
 			case 'private' :
-				$stat = __('Published');
+				$stat = __( 'Published' );
 				break;
 			case 'future' :
-				$stat = __('Scheduled');
+				$stat = __( 'Scheduled' );
 				break;
 			case 'pending' :
-				$stat = __('Pending Review');
+				$stat = __( 'Pending Review' );
 				break;
 			case 'draft' :
-				$stat = __('Draft');
+				$stat = __( 'Draft' );
 				break;
 		}
 
@@ -1851,11 +2014,11 @@
 			$time = '';
 		} else {
 			/* translators: date format in table columns, see https://secure.php.net/date */
-			$time = mysql2date(__('Y/m/d'), $post->post_date);
+			$time = mysql2date( __( 'Y/m/d' ), $post->post_date );
 		}
 
-		$html .= '<tr class="' . trim( 'found-posts ' . $alt ) . '"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . esc_attr($post->ID) . '"></td>';
-		$html .= '<td><label for="found-'.$post->ID.'">' . esc_html( $title ) . '</label></td><td class="no-break">' . esc_html( $post_types[$post->post_type]->labels->singular_name ) . '</td><td class="no-break">'.esc_html( $time ) . '</td><td class="no-break">' . esc_html( $stat ). ' </td></tr>' . "\n\n";
+		$html .= '<tr class="' . trim( 'found-posts ' . $alt ) . '"><td class="found-radio"><input type="radio" id="found-' . $post->ID . '" name="found_post_id" value="' . esc_attr( $post->ID ) . '"></td>';
+		$html .= '<td><label for="found-' . $post->ID . '">' . esc_html( $title ) . '</label></td><td class="no-break">' . esc_html( $post_types[ $post->post_type ]->labels->singular_name ) . '</td><td class="no-break">' . esc_html( $time ) . '</td><td class="no-break">' . esc_html( $stat ) . ' </td></tr>' . "\n\n";
 	}
 
 	$html .= '</tbody></table>';
@@ -1871,28 +2034,30 @@
 function wp_ajax_widgets_order() {
 	check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
 
-	if ( !current_user_can('edit_theme_options') )
+	if ( ! current_user_can( 'edit_theme_options' ) ) {
 		wp_die( -1 );
+	}
 
 	unset( $_POST['savewidgets'], $_POST['action'] );
 
 	// Save widgets order for all sidebars.
-	if ( is_array($_POST['sidebars']) ) {
+	if ( is_array( $_POST['sidebars'] ) ) {
 		$sidebars = array();
 		foreach ( $_POST['sidebars'] as $key => $val ) {
 			$sb = array();
-			if ( !empty($val) ) {
-				$val = explode(',', $val);
+			if ( ! empty( $val ) ) {
+				$val = explode( ',', $val );
 				foreach ( $val as $k => $v ) {
-					if ( strpos($v, 'widget-') === false )
+					if ( strpos( $v, 'widget-' ) === false ) {
 						continue;
+					}
 
-					$sb[$k] = substr($v, strpos($v, '_') + 1);
+					$sb[ $k ] = substr( $v, strpos( $v, '_' ) + 1 );
 				}
 			}
-			$sidebars[$key] = $sb;
+			$sidebars[ $key ] = $sb;
 		}
-		wp_set_sidebars_widgets($sidebars);
+		wp_set_sidebars_widgets( $sidebars );
 		wp_die( 1 );
 	}
 
@@ -1913,8 +2078,9 @@
 
 	check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
 
-	if ( !current_user_can('edit_theme_options') || !isset($_POST['id_base']) )
+	if ( ! current_user_can( 'edit_theme_options' ) || ! isset( $_POST['id_base'] ) ) {
 		wp_die( -1 );
+	}
 
 	unset( $_POST['savewidgets'], $_POST['action'] );
 
@@ -1938,30 +2104,39 @@
 	$id_base = $_POST['id_base'];
 	$widget_id = $_POST['widget-id'];
 	$sidebar_id = $_POST['sidebar'];
-	$multi_number = !empty($_POST['multi_number']) ? (int) $_POST['multi_number'] : 0;
-	$settings = isset($_POST['widget-' . $id_base]) && is_array($_POST['widget-' . $id_base]) ? $_POST['widget-' . $id_base] : false;
-	$error = '<p>' . __('An error has occurred. Please reload the page and try again.') . '</p>';
+	$multi_number = ! empty( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : 0;
+	$settings = isset( $_POST[ 'widget-' . $id_base ] ) && is_array( $_POST[ 'widget-' . $id_base ] ) ? $_POST[ 'widget-' . $id_base ] : false;
+	$error = '<p>' . __( 'An error has occurred. Please reload the page and try again.' ) . '</p>';
 
 	$sidebars = wp_get_sidebars_widgets();
-	$sidebar = isset($sidebars[$sidebar_id]) ? $sidebars[$sidebar_id] : array();
+	$sidebar = isset( $sidebars[ $sidebar_id ] ) ? $sidebars[ $sidebar_id ] : array();
 
 	// Delete.
-	if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) {
+	if ( isset( $_POST['delete_widget'] ) && $_POST['delete_widget'] ) {
 
-		if ( !isset($wp_registered_widgets[$widget_id]) )
+		if ( ! isset( $wp_registered_widgets[ $widget_id ] ) ) {
 			wp_die( $error );
+		}
 
-		$sidebar = array_diff( $sidebar, array($widget_id) );
-		$_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1');
+		$sidebar = array_diff( $sidebar, array( $widget_id ) );
+		$_POST = array(
+			'sidebar' => $sidebar_id,
+			'widget-' . $id_base => array(),
+			'the-widget-id' => $widget_id,
+			'delete_widget' => '1',
+		);
 
 		/** This action is documented in wp-admin/widgets.php */
 		do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base );
 
-	} elseif ( $settings && preg_match( '/__i__|%i%/', key($settings) ) ) {
-		if ( !$multi_number )
+	} elseif ( $settings && preg_match( '/__i__|%i%/', key( $settings ) ) ) {
+		if ( ! $multi_number ) {
 			wp_die( $error );
+		}
 
-		$_POST[ 'widget-' . $id_base ] = array( $multi_number => reset( $settings ) );
+		$_POST[ 'widget-' . $id_base ] = array(
+			$multi_number => reset( $settings ),
+		);
 		$widget_id = $id_base . '-' . $multi_number;
 		$sidebar[] = $widget_id;
 	}
@@ -1970,8 +2145,9 @@
 	foreach ( (array) $wp_registered_widget_updates as $name => $control ) {
 
 		if ( $name == $id_base ) {
-			if ( !is_callable( $control['callback'] ) )
+			if ( ! is_callable( $control['callback'] ) ) {
 				continue;
+			}
 
 			ob_start();
 				call_user_func_array( $control['callback'], $control['params'] );
@@ -1980,18 +2156,20 @@
 		}
 	}
 
-	if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) {
-		$sidebars[$sidebar_id] = $sidebar;
-		wp_set_sidebars_widgets($sidebars);
+	if ( isset( $_POST['delete_widget'] ) && $_POST['delete_widget'] ) {
+		$sidebars[ $sidebar_id ] = $sidebar;
+		wp_set_sidebars_widgets( $sidebars );
 		echo "deleted:$widget_id";
 		wp_die();
 	}
 
-	if ( !empty($_POST['add_new']) )
+	if ( ! empty( $_POST['add_new'] ) ) {
 		wp_die();
+	}
 
-	if ( $form = $wp_registered_widget_controls[$widget_id] )
+	if ( $form = $wp_registered_widget_controls[ $widget_id ] ) {
 		call_user_func_array( $form['callback'], $form['params'] );
+	}
 
 	wp_die();
 }
@@ -2035,9 +2213,9 @@
 		$multi_number = array_pop( $pieces );
 		$id_base = implode( '-', $pieces );
 		$widget = get_option( 'widget_' . $id_base );
-		unset( $widget[$multi_number] );
+		unset( $widget[ $multi_number ] );
 		update_option( 'widget_' . $id_base, $widget );
-		unset( $sidebars_widgets['wp_inactive_widgets'][$key] );
+		unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] );
 	}
 
 	wp_set_sidebars_widgets( $sidebars_widgets );
@@ -2064,7 +2242,7 @@
 			'data'    => array(
 				'message'  => __( 'Sorry, you are not allowed to upload files.' ),
 				'filename' => $_FILES['async-upload']['name'],
-			)
+			),
 		) );
 
 		wp_die();
@@ -2078,7 +2256,7 @@
 				'data'    => array(
 					'message'  => __( 'Sorry, you are not allowed to attach files to this post.' ),
 					'filename' => $_FILES['async-upload']['name'],
-				)
+				),
 			) );
 
 			wp_die();
@@ -2098,7 +2276,7 @@
 				'data'    => array(
 					'message'  => __( 'The uploaded file is not a valid image. Please try again.' ),
 					'filename' => $_FILES['async-upload']['name'],
-				)
+				),
 			) );
 
 			wp_die();
@@ -2113,22 +2291,25 @@
 			'data'    => array(
 				'message'  => $attachment_id->get_error_message(),
 				'filename' => $_FILES['async-upload']['name'],
-			)
+			),
 		) );
 
 		wp_die();
 	}
 
 	if ( isset( $post_data['context'] ) && isset( $post_data['theme'] ) ) {
-		if ( 'custom-background' === $post_data['context'] )
+		if ( 'custom-background' === $post_data['context'] ) {
 			update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', $post_data['theme'] );
+		}
 
-		if ( 'custom-header' === $post_data['context'] )
+		if ( 'custom-header' === $post_data['context'] ) {
 			update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', $post_data['theme'] );
+		}
 	}
 
-	if ( ! $attachment = wp_prepare_attachment_for_js( $attachment_id ) )
+	if ( ! $attachment = wp_prepare_attachment_for_js( $attachment_id ) ) {
 		wp_die();
+	}
 
 	echo wp_json_encode( array(
 		'success' => true,
@@ -2144,9 +2325,10 @@
  * @since 3.1.0
  */
 function wp_ajax_image_editor() {
-	$attachment_id = intval($_POST['postid']);
-	if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) )
+	$attachment_id = intval( $_POST['postid'] );
+	if ( empty( $attachment_id ) || ! current_user_can( 'edit_post', $attachment_id ) ) {
 		wp_die( -1 );
+	}
 
 	check_ajax_referer( "image_editor-$attachment_id" );
 	include_once( ABSPATH . 'wp-admin/includes/image-edit.php' );
@@ -2154,19 +2336,19 @@
 	$msg = false;
 	switch ( $_POST['do'] ) {
 		case 'save' :
-			$msg = wp_save_image($attachment_id);
-			$msg = wp_json_encode($msg);
+			$msg = wp_save_image( $attachment_id );
+			$msg = wp_json_encode( $msg );
 			wp_die( $msg );
 			break;
 		case 'scale' :
-			$msg = wp_save_image($attachment_id);
+			$msg = wp_save_image( $attachment_id );
 			break;
 		case 'restore' :
-			$msg = wp_restore_image($attachment_id);
+			$msg = wp_restore_image( $attachment_id );
 			break;
 	}
 
-	wp_image_editor($attachment_id, $msg);
+	wp_image_editor( $attachment_id, $msg );
 	wp_die();
 }
 
@@ -2179,15 +2361,16 @@
 	$json = ! empty( $_REQUEST['json'] ); // New-style request
 
 	$post_ID = intval( $_POST['post_id'] );
-	if ( ! current_user_can( 'edit_post', $post_ID ) )
+	if ( ! current_user_can( 'edit_post', $post_ID ) ) {
 		wp_die( -1 );
+	}
 
 	$thumbnail_id = intval( $_POST['thumbnail_id'] );
 
-	if ( $json )
+	if ( $json ) {
 		check_ajax_referer( "update-post_$post_ID" );
-	else
-		check_ajax_referer( "set_post_thumbnail-$post_ID" );
+	} else { check_ajax_referer( "set_post_thumbnail-$post_ID" );
+	}
 
 	if ( $thumbnail_id == '-1' ) {
 		if ( delete_post_thumbnail( $post_ID ) ) {
@@ -2311,10 +2494,11 @@
 
 	$post = null;
 
-	if ( $post_id )
+	if ( $post_id ) {
 		$post = get_post( $post_id );
+	}
 
-	check_ajax_referer('update-post_' . $post_id, '_wpnonce');
+	check_ajax_referer( 'update-post_' . $post_id, '_wpnonce' );
 
 	$post_id = edit_post();
 
@@ -2332,12 +2516,14 @@
 
 	if ( $last_id = get_post_meta( $post_id, '_edit_last', true ) ) {
 		$last_user = get_userdata( $last_id );
-		$last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time );
+		$last_edited = sprintf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), $last_date, $last_time );
 	} else {
-		$last_edited = sprintf( __('Last edited on %1$s at %2$s'), $last_date, $last_time );
+		$last_edited = sprintf( __( 'Last edited on %1$s at %2$s' ), $last_date, $last_time );
 	}
 
-	wp_send_json_success( array( 'last_edited' => $last_edited ) );
+	wp_send_json_success( array(
+		'last_edited' => $last_edited,
+	) );
 }
 
 /**
@@ -2346,20 +2532,24 @@
  * @since 3.1.0
  */
 function wp_ajax_wp_remove_post_lock() {
-	if ( empty( $_POST['post_ID'] ) || empty( $_POST['active_post_lock'] ) )
+	if ( empty( $_POST['post_ID'] ) || empty( $_POST['active_post_lock'] ) ) {
 		wp_die( 0 );
+	}
 	$post_id = (int) $_POST['post_ID'];
-	if ( ! $post = get_post( $post_id ) )
+	if ( ! $post = get_post( $post_id ) ) {
 		wp_die( 0 );
+	}
 
 	check_ajax_referer( 'update-post_' . $post_id );
 
-	if ( ! current_user_can( 'edit_post', $post_id ) )
+	if ( ! current_user_can( 'edit_post', $post_id ) ) {
 		wp_die( -1 );
+	}
 
 	$active_lock = array_map( 'absint', explode( ':', $_POST['active_post_lock'] ) );
-	if ( $active_lock[1] != get_current_user_id() )
+	if ( $active_lock[1] != get_current_user_id() ) {
 		wp_die( 0 );
+	}
 
 	/**
 	 * Filters the post lock window duration.
@@ -2381,15 +2571,17 @@
  */
 function wp_ajax_dismiss_wp_pointer() {
 	$pointer = $_POST['pointer'];
-	if ( $pointer != sanitize_key( $pointer ) )
+	if ( $pointer != sanitize_key( $pointer ) ) {
 		wp_die( 0 );
+	}
 
-//	check_ajax_referer( 'dismiss-pointer_' . $pointer );
+	//  check_ajax_referer( 'dismiss-pointer_' . $pointer );
 
 	$dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) );
 
-	if ( in_array( $pointer, $dismissed ) )
+	if ( in_array( $pointer, $dismissed ) ) {
 		wp_die( 0 );
+	}
 
 	$dismissed[] = $pointer;
 	$dismissed = implode( ',', $dismissed );
@@ -2404,23 +2596,29 @@
  * @since 3.5.0
  */
 function wp_ajax_get_attachment() {
-	if ( ! isset( $_REQUEST['id'] ) )
+	if ( ! isset( $_REQUEST['id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $id = absint( $_REQUEST['id'] ) )
+	if ( ! $id = absint( $_REQUEST['id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $post = get_post( $id ) )
+	if ( ! $post = get_post( $id ) ) {
 		wp_send_json_error();
+	}
 
-	if ( 'attachment' != $post->post_type )
+	if ( 'attachment' != $post->post_type ) {
 		wp_send_json_error();
+	}
 
-	if ( ! current_user_can( 'upload_files' ) )
+	if ( ! current_user_can( 'upload_files' ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $attachment = wp_prepare_attachment_for_js( $id ) )
+	if ( ! $attachment = wp_prepare_attachment_for_js( $id ) ) {
 		wp_send_json_error();
+	}
 
 	wp_send_json_success( $attachment );
 }
@@ -2431,13 +2629,23 @@
  * @since 3.5.0
  */
 function wp_ajax_query_attachments() {
-	if ( ! current_user_can( 'upload_files' ) )
+	if ( ! current_user_can( 'upload_files' ) ) {
 		wp_send_json_error();
+	}
 
 	$query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
 	$keys = array(
-		's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
-		'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
+		's',
+	'order',
+	'orderby',
+	'posts_per_page',
+	'paged',
+	'post_mime_type',
+		'post_parent',
+	'post__in',
+	'post__not_in',
+	'year',
+	'monthnum',
 	);
 	foreach ( get_taxonomies_for_attachments( 'objects' ) as $t ) {
 		if ( $t->query_var && isset( $query[ $t->query_var ] ) ) {
@@ -2455,8 +2663,9 @@
 		$query['post_status'] = 'inherit';
 	}
 
-	if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) )
+	if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) ) {
 		$query['post_status'] .= ',private';
+	}
 
 	// Filter query clauses to include filenames.
 	if ( isset( $query['s'] ) ) {
@@ -2488,37 +2697,46 @@
  * @since 3.5.0
  */
 function wp_ajax_save_attachment() {
-	if ( ! isset( $_REQUEST['id'] ) || ! isset( $_REQUEST['changes'] ) )
+	if ( ! isset( $_REQUEST['id'] ) || ! isset( $_REQUEST['changes'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $id = absint( $_REQUEST['id'] ) )
+	if ( ! $id = absint( $_REQUEST['id'] ) ) {
 		wp_send_json_error();
+	}
 
 	check_ajax_referer( 'update-post_' . $id, 'nonce' );
 
-	if ( ! current_user_can( 'edit_post', $id ) )
+	if ( ! current_user_can( 'edit_post', $id ) ) {
 		wp_send_json_error();
+	}
 
 	$changes = $_REQUEST['changes'];
 	$post    = get_post( $id, ARRAY_A );
 
-	if ( 'attachment' != $post['post_type'] )
+	if ( 'attachment' != $post['post_type'] ) {
 		wp_send_json_error();
+	}
 
-	if ( isset( $changes['parent'] ) )
+	if ( isset( $changes['parent'] ) ) {
 		$post['post_parent'] = $changes['parent'];
+	}
 
-	if ( isset( $changes['title'] ) )
+	if ( isset( $changes['title'] ) ) {
 		$post['post_title'] = $changes['title'];
+	}
 
-	if ( isset( $changes['caption'] ) )
+	if ( isset( $changes['caption'] ) ) {
 		$post['post_excerpt'] = $changes['caption'];
+	}
 
-	if ( isset( $changes['description'] ) )
+	if ( isset( $changes['description'] ) ) {
 		$post['post_content'] = $changes['description'];
+	}
 
-	if ( MEDIA_TRASH && isset( $changes['status'] ) )
+	if ( MEDIA_TRASH && isset( $changes['status'] ) ) {
 		$post['post_status'] = $changes['status'];
+	}
 
 	if ( isset( $changes['alt'] ) ) {
 		$alt = wp_unslash( $changes['alt'] );
@@ -2562,25 +2780,30 @@
  * @since 3.5.0
  */
 function wp_ajax_save_attachment_compat() {
-	if ( ! isset( $_REQUEST['id'] ) )
+	if ( ! isset( $_REQUEST['id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $id = absint( $_REQUEST['id'] ) )
+	if ( ! $id = absint( $_REQUEST['id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) )
+	if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) ) {
 		wp_send_json_error();
+	}
 	$attachment_data = $_REQUEST['attachments'][ $id ];
 
 	check_ajax_referer( 'update-post_' . $id, 'nonce' );
 
-	if ( ! current_user_can( 'edit_post', $id ) )
+	if ( ! current_user_can( 'edit_post', $id ) ) {
 		wp_send_json_error();
+	}
 
 	$post = get_post( $id, ARRAY_A );
 
-	if ( 'attachment' != $post['post_type'] )
+	if ( 'attachment' != $post['post_type'] ) {
 		wp_send_json_error();
+	}
 
 	/** This filter is documented in wp-admin/includes/media.php */
 	$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
@@ -2593,12 +2816,14 @@
 	wp_update_post( $post );
 
 	foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
-		if ( isset( $attachment_data[ $taxonomy ] ) )
+		if ( isset( $attachment_data[ $taxonomy ] ) ) {
 			wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false );
+		}
 	}
 
-	if ( ! $attachment = wp_prepare_attachment_for_js( $id ) )
+	if ( ! $attachment = wp_prepare_attachment_for_js( $id ) ) {
 		wp_send_json_error();
+	}
 
 	wp_send_json_success( $attachment );
 }
@@ -2609,31 +2834,41 @@
  * @since 3.5.0
  */
 function wp_ajax_save_attachment_order() {
-	if ( ! isset( $_REQUEST['post_id'] ) )
+	if ( ! isset( $_REQUEST['post_id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $post_id = absint( $_REQUEST['post_id'] ) )
+	if ( ! $post_id = absint( $_REQUEST['post_id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( empty( $_REQUEST['attachments'] ) )
+	if ( empty( $_REQUEST['attachments'] ) ) {
 		wp_send_json_error();
+	}
 
 	check_ajax_referer( 'update-post_' . $post_id, 'nonce' );
 
 	$attachments = $_REQUEST['attachments'];
 
-	if ( ! current_user_can( 'edit_post', $post_id ) )
+	if ( ! current_user_can( 'edit_post', $post_id ) ) {
 		wp_send_json_error();
+	}
 
 	foreach ( $attachments as $attachment_id => $menu_order ) {
-		if ( ! current_user_can( 'edit_post', $attachment_id ) )
+		if ( ! current_user_can( 'edit_post', $attachment_id ) ) {
 			continue;
-		if ( ! $attachment = get_post( $attachment_id ) )
+		}
+		if ( ! $attachment = get_post( $attachment_id ) ) {
 			continue;
-		if ( 'attachment' != $attachment->post_type )
+		}
+		if ( 'attachment' != $attachment->post_type ) {
 			continue;
+		}
 
-		wp_update_post( array( 'ID' => $attachment_id, 'menu_order' => $menu_order ) );
+		wp_update_post( array(
+			'ID' => $attachment_id,
+			'menu_order' => $menu_order,
+		) );
 	}
 
 	wp_send_json_success();
@@ -2655,21 +2890,26 @@
 
 	$id = intval( $attachment['id'] );
 
-	if ( ! $post = get_post( $id ) )
+	if ( ! $post = get_post( $id ) ) {
 		wp_send_json_error();
+	}
 
-	if ( 'attachment' != $post->post_type )
+	if ( 'attachment' != $post->post_type ) {
 		wp_send_json_error();
+	}
 
 	if ( current_user_can( 'edit_post', $id ) ) {
 		// If this attachment is unattached, attach it. Primarily a back compat thing.
 		if ( 0 == $post->post_parent && $insert_into_post_id = intval( $_POST['post_id'] ) ) {
-			wp_update_post( array( 'ID' => $id, 'post_parent' => $insert_into_post_id ) );
+			wp_update_post( array(
+				'ID' => $id,
+				'post_parent' => $insert_into_post_id,
+			) );
 		}
 	}
 
 	$url = empty( $attachment['url'] ) ? '' : $attachment['url'];
-	$rel = ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url );
+	$rel = ( strpos( $url, 'attachment_id' ) || get_attachment_link( $id ) == $url );
 
 	remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' );
 
@@ -2686,7 +2926,7 @@
 
 		$title = ''; // We no longer insert title tags into <img> tags, as they are redundant.
 		$html = get_image_send_to_editor( $id, $caption, $title, $align, $url, $rel, $size, $alt );
-	} elseif ( wp_attachment_is( 'video', $post ) || wp_attachment_is( 'audio', $post )  ) {
+	} elseif ( wp_attachment_is( 'video', $post ) || wp_attachment_is( 'audio', $post ) ) {
 		$html = stripslashes_deep( $_POST['html'] );
 	} else {
 		$html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : '';
@@ -2723,22 +2963,26 @@
 
 	check_ajax_referer( 'media-send-to-editor', 'nonce' );
 
-	if ( ! $src = wp_unslash( $_POST['src'] ) )
+	if ( ! $src = wp_unslash( $_POST['src'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! strpos( $src, '://' ) )
+	if ( ! strpos( $src, '://' ) ) {
 		$src = 'http://' . $src;
+	}
 
-	if ( ! $src = esc_url_raw( $src ) )
+	if ( ! $src = esc_url_raw( $src ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! $link_text = trim( wp_unslash( $_POST['link_text'] ) ) )
+	if ( ! $link_text = trim( wp_unslash( $_POST['link_text'] ) ) ) {
 		$link_text = wp_basename( $src );
+	}
 
 	$post = get_post( isset( $_POST['post_id'] ) ? $_POST['post_id'] : 0 );
 
 	// Ping WordPress for an embed.
-	$check_embed = $wp_embed->run_shortcode( '[embed]'. $src .'[/embed]' );
+	$check_embed = $wp_embed->run_shortcode( '[embed]' . $src . '[/embed]' );
 
 	// Fallback that WordPress creates when no oEmbed was found.
 	$fallback = $wp_embed->maybe_make_link( $src );
@@ -2755,8 +2999,9 @@
 	// Figure out what filter to run:
 	$type = 'file';
 	if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) )
-		&& ( 'audio' == $ext_type || 'video' == $ext_type ) )
+		&& ( 'audio' == $ext_type || 'video' == $ext_type ) ) {
 			$type = $ext_type;
+	}
 
 	/** This filter is documented in wp-admin/includes/media.php */
 	$html = apply_filters( "{$type}_send_to_editor_url", $html, $src, $link_text );
@@ -2781,7 +3026,7 @@
 
 	// screen_id is the same as $current_screen->id and the JS global 'pagenow'.
 	if ( ! empty( $_POST['screen_id'] ) ) {
-		$screen_id = sanitize_key($_POST['screen_id']);
+		$screen_id = sanitize_key( $_POST['screen_id'] );
 	} else {
 		$screen_id = 'front';
 	}
@@ -2849,15 +3094,20 @@
 function wp_ajax_get_revision_diffs() {
 	require ABSPATH . 'wp-admin/includes/revision.php';
 
-	if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
+	if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) ) {
 		wp_send_json_error();
+	}
 
-	if ( ! current_user_can( 'edit_post', $post->ID ) )
+	if ( ! current_user_can( 'edit_post', $post->ID ) ) {
 		wp_send_json_error();
+	}
 
 	// Really just pre-loading the cache here.
-	if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) )
+	if ( ! $revisions = wp_get_post_revisions( $post->ID, array(
+		'check_enabled' => false,
+	) ) ) {
 		wp_send_json_error();
+	}
 
 	$return = array();
 	@set_time_limit( 0 );
@@ -2897,7 +3147,7 @@
 
 	wp_send_json_success( array(
 		'previousScheme' => 'admin-color-' . $previous_color_scheme,
-		'currentScheme'  => 'admin-color-' . $color_scheme
+		'currentScheme'  => 'admin-color-' . $color_scheme,
 	) );
 }
 
@@ -2918,7 +3168,7 @@
 
 	$args = wp_parse_args( wp_unslash( $_REQUEST['request'] ), array(
 		'per_page' => 20,
-		'fields'   => $theme_field_defaults
+		'fields'   => $theme_field_defaults,
 	) );
 
 	if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
@@ -2943,7 +3193,7 @@
 	foreach ( $api->themes as &$theme ) {
 		$theme->install_url = add_query_arg( array(
 			'theme'    => $theme->slug,
-			'_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug )
+			'_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
 		), $update_php );
 
 		if ( current_user_can( 'switch_themes' ) ) {
@@ -2972,10 +3222,15 @@
 		$theme->author      = wp_kses( $theme->author, $themes_allowedtags );
 		$theme->version     = wp_kses( $theme->version, $themes_allowedtags );
 		$theme->description = wp_kses( $theme->description, $themes_allowedtags );
-		$theme->stars       = wp_star_rating( array( 'rating' => $theme->rating, 'type' => 'percent', 'number' => $theme->num_ratings, 'echo' => false ) );
+		$theme->stars       = wp_star_rating( array(
+			'rating' => $theme->rating,
+			'type' => 'percent',
+			'number' => $theme->num_ratings,
+			'echo' => false,
+		) );
 		$theme->num_ratings = number_format_i18n( $theme->num_ratings );
 		$theme->preview_url = set_url_scheme( $theme->preview_url );
-	}
+	}// End foreach().
 
 	wp_send_json_success( $api );
 }
@@ -3070,7 +3325,7 @@
 
 	$return = array(
 		'body' => $parsed,
-		'attr' => $wp_embed->last_attr
+		'attr' => $wp_embed->last_attr,
 	);
 
 	if ( strpos( $parsed, 'class="wp-embedded-content' ) ) {
@@ -3115,7 +3370,7 @@
 		setup_postdata( $post );
 	}
 
-	$parsed = do_shortcode( $shortcode  );
+	$parsed = do_shortcode( $shortcode );
 
 	if ( empty( $parsed ) ) {
 		wp_send_json_error( array(
@@ -3149,7 +3404,7 @@
 
 	wp_send_json_success( array(
 		'head' => $head,
-		'body' => ob_get_clean()
+		'body' => ob_get_clean(),
 	) );
 }
 
@@ -3185,7 +3440,9 @@
 		$message = sprintf( __( '%s has been logged out.' ), $user->display_name );
 	}
 
-	wp_send_json_success( array( 'message' => $message ) );
+	wp_send_json_success( array(
+		'message' => $message,
+	) );
 }
 
 /**
@@ -3228,7 +3485,9 @@
 	$cropped = wp_crop_image( $attachment_id, $data['x1'], $data['y1'], $data['width'], $data['height'], $data['dst_width'], $data['dst_height'] );
 
 	if ( ! $cropped || is_wp_error( $cropped ) ) {
-		wp_send_json_error( array( 'message' => __( 'Image could not be processed.' ) ) );
+		wp_send_json_error( array(
+			'message' => __( 'Image could not be processed.' ),
+		) );
 	}
 
 	switch ( $context ) {
@@ -3317,7 +3576,7 @@
 			 * @param string $context       The Customizer control requesting the cropped image.
 			 */
 			$attachment_id = apply_filters( 'wp_ajax_cropped_attachment_id', $attachment_id, $context );
-	}
+	}// End switch().
 
 	wp_send_json_success( wp_prepare_attachment_for_js( $attachment_id ) );
 }
@@ -3387,7 +3646,9 @@
 
 	$api = themes_api( 'theme_information', array(
 		'slug'   => $slug,
-		'fields' => array( 'sections' => false ),
+		'fields' => array(
+			'sections' => false,
+		),
 	) );
 
 	if ( is_wp_error( $api ) ) {
@@ -3705,7 +3966,9 @@
 	}
 
 	if ( is_multisite() && current_user_can( 'manage_network_plugins' ) && 'import' !== $pagenow ) {
-		$status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
+		$status['activateUrl'] = add_query_arg( array(
+			'networkwide' => 1,
+		), $status['activateUrl'] );
 	}
 
 	wp_send_json_success( $status );
@@ -3807,7 +4070,7 @@
 		}
 
 		wp_send_json_error( $status );
-	}
+	}// End if().
 
 	// An unhandled error occurred.
 	$status['errorMessage'] = __( 'Plugin update failed.' );
Index: src/wp-admin/includes/bookmark.php
===================================================================
--- src/wp-admin/includes/bookmark.php	(revision 40901)
+++ src/wp-admin/includes/bookmark.php	(working copy)
@@ -35,14 +35,15 @@
 	}
 
 	$_POST['link_url'] = esc_html( $_POST['link_url'] );
-	$_POST['link_url'] = esc_url($_POST['link_url']);
+	$_POST['link_url'] = esc_url( $_POST['link_url'] );
 	$_POST['link_name'] = esc_html( $_POST['link_name'] );
 	$_POST['link_image'] = esc_html( $_POST['link_image'] );
-	$_POST['link_rss'] = esc_url($_POST['link_rss']);
-	if ( !isset($_POST['link_visible']) || 'N' != $_POST['link_visible'] )
+	$_POST['link_rss'] = esc_url( $_POST['link_rss'] );
+	if ( ! isset( $_POST['link_visible'] ) || 'N' != $_POST['link_visible'] ) {
 		$_POST['link_visible'] = 'Y';
+	}
 
-	if ( !empty( $link_id ) ) {
+	if ( ! empty( $link_id ) ) {
 		$_POST['link_id'] = $link_id;
 		return wp_update_link( $_POST );
 	} else {
@@ -59,15 +60,15 @@
  */
 function get_default_link_to_edit() {
 	$link = new stdClass;
-	if ( isset( $_GET['linkurl'] ) )
+	if ( isset( $_GET['linkurl'] ) ) {
 		$link->link_url = esc_url( wp_unslash( $_GET['linkurl'] ) );
-	else
-		$link->link_url = '';
+	} else { $link->link_url = '';
+	}
 
-	if ( isset( $_GET['name'] ) )
+	if ( isset( $_GET['name'] ) ) {
 		$link->link_name = esc_attr( wp_unslash( $_GET['name'] ) );
-	else
-		$link->link_name = '';
+	} else { $link->link_name = '';
+	}
 
 	$link->link_visible = 'Y';
 
@@ -97,7 +98,9 @@
 
 	wp_delete_object_term_relationships( $link_id, 'link_category' );
 
-	$wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) );
+	$wpdb->delete( $wpdb->links, array(
+		'link_id' => $link_id,
+	) );
 
 	/**
 	 * Fires after a link has been deleted.
@@ -122,7 +125,9 @@
  * @return array The requested link's categories
  */
 function wp_get_link_cats( $link_id = 0 ) {
-	$cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') );
+	$cats = wp_get_object_terms( $link_id, 'link_category', array(
+		'fields' => 'ids',
+	) );
 	return array_unique( $cats );
 }
 
@@ -152,7 +157,12 @@
 function wp_insert_link( $linkdata, $wp_error = false ) {
 	global $wpdb;
 
-	$defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 );
+	$defaults = array(
+		'link_id' => 0,
+		'link_name' => '',
+		'link_url' => '',
+		'link_rating' => 0,
+	);
 
 	$args = wp_parse_args( $linkdata, $defaults );
 	$r = wp_unslash( sanitize_bookmark( $args, 'db' ) );
@@ -249,8 +259,9 @@
  */
 function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
 	// If $link_categories isn't already an array, make it one:
-	if ( !is_array( $link_categories ) || 0 == count( $link_categories ) )
+	if ( ! is_array( $link_categories ) || 0 == count( $link_categories ) ) {
 		$link_categories = array( get_option( 'default_link_category' ) );
+	}
 
 	$link_categories = array_map( 'intval', $link_categories );
 	$link_categories = array_unique( $link_categories );
@@ -278,10 +289,10 @@
 
 	// Passed link category list overwrites existing category list if not empty.
 	if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] )
-			 && 0 != count( $linkdata['link_category'] ) )
+			 && 0 != count( $linkdata['link_category'] ) ) {
 		$link_cats = $linkdata['link_category'];
-	else
-		$link_cats = $link['link_category'];
+	} else { $link_cats = $link['link_category'];
+	}
 
 	// Merge old and new fields with new fields overwriting old ones.
 	$linkdata = array_merge( $link, $linkdata );
@@ -300,8 +311,9 @@
  */
 function wp_link_manager_disabled_message() {
 	global $pagenow;
-	if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow )
+	if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow ) {
 		return;
+	}
 
 	add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 );
 	$really_can_manage_links = current_user_can( 'manage_links' );
Index: src/wp-admin/includes/class-automatic-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-automatic-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-automatic-upgrader-skin.php	(working copy)
@@ -69,14 +69,16 @@
 		} else {
 			$string = $data;
 		}
-		if ( ! empty( $this->upgrader->strings[ $string ] ) )
+		if ( ! empty( $this->upgrader->strings[ $string ] ) ) {
 			$string = $this->upgrader->strings[ $string ];
+		}
 
 		if ( strpos( $string, '%' ) !== false ) {
 			$args = func_get_args();
 			$args = array_splice( $args, 1 );
-			if ( ! empty( $args ) )
+			if ( ! empty( $args ) ) {
 				$string = vsprintf( $string, $args );
+			}
 		}
 
 		$string = trim( $string );
@@ -84,15 +86,16 @@
 		// Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
 		$string = wp_kses( $string, array(
 			'a' => array(
-				'href' => true
+				'href' => true,
 			),
 			'br' => true,
 			'em' => true,
 			'strong' => true,
 		) );
 
-		if ( empty( $string ) )
+		if ( empty( $string ) ) {
 			return;
+		}
 
 		$this->messages[] = $string;
 	}
@@ -109,7 +112,8 @@
 	 */
 	public function footer() {
 		$output = ob_get_clean();
-		if ( ! empty( $output ) )
+		if ( ! empty( $output ) ) {
 			$this->feedback( $output );
+		}
 	}
 }
Index: src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php	(working copy)
@@ -20,23 +20,23 @@
 
 	public function add_strings() {
 		parent::add_strings();
-		$this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
+		$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)' );
 	}
 
 	/**
 	 *
 	 * @param string $title
 	 */
-	public function before($title = '') {
-		parent::before($this->plugin_info['Title']);
+	public function before( $title = '' ) {
+		parent::before( $this->plugin_info['Title'] );
 	}
 
 	/**
 	 *
 	 * @param string $title
 	 */
-	public function after($title = '') {
-		parent::after($this->plugin_info['Title']);
+	public function after( $title = '' ) {
+		parent::after( $this->plugin_info['Title'] );
 		$this->decrement_update_count( 'plugin' );
 	}
 
@@ -45,12 +45,13 @@
 	 */
 	public function bulk_footer() {
 		parent::bulk_footer();
-		$update_actions =  array(
+		$update_actions = array(
 			'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
-			'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
+			'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
 		);
-		if ( ! current_user_can( 'activate_plugins' ) )
+		if ( ! current_user_can( 'activate_plugins' ) ) {
 			unset( $update_actions['plugins_page'] );
+		}
 
 		/**
 		 * Filters the list of action links available following bulk plugin updates.
@@ -62,7 +63,8 @@
 		 */
 		$update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
 
-		if ( ! empty($update_actions) )
-			$this->feedback(implode(' | ', (array)$update_actions));
+		if ( ! empty( $update_actions ) ) {
+			$this->feedback( implode( ' | ', (array) $update_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-bulk-theme-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-bulk-theme-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-bulk-theme-upgrader-skin.php	(working copy)
@@ -20,23 +20,23 @@
 
 	public function add_strings() {
 		parent::add_strings();
-		$this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
+		$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
 	}
 
 	/**
 	 *
 	 * @param string $title
 	 */
-	public function before($title = '') {
-		parent::before( $this->theme_info->display('Name') );
+	public function before( $title = '' ) {
+		parent::before( $this->theme_info->display( 'Name' ) );
 	}
 
 	/**
 	 *
 	 * @param string $title
 	 */
-	public function after($title = '') {
-		parent::after( $this->theme_info->display('Name') );
+	public function after( $title = '' ) {
+		parent::after( $this->theme_info->display( 'Name' ) );
 		$this->decrement_update_count( 'theme' );
 	}
 
@@ -45,12 +45,13 @@
 	 */
 	public function bulk_footer() {
 		parent::bulk_footer();
-		$update_actions =  array(
+		$update_actions = array(
 			'themes_page' => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
-			'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
+			'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
 		);
-		if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) )
+		if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
 			unset( $update_actions['themes_page'] );
+		}
 
 		/**
 		 * Filters the list of action links available following bulk theme updates.
@@ -62,7 +63,8 @@
 		 */
 		$update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
 
-		if ( ! empty($update_actions) )
-			$this->feedback(implode(' | ', (array)$update_actions));
+		if ( ! empty( $update_actions ) ) {
+			$this->feedback( implode( ' | ', (array) $update_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-bulk-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-bulk-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-bulk-upgrader-skin.php	(working copy)
@@ -26,49 +26,54 @@
 	 *
 	 * @param array $args
 	 */
-	public function __construct($args = array()) {
-		$defaults = array( 'url' => '', 'nonce' => '' );
-		$args = wp_parse_args($args, $defaults);
+	public function __construct( $args = array() ) {
+		$defaults = array(
+			'url' => '',
+			'nonce' => '',
+		);
+		$args = wp_parse_args( $args, $defaults );
 
-		parent::__construct($args);
+		parent::__construct( $args );
 	}
 
 	/**
 	 * @access public
 	 */
 	public function add_strings() {
-		$this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
+		$this->upgrader->strings['skin_upgrade_start'] = __( 'The update process is starting. This process may take a while on some hosts, so please be patient.' );
 		/* translators: 1: Title of an update, 2: Error message */
-		$this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
+		$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while updating %1$s: %2$s' );
 		/* translators: 1: Title of an update */
-		$this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
+		$this->upgrader->strings['skin_update_failed'] = __( 'The update of %1$s failed.' );
 		/* translators: 1: Title of an update */
 		$this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' );
-		$this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
+		$this->upgrader->strings['skin_upgrade_end'] = __( 'All updates have been completed.' );
 	}
 
 	/**
 	 * @param string $string
 	 */
-	public function feedback($string) {
-		if ( isset( $this->upgrader->strings[$string] ) )
-			$string = $this->upgrader->strings[$string];
+	public function feedback( $string ) {
+		if ( isset( $this->upgrader->strings[ $string ] ) ) {
+			$string = $this->upgrader->strings[ $string ];
+		}
 
-		if ( strpos($string, '%') !== false ) {
+		if ( strpos( $string, '%' ) !== false ) {
 			$args = func_get_args();
-			$args = array_splice($args, 1);
+			$args = array_splice( $args, 1 );
 			if ( $args ) {
 				$args = array_map( 'strip_tags', $args );
 				$args = array_map( 'esc_html', $args );
-				$string = vsprintf($string, $args);
+				$string = vsprintf( $string, $args );
 			}
 		}
-		if ( empty($string) )
+		if ( empty( $string ) ) {
 			return;
-		if ( $this->in_loop )
+		}
+		if ( $this->in_loop ) {
 			echo "$string<br />\n";
-		else
-			echo "<p>$string</p>\n";
+		} else { echo "<p>$string</p>\n";
+		}
 	}
 
 	/**
@@ -89,47 +94,48 @@
 	 *
 	 * @param string|WP_Error $error
 	 */
-	public function error($error) {
-		if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
-			$this->error = $this->upgrader->strings[$error];
+	public function error( $error ) {
+		if ( is_string( $error ) && isset( $this->upgrader->strings[ $error ] ) ) {
+			$this->error = $this->upgrader->strings[ $error ];
+		}
 
-		if ( is_wp_error($error) ) {
+		if ( is_wp_error( $error ) ) {
 			$messages = array();
 			foreach ( $error->get_error_messages() as $emessage ) {
-				if ( $error->get_error_data() && is_string( $error->get_error_data() ) )
+				if ( $error->get_error_data() && is_string( $error->get_error_data() ) ) {
 					$messages[] = $emessage . ' ' . esc_html( strip_tags( $error->get_error_data() ) );
-				else
-					$messages[] = $emessage;
+				} else { $messages[] = $emessage;
+				}
 			}
-			$this->error = implode(', ', $messages);
+			$this->error = implode( ', ', $messages );
 		}
-		echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
+		echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
 	}
 
 	/**
 	 * @access public
 	 */
 	public function bulk_header() {
-		$this->feedback('skin_upgrade_start');
+		$this->feedback( 'skin_upgrade_start' );
 	}
 
 	/**
 	 * @access public
 	 */
 	public function bulk_footer() {
-		$this->feedback('skin_upgrade_end');
+		$this->feedback( 'skin_upgrade_end' );
 	}
 
 	/**
 	 *
 	 * @param string $title
 	 */
-	public function before($title = '') {
+	public function before( $title = '' ) {
 		$this->in_loop = true;
 		printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
-		echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').css("display", "inline-block");</script>';
+		echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').css("display", "inline-block");</script>';
 		// This progress messages div gets moved via JavaScript when clicking on "Show details.".
-		echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>';
+		echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr( $this->upgrader->update_current ) . '"><p>';
 		$this->flush_output();
 	}
 
@@ -137,16 +143,16 @@
 	 *
 	 * @param string $title
 	 */
-	public function after($title = '') {
+	public function after( $title = '' ) {
 		echo '</p></div>';
 		if ( $this->error || ! $this->result ) {
 			if ( $this->error ) {
-				echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
+				echo '<div class="error"><p>' . sprintf( $this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
 			} else {
-				echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '</p></div>';
+				echo '<div class="error"><p>' . sprintf( $this->upgrader->strings['skin_update_failed'], $title ) . '</p></div>';
 			}
 
-			echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
+			echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>';
 		}
 		if ( $this->result && ! is_wp_error( $this->result ) ) {
 			if ( ! $this->error ) {
@@ -156,7 +162,7 @@
 					'</p></div>';
 			}
 
-			echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
+			echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
 		}
 
 		$this->reset();
Index: src/wp-admin/includes/class-core-upgrader.php
===================================================================
--- src/wp-admin/includes/class-core-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-core-upgrader.php	(working copy)
@@ -27,13 +27,13 @@
 	 * @access public
 	 */
 	public function upgrade_strings() {
-		$this->strings['up_to_date'] = __('WordPress is at the latest version.');
-		$this->strings['locked'] = __('Another update is currently in progress.');
-		$this->strings['no_package'] = __('Update package not available.');
-		$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-		$this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-		$this->strings['copy_failed'] = __('Could not copy files.');
-		$this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' );
+		$this->strings['up_to_date'] = __( 'WordPress is at the latest version.' );
+		$this->strings['locked'] = __( 'Another update is currently in progress.' );
+		$this->strings['no_package'] = __( 'Update package not available.' );
+		$this->strings['downloading_package'] = __( 'Downloading update from <span class="code">%s</span>&#8230;' );
+		$this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
+		$this->strings['copy_failed'] = __( 'Could not copy files.' );
+		$this->strings['copy_failed_space'] = __( 'Could not copy files. You may have run out of disk space.' );
 		$this->strings['start_rollback'] = __( 'Attempting to roll back to previous version.' );
 		$this->strings['rollback_was_required'] = __( 'Due to an error during updating, WordPress has rolled back to your previous version.' );
 	}
@@ -79,21 +79,23 @@
 		$this->upgrade_strings();
 
 		// Is an update available?
-		if ( !isset( $current->response ) || $current->response == 'latest' )
-			return new WP_Error('up_to_date', $this->strings['up_to_date']);
+		if ( ! isset( $current->response ) || $current->response == 'latest' ) {
+			return new WP_Error( 'up_to_date', $this->strings['up_to_date'] );
+		}
 
 		$res = $this->fs_connect( array( ABSPATH, WP_CONTENT_DIR ), $parsed_args['allow_relaxed_file_ownership'] );
 		if ( ! $res || is_wp_error( $res ) ) {
 			return $res;
 		}
 
-		$wp_dir = trailingslashit($wp_filesystem->abspath());
+		$wp_dir = trailingslashit( $wp_filesystem->abspath() );
 
 		$partial = true;
-		if ( $parsed_args['do_rollback'] )
+		if ( $parsed_args['do_rollback'] ) {
 			$partial = false;
-		elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() )
+		} elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() ) {
 			$partial = false;
+		}
 
 		/*
 		 * If partial update is returned from the API, use that, unless we're doing
@@ -101,17 +103,17 @@
 		 * the new_bundled zip. Don't though if the constant is set to skip bundled items.
 		 * If the API returns a no_content zip, go with it. Finally, default to the full zip.
 		 */
-		if ( $parsed_args['do_rollback'] && $current->packages->rollback )
+		if ( $parsed_args['do_rollback'] && $current->packages->rollback ) {
 			$to_download = 'rollback';
-		elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial )
+		} elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial ) {
 			$to_download = 'partial';
-		elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
-			&& ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) )
+		} elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
+			&& ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) {
 			$to_download = 'new_bundled';
-		elseif ( $current->packages->no_content )
+		} elseif ( $current->packages->no_content ) {
 			$to_download = 'no_content';
-		else
-			$to_download = 'full';
+		} else { $to_download = 'full';
+		}
 
 		// Lock to prevent multiple Core Updates occurring
 		$lock = WP_Upgrader::create_lock( 'core_updater', 15 * MINUTE_IN_SECONDS );
@@ -132,12 +134,12 @@
 		}
 
 		// Copy update-core.php from the new version into place.
-		if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
-			$wp_filesystem->delete($working_dir, true);
+		if ( ! $wp_filesystem->copy( $working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true ) ) {
+			$wp_filesystem->delete( $working_dir, true );
 			WP_Upgrader::release_lock( 'core_updater' );
 			return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' );
 		}
-		$wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE);
+		$wp_filesystem->chmod( $wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE );
 
 		require_once( ABSPATH . 'wp-admin/includes/update-core.php' );
 
@@ -158,12 +160,13 @@
 				 * mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
 				 * do_rollback allows for update_core() to trigger a rollback if needed.
 				 */
-				if ( false !== strpos( $error_code, 'do_rollback' ) )
+				if ( false !== strpos( $error_code, 'do_rollback' ) ) {
 					$try_rollback = true;
-				elseif ( false !== strpos( $error_code, '__copy_dir' ) )
+				} elseif ( false !== strpos( $error_code, '__copy_dir' ) ) {
 					$try_rollback = true;
-				elseif ( 'disk_full' === $error_code )
+				} elseif ( 'disk_full' === $error_code ) {
 					$try_rollback = true;
+				}
 			}
 
 			if ( $try_rollback ) {
@@ -173,15 +176,23 @@
 				/** This filter is documented in wp-admin/includes/update-core.php */
 				apply_filters( 'update_feedback', $this->strings['start_rollback'] );
 
-				$rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
+				$rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array(
+					'do_rollback' => true,
+				) ) );
 
 				$original_result = $result;
-				$result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) );
+				$result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array(
+					'update' => $original_result,
+					'rollback' => $rollback_result,
+				) );
 			}
-		}
+		}// End if().
 
 		/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
-		do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );
+		do_action( 'upgrader_process_complete', $this, array(
+			'action' => 'update',
+			'type' => 'core',
+		) );
 
 		// Clear the current updates
 		delete_site_transient( 'update_core' );
@@ -192,7 +203,7 @@
 				'success'          => true,
 				'fs_method'        => $wp_filesystem->method,
 				'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
-				'fs_method_direct' => !empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
+				'fs_method_direct' => ! empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
 				'time_taken'       => time() - $start_time,
 				'reported'         => $wp_version,
 				'attempted'        => $current->version,
@@ -238,7 +249,7 @@
 	public static function should_update_to_version( $offered_ver ) {
 		include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z
 
-		$current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version  ), 0, 2 ) ); // x.y
+		$current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y
 		$new_branch     = implode( '.', array_slice( preg_split( '/[.-]/', $offered_ver ), 0, 2 ) ); // x.y
 		$current_is_development_version = (bool) strpos( $wp_version, '-' );
 
@@ -263,28 +274,33 @@
 		}
 
 		// 1: If we're already on that version, not much point in updating?
-		if ( $offered_ver == $wp_version )
+		if ( $offered_ver == $wp_version ) {
 			return false;
+		}
 
 		// 2: If we're running a newer version, that's a nope
-		if ( version_compare( $wp_version, $offered_ver, '>' ) )
+		if ( version_compare( $wp_version, $offered_ver, '>' ) ) {
 			return false;
+		}
 
 		$failure_data = get_site_option( 'auto_core_update_failed' );
 		if ( $failure_data ) {
 			// If this was a critical update failure, cannot update.
-			if ( ! empty( $failure_data['critical'] ) )
+			if ( ! empty( $failure_data['critical'] ) ) {
 				return false;
+			}
 
 			// Don't claim we can update on update-core.php if we have a non-critical failure logged.
-			if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) )
+			if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) ) {
 				return false;
+			}
 
 			// Cannot update if we're retrying the same A to B update that caused a non-critical failure.
 			// Some non-critical failures do allow retries, like download_failed.
 			// 3.7.1 => 3.7.2 resulted in files_not_writable, if we are still on 3.7.1 and still trying to update to 3.7.2.
-			if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] )
+			if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] ) {
 				return false;
+			}
 		}
 
 		// 3: 3.7-alpha-25000 -> 3.7-alpha-25678 -> 3.7-beta1 -> 3.7-beta2
@@ -298,9 +314,9 @@
 			 * @param bool $upgrade_dev Whether to enable automatic updates for
 			 *                          development versions.
 			 */
-			if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) )
+			if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) ) {
 				return false;
-			// Else fall through to minor + major branches below.
+			}
 		}
 
 		// 4: Minor In-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4)
@@ -349,15 +365,18 @@
 
 		$checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
 
-		if ( ! is_array( $checksums ) )
+		if ( ! is_array( $checksums ) ) {
 			return false;
+		}
 
 		foreach ( $checksums as $file => $checksum ) {
 			// Skip files which get updated
-			if ( 'wp-content' == substr( $file, 0, 10 ) )
+			if ( 'wp-content' == substr( $file, 0, 10 ) ) {
 				continue;
-			if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum )
+			}
+			if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum ) {
 				return false;
+			}
 		}
 
 		return true;
Index: src/wp-admin/includes/class-file-upload-upgrader.php
===================================================================
--- src/wp-admin/includes/class-file-upload-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-file-upload-upgrader.php	(working copy)
@@ -56,18 +56,23 @@
 	 */
 	public function __construct( $form, $urlholder ) {
 
-		if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
-			wp_die(__('Please select a file'));
+		if ( empty( $_FILES[ $form ]['name'] ) && empty( $_GET[ $urlholder ] ) ) {
+			wp_die( __( 'Please select a file' ) );
+		}
 
 		//Handle a newly uploaded file, Else assume it's already been uploaded
-		if ( ! empty($_FILES) ) {
-			$overrides = array( 'test_form' => false, 'test_type' => false );
-			$file = wp_handle_upload( $_FILES[$form], $overrides );
+		if ( ! empty( $_FILES ) ) {
+			$overrides = array(
+				'test_form' => false,
+				'test_type' => false,
+			);
+			$file = wp_handle_upload( $_FILES[ $form ], $overrides );
 
-			if ( isset( $file['error'] ) )
+			if ( isset( $file['error'] ) ) {
 				wp_die( $file['error'] );
+			}
 
-			$this->filename = $_FILES[$form]['name'];
+			$this->filename = $_FILES[ $form ]['name'];
 			$this->package = $file['file'];
 
 			// Construct the object array
@@ -77,7 +82,7 @@
 				'post_mime_type' => $file['type'],
 				'guid' => $file['url'],
 				'context' => 'upgrader',
-				'post_status' => 'private'
+				'post_status' => 'private',
 			);
 
 			// Save the data.
@@ -86,19 +91,21 @@
 			// Schedule a cleanup for 2 hours from now in case of failed install.
 			wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
 
-		} elseif ( is_numeric( $_GET[$urlholder] ) ) {
+		} elseif ( is_numeric( $_GET[ $urlholder ] ) ) {
 			// Numeric Package = previously uploaded file, see above.
-			$this->id = (int) $_GET[$urlholder];
+			$this->id = (int) $_GET[ $urlholder ];
 			$attachment = get_post( $this->id );
-			if ( empty($attachment) )
-				wp_die(__('Please select a file'));
+			if ( empty( $attachment ) ) {
+				wp_die( __( 'Please select a file' ) );
+			}
 
 			$this->filename = $attachment->post_title;
 			$this->package = get_attached_file( $attachment->ID );
 		} else {
 			// Else, It's set to something, Back compat for plugins using the old (pre-3.3) File_Uploader handler.
-			if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
+			if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) {
 				wp_die( $uploads['error'] );
+			}
 
 			$this->filename = sanitize_file_name( $_GET[ $urlholder ] );
 			$this->package = $uploads['basedir'] . '/' . $this->filename;
@@ -106,7 +113,7 @@
 			if ( 0 !== strpos( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
 				wp_die( __( 'Please select a file' ) );
 			}
-		}
+		}// End if().
 	}
 
 	/**
@@ -118,11 +125,12 @@
 	 * @return bool Whether the cleanup was successful.
 	 */
 	public function cleanup() {
-		if ( $this->id )
+		if ( $this->id ) {
 			wp_delete_attachment( $this->id );
 
-		elseif ( file_exists( $this->package ) )
+		} elseif ( file_exists( $this->package ) ) {
 			return @unlink( $this->package );
+		}
 
 		return true;
 	}
Index: src/wp-admin/includes/class-language-pack-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-language-pack-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-language-pack-upgrader-skin.php	(working copy)
@@ -26,7 +26,12 @@
 	 * @param array $args
 	 */
 	public function __construct( $args = array() ) {
-		$defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
+		$defaults = array(
+			'url' => '',
+			'nonce' => '',
+			'title' => __( 'Update Translations' ),
+			'skip_header_footer' => false,
+		);
 		$args = wp_parse_args( $args, $defaults );
 		if ( $args['skip_header_footer'] ) {
 			$this->done_header = true;
@@ -81,7 +86,8 @@
 		 */
 		$update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );
 
-		if ( $update_actions && $this->display_footer_actions )
+		if ( $update_actions && $this->display_footer_actions ) {
 			$this->feedback( implode( ' | ', $update_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-language-pack-upgrader.php
===================================================================
--- src/wp-admin/includes/class-language-pack-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-language-pack-upgrader.php	(working copy)
@@ -176,8 +176,9 @@
 		$this->init();
 		$this->upgrade_strings();
 
-		if ( ! $language_updates )
+		if ( ! $language_updates ) {
 			$language_updates = wp_get_translation_updates();
+		}
 
 		if ( empty( $language_updates ) ) {
 			$this->skin->header();
@@ -188,8 +189,9 @@
 			return true;
 		}
 
-		if ( 'upgrader_process_complete' == current_filter() )
+		if ( 'upgrader_process_complete' == current_filter() ) {
 			$this->skin->feedback( 'starting_upgrade' );
+		}
 
 		// Remove any existing upgrade filters from the plugin/theme upgraders #WP29425 & #WP29230
 		remove_all_filters( 'upgrader_pre_install' );
@@ -218,9 +220,11 @@
 		 * as we then may need to create a /plugins or /themes directory inside of it.
 		 */
 		$remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR );
-		if ( ! $wp_filesystem->exists( $remote_destination ) )
-			if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) )
+		if ( ! $wp_filesystem->exists( $remote_destination ) ) {
+			if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
 				return new WP_Error( 'mkdir_failed_lang_dir', $this->strings['mkdir_failed'], $remote_destination );
+			}
+		}
 
 		$language_updates_results = array();
 
@@ -229,10 +233,11 @@
 			$this->skin->language_update = $language_update;
 
 			$destination = WP_LANG_DIR;
-			if ( 'plugin' == $language_update->type )
+			if ( 'plugin' == $language_update->type ) {
 				$destination .= '/plugins';
-			elseif ( 'theme' == $language_update->type )
+			} elseif ( 'theme' == $language_update->type ) {
 				$destination .= '/themes';
+			}
 
 			$this->update_current++;
 
@@ -246,7 +251,7 @@
 				'hook_extra' => array(
 					'language_update_type' => $language_update->type,
 					'language_update' => $language_update,
-				)
+				),
 			);
 
 			$result = $this->run( $options );
@@ -264,7 +269,7 @@
 				'slug'     => isset( $language_update->slug ) ? $language_update->slug : 'default',
 				'version'  => $language_update->version,
 			);
-		}
+		}// End foreach().
 
 		// Remove upgrade hooks which are not required for translation updates.
 		remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
@@ -277,7 +282,7 @@
 			'action'       => 'update',
 			'type'         => 'translation',
 			'bulk'         => true,
-			'translations' => $language_updates_results
+			'translations' => $language_updates_results,
 		) );
 
 		// Re-add upgrade hooks.
@@ -317,8 +322,9 @@
 	public function check_package( $source, $remote_source ) {
 		global $wp_filesystem;
 
-		if ( is_wp_error( $source ) )
+		if ( is_wp_error( $source ) ) {
 			return $source;
+		}
 
 		// Check that the folder contains a valid language.
 		$files = $wp_filesystem->dirlist( $remote_source );
@@ -326,10 +332,11 @@
 		// Check to see if a .po and .mo exist in the folder.
 		$po = $mo = false;
 		foreach ( (array) $files as $file => $filedata ) {
-			if ( '.po' == substr( $file, -3 ) )
+			if ( '.po' == substr( $file, -3 ) ) {
 				$po = true;
-			elseif ( '.mo' == substr( $file, -3 ) )
+			} elseif ( '.mo' == substr( $file, -3 ) ) {
 				$mo = true;
+			}
 		}
 
 		if ( ! $mo || ! $po ) {
@@ -361,14 +368,16 @@
 
 			case 'theme':
 				$theme = wp_get_theme( $update->slug );
-				if ( $theme->exists() )
+				if ( $theme->exists() ) {
 					return $theme->Get( 'Name' );
+				}
 				break;
 			case 'plugin':
 				$plugin_data = get_plugins( '/' . $update->slug );
 				$plugin_data = reset( $plugin_data );
-				if ( $plugin_data )
+				if ( $plugin_data ) {
 					return $plugin_data['Name'];
+				}
 				break;
 		}
 		return '';
Index: src/wp-admin/includes/class-plugin-installer-skin.php
===================================================================
--- src/wp-admin/includes/class-plugin-installer-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-plugin-installer-skin.php	(working copy)
@@ -23,22 +23,29 @@
 	 *
 	 * @param array $args
 	 */
-	public function __construct($args = array()) {
-		$defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
-		$args = wp_parse_args($args, $defaults);
+	public function __construct( $args = array() ) {
+		$defaults = array(
+			'type' => 'web',
+			'url' => '',
+			'plugin' => '',
+			'nonce' => '',
+			'title' => '',
+		);
+		$args = wp_parse_args( $args, $defaults );
 
 		$this->type = $args['type'];
-		$this->api = isset($args['api']) ? $args['api'] : array();
+		$this->api = isset( $args['api'] ) ? $args['api'] : array();
 
-		parent::__construct($args);
+		parent::__construct( $args );
 	}
 
 	/**
 	 * @access public
 	 */
 	public function before() {
-		if ( !empty($this->api) )
-			$this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin <strong>%s %s</strong>.'), $this->api->name, $this->api->version);
+		if ( ! empty( $this->api ) ) {
+			$this->upgrader->strings['process_success'] = sprintf( __( 'Successfully installed the plugin <strong>%1$s %2$s</strong>.' ), $this->api->name, $this->api->version );
+		}
 	}
 
 	/**
@@ -49,12 +56,12 @@
 
 		$install_actions = array();
 
-		$from = isset($_GET['from']) ? wp_unslash( $_GET['from'] ) : 'plugins';
+		$from = isset( $_GET['from'] ) ? wp_unslash( $_GET['from'] ) : 'plugins';
 
-		if ( 'import' == $from )
+		if ( 'import' == $from ) {
 			$install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;from=import&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin &amp; Run Importer' ) . '</a>';
-		else
-			$install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>';
+		} else { $install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>';
+		}
 
 		if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
 			$install_actions['network_activate'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Network Activate' ) . '</a>';
@@ -71,7 +78,7 @@
 			$install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>';
 		}
 
-		if ( ! $this->result || is_wp_error($this->result) ) {
+		if ( ! $this->result || is_wp_error( $this->result ) ) {
 			unset( $install_actions['activate_plugin'], $install_actions['network_activate'] );
 		} elseif ( ! current_user_can( 'activate_plugins' ) ) {
 			unset( $install_actions['activate_plugin'] );
Index: src/wp-admin/includes/class-plugin-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-plugin-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-plugin-upgrader-skin.php	(working copy)
@@ -25,15 +25,20 @@
 	 * @param array $args
 	 */
 	public function __construct( $args = array() ) {
-		$defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
-		$args = wp_parse_args($args, $defaults);
+		$defaults = array(
+			'url' => '',
+			'plugin' => '',
+			'nonce' => '',
+			'title' => __( 'Update Plugin' ),
+		);
+		$args = wp_parse_args( $args, $defaults );
 
 		$this->plugin = $args['plugin'];
 
 		$this->plugin_active = is_plugin_active( $this->plugin );
 		$this->plugin_network_active = is_plugin_active_for_network( $this->plugin );
 
-		parent::__construct($args);
+		parent::__construct( $args );
 	}
 
 	/**
@@ -41,19 +46,20 @@
 	 */
 	public function after() {
 		$this->plugin = $this->upgrader->plugin_info();
-		if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
+		if ( ! empty( $this->plugin ) && ! is_wp_error( $this->result ) && $this->plugin_active ) {
 			// Currently used only when JS is off for a single plugin update?
 			echo '<iframe title="' . esc_attr__( 'Update progress' ) . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) . '"></iframe>';
 		}
 
 		$this->decrement_update_count( 'plugin' );
 
-		$update_actions =  array(
-			'activate_plugin' => '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>',
-			'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>'
+		$update_actions = array(
+			'activate_plugin' => '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>',
+			'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
 		);
-		if ( $this->plugin_active || ! $this->result || is_wp_error( $this->result ) || ! current_user_can( 'activate_plugins' ) )
+		if ( $this->plugin_active || ! $this->result || is_wp_error( $this->result ) || ! current_user_can( 'activate_plugins' ) ) {
 			unset( $update_actions['activate_plugin'] );
+		}
 
 		/**
 		 * Filters the list of action links available following a single plugin update.
@@ -65,7 +71,8 @@
 		 */
 		$update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );
 
-		if ( ! empty($update_actions) )
-			$this->feedback(implode(' | ', (array)$update_actions));
+		if ( ! empty( $update_actions ) ) {
+			$this->feedback( implode( ' | ', (array) $update_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-plugin-upgrader.php
===================================================================
--- src/wp-admin/includes/class-plugin-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-plugin-upgrader.php	(working copy)
@@ -47,15 +47,15 @@
 	 * @access public
 	 */
 	public function upgrade_strings() {
-		$this->strings['up_to_date'] = __('The plugin is at the latest version.');
-		$this->strings['no_package'] = __('Update package not available.');
-		$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-		$this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-		$this->strings['remove_old'] = __('Removing the old version of the plugin&#8230;');
-		$this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
-		$this->strings['process_failed'] = __('Plugin update failed.');
-		$this->strings['process_success'] = __('Plugin updated successfully.');
-		$this->strings['process_bulk_success'] = __('Plugins updated successfully.');
+		$this->strings['up_to_date'] = __( 'The plugin is at the latest version.' );
+		$this->strings['no_package'] = __( 'Update package not available.' );
+		$this->strings['downloading_package'] = __( 'Downloading update from <span class="code">%s</span>&#8230;' );
+		$this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
+		$this->strings['remove_old'] = __( 'Removing the old version of the plugin&#8230;' );
+		$this->strings['remove_old_failed'] = __( 'Could not remove the old plugin.' );
+		$this->strings['process_failed'] = __( 'Plugin update failed.' );
+		$this->strings['process_success'] = __( 'Plugin updated successfully.' );
+		$this->strings['process_bulk_success'] = __( 'Plugins updated successfully.' );
 	}
 
 	/**
@@ -65,13 +65,13 @@
 	 * @access public
 	 */
 	public function install_strings() {
-		$this->strings['no_package'] = __('Install package not available.');
-		$this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
-		$this->strings['unpack_package'] = __('Unpacking the package&#8230;');
-		$this->strings['installing_package'] = __('Installing the plugin&#8230;');
-		$this->strings['no_files'] = __('The plugin contains no files.');
-		$this->strings['process_failed'] = __('Plugin install failed.');
-		$this->strings['process_success'] = __('Plugin installed successfully.');
+		$this->strings['no_package'] = __( 'Install package not available.' );
+		$this->strings['downloading_package'] = __( 'Downloading install package from <span class="code">%s</span>&#8230;' );
+		$this->strings['unpack_package'] = __( 'Unpacking the package&#8230;' );
+		$this->strings['installing_package'] = __( 'Installing the plugin&#8230;' );
+		$this->strings['no_files'] = __( 'The plugin contains no files.' );
+		$this->strings['process_failed'] = __( 'Plugin install failed.' );
+		$this->strings['process_success'] = __( 'Plugin installed successfully.' );
 	}
 
 	/**
@@ -100,7 +100,7 @@
 		$this->init();
 		$this->install_strings();
 
-		add_filter('upgrader_source_selection', array($this, 'check_package') );
+		add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
 		if ( $parsed_args['clear_update_cache'] ) {
 			// Clear cache so wp_update_plugins() knows about the new plugin.
 			add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
@@ -114,14 +114,15 @@
 			'hook_extra' => array(
 				'type' => 'plugin',
 				'action' => 'install',
-			)
+			),
 		) );
 
 		remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
-		remove_filter('upgrader_source_selection', array($this, 'check_package') );
+		remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
 
-		if ( ! $this->result || is_wp_error($this->result) )
+		if ( ! $this->result || is_wp_error( $this->result ) ) {
 			return $this->result;
+		}
 
 		// Force refresh of plugin update information
 		wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
@@ -156,10 +157,10 @@
 		$this->upgrade_strings();
 
 		$current = get_site_transient( 'update_plugins' );
-		if ( !isset( $current->response[ $plugin ] ) ) {
+		if ( ! isset( $current->response[ $plugin ] ) ) {
 			$this->skin->before();
-			$this->skin->set_result(false);
-			$this->skin->error('up_to_date');
+			$this->skin->set_result( false );
+			$this->skin->error( 'up_to_date' );
 			$this->skin->after();
 			return false;
 		}
@@ -167,8 +168,8 @@
 		// Get the URL to the zip file
 		$r = $current->response[ $plugin ];
 
-		add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2);
-		add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
+		add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 );
+		add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
 		//'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
 		if ( $parsed_args['clear_update_cache'] ) {
 			// Clear cache so wp_update_plugins() knows about the new plugin.
@@ -189,11 +190,12 @@
 
 		// Cleanup our hooks, in case something else does a upgrade on this connection.
 		remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
-		remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));
-		remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
+		remove_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ) );
+		remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) );
 
-		if ( ! $this->result || is_wp_error($this->result) )
+		if ( ! $this->result || is_wp_error( $this->result ) ) {
 			return $this->result;
+		}
 
 		// Force refresh of plugin update information
 		wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
@@ -230,12 +232,12 @@
 
 		$current = get_site_transient( 'update_plugins' );
 
-		add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
+		add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
 
 		$this->skin->header();
 
 		// Connect to the Filesystem first.
-		$res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) );
+		$res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
 		if ( ! $res ) {
 			$this->skin->footer();
 			return false;
@@ -250,32 +252,34 @@
 		 * @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
 		 */
 		$maintenance = ( is_multisite() && ! empty( $plugins ) );
-		foreach ( $plugins as $plugin )
-			$maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) );
-		if ( $maintenance )
-			$this->maintenance_mode(true);
+		foreach ( $plugins as $plugin ) {
+			$maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin ] ) );
+		}
+		if ( $maintenance ) {
+			$this->maintenance_mode( true );
+		}
 
 		$results = array();
 
-		$this->update_count = count($plugins);
+		$this->update_count = count( $plugins );
 		$this->update_current = 0;
 		foreach ( $plugins as $plugin ) {
 			$this->update_current++;
-			$this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true);
+			$this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true );
 
-			if ( !isset( $current->response[ $plugin ] ) ) {
-				$this->skin->set_result('up_to_date');
+			if ( ! isset( $current->response[ $plugin ] ) ) {
+				$this->skin->set_result( 'up_to_date' );
 				$this->skin->before();
-				$this->skin->feedback('up_to_date');
+				$this->skin->feedback( 'up_to_date' );
 				$this->skin->after();
-				$results[$plugin] = true;
+				$results[ $plugin ] = true;
 				continue;
 			}
 
 			// Get the URL to the zip file.
 			$r = $current->response[ $plugin ];
 
-			$this->skin->plugin_active = is_plugin_active($plugin);
+			$this->skin->plugin_active = is_plugin_active( $plugin );
 
 			$result = $this->run( array(
 				'package' => $r->package,
@@ -284,18 +288,19 @@
 				'clear_working' => true,
 				'is_multi' => true,
 				'hook_extra' => array(
-					'plugin' => $plugin
-				)
+					'plugin' => $plugin,
+				),
 			) );
 
-			$results[$plugin] = $this->result;
+			$results[ $plugin ] = $this->result;
 
 			// Prevent credentials auth screen from displaying multiple times
-			if ( false === $result )
+			if ( false === $result ) {
 				break;
-		} //end foreach $plugins
+			}
+		} // End foreach().
 
-		$this->maintenance_mode(false);
+		$this->maintenance_mode( false );
 
 		// Force refresh of plugin update information.
 		wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
@@ -313,7 +318,7 @@
 		$this->skin->footer();
 
 		// Cleanup our hooks, in case something else does a upgrade on this connection.
-		remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
+		remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) );
 
 		return $results;
 	}
@@ -333,15 +338,17 @@
 	 * @return string|WP_Error The source as passed, or a WP_Error object
 	 *                         if no plugins were found.
 	 */
-	public function check_package($source) {
+	public function check_package( $source ) {
 		global $wp_filesystem;
 
-		if ( is_wp_error($source) )
+		if ( is_wp_error( $source ) ) {
 			return $source;
+		}
 
-		$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
-		if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
+		$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
+		if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
 			return $source;
+		}
 
 		// Check the folder contains at least 1 valid plugin.
 		$plugins_found = false;
@@ -356,8 +363,9 @@
 			}
 		}
 
-		if ( ! $plugins_found )
+		if ( ! $plugins_found ) {
 			return new WP_Error( 'incompatible_archive_no_plugins', $this->strings['incompatible_archive'], __( 'No valid plugins were found.' ) );
+		}
 
 		return $source;
 	}
@@ -373,16 +381,19 @@
 	 * @return string|false The full path to the main plugin file, or false.
 	 */
 	public function plugin_info() {
-		if ( ! is_array($this->result) )
+		if ( ! is_array( $this->result ) ) {
 			return false;
-		if ( empty($this->result['destination_name']) )
+		}
+		if ( empty( $this->result['destination_name'] ) ) {
 			return false;
+		}
 
-		$plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash
-		if ( empty($plugin) )
+		$plugin = get_plugins( '/' . $this->result['destination_name'] ); //Ensure to pass with leading slash
+		if ( empty( $plugin ) ) {
 			return false;
+		}
 
-		$pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
+		$pluginfiles = array_keys( $plugin ); //Assume the requested plugin is the first in the list
 
 		return $this->result['destination_name'] . '/' . $pluginfiles[0];
 	}
@@ -400,22 +411,25 @@
 	 * @param array          $plugin Plugin package arguments.
 	 * @return bool|WP_Error The passed in $return param or WP_Error.
 	 */
-	public function deactivate_plugin_before_upgrade($return, $plugin) {
+	public function deactivate_plugin_before_upgrade( $return, $plugin ) {
 
-		if ( is_wp_error($return) ) //Bypass.
+		if ( is_wp_error( $return ) ) { //Bypass.
 			return $return;
+		}
 
 		// When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
-		if ( wp_doing_cron() )
+		if ( wp_doing_cron() ) {
 			return $return;
+		}
 
-		$plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
-		if ( empty($plugin) )
-			return new WP_Error('bad_request', $this->strings['bad_request']);
+		$plugin = isset( $plugin['plugin'] ) ? $plugin['plugin'] : '';
+		if ( empty( $plugin ) ) {
+			return new WP_Error( 'bad_request', $this->strings['bad_request'] );
+		}
 
-		if ( is_plugin_active($plugin) ) {
+		if ( is_plugin_active( $plugin ) ) {
 			//Deactivate the plugin silently, Prevent deactivation hooks from running.
-			deactivate_plugins($plugin, true);
+			deactivate_plugins( $plugin, true );
 		}
 
 		return $return;
@@ -431,37 +445,41 @@
 	 * @access public
 	 *
 	 * @global WP_Filesystem_Base $wp_filesystem Subclass
-     *
+	 *
 	 * @param bool|WP_Error $removed
 	 * @param string        $local_destination
 	 * @param string        $remote_destination
 	 * @param array         $plugin
 	 * @return WP_Error|bool
 	 */
-	public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
+	public function delete_old_plugin( $removed, $local_destination, $remote_destination, $plugin ) {
 		global $wp_filesystem;
 
-		if ( is_wp_error($removed) )
+		if ( is_wp_error( $removed ) ) {
 			return $removed; //Pass errors through.
+		}
 
-		$plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
-		if ( empty($plugin) )
-			return new WP_Error('bad_request', $this->strings['bad_request']);
+		$plugin = isset( $plugin['plugin'] ) ? $plugin['plugin'] : '';
+		if ( empty( $plugin ) ) {
+			return new WP_Error( 'bad_request', $this->strings['bad_request'] );
+		}
 
 		$plugins_dir = $wp_filesystem->wp_plugins_dir();
-		$this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
+		$this_plugin_dir = trailingslashit( dirname( $plugins_dir . $plugin ) );
 
-		if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If it's already vanished.
+		if ( ! $wp_filesystem->exists( $this_plugin_dir ) ) { //If it's already vanished.
 			return $removed;
+		}
 
 		// If plugin is in its own directory, recursively delete the directory.
-		if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder
-			$deleted = $wp_filesystem->delete($this_plugin_dir, true);
-		else
-			$deleted = $wp_filesystem->delete($plugins_dir . $plugin);
+		if ( strpos( $plugin, '/' ) && $this_plugin_dir != $plugins_dir ) { //base check on if plugin includes directory separator AND that it's not the root plugin folder
+			$deleted = $wp_filesystem->delete( $this_plugin_dir, true );
+		} else { $deleted = $wp_filesystem->delete( $plugins_dir . $plugin );
+		}
 
-		if ( ! $deleted )
-			return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
+		if ( ! $deleted ) {
+			return new WP_Error( 'remove_old_failed', $this->strings['remove_old_failed'] );
+		}
 
 		return true;
 	}
Index: src/wp-admin/includes/class-theme-installer-skin.php
===================================================================
--- src/wp-admin/includes/class-theme-installer-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-theme-installer-skin.php	(working copy)
@@ -23,36 +23,39 @@
 	 *
 	 * @param array $args
 	 */
-	public function __construct($args = array()) {
+	public function __construct( $args = array() ) {
 		$defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
-		$args = wp_parse_args($args, $defaults);
+		$args = wp_parse_args( $args, $defaults );
 
 		$this->type = $args['type'];
-		$this->api = isset($args['api']) ? $args['api'] : array();
+		$this->api = isset( $args['api'] ) ? $args['api'] : array();
 
-		parent::__construct($args);
+		parent::__construct( $args );
 	}
 
 	/**
 	 * @access public
 	 */
 	public function before() {
-		if ( !empty($this->api) )
-			$this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version);
+		if ( ! empty( $this->api ) ) {
+			$this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version );
+		}
 	}
 
 	/**
 	 * @access public
 	 */
 	public function after() {
-		if ( empty($this->upgrader->result['destination_name']) )
+		if ( empty( $this->upgrader->result['destination_name'] ) ) {
 			return;
+		}
 
 		$theme_info = $this->upgrader->theme_info();
-		if ( empty( $theme_info ) )
+		if ( empty( $theme_info ) ) {
 			return;
+		}
 
-		$name       = $theme_info->display('Name');
+		$name       = $theme_info->display( 'Name' );
 		$stylesheet = $this->upgrader->result['destination_name'];
 		$template   = $theme_info->get_template();
 
@@ -60,7 +63,7 @@
 			'action'     => 'activate',
 			'template'   => urlencode( $template ),
 			'stylesheet' => urlencode( $stylesheet ),
-		), admin_url('themes.php') );
+		), admin_url( 'themes.php' ) );
 		$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
 
 		$install_actions = array();
@@ -70,16 +73,19 @@
 		}
 		$install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
 
-		if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
+		if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) {
 			$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
+		}
 
-		if ( $this->type == 'web' )
+		if ( $this->type == 'web' ) {
 			$install_actions['themes_page'] = '<a href="' . self_admin_url( 'theme-install.php' ) . '" target="_parent">' . __( 'Return to Theme Installer' ) . '</a>';
-		elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) )
+		} elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) ) {
 			$install_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
+		}
 
-		if ( ! $this->result || is_wp_error($this->result) || is_network_admin() || ! current_user_can( 'switch_themes' ) )
+		if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() || ! current_user_can( 'switch_themes' ) ) {
 			unset( $install_actions['activate'], $install_actions['preview'] );
+		}
 
 		/**
 		 * Filters the list of action links available following a single theme installation.
@@ -92,7 +98,8 @@
 		 * @param WP_Theme $theme_info      Theme object.
 		 */
 		$install_actions = apply_filters( 'install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info );
-		if ( ! empty($install_actions) )
-			$this->feedback(implode(' | ', (array)$install_actions));
+		if ( ! empty( $install_actions ) ) {
+			$this->feedback( implode( ' | ', (array) $install_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-theme-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-theme-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-theme-upgrader-skin.php	(working copy)
@@ -22,13 +22,18 @@
 	 *
 	 * @param array $args
 	 */
-	public function __construct($args = array()) {
-		$defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
-		$args = wp_parse_args($args, $defaults);
+	public function __construct( $args = array() ) {
+		$defaults = array(
+			'url' => '',
+			'theme' => '',
+			'nonce' => '',
+			'title' => __( 'Update Theme' ),
+		);
+		$args = wp_parse_args( $args, $defaults );
 
 		$this->theme = $args['theme'];
 
-		parent::__construct($args);
+		parent::__construct( $args );
 	}
 
 	/**
@@ -39,7 +44,7 @@
 
 		$update_actions = array();
 		if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) {
-			$name       = $theme_info->display('Name');
+			$name       = $theme_info->display( 'Name' );
 			$stylesheet = $this->upgrader->result['destination_name'];
 			$template   = $theme_info->get_template();
 
@@ -47,7 +52,7 @@
 				'action'     => 'activate',
 				'template'   => urlencode( $template ),
 				'stylesheet' => urlencode( $stylesheet ),
-			), admin_url('themes.php') );
+			), admin_url( 'themes.php' ) );
 			$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
 
 			if ( get_stylesheet() == $stylesheet ) {
@@ -61,8 +66,9 @@
 				$update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
 			}
 
-			if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() )
+			if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) {
 				unset( $update_actions['preview'], $update_actions['activate'] );
+			}
 		}
 
 		$update_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
@@ -77,7 +83,8 @@
 		 */
 		$update_actions = apply_filters( 'update_theme_complete_actions', $update_actions, $this->theme );
 
-		if ( ! empty($update_actions) )
-			$this->feedback(implode(' | ', (array)$update_actions));
+		if ( ! empty( $update_actions ) ) {
+			$this->feedback( implode( ' | ', (array) $update_actions ) );
+		}
 	}
 }
Index: src/wp-admin/includes/class-theme-upgrader.php
===================================================================
--- src/wp-admin/includes/class-theme-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-theme-upgrader.php	(working copy)
@@ -46,14 +46,14 @@
 	 * @access public
 	 */
 	public function upgrade_strings() {
-		$this->strings['up_to_date'] = __('The theme is at the latest version.');
-		$this->strings['no_package'] = __('Update package not available.');
-		$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-		$this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-		$this->strings['remove_old'] = __('Removing the old version of the theme&#8230;');
-		$this->strings['remove_old_failed'] = __('Could not remove the old theme.');
-		$this->strings['process_failed'] = __('Theme update failed.');
-		$this->strings['process_success'] = __('Theme updated successfully.');
+		$this->strings['up_to_date'] = __( 'The theme is at the latest version.' );
+		$this->strings['no_package'] = __( 'Update package not available.' );
+		$this->strings['downloading_package'] = __( 'Downloading update from <span class="code">%s</span>&#8230;' );
+		$this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
+		$this->strings['remove_old'] = __( 'Removing the old version of the theme&#8230;' );
+		$this->strings['remove_old_failed'] = __( 'Could not remove the old theme.' );
+		$this->strings['process_failed'] = __( 'Theme update failed.' );
+		$this->strings['process_success'] = __( 'Theme updated successfully.' );
 	}
 
 	/**
@@ -63,23 +63,23 @@
 	 * @access public
 	 */
 	public function install_strings() {
-		$this->strings['no_package'] = __('Install package not available.');
-		$this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
-		$this->strings['unpack_package'] = __('Unpacking the package&#8230;');
-		$this->strings['installing_package'] = __('Installing the theme&#8230;');
-		$this->strings['no_files'] = __('The theme contains no files.');
-		$this->strings['process_failed'] = __('Theme install failed.');
-		$this->strings['process_success'] = __('Theme installed successfully.');
+		$this->strings['no_package'] = __( 'Install package not available.' );
+		$this->strings['downloading_package'] = __( 'Downloading install package from <span class="code">%s</span>&#8230;' );
+		$this->strings['unpack_package'] = __( 'Unpacking the package&#8230;' );
+		$this->strings['installing_package'] = __( 'Installing the theme&#8230;' );
+		$this->strings['no_files'] = __( 'The theme contains no files.' );
+		$this->strings['process_failed'] = __( 'Theme install failed.' );
+		$this->strings['process_success'] = __( 'Theme installed successfully.' );
 		/* translators: 1: theme name, 2: version */
-		$this->strings['process_success_specific'] = __('Successfully installed the theme <strong>%1$s %2$s</strong>.');
-		$this->strings['parent_theme_search'] = __('This theme requires a parent theme. Checking if it is installed&#8230;');
+		$this->strings['process_success_specific'] = __( 'Successfully installed the theme <strong>%1$s %2$s</strong>.' );
+		$this->strings['parent_theme_search'] = __( 'This theme requires a parent theme. Checking if it is installed&#8230;' );
 		/* translators: 1: theme name, 2: version */
-		$this->strings['parent_theme_prepare_install'] = __('Preparing to install <strong>%1$s %2$s</strong>&#8230;');
+		$this->strings['parent_theme_prepare_install'] = __( 'Preparing to install <strong>%1$s %2$s</strong>&#8230;' );
 		/* translators: 1: theme name, 2: version */
-		$this->strings['parent_theme_currently_installed'] = __('The parent theme, <strong>%1$s %2$s</strong>, is currently installed.');
+		$this->strings['parent_theme_currently_installed'] = __( 'The parent theme, <strong>%1$s %2$s</strong>, is currently installed.' );
 		/* translators: 1: theme name, 2: version */
-		$this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, <strong>%1$s %2$s</strong>.');
-		$this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.');
+		$this->strings['parent_theme_install_success'] = __( 'Successfully installed the parent theme, <strong>%1$s %2$s</strong>.' );
+		$this->strings['parent_theme_not_found'] = __( '<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.' );
 	}
 
 	/**
@@ -99,24 +99,31 @@
 		// Check to see if we need to install a parent theme
 		$theme_info = $this->theme_info();
 
-		if ( ! $theme_info->parent() )
+		if ( ! $theme_info->parent() ) {
 			return $install_result;
+		}
 
 		$this->skin->feedback( 'parent_theme_search' );
 
 		if ( ! $theme_info->parent()->errors() ) {
-			$this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') );
+			$this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display( 'Name' ), $theme_info->parent()->display( 'Version' ) );
 			// We already have the theme, fall through.
 			return $install_result;
 		}
 
 		// We don't have the parent theme, let's install it.
-		$api = themes_api('theme_information', array('slug' => $theme_info->get('Template'), 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
+		$api = themes_api( 'theme_information', array(
+			'slug' => $theme_info->get( 'Template' ),
+			'fields' => array(
+				'sections' => false,
+				'tags' => false,
+			),
+		) ); //Save on a bit of bandwidth.
 
-		if ( ! $api || is_wp_error($api) ) {
-			$this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
+		if ( ! $api || is_wp_error( $api ) ) {
+			$this->skin->feedback( 'parent_theme_not_found', $theme_info->get( 'Template' ) );
 			// Don't show activate or preview actions after install
-			add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
+			add_filter( 'install_theme_complete_actions', array( $this, 'hide_activate_preview_actions' ) );
 			return $install_result;
 		}
 
@@ -128,23 +135,24 @@
 		$this->skin->api = $api;
 		$this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version);
 
-		$this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version);
+		$this->skin->feedback( 'parent_theme_prepare_install', $api->name, $api->version );
 
-		add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme.
+		add_filter( 'install_theme_complete_actions', '__return_false', 999 ); // Don't show any actions after installing the theme.
 
 		// Install the parent theme
 		$parent_result = $this->run( array(
 			'package' => $api->download_link,
 			'destination' => get_theme_root(),
 			'clear_destination' => false, //Do not overwrite files.
-			'clear_working' => true
+			'clear_working' => true,
 		) );
 
-		if ( is_wp_error($parent_result) )
-			add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
+		if ( is_wp_error( $parent_result ) ) {
+			add_filter( 'install_theme_complete_actions', array( $this, 'hide_activate_preview_actions' ) );
+		}
 
 		// Start cleaning up after the parents installation
-		remove_filter('install_theme_complete_actions', '__return_false', 999);
+		remove_filter( 'install_theme_complete_actions', '__return_false', 999 );
 
 		// Reset child's result and data
 		$this->result = $child_result;
@@ -168,7 +176,7 @@
 	 * @return array
 	 */
 	public function hide_activate_preview_actions( $actions ) {
-		unset($actions['activate'], $actions['preview']);
+		unset( $actions['activate'], $actions['preview'] );
 		return $actions;
 	}
 
@@ -199,8 +207,8 @@
 		$this->init();
 		$this->install_strings();
 
-		add_filter('upgrader_source_selection', array($this, 'check_package') );
-		add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3);
+		add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
+		add_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ), 10, 3 );
 		if ( $parsed_args['clear_update_cache'] ) {
 			// Clear cache so wp_update_themes() knows about the new theme.
 			add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
@@ -218,11 +226,12 @@
 		) );
 
 		remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
-		remove_filter('upgrader_source_selection', array($this, 'check_package') );
-		remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'));
+		remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
+		remove_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ) );
 
-		if ( ! $this->result || is_wp_error($this->result) )
+		if ( ! $this->result || is_wp_error( $this->result ) ) {
 			return $this->result;
+		}
 
 		// Refresh the Theme Update information
 		wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
@@ -258,9 +267,9 @@
 
 		// Is an update available?
 		$current = get_site_transient( 'update_themes' );
-		if ( !isset( $current->response[ $theme ] ) ) {
+		if ( ! isset( $current->response[ $theme ] ) ) {
 			$this->skin->before();
-			$this->skin->set_result(false);
+			$this->skin->set_result( false );
 			$this->skin->error( 'up_to_date' );
 			$this->skin->after();
 			return false;
@@ -268,9 +277,9 @@
 
 		$r = $current->response[ $theme ];
 
-		add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
-		add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
-		add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
+		add_filter( 'upgrader_pre_install', array( $this, 'current_before' ), 10, 2 );
+		add_filter( 'upgrader_post_install', array( $this, 'current_after' ), 10, 2 );
+		add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );
 		if ( $parsed_args['clear_update_cache'] ) {
 			// Clear cache so wp_update_themes() knows about the new theme.
 			add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
@@ -289,12 +298,13 @@
 		) );
 
 		remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
-		remove_filter('upgrader_pre_install', array($this, 'current_before'));
-		remove_filter('upgrader_post_install', array($this, 'current_after'));
-		remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
+		remove_filter( 'upgrader_pre_install', array( $this, 'current_before' ) );
+		remove_filter( 'upgrader_post_install', array( $this, 'current_after' ) );
+		remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ) );
 
-		if ( ! $this->result || is_wp_error($this->result) )
+		if ( ! $this->result || is_wp_error( $this->result ) ) {
 			return $this->result;
+		}
 
 		wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
 
@@ -330,14 +340,14 @@
 
 		$current = get_site_transient( 'update_themes' );
 
-		add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
-		add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
-		add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
+		add_filter( 'upgrader_pre_install', array( $this, 'current_before' ), 10, 2 );
+		add_filter( 'upgrader_post_install', array( $this, 'current_after' ), 10, 2 );
+		add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );
 
 		$this->skin->header();
 
 		// Connect to the Filesystem first.
-		$res = $this->fs_connect( array(WP_CONTENT_DIR) );
+		$res = $this->fs_connect( array( WP_CONTENT_DIR ) );
 		if ( ! $res ) {
 			$this->skin->footer();
 			return false;
@@ -350,26 +360,28 @@
 		// - a theme with an update available is currently in use.
 		// @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
 		$maintenance = ( is_multisite() && ! empty( $themes ) );
-		foreach ( $themes as $theme )
+		foreach ( $themes as $theme ) {
 			$maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template();
-		if ( $maintenance )
-			$this->maintenance_mode(true);
+		}
+		if ( $maintenance ) {
+			$this->maintenance_mode( true );
+		}
 
 		$results = array();
 
-		$this->update_count = count($themes);
+		$this->update_count = count( $themes );
 		$this->update_current = 0;
 		foreach ( $themes as $theme ) {
 			$this->update_current++;
 
-			$this->skin->theme_info = $this->theme_info($theme);
+			$this->skin->theme_info = $this->theme_info( $theme );
 
-			if ( !isset( $current->response[ $theme ] ) ) {
-				$this->skin->set_result(true);
+			if ( ! isset( $current->response[ $theme ] ) ) {
+				$this->skin->set_result( true );
 				$this->skin->before();
 				$this->skin->feedback( 'up_to_date' );
 				$this->skin->after();
-				$results[$theme] = true;
+				$results[ $theme ] = true;
 				continue;
 			}
 
@@ -383,18 +395,19 @@
 				'clear_working' => true,
 				'is_multi' => true,
 				'hook_extra' => array(
-					'theme' => $theme
+					'theme' => $theme,
 				),
 			) );
 
-			$results[$theme] = $this->result;
+			$results[ $theme ] = $this->result;
 
 			// Prevent credentials auth screen from displaying multiple times
-			if ( false === $result )
+			if ( false === $result ) {
 				break;
-		} //end foreach $plugins
+			}
+		} // End foreach().
 
-		$this->maintenance_mode(false);
+		$this->maintenance_mode( false );
 
 		// Refresh the Theme Update information
 		wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
@@ -412,9 +425,9 @@
 		$this->skin->footer();
 
 		// Cleanup our hooks, in case something else does a upgrade on this connection.
-		remove_filter('upgrader_pre_install', array($this, 'current_before'));
-		remove_filter('upgrader_post_install', array($this, 'current_after'));
-		remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
+		remove_filter( 'upgrader_pre_install', array( $this, 'current_before' ) );
+		remove_filter( 'upgrader_post_install', array( $this, 'current_after' ) );
+		remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ) );
 
 		return $results;
 	}
@@ -437,13 +450,15 @@
 	public function check_package( $source ) {
 		global $wp_filesystem;
 
-		if ( is_wp_error($source) )
+		if ( is_wp_error( $source ) ) {
 			return $source;
+		}
 
 		// Check the folder contains a valid theme
-		$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
-		if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
+		$working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit( WP_CONTENT_DIR ), $source );
+		if ( ! is_dir( $working_directory ) ) { // Sanity check, if the above fails, let's not prevent installation.
 			return $source;
+		}
 
 		// A proper archive should have a style.css file in the single subdirectory
 		if ( ! file_exists( $working_directory . 'style.css' ) ) {
@@ -455,7 +470,10 @@
 			);
 		}
 
-		$info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
+		$info = get_file_data( $working_directory . 'style.css', array(
+			'Name' => 'Theme Name',
+			'Template' => 'Template',
+		) );
 
 		if ( empty( $info['Name'] ) ) {
 			return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'],
@@ -492,17 +510,20 @@
 	 * @param array          $theme
 	 * @return bool|WP_Error
 	 */
-	public function current_before($return, $theme) {
-		if ( is_wp_error($return) )
+	public function current_before( $return, $theme ) {
+		if ( is_wp_error( $return ) ) {
 			return $return;
+		}
 
-		$theme = isset($theme['theme']) ? $theme['theme'] : '';
+		$theme = isset( $theme['theme'] ) ? $theme['theme'] : '';
 
-		if ( $theme != get_stylesheet() ) //If not current
+		if ( $theme != get_stylesheet() ) { //If not current
 			return $return;
+		}
 		//Change to maintenance mode now.
-		if ( ! $this->bulk )
-			$this->maintenance_mode(true);
+		if ( ! $this->bulk ) {
+			$this->maintenance_mode( true );
+		}
 
 		return $return;
 	}
@@ -520,14 +541,16 @@
 	 * @param array          $theme
 	 * @return bool|WP_Error
 	 */
-	public function current_after($return, $theme) {
-		if ( is_wp_error($return) )
+	public function current_after( $return, $theme ) {
+		if ( is_wp_error( $return ) ) {
 			return $return;
+		}
 
-		$theme = isset($theme['theme']) ? $theme['theme'] : '';
+		$theme = isset( $theme['theme'] ) ? $theme['theme'] : '';
 
-		if ( $theme != get_stylesheet() ) // If not current
+		if ( $theme != get_stylesheet() ) { // If not current
 			return $return;
+		}
 
 		// Ensure stylesheet name hasn't changed after the upgrade:
 		if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
@@ -537,8 +560,9 @@
 		}
 
 		//Time to remove maintenance mode
-		if ( ! $this->bulk )
-			$this->maintenance_mode(false);
+		if ( ! $this->bulk ) {
+			$this->maintenance_mode( false );
+		}
 		return $return;
 	}
 
@@ -562,17 +586,20 @@
 	public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
 		global $wp_filesystem;
 
-		if ( is_wp_error( $removed ) )
+		if ( is_wp_error( $removed ) ) {
 			return $removed; // Pass errors through.
+		}
 
-		if ( ! isset( $theme['theme'] ) )
+		if ( ! isset( $theme['theme'] ) ) {
 			return $removed;
+		}
 
 		$theme = $theme['theme'];
 		$themes_dir = trailingslashit( $wp_filesystem->wp_themes_dir( $theme ) );
 		if ( $wp_filesystem->exists( $themes_dir . $theme ) ) {
-			if ( ! $wp_filesystem->delete( $themes_dir . $theme, true ) )
+			if ( ! $wp_filesystem->delete( $themes_dir . $theme, true ) ) {
 				return false;
+			}
 		}
 
 		return true;
@@ -590,13 +617,13 @@
 	 * @return WP_Theme|false The theme's info object, or false `$theme` is not supplied
 	 *                        and the last result isn't set.
 	 */
-	public function theme_info($theme = null) {
+	public function theme_info( $theme = null ) {
 
-		if ( empty($theme) ) {
-			if ( !empty($this->result['destination_name']) )
+		if ( empty( $theme ) ) {
+			if ( ! empty( $this->result['destination_name'] ) ) {
 				$theme = $this->result['destination_name'];
-			else
-				return false;
+			} else { return false;
+			}
 		}
 		return wp_get_theme( $theme );
 	}
Index: src/wp-admin/includes/class-walker-category-checklist.php
===================================================================
--- src/wp-admin/includes/class-walker-category-checklist.php	(revision 40901)
+++ src/wp-admin/includes/class-walker-category-checklist.php	(working copy)
@@ -18,7 +18,10 @@
  */
 class Walker_Category_Checklist extends Walker {
 	public $tree_type = 'category';
-	public $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
+	public $db_fields = array(
+		'parent' => 'parent',
+		'id' => 'term_id',
+	); //TODO: decouple this
 
 	/**
 	 * Starts the list before the elements are added.
@@ -32,7 +35,7 @@
 	 * @param array  $args   An array of arguments. @see wp_terms_checklist()
 	 */
 	public function start_lvl( &$output, $depth = 0, $args = array() ) {
-		$indent = str_repeat("\t", $depth);
+		$indent = str_repeat( "\t", $depth );
 		$output .= "$indent<ul class='children'>\n";
 	}
 
@@ -48,7 +51,7 @@
 	 * @param array  $args   An array of arguments. @see wp_terms_checklist()
 	 */
 	public function end_lvl( &$output, $depth = 0, $args = array() ) {
-		$indent = str_repeat("\t", $depth);
+		$indent = str_repeat( "\t", $depth );
 		$output .= "$indent</ul>\n";
 	}
 
@@ -100,7 +103,7 @@
 		} else {
 			/** This filter is documented in wp-includes/category-template.php */
 			$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" .
-				'<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' .
+				'<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' .
 				checked( in_array( $category->term_id, $args['selected_cats'] ), true, false ) .
 				disabled( empty( $args['disabled'] ), false, false ) . ' /> ' .
 				esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
Index: src/wp-admin/includes/class-walker-nav-menu-checklist.php
===================================================================
--- src/wp-admin/includes/class-walker-nav-menu-checklist.php	(revision 40901)
+++ src/wp-admin/includes/class-walker-nav-menu-checklist.php	(working copy)
@@ -74,7 +74,7 @@
 	public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
 		global $_nav_menu_placeholder;
 
-		$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
+		$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
 		$possible_object_id = isset( $item->post_type ) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_nav_menu_placeholder;
 		$possible_db_id = ( ! empty( $item->ID ) ) && ( 0 < $possible_object_id ) ? (int) $item->ID : 0;
 
@@ -84,34 +84,36 @@
 		$output .= '<label class="menu-item-title">';
 		$output .= '<input type="checkbox" class="menu-item-checkbox';
 
-		if ( ! empty( $item->front_or_home ) )
+		if ( ! empty( $item->front_or_home ) ) {
 			$output .= ' add-to-top';
+		}
 
-		$output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
+		$output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="' . esc_attr( $item->object_id ) . '" /> ';
 
 		if ( ! empty( $item->label ) ) {
 			$title = $item->label;
 		} elseif ( isset( $item->post_type ) ) {
 			/** This filter is documented in wp-includes/post-template.php */
 			$title = apply_filters( 'the_title', $item->post_title, $item->ID );
-			if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title )
+			if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title ) {
 				$title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title );
+			}
 		}
 
 		$output .= isset( $title ) ? esc_html( $title ) : esc_html( $item->title );
- 		$output .= '</label>';
+		 $output .= '</label>';
 
 		// Menu item hidden fields
 		$output .= '<input type="hidden" class="menu-item-db-id" name="menu-item[' . $possible_object_id . '][menu-item-db-id]" value="' . $possible_db_id . '" />';
-		$output .= '<input type="hidden" class="menu-item-object" name="menu-item[' . $possible_object_id . '][menu-item-object]" value="'. esc_attr( $item->object ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="'. esc_attr( $item->menu_item_parent ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="'. esc_attr( $item->type ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="'. esc_attr( $item->title ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="'. esc_attr( $item->url ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="'. esc_attr( $item->target ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr_title]" value="'. esc_attr( $item->attr_title ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="'. esc_attr( implode( ' ', $item->classes ) ) .'" />';
-		$output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="'. esc_attr( $item->xfn ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-object" name="menu-item[' . $possible_object_id . '][menu-item-object]" value="' . esc_attr( $item->object ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="' . esc_attr( $item->menu_item_parent ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="' . esc_attr( $item->type ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="' . esc_attr( $item->title ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="' . esc_attr( $item->url ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="' . esc_attr( $item->target ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr_title]" value="' . esc_attr( $item->attr_title ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="' . esc_attr( implode( ' ', $item->classes ) ) . '" />';
+		$output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="' . esc_attr( $item->xfn ) . '" />';
 	}
 
 } // Walker_Nav_Menu_Checklist
Index: src/wp-admin/includes/class-wp-automatic-updater.php
===================================================================
--- src/wp-admin/includes/class-wp-automatic-updater.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-automatic-updater.php	(working copy)
@@ -31,11 +31,13 @@
 	 */
 	public function is_disabled() {
 		// Background updates are disabled if you don't want file changes.
-		if ( ! wp_is_file_mod_allowed( 'automatic_updater' ) )
+		if ( ! wp_is_file_mod_allowed( 'automatic_updater' ) ) {
 			return true;
+		}
 
-		if ( wp_installing() )
+		if ( wp_installing() ) {
 			return true;
+		}
 
 		// More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters.
 		$disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED;
@@ -74,8 +76,9 @@
 	 */
 	public function is_vcs_checkout( $context ) {
 		$context_dirs = array( untrailingslashit( $context ) );
-		if ( $context !== ABSPATH )
+		if ( $context !== ABSPATH ) {
 			$context_dirs[] = untrailingslashit( ABSPATH );
+		}
 
 		$vcs_dirs = array( '.svn', '.git', '.hg', '.bzr' );
 		$check_dirs = array();
@@ -86,10 +89,9 @@
 				$check_dirs[] = $context_dir;
 
 				// Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here.
-				if ( $context_dir == dirname( $context_dir ) )
+				if ( $context_dir == dirname( $context_dir ) ) {
 					break;
-
-			// Continue one level at a time.
+				}
 			} while ( $context_dir = dirname( $context_dir ) );
 		}
 
@@ -98,8 +100,9 @@
 		// Search all directories we've found for evidence of version control.
 		foreach ( $vcs_dirs as $vcs_dir ) {
 			foreach ( $check_dirs as $check_dir ) {
-				if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) )
+				if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) {
 					break 2;
+				}
 			}
 		}
 
@@ -135,8 +138,9 @@
 		// Used to see if WP_Filesystem is set up to allow unattended updates.
 		$skin = new Automatic_Upgrader_Skin;
 
-		if ( $this->is_disabled() )
+		if ( $this->is_disabled() ) {
 			return false;
+		}
 
 		// Only relax the filesystem checks when the update doesn't include new files
 		$allow_relaxed_file_ownership = false;
@@ -146,16 +150,17 @@
 
 		// If we can't do an auto core update, we may still be able to email the user.
 		if ( ! $skin->request_filesystem_credentials( false, $context, $allow_relaxed_file_ownership ) || $this->is_vcs_checkout( $context ) ) {
-			if ( 'core' == $type )
+			if ( 'core' == $type ) {
 				$this->send_core_update_notification_email( $item );
+			}
 			return false;
 		}
 
 		// Next up, is this an item we can update?
-		if ( 'core' == $type )
+		if ( 'core' == $type ) {
 			$update = Core_Upgrader::should_update_to_version( $item->current );
-		else
-			$update = ! empty( $item->autoupdate );
+		} else { $update = ! empty( $item->autoupdate );
+		}
 
 		/**
 		 * Filters whether to automatically update core, a plugin, a theme, or a language.
@@ -179,8 +184,9 @@
 		$update = apply_filters( "auto_update_{$type}", $update, $item );
 
 		if ( ! $update ) {
-			if ( 'core' == $type )
+			if ( 'core' == $type ) {
 				$this->send_core_update_notification_email( $item );
+			}
 			return false;
 		}
 
@@ -189,13 +195,14 @@
 			global $wpdb;
 
 			$php_compat = version_compare( phpversion(), $item->php_version, '>=' );
-			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
+			if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
 				$mysql_compat = true;
-			else
-				$mysql_compat = version_compare( $wpdb->db_version(), $item->mysql_version, '>=' );
+			} else { $mysql_compat = version_compare( $wpdb->db_version(), $item->mysql_version, '>=' );
+			}
 
-			if ( ! $php_compat || ! $mysql_compat )
+			if ( ! $php_compat || ! $mysql_compat ) {
 				return false;
+			}
 		}
 
 		return true;
@@ -213,8 +220,9 @@
 		$notified = get_site_option( 'auto_core_update_notified' );
 
 		// Don't notify if we've already notified the same email address of the same version.
-		if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
+		if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current ) {
 			return false;
+		}
 
 		// See if we need to notify users of a core update.
 		$notify = ! empty( $item->notify_email );
@@ -238,8 +246,9 @@
 		 * @param bool   $notify Whether the site administrator is notified.
 		 * @param object $item   The update offer.
 		 */
-		if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) )
+		if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) ) {
 			return false;
+		}
 
 		$this->send_email( 'manual', $item );
 		return true;
@@ -281,8 +290,9 @@
 		}
 
 		// Determine whether we can and should perform this update.
-		if ( ! $this->should_update( $type, $item, $context ) )
+		if ( ! $this->should_update( $type, $item, $context ) ) {
 			return false;
+		}
 
 		/**
 		 * Fires immediately prior to an auto-update.
@@ -360,7 +370,7 @@
 			'item'     => $item,
 			'result'   => $upgrade_result,
 			'name'     => $item_name,
-			'messages' => $skin->get_upgrade_messages()
+			'messages' => $skin->get_upgrade_messages(),
 		);
 
 		return $upgrade_result;
@@ -373,14 +383,17 @@
 	 * @access public
 	 */
 	public function run() {
-		if ( $this->is_disabled() )
+		if ( $this->is_disabled() ) {
 			return;
+		}
 
-		if ( ! is_main_network() || ! is_main_site() )
+		if ( ! is_main_network() || ! is_main_site() ) {
 			return;
+		}
 
-		if ( ! WP_Upgrader::create_lock( 'auto_updater' ) )
+		if ( ! WP_Upgrader::create_lock( 'auto_updater' ) ) {
 			return;
+		}
 
 		// Don't automatically run these thins, as we'll handle it ourselves
 		remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
@@ -391,7 +404,7 @@
 		// Next, Plugins
 		wp_update_plugins(); // Check for Plugin updates
 		$plugin_updates = get_site_transient( 'update_plugins' );
-		if ( $plugin_updates && !empty( $plugin_updates->response ) ) {
+		if ( $plugin_updates && ! empty( $plugin_updates->response ) ) {
 			foreach ( $plugin_updates->response as $plugin ) {
 				$this->update( 'plugin', $plugin );
 			}
@@ -402,7 +415,7 @@
 		// Next, those themes we all love
 		wp_update_themes();  // Check for Theme updates
 		$theme_updates = get_site_transient( 'update_themes' );
-		if ( $theme_updates && !empty( $theme_updates->response ) ) {
+		if ( $theme_updates && ! empty( $theme_updates->response ) ) {
 			foreach ( $theme_updates->response as $theme ) {
 				$this->update( 'theme', (object) $theme );
 			}
@@ -414,8 +427,9 @@
 		wp_version_check(); // Check for Core updates
 		$core_update = find_core_auto_update();
 
-		if ( $core_update )
+		if ( $core_update ) {
 			$this->update( 'core', $core_update );
+		}
 
 		// Clean up, and check for any pending translations
 		// (Core_Upgrader checks for core updates)
@@ -463,11 +477,13 @@
 			 *                                  install is a development version.
 			 *                                  Return false to avoid the email.
 			 */
-			if ( apply_filters( 'automatic_updates_send_debug_email', $development_version ) )
+			if ( apply_filters( 'automatic_updates_send_debug_email', $development_version ) ) {
 				$this->send_debug_email();
+			}
 
-			if ( ! empty( $this->update_results['core'] ) )
+			if ( ! empty( $this->update_results['core'] ) ) {
 				$this->after_core_update( $this->update_results['core'][0] );
+			}
 
 			/**
 			 * Fires after all automatic updates have run.
@@ -547,16 +563,17 @@
 		 * the issue could actually be on WordPress.org's side.) If that one fails, then email.
 		 */
 		$send = true;
-  		$transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro', 'locked' );
-  		if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
-  			wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
-  			$send = false;
-  		}
+		  $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro', 'locked' );
+		if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
+			wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
+			$send = false;
+		}
 
-  		$n = get_site_option( 'auto_core_update_notified' );
+		  $n = get_site_option( 'auto_core_update_notified' );
 		// Don't notify if we've already notified the same email address of the same version of the same notification type.
-		if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
+		if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current ) {
 			$send = false;
+		}
 
 		update_site_option( 'auto_core_update_failed', array(
 			'attempted'  => $core_update->current,
@@ -567,8 +584,9 @@
 			'retry'      => in_array( $error_code, $transient_failures ),
 		) );
 
-		if ( $send )
+		if ( $send ) {
 			$this->send_email( 'fail', $core_update, $result );
+		}
 	}
 
 	/**
@@ -591,8 +609,9 @@
 
 		$next_user_core_update = get_preferred_from_update_core();
 		// If the update transient is empty, use the update we just performed
-		if ( ! $next_user_core_update )
+		if ( ! $next_user_core_update ) {
 			$next_user_core_update = $core_update;
+		}
 		$newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) );
 
 		/**
@@ -606,8 +625,9 @@
 		 * @param object $core_update The update offer that was attempted.
 		 * @param mixed  $result      The result for the core update. Can be WP_Error.
 		 */
-		if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) )
+		if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) ) {
 			return;
+		}
 
 		switch ( $type ) {
 			case 'success' : // We updated.
@@ -640,12 +660,13 @@
 			case 'success' :
 				$body .= sprintf( __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), home_url(), $core_update->current );
 				$body .= "\n\n";
-				if ( ! $newer_version_available )
+				if ( ! $newer_version_available ) {
 					$body .= __( 'No further action is needed on your part.' ) . ' ';
+				}
 
 				// Can only reference the About screen if their update was successful.
 				list( $about_version ) = explode( '-', $core_update->current, 2 );
-				$body .= sprintf( __( "For more on version %s, see the About WordPress screen:" ), $about_version );
+				$body .= sprintf( __( 'For more on version %s, see the About WordPress screen:' ), $about_version );
 				$body .= "\n" . admin_url( 'about.php' );
 
 				if ( $newer_version_available ) {
@@ -664,30 +685,31 @@
 
 				// Don't show this message if there is a newer version available.
 				// Potential for confusion, and also not useful for them to know at this point.
-				if ( 'fail' == $type && ! $newer_version_available )
+				if ( 'fail' == $type && ! $newer_version_available ) {
 					$body .= __( 'We tried but were unable to update your site automatically.' ) . ' ';
+				}
 
 				$body .= __( 'Updating is easy and only takes a few moments:' );
 				$body .= "\n" . network_admin_url( 'update-core.php' );
 				break;
 
 			case 'critical' :
-				if ( $newer_version_available )
+				if ( $newer_version_available ) {
 					$body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s.' ), home_url(), $core_update->current );
-				else
-					$body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current );
+				} else { $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current );
+				}
 
 				$body .= "\n\n" . __( "This means your site may be offline or broken. Don't panic; this can be fixed." );
 
 				$body .= "\n\n" . __( "Please check out your site now. It's possible that everything is working. If it says you need to update, you should do so:" );
 				$body .= "\n" . network_admin_url( 'update-core.php' );
 				break;
-		}
+		}// End switch().
 
 		$critical_support = 'critical' === $type && ! empty( $core_update->support_email );
 		if ( $critical_support ) {
 			// Support offer if available.
-			$body .= "\n\n" . sprintf( __( "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working." ), $core_update->support_email );
+			$body .= "\n\n" . sprintf( __( 'The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working.' ), $core_update->support_email );
 		} else {
 			// Add a note about the support forums.
 			$body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
@@ -700,7 +722,7 @@
 		}
 
 		if ( $critical_support ) {
-			$body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
+			$body .= ' ' . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
 		}
 
 		// If things are successful and we're now on the latest, mention plugins and themes if any are out of date.
@@ -719,23 +741,27 @@
 
 			// If we had a rollback and we're still critical, then the rollback failed too.
 			// Loop through all errors (the main WP_Error, the update result, the rollback result) for code, data, etc.
-			if ( 'rollback_was_required' == $result->get_error_code() )
+			if ( 'rollback_was_required' == $result->get_error_code() ) {
 				$errors = array( $result, $result->get_error_data()->update, $result->get_error_data()->rollback );
-			else
-				$errors = array( $result );
+			} else { $errors = array( $result );
+			}
 
 			foreach ( $errors as $error ) {
-				if ( ! is_wp_error( $error ) )
+				if ( ! is_wp_error( $error ) ) {
 					continue;
+				}
 				$error_code = $error->get_error_code();
-				$body .= "\n\n" . sprintf( __( "Error code: %s" ), $error_code );
-				if ( 'rollback_was_required' == $error_code )
+				$body .= "\n\n" . sprintf( __( 'Error code: %s' ), $error_code );
+				if ( 'rollback_was_required' == $error_code ) {
 					continue;
-				if ( $error->get_error_message() )
+				}
+				if ( $error->get_error_message() ) {
 					$body .= "\n" . $error->get_error_message();
+				}
 				$error_data = $error->get_error_data();
-				if ( $error_data )
+				if ( $error_data ) {
 					$body .= "\n" . implode( ', ', (array) $error_data );
+				}
 			}
 			$body .= "\n";
 		}
@@ -777,8 +803,9 @@
 	 */
 	protected function send_debug_email() {
 		$update_count = 0;
-		foreach ( $this->update_results as $type => $updates )
+		foreach ( $this->update_results as $type => $updates ) {
 			$update_count += count( $updates );
+		}
 
 		$body = array();
 		$failures = 0;
@@ -799,9 +826,12 @@
 
 		// Plugins, Themes, Translations
 		foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) {
-			if ( ! isset( $this->update_results[ $type ] ) )
+			if ( ! isset( $this->update_results[ $type ] ) ) {
 				continue;
-			$success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );
+			}
+			$success_items = wp_list_filter( $this->update_results[ $type ], array(
+				'result' => true,
+			) );
 			if ( $success_items ) {
 				$messages = array(
 					'plugin'      => __( 'The following plugins were successfully updated:' ),
@@ -831,12 +861,12 @@
 				}
 			}
 			$body[] = '';
-		}
+		}// End foreach().
 
 		$site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
 		if ( $failures ) {
 			$body[] = trim( __(
-"BETA TESTING?
+				"BETA TESTING?
 =============
 
 This debugging email is sent when you are using a development version of WordPress.
@@ -854,26 +884,32 @@
 		}
 
 		$body[] = trim( __(
-'UPDATE LOG
+			'UPDATE LOG
 ==========' ) );
 		$body[] = '';
 
 		foreach ( array( 'core', 'plugin', 'theme', 'translation' ) as $type ) {
-			if ( ! isset( $this->update_results[ $type ] ) )
+			if ( ! isset( $this->update_results[ $type ] ) ) {
 				continue;
+			}
 			foreach ( $this->update_results[ $type ] as $update ) {
 				$body[] = $update->name;
 				$body[] = str_repeat( '-', strlen( $update->name ) );
-				foreach ( $update->messages as $message )
-					$body[] = "  " . html_entity_decode( str_replace( '&#8230;', '...', $message ) );
+				foreach ( $update->messages as $message ) {
+					$body[] = '  ' . html_entity_decode( str_replace( '&#8230;', '...', $message ) );
+				}
 				if ( is_wp_error( $update->result ) ) {
-					$results = array( 'update' => $update->result );
+					$results = array(
+						'update' => $update->result,
+					);
 					// If we rolled back, we want to know an error that occurred then too.
-					if ( 'rollback_was_required' === $update->result->get_error_code() )
+					if ( 'rollback_was_required' === $update->result->get_error_code() ) {
 						$results = (array) $update->result->get_error_data();
+					}
 					foreach ( $results as $result_type => $result ) {
-						if ( ! is_wp_error( $result ) )
+						if ( ! is_wp_error( $result ) ) {
 							continue;
+						}
 
 						if ( 'rollback' === $result_type ) {
 							/* translators: 1: Error code, 2: Error message. */
@@ -883,19 +919,20 @@
 							$body[] = '  ' . sprintf( __( 'Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() );
 						}
 
-						if ( $result->get_error_data() )
+						if ( $result->get_error_data() ) {
 							$body[] = '         ' . implode( ', ', (array) $result->get_error_data() );
+						}
 					}
 				}
 				$body[] = '';
 			}
-		}
+		}// End foreach().
 
 		$email = array(
 			'to'      => get_site_option( 'admin_email' ),
 			'subject' => $subject,
 			'body'    => implode( "\n", $body ),
-			'headers' => ''
+			'headers' => '',
 		);
 
 		/**
Index: src/wp-admin/includes/class-wp-comments-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-comments-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-comments-list-table.php	(working copy)
@@ -64,7 +64,7 @@
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		return current_user_can('edit_posts');
+		return current_user_can( 'edit_posts' );
 	}
 
 	/**
@@ -78,10 +78,11 @@
 		global $post_id, $comment_status, $search, $comment_type;
 
 		$comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
-		if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
+		if ( ! in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) ) {
 			$comment_status = 'all';
+		}
 
-		$comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
+		$comment_type = ! empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
 
 		$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
 
@@ -98,8 +99,7 @@
 
 		if ( isset( $_REQUEST['number'] ) ) {
 			$number = (int) $_REQUEST['number'];
-		}
-		else {
+		} else {
 			$number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra
 		}
 
@@ -122,7 +122,7 @@
 		);
 
 		$args = array(
-			'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
+			'status' => isset( $status_map[ $comment_status ] ) ? $status_map[ $comment_status ] : $comment_status,
 			'search' => $search,
 			'user_id' => $user_id,
 			'offset' => $start,
@@ -149,7 +149,7 @@
 		$total_comments = get_comments( array_merge( $args, array(
 			'count' => true,
 			'offset' => 0,
-			'number' => 0
+			'number' => 0,
 		) ) );
 
 		$this->set_pagination_args( array(
@@ -236,24 +236,28 @@
 				'Trash <span class="count">(%s)</span>',
 				'Trash <span class="count">(%s)</span>',
 				'comments'
-			)
+			),
 		);
 
-		if ( !EMPTY_TRASH_DAYS )
-			unset($stati['trash']);
+		if ( ! EMPTY_TRASH_DAYS ) {
+			unset( $stati['trash'] );
+		}
 
 		$link = admin_url( 'edit-comments.php' );
-		if ( !empty($comment_type) && 'all' != $comment_type )
+		if ( ! empty( $comment_type ) && 'all' != $comment_type ) {
 			$link = add_query_arg( 'comment_type', $comment_type, $link );
+		}
 
 		foreach ( $stati as $status => $label ) {
 			$class = ( $status === $comment_status ) ? ' class="current"' : '';
 
-			if ( !isset( $num_comments->$status ) )
+			if ( ! isset( $num_comments->$status ) ) {
 				$num_comments->$status = 10;
+			}
 			$link = add_query_arg( 'comment_status', $status, $link );
-			if ( $post_id )
+			if ( $post_id ) {
 				$link = add_query_arg( 'p', absint( $post_id ), $link );
+			}
 			/*
 			// I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
 			if ( !empty( $_REQUEST['s'] ) )
@@ -289,12 +293,15 @@
 		global $comment_status;
 
 		$actions = array();
-		if ( in_array( $comment_status, array( 'all', 'approved' ) ) )
+		if ( in_array( $comment_status, array( 'all', 'approved' ) ) ) {
 			$actions['unapprove'] = __( 'Unapprove' );
-		if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
+		}
+		if ( in_array( $comment_status, array( 'all', 'moderated' ) ) ) {
 			$actions['approve'] = __( 'Approve' );
-		if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) )
+		}
+		if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) ) {
 			$actions['spam'] = _x( 'Mark as Spam', 'comment' );
+		}
 
 		if ( 'trash' === $comment_status ) {
 			$actions['untrash'] = __( 'Restore' );
@@ -302,10 +309,10 @@
 			$actions['unspam'] = _x( 'Not Spam', 'comment' );
 		}
 
-		if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || !EMPTY_TRASH_DAYS )
+		if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || ! EMPTY_TRASH_DAYS ) {
 			$actions['delete'] = __( 'Delete Permanently' );
-		else
-			$actions['trash'] = __( 'Move to Trash' );
+		} else { $actions['trash'] = __( 'Move to Trash' );
+		}
 
 		return $actions;
 	}
@@ -322,43 +329,46 @@
 ?>
 		<div class="alignleft actions">
 <?php
-		if ( 'top' === $which ) {
+if ( 'top' === $which ) {
 ?>
-			<label class="screen-reader-text" for="filter-by-comment-type"><?php _e( 'Filter by comment type' ); ?></label>
-			<select id="filter-by-comment-type" name="comment_type">
-				<option value=""><?php _e( 'All comment types' ); ?></option>
+<label class="screen-reader-text" for="filter-by-comment-type"><?php _e( 'Filter by comment type' ); ?></label>
+<select id="filter-by-comment-type" name="comment_type">
+<option value=""><?php _e( 'All comment types' ); ?></option>
 <?php
-				/**
+/**
 				 * Filters the comment types dropdown menu.
 				 *
 				 * @since 2.7.0
 				 *
 				 * @param array $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
 				 */
-				$comment_types = apply_filters( 'admin_comment_types_dropdown', array(
-					'comment' => __( 'Comments' ),
-					'pings' => __( 'Pings' ),
-				) );
-
-				foreach ( $comment_types as $type => $label )
-					echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
-			?>
-			</select>
+$comment_types = apply_filters( 'admin_comment_types_dropdown', array(
+	'comment' => __( 'Comments' ),
+	'pings' => __( 'Pings' ),
+) );
+
+foreach ( $comment_types as $type => $label ) {
+	echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
+}
+?>
+</select>
 <?php
-			/**
+/**
 			 * Fires just before the Filter submit button for comment types.
 			 *
 			 * @since 3.5.0
 			 */
-			do_action( 'restrict_manage_comments' );
-			submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
-		}
+do_action( 'restrict_manage_comments' );
+submit_button( __( 'Filter' ), '', 'filter_action', false, array(
+	'id' => 'post-query-submit',
+) );
+}
 
-		if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $this->has_items() ) {
-			wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
-			$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
-			submit_button( $title, 'apply', 'delete_all', false );
-		}
+if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $this->has_items() ) {
+	wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
+	$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
+	submit_button( $title, 'apply', 'delete_all', false );
+}
 		/**
 		 * Fires after the Filter submit button for comment types.
 		 *
@@ -374,8 +384,9 @@
 	 * @return string|false
 	 */
 	public function current_action() {
-		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
+		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
 			return 'delete_all';
+		}
 
 		return parent::current_action();
 	}
@@ -391,8 +402,9 @@
 
 		$columns = array();
 
-		if ( $this->checkbox )
+		if ( $this->checkbox ) {
 			$columns['cb'] = '<input type="checkbox" />';
+		}
 
 		$columns['author'] = __( 'Author' );
 		$columns['comment'] = _x( 'Comment', 'column name' );
@@ -415,7 +427,7 @@
 		return array(
 			'author'   => 'comment_author',
 			'response' => 'comment_post_ID',
-			'date'     => 'comment_date'
+			'date'     => 'comment_date',
 		);
 	}
 
@@ -435,7 +447,7 @@
 	 * @access public
 	 */
 	public function display() {
-		wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
+		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
 
 		$this->display_tablenav( 'top' );
 
@@ -501,28 +513,28 @@
 		unset( $GLOBALS['post'], $GLOBALS['comment'] );
 	}
 
- 	/**
- 	 * Generate and display row actions links.
- 	 *
- 	 * @since 4.3.0
- 	 * @access protected
- 	 *
- 	 * @global string $comment_status Status for the current listed comments.
- 	 *
- 	 * @param WP_Comment $comment     The comment object.
- 	 * @param string     $column_name Current column name.
- 	 * @param string     $primary     Primary column name.
- 	 * @return string|void Comment row actions output.
- 	 */
- 	protected function handle_row_actions( $comment, $column_name, $primary ) {
- 		global $comment_status;
+	 /**
+	  * Generate and display row actions links.
+	  *
+	  * @since 4.3.0
+	  * @access protected
+	  *
+	  * @global string $comment_status Status for the current listed comments.
+	  *
+	  * @param WP_Comment $comment     The comment object.
+	  * @param string     $column_name Current column name.
+	  * @param string     $primary     Primary column name.
+	  * @return string|void Comment row actions output.
+	  */
+	protected function handle_row_actions( $comment, $column_name, $primary ) {
+		global $comment_status;
 
 		if ( $primary !== $column_name ) {
 			return '';
 		}
 
- 		if ( ! $this->user_can ) {
- 			return;
+		if ( ! $this->user_can ) {
+			return;
 		}
 
 		$the_comment_status = wp_get_comment_status( $comment );
@@ -544,12 +556,16 @@
 
 		// Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash.
 		$actions = array(
-			'approve' => '', 'unapprove' => '',
-			'reply' => '',
-			'quickedit' => '',
-			'edit' => '',
-			'spam' => '', 'unspam' => '',
-			'trash' => '', 'untrash' => '', 'delete' => ''
+		   'approve' => '',
+		'unapprove' => '',
+		   'reply' => '',
+		   'quickedit' => '',
+		   'edit' => '',
+		   'spam' => '',
+		'unspam' => '',
+		   'trash' => '',
+		'untrash' => '',
+		'delete' => '',
 		);
 
 		// Not looking at all comments.
@@ -574,14 +590,14 @@
 			$actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1' class='vim-z vim-destructive' aria-label='" . esc_attr__( 'Restore this comment from the Trash' ) . "'>" . __( 'Restore' ) . '</a>';
 		}
 
-		if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || !EMPTY_TRASH_DAYS ) {
+		if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || ! EMPTY_TRASH_DAYS ) {
 			$actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Delete this comment permanently' ) . "'>" . __( 'Delete Permanently' ) . '</a>';
 		} else {
 			$actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Move this comment to the Trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
 		}
 
 		if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) {
-			$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>". __( 'Edit' ) . '</a>';
+			$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>" . __( 'Edit' ) . '</a>';
 
 			$format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" aria-label="%s" href="#">%s</a>';
 
@@ -600,13 +616,13 @@
 			( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
 
 			// Reply and quickedit need a hide-if-no-js span when not added with ajax
-			if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() )
+			if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() ) {
 				$action .= ' hide-if-no-js';
-			elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
-				if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )
+			} elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
+				if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) {
 					$action .= ' approve';
-				else
-					$action .= ' unapprove';
+				} else { $action .= ' unapprove';
+				}
 			}
 
 			$out .= "<span class='$action'>$sep$link</span>";
@@ -683,7 +699,9 @@
 			$author_url_display = wp_html_excerpt( $author_url_display, 49, '&hellip;' );
 		}
 
-		echo "<strong>"; comment_author( $comment ); echo '</strong><br />';
+		echo '<strong>';
+		comment_author( $comment );
+		echo '</strong><br />';
 		if ( ! empty( $author_url_display ) ) {
 			printf( '<a href="%s">%s</a><br />', esc_url( $author_url ), esc_html( $author_url_display ) );
 		}
@@ -700,7 +718,10 @@
 
 			$author_ip = get_comment_author_IP( $comment );
 			if ( $author_ip ) {
-				$author_ip_url = add_query_arg( array( 's' => $author_ip, 'mode' => 'detail' ), admin_url( 'edit-comments.php' ) );
+				$author_ip_url = add_query_arg( array(
+					's' => $author_ip,
+					'mode' => 'detail',
+				), admin_url( 'edit-comments.php' ) );
 				if ( 'spam' === $comment_status ) {
 					$author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url );
 				}
@@ -723,7 +744,7 @@
 		);
 
 		echo '<div class="submitted-on">';
-		if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
+		if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
 			printf(
 				'<a href="%s">%s</a>',
 				esc_url( get_comment_link( $comment ) ),
@@ -747,11 +768,11 @@
 			return;
 		}
 
-		if ( isset( $this->pending_count[$post->ID] ) ) {
-			$pending_comments = $this->pending_count[$post->ID];
+		if ( isset( $this->pending_count[ $post->ID ] ) ) {
+			$pending_comments = $this->pending_count[ $post->ID ];
 		} else {
 			$_pending_count_temp = get_pending_comments_num( array( $post->ID ) );
-			$pending_comments = $this->pending_count[$post->ID] = $_pending_count_temp[$post->ID];
+			$pending_comments = $this->pending_count[ $post->ID ] = $_pending_count_temp[ $post->ID ];
 		}
 
 		if ( current_user_can( 'edit_post', $post->ID ) ) {
Index: src/wp-admin/includes/class-wp-community-events.php
===================================================================
--- src/wp-admin/includes/class-wp-community-events.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-community-events.php	(working copy)
@@ -165,7 +165,7 @@
 			$this->maybe_log_events_response( 'Valid response received', $debugging_info );
 
 			return $response_body;
-		}
+		}// End if().
 	}
 
 	/**
@@ -205,7 +205,7 @@
 
 		// Wrap the args in an array compatible with the second parameter of `wp_remote_get()`.
 		return array(
-			'body' => $args
+			'body' => $args,
 		);
 	}
 
@@ -314,7 +314,7 @@
 
 		if ( isset( $location['ip'] ) ) {
 			$key = 'community-events-' . md5( $location['ip'] );
-		} else if ( isset( $location['latitude'], $location['longitude'] ) ) {
+		} elseif ( isset( $location['latitude'], $location['longitude'] ) ) {
 			$key = 'community-events-' . md5( $location['latitude'] . $location['longitude'] );
 		}
 
Index: src/wp-admin/includes/class-wp-filesystem-base.php
===================================================================
--- src/wp-admin/includes/class-wp-filesystem-base.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-filesystem-base.php	(working copy)
@@ -59,10 +59,11 @@
 	 * @return string The location of the remote path.
 	 */
 	public function abspath() {
-		$folder = $this->find_folder(ABSPATH);
+		$folder = $this->find_folder( ABSPATH );
 		// Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare.
-		if ( ! $folder && $this->is_dir( '/' . WPINC ) )
+		if ( ! $folder && $this->is_dir( '/' . WPINC ) ) {
 			$folder = '/';
+		}
 		return $folder;
 	}
 
@@ -75,7 +76,7 @@
 	 * @return string The location of the remote path.
 	 */
 	public function wp_content_dir() {
-		return $this->find_folder(WP_CONTENT_DIR);
+		return $this->find_folder( WP_CONTENT_DIR );
 	}
 
 	/**
@@ -87,7 +88,7 @@
 	 * @return string The location of the remote path.
 	 */
 	public function wp_plugins_dir() {
-		return $this->find_folder(WP_PLUGIN_DIR);
+		return $this->find_folder( WP_PLUGIN_DIR );
 	}
 
 	/**
@@ -103,8 +104,9 @@
 		$theme_root = get_theme_root( $theme );
 
 		// Account for relative theme roots
-		if ( '/themes' == $theme_root || ! is_dir( $theme_root ) )
+		if ( '/themes' == $theme_root || ! is_dir( $theme_root ) ) {
 			$theme_root = WP_CONTENT_DIR . $theme_root;
+		}
 
 		return $this->find_folder( $theme_root );
 	}
@@ -118,7 +120,7 @@
 	 * @return string The location of the remote path.
 	 */
 	public function wp_lang_dir() {
-		return $this->find_folder(WP_LANG_DIR);
+		return $this->find_folder( WP_LANG_DIR );
 	}
 
 	/**
@@ -139,7 +141,7 @@
 	 * @return string The location of the remote path.
 	 */
 	public function find_base_dir( $base = '.', $echo = false ) {
-		_deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
+		_deprecated_function( __FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
 		$this->verbose = $echo;
 		return $this->abspath();
 	}
@@ -161,7 +163,7 @@
 	 * @return string The location of the remote path.
 	 */
 	public function get_base_dir( $base = '.', $echo = false ) {
-		_deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
+		_deprecated_function( __FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
 		$this->verbose = $echo;
 		return $this->abspath();
 	}
@@ -179,29 +181,33 @@
 	 * @return string|false The location of the remote path, false on failure.
 	 */
 	public function find_folder( $folder ) {
-		if ( isset( $this->cache[ $folder ] ) )
+		if ( isset( $this->cache[ $folder ] ) ) {
 			return $this->cache[ $folder ];
+		}
 
-		if ( stripos($this->method, 'ftp') !== false ) {
+		if ( stripos( $this->method, 'ftp' ) !== false ) {
 			$constant_overrides = array(
 				'FTP_BASE' => ABSPATH,
 				'FTP_CONTENT_DIR' => WP_CONTENT_DIR,
 				'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR,
-				'FTP_LANG_DIR' => WP_LANG_DIR
+				'FTP_LANG_DIR' => WP_LANG_DIR,
 			);
 
 			// Direct matches ( folder = CONSTANT/ )
 			foreach ( $constant_overrides as $constant => $dir ) {
-				if ( ! defined( $constant ) )
+				if ( ! defined( $constant ) ) {
 					continue;
-				if ( $folder === $dir )
+				}
+				if ( $folder === $dir ) {
 					return trailingslashit( constant( $constant ) );
+				}
 			}
 
 			// Prefix Matches ( folder = CONSTANT/subdir )
 			foreach ( $constant_overrides as $constant => $dir ) {
-				if ( ! defined( $constant ) )
+				if ( ! defined( $constant ) ) {
 					continue;
+				}
 				if ( 0 === stripos( $folder, $dir ) ) { // $folder starts with $dir
 					$potential_folder = preg_replace( '#^' . preg_quote( $dir, '#' ) . '/#i', trailingslashit( constant( $constant ) ), $folder );
 					$potential_folder = trailingslashit( $potential_folder );
@@ -213,23 +219,25 @@
 				}
 			}
 		} elseif ( 'direct' == $this->method ) {
-			$folder = str_replace('\\', '/', $folder); // Windows path sanitisation
-			return trailingslashit($folder);
-		}
+			$folder = str_replace( '\\', '/', $folder ); // Windows path sanitisation
+			return trailingslashit( $folder );
+		}// End if().
 
-		$folder = preg_replace('|^([a-z]{1}):|i', '', $folder); // Strip out windows drive letter if it's there.
-		$folder = str_replace('\\', '/', $folder); // Windows path sanitisation
+		$folder = preg_replace( '|^([a-z]{1}):|i', '', $folder ); // Strip out windows drive letter if it's there.
+		$folder = str_replace( '\\', '/', $folder ); // Windows path sanitisation
 
-		if ( isset($this->cache[ $folder ] ) )
+		if ( isset( $this->cache[ $folder ] ) ) {
 			return $this->cache[ $folder ];
+		}
 
-		if ( $this->exists($folder) ) { // Folder exists at that absolute path.
-			$folder = trailingslashit($folder);
+		if ( $this->exists( $folder ) ) { // Folder exists at that absolute path.
+			$folder = trailingslashit( $folder );
 			$this->cache[ $folder ] = $folder;
 			return $folder;
 		}
-		if ( $return = $this->search_for_folder($folder) )
+		if ( $return = $this->search_for_folder( $folder ) ) {
 			$this->cache[ $folder ] = $return;
+		}
 		return $return;
 	}
 
@@ -247,17 +255,18 @@
 	 * @return string|false The location of the remote path, false to cease looping.
 	 */
 	public function search_for_folder( $folder, $base = '.', $loop = false ) {
-		if ( empty( $base ) || '.' == $base )
-			$base = trailingslashit($this->cwd());
+		if ( empty( $base ) || '.' == $base ) {
+			$base = trailingslashit( $this->cwd() );
+		}
 
-		$folder = untrailingslashit($folder);
+		$folder = untrailingslashit( $folder );
 
 		if ( $this->verbose ) {
 			/* translators: 1: folder to locate, 2: folder to start searching from */
 			printf( "\n" . __( 'Looking for %1$s in %2$s' ) . "<br/>\n", $folder, $base );
 		}
 
-		$folder_parts = explode('/', $folder);
+		$folder_parts = explode( '/', $folder );
 		$folder_part_keys = array_keys( $folder_parts );
 		$last_index = array_pop( $folder_part_keys );
 		$last_path = $folder_parts[ $last_index ];
@@ -265,8 +274,9 @@
 		$files = $this->dirlist( $base );
 
 		foreach ( $folder_parts as $index => $key ) {
-			if ( $index == $last_index )
+			if ( $index == $last_index ) {
 				continue; // We want this to be caught by the next code block.
+			}
 
 			/*
 			 * Working from /home/ to /user/ to /wordpress/ see if that file exists within
@@ -275,10 +285,10 @@
 			 * folder level, and see if that matches, and so on. If it reaches the end, and still
 			 * cant find it, it'll return false for the entire function.
 			 */
-			if ( isset($files[ $key ]) ){
+			if ( isset( $files[ $key ] ) ) {
 
 				// Let's try that folder:
-				$newdir = trailingslashit(path_join($base, $key));
+				$newdir = trailingslashit( path_join( $base, $key ) );
 				if ( $this->verbose ) {
 					/* translators: %s: directory name */
 					printf( "\n" . __( 'Changing to %s' ) . "<br/>\n", $newdir );
@@ -286,25 +296,27 @@
 
 				// Only search for the remaining path tokens in the directory, not the full path again.
 				$newfolder = implode( '/', array_slice( $folder_parts, $index + 1 ) );
-				if ( $ret = $this->search_for_folder( $newfolder, $newdir, $loop) )
+				if ( $ret = $this->search_for_folder( $newfolder, $newdir, $loop ) ) {
 					return $ret;
+				}
 			}
 		}
 
 		// Only check this as a last resort, to prevent locating the incorrect install.
 		// All above procedures will fail quickly if this is the right branch to take.
-		if (isset( $files[ $last_path ] ) ) {
+		if ( isset( $files[ $last_path ] ) ) {
 			if ( $this->verbose ) {
 				/* translators: %s: directory name */
 				printf( "\n" . __( 'Found %s' ) . "<br/>\n",  $base . $last_path );
 			}
-			return trailingslashit($base . $last_path);
+			return trailingslashit( $base . $last_path );
 		}
 
 		// Prevent this function from looping again.
 		// No need to proceed if we've just searched in /
-		if ( $loop || '/' == $base )
+		if ( $loop || '/' == $base ) {
 			return false;
+		}
 
 		// As an extra last resort, Change back to / if the folder wasn't found.
 		// This comes into effect when the CWD is /home/user/ but WP is at /var/www/....
@@ -325,24 +337,25 @@
 	 * @param string $file String filename.
 	 * @return string The *nix-style representation of permissions.
 	 */
-	public function gethchmod( $file ){
+	public function gethchmod( $file ) {
 		$perms = intval( $this->getchmod( $file ), 8 );
-		if (($perms & 0xC000) == 0xC000) // Socket
+		if ( ($perms & 0xC000) == 0xC000 ) { // Socket
 			$info = 's';
-		elseif (($perms & 0xA000) == 0xA000) // Symbolic Link
+		} elseif ( ($perms & 0xA000) == 0xA000 ) { // Symbolic Link
 			$info = 'l';
-		elseif (($perms & 0x8000) == 0x8000) // Regular
+		} elseif ( ($perms & 0x8000) == 0x8000 ) { // Regular
 			$info = '-';
-		elseif (($perms & 0x6000) == 0x6000) // Block special
+		} elseif ( ($perms & 0x6000) == 0x6000 ) { // Block special
 			$info = 'b';
-		elseif (($perms & 0x4000) == 0x4000) // Directory
+		} elseif ( ($perms & 0x4000) == 0x4000 ) { // Directory
 			$info = 'd';
-		elseif (($perms & 0x2000) == 0x2000) // Character special
+		} elseif ( ($perms & 0x2000) == 0x2000 ) { // Character special
 			$info = 'c';
-		elseif (($perms & 0x1000) == 0x1000) // FIFO pipe
+		} elseif ( ($perms & 0x1000) == 0x1000 ) { // FIFO pipe
 			$info = 'p';
-		else // Unknown
+		} else { // End if().
 			$info = 'u';
+		}
 
 		// Owner
 		$info .= (($perms & 0x0100) ? 'r' : '-');
@@ -384,7 +397,7 @@
 	 *
 	 * Converts '-rw-r--r--' to 0644
 	 * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod()
- 	 *
+	  *
 	 * @link https://secure.php.net/manual/en/function.chmod.php#49614
 	 *
 	 * @access public
@@ -395,18 +408,23 @@
 	 */
 	public function getnumchmodfromh( $mode ) {
 		$realmode = '';
-		$legal =  array('', 'w', 'r', 'x', '-');
-		$attarray = preg_split('//', $mode);
+		$legal = array( '', 'w', 'r', 'x', '-' );
+		$attarray = preg_split( '//', $mode );
 
 		for ( $i = 0, $c = count( $attarray ); $i < $c; $i++ ) {
-		   if ($key = array_search($attarray[$i], $legal)) {
-			   $realmode .= $legal[$key];
-		   }
+			if ( $key = array_search( $attarray[ $i ], $legal ) ) {
+				$realmode .= $legal[ $key ];
+			}
 		}
 
-		$mode = str_pad($realmode, 10, '-', STR_PAD_LEFT);
-		$trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1');
-		$mode = strtr($mode,$trans);
+		$mode = str_pad( $realmode, 10, '-', STR_PAD_LEFT );
+		$trans = array(
+			'-' => '0',
+			'r' => '4',
+			'w' => '2',
+			'x' => '1',
+		);
+		$mode = strtr( $mode,$trans );
 
 		$newmode = $mode[0];
 		$newmode .= $mode[1] + $mode[2] + $mode[3];
@@ -567,7 +585,7 @@
 	 * @access public
 	 * @since 2.5.0
 	 * @abstract
-	 * 
+	 *
 	 * @param string $file Path to the file.
 	 * @return string|bool Username of the user or false on error.
 	 */
Index: src/wp-admin/includes/class-wp-filesystem-direct.php
===================================================================
--- src/wp-admin/includes/class-wp-filesystem-direct.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-filesystem-direct.php	(working copy)
@@ -23,7 +23,7 @@
 	 *
 	 * @param mixed $arg ignored argument
 	 */
-	public function __construct($arg) {
+	public function __construct( $arg ) {
 		$this->method = 'direct';
 		$this->errors = new WP_Error();
 	}
@@ -36,8 +36,8 @@
 	 * @param string $file Name of the file to read.
 	 * @return string|bool The function returns the read data or false on failure.
 	 */
-	public function get_contents($file) {
-		return @file_get_contents($file);
+	public function get_contents( $file ) {
+		return @file_get_contents( $file );
 	}
 
 	/**
@@ -48,8 +48,8 @@
 	 * @param string $file Path to the file.
 	 * @return array|bool the file contents in an array or false on failure.
 	 */
-	public function get_contents_array($file) {
-		return @file($file);
+	public function get_contents_array( $file ) {
+		return @file( $file );
 	}
 
 	/**
@@ -65,8 +65,9 @@
 	 */
 	public function put_contents( $file, $contents, $mode = false ) {
 		$fp = @fopen( $file, 'wb' );
-		if ( ! $fp )
+		if ( ! $fp ) {
 			return false;
+		}
 
 		mbstring_binary_safe_encoding();
 
@@ -78,8 +79,9 @@
 
 		fclose( $fp );
 
-		if ( $data_length !== $bytes_written )
+		if ( $data_length !== $bytes_written ) {
 			return false;
+		}
 
 		$this->chmod( $file, $mode );
 
@@ -105,8 +107,8 @@
 	 * @param string $dir The new current directory.
 	 * @return bool Returns true on success or false on failure.
 	 */
-	public function chdir($dir) {
-		return @chdir($dir);
+	public function chdir( $dir ) {
+		return @chdir( $dir );
 	}
 
 	/**
@@ -119,18 +121,22 @@
 	 * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
 	 * @return bool Returns true on success or false on failure.
 	 */
-	public function chgrp($file, $group, $recursive = false) {
-		if ( ! $this->exists($file) )
+	public function chgrp( $file, $group, $recursive = false ) {
+		if ( ! $this->exists( $file ) ) {
 			return false;
-		if ( ! $recursive )
-			return @chgrp($file, $group);
-		if ( ! $this->is_dir($file) )
-			return @chgrp($file, $group);
+		}
+		if ( ! $recursive ) {
+			return @chgrp( $file, $group );
+		}
+		if ( ! $this->is_dir( $file ) ) {
+			return @chgrp( $file, $group );
+		}
 		// Is a directory, and we want recursive
-		$file = trailingslashit($file);
-		$filelist = $this->dirlist($file);
-		foreach ($filelist as $filename)
-			$this->chgrp($file . $filename, $group, $recursive);
+		$file = trailingslashit( $file );
+		$filelist = $this->dirlist( $file );
+		foreach ( $filelist as $filename ) {
+			$this->chgrp( $file . $filename, $group, $recursive );
+		}
 
 		return true;
 	}
@@ -146,23 +152,25 @@
 	 * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
 	 * @return bool Returns true on success or false on failure.
 	 */
-	public function chmod($file, $mode = false, $recursive = false) {
+	public function chmod( $file, $mode = false, $recursive = false ) {
 		if ( ! $mode ) {
-			if ( $this->is_file($file) )
+			if ( $this->is_file( $file ) ) {
 				$mode = FS_CHMOD_FILE;
-			elseif ( $this->is_dir($file) )
+			} elseif ( $this->is_dir( $file ) ) {
 				$mode = FS_CHMOD_DIR;
-			else
-				return false;
+			} else { return false;
+			}
 		}
 
-		if ( ! $recursive || ! $this->is_dir($file) )
-			return @chmod($file, $mode);
+		if ( ! $recursive || ! $this->is_dir( $file ) ) {
+			return @chmod( $file, $mode );
+		}
 		// Is a directory, and we want recursive
-		$file = trailingslashit($file);
-		$filelist = $this->dirlist($file);
-		foreach ( (array)$filelist as $filename => $filemeta)
-			$this->chmod($file . $filename, $mode, $recursive);
+		$file = trailingslashit( $file );
+		$filelist = $this->dirlist( $file );
+		foreach ( (array) $filelist as $filename => $filemeta ) {
+			$this->chmod( $file . $filename, $mode, $recursive );
+		}
 
 		return true;
 	}
@@ -178,17 +186,20 @@
 	 *                          Default false.
 	 * @return bool Returns true on success or false on failure.
 	 */
-	public function chown($file, $owner, $recursive = false) {
-		if ( ! $this->exists($file) )
+	public function chown( $file, $owner, $recursive = false ) {
+		if ( ! $this->exists( $file ) ) {
 			return false;
-		if ( ! $recursive )
-			return @chown($file, $owner);
-		if ( ! $this->is_dir($file) )
-			return @chown($file, $owner);
+		}
+		if ( ! $recursive ) {
+			return @chown( $file, $owner );
+		}
+		if ( ! $this->is_dir( $file ) ) {
+			return @chown( $file, $owner );
+		}
 		// Is a directory, and we want recursive
-		$filelist = $this->dirlist($file);
-		foreach ($filelist as $filename) {
-			$this->chown($file . '/' . $filename, $owner, $recursive);
+		$filelist = $this->dirlist( $file );
+		foreach ( $filelist as $filename ) {
+			$this->chown( $file . '/' . $filename, $owner, $recursive );
 		}
 		return true;
 	}
@@ -201,13 +212,15 @@
 	 * @param string $file Path to the file.
 	 * @return string|bool Username of the user or false on error.
 	 */
-	public function owner($file) {
-		$owneruid = @fileowner($file);
-		if ( ! $owneruid )
+	public function owner( $file ) {
+		$owneruid = @fileowner( $file );
+		if ( ! $owneruid ) {
 			return false;
-		if ( ! function_exists('posix_getpwuid') )
+		}
+		if ( ! function_exists( 'posix_getpwuid' ) ) {
 			return $owneruid;
-		$ownerarray = posix_getpwuid($owneruid);
+		}
+		$ownerarray = posix_getpwuid( $owneruid );
 		return $ownerarray['name'];
 	}
 
@@ -221,7 +234,7 @@
 	 * @param string $file Path to the file.
 	 * @return string Mode of the file (last 3 digits).
 	 */
-	public function getchmod($file) {
+	public function getchmod( $file ) {
 		return substr( decoct( @fileperms( $file ) ), -3 );
 	}
 
@@ -231,13 +244,15 @@
 	 * @param string $file
 	 * @return string|false
 	 */
-	public function group($file) {
-		$gid = @filegroup($file);
-		if ( ! $gid )
+	public function group( $file ) {
+		$gid = @filegroup( $file );
+		if ( ! $gid ) {
 			return false;
-		if ( ! function_exists('posix_getgrgid') )
+		}
+		if ( ! function_exists( 'posix_getgrgid' ) ) {
 			return $gid;
-		$grouparray = posix_getgrgid($gid);
+		}
+		$grouparray = posix_getgrgid( $gid );
 		return $grouparray['name'];
 	}
 
@@ -250,13 +265,15 @@
 	 * @param int    $mode
 	 * @return bool
 	 */
-	public function copy($source, $destination, $overwrite = false, $mode = false) {
-		if ( ! $overwrite && $this->exists($destination) )
+	public function copy( $source, $destination, $overwrite = false, $mode = false ) {
+		if ( ! $overwrite && $this->exists( $destination ) ) {
 			return false;
+		}
 
-		$rtval = copy($source, $destination);
-		if ( $mode )
-			$this->chmod($destination, $mode);
+		$rtval = copy( $source, $destination );
+		if ( $mode ) {
+			$this->chmod( $destination, $mode );
+		}
 		return $rtval;
 	}
 
@@ -268,16 +285,18 @@
 	 * @param bool $overwrite
 	 * @return bool
 	 */
-	public function move($source, $destination, $overwrite = false) {
-		if ( ! $overwrite && $this->exists($destination) )
+	public function move( $source, $destination, $overwrite = false ) {
+		if ( ! $overwrite && $this->exists( $destination ) ) {
 			return false;
+		}
 
 		// Try using rename first. if that fails (for example, source is read only) try copy.
-		if ( @rename($source, $destination) )
+		if ( @rename( $source, $destination ) ) {
 			return true;
+		}
 
-		if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ) {
-			$this->delete($source);
+		if ( $this->copy( $source, $destination, $overwrite ) && $this->exists( $destination ) ) {
+			$this->delete( $source );
 			return true;
 		} else {
 			return false;
@@ -292,30 +311,35 @@
 	 * @param string $type
 	 * @return bool
 	 */
-	public function delete($file, $recursive = false, $type = false) {
-		if ( empty( $file ) ) // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem.
+	public function delete( $file, $recursive = false, $type = false ) {
+		if ( empty( $file ) ) { // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem.
 			return false;
+		}
 		$file = str_replace( '\\', '/', $file ); // for win32, occasional problems deleting files otherwise
 
-		if ( 'f' == $type || $this->is_file($file) )
-			return @unlink($file);
-		if ( ! $recursive && $this->is_dir($file) )
-			return @rmdir($file);
+		if ( 'f' == $type || $this->is_file( $file ) ) {
+			return @unlink( $file );
+		}
+		if ( ! $recursive && $this->is_dir( $file ) ) {
+			return @rmdir( $file );
+		}
 
 		// At this point it's a folder, and we're in recursive mode
-		$file = trailingslashit($file);
-		$filelist = $this->dirlist($file, true);
+		$file = trailingslashit( $file );
+		$filelist = $this->dirlist( $file, true );
 
 		$retval = true;
 		if ( is_array( $filelist ) ) {
 			foreach ( $filelist as $filename => $fileinfo ) {
-				if ( ! $this->delete($file . $filename, $recursive, $fileinfo['type']) )
+				if ( ! $this->delete( $file . $filename, $recursive, $fileinfo['type'] ) ) {
 					$retval = false;
+				}
 			}
 		}
 
-		if ( file_exists($file) && ! @rmdir($file) )
+		if ( file_exists( $file ) && ! @rmdir( $file ) ) {
 			$retval = false;
+		}
 
 		return $retval;
 	}
@@ -325,8 +349,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function exists($file) {
-		return @file_exists($file);
+	public function exists( $file ) {
+		return @file_exists( $file );
 	}
 	/**
 	 * @access public
@@ -334,8 +358,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_file($file) {
-		return @is_file($file);
+	public function is_file( $file ) {
+		return @is_file( $file );
 	}
 	/**
 	 * @access public
@@ -343,8 +367,8 @@
 	 * @param string $path
 	 * @return bool
 	 */
-	public function is_dir($path) {
-		return @is_dir($path);
+	public function is_dir( $path ) {
+		return @is_dir( $path );
 	}
 
 	/**
@@ -353,8 +377,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_readable($file) {
-		return @is_readable($file);
+	public function is_readable( $file ) {
+		return @is_readable( $file );
 	}
 
 	/**
@@ -363,8 +387,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_writable($file) {
-		return @is_writable($file);
+	public function is_writable( $file ) {
+		return @is_writable( $file );
 	}
 
 	/**
@@ -373,8 +397,8 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function atime($file) {
-		return @fileatime($file);
+	public function atime( $file ) {
+		return @fileatime( $file );
 	}
 
 	/**
@@ -383,8 +407,8 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function mtime($file) {
-		return @filemtime($file);
+	public function mtime( $file ) {
+		return @filemtime( $file );
 	}
 
 	/**
@@ -393,8 +417,8 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function size($file) {
-		return @filesize($file);
+	public function size( $file ) {
+		return @filesize( $file );
 	}
 
 	/**
@@ -405,12 +429,14 @@
 	 * @param int $atime
 	 * @return bool
 	 */
-	public function touch($file, $time = 0, $atime = 0) {
-		if ($time == 0)
+	public function touch( $file, $time = 0, $atime = 0 ) {
+		if ( $time == 0 ) {
 			$time = time();
-		if ($atime == 0)
+		}
+		if ( $atime == 0 ) {
 			$atime = time();
-		return @touch($file, $time, $atime);
+		}
+		return @touch( $file, $time, $atime );
 	}
 
 	/**
@@ -422,22 +448,27 @@
 	 * @param mixed  $chgrp
 	 * @return bool
 	 */
-	public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
+	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
 		// Safe mode fails with a trailing slash under certain PHP versions.
-		$path = untrailingslashit($path);
-		if ( empty($path) )
+		$path = untrailingslashit( $path );
+		if ( empty( $path ) ) {
 			return false;
+		}
 
-		if ( ! $chmod )
+		if ( ! $chmod ) {
 			$chmod = FS_CHMOD_DIR;
+		}
 
-		if ( ! @mkdir($path) )
+		if ( ! @mkdir( $path ) ) {
 			return false;
-		$this->chmod($path, $chmod);
-		if ( $chown )
-			$this->chown($path, $chown);
-		if ( $chgrp )
-			$this->chgrp($path, $chgrp);
+		}
+		$this->chmod( $path, $chmod );
+		if ( $chown ) {
+			$this->chown( $path, $chown );
+		}
+		if ( $chgrp ) {
+			$this->chgrp( $path, $chgrp );
+		}
 		return true;
 	}
 
@@ -448,8 +479,8 @@
 	 * @param bool $recursive
 	 * @return bool
 	 */
-	public function rmdir($path, $recursive = false) {
-		return $this->delete($path, $recursive);
+	public function rmdir( $path, $recursive = false ) {
+		return $this->delete( $path, $recursive );
 	}
 
 	/**
@@ -460,58 +491,63 @@
 	 * @param bool $recursive
 	 * @return bool|array
 	 */
-	public function dirlist($path, $include_hidden = true, $recursive = false) {
-		if ( $this->is_file($path) ) {
-			$limit_file = basename($path);
-			$path = dirname($path);
+	public function dirlist( $path, $include_hidden = true, $recursive = false ) {
+		if ( $this->is_file( $path ) ) {
+			$limit_file = basename( $path );
+			$path = dirname( $path );
 		} else {
 			$limit_file = false;
 		}
 
-		if ( ! $this->is_dir($path) )
+		if ( ! $this->is_dir( $path ) ) {
 			return false;
+		}
 
-		$dir = @dir($path);
-		if ( ! $dir )
+		$dir = @dir( $path );
+		if ( ! $dir ) {
 			return false;
+		}
 
 		$ret = array();
 
-		while (false !== ($entry = $dir->read()) ) {
+		while ( false !== ($entry = $dir->read()) ) {
 			$struc = array();
 			$struc['name'] = $entry;
 
-			if ( '.' == $struc['name'] || '..' == $struc['name'] )
+			if ( '.' == $struc['name'] || '..' == $struc['name'] ) {
 				continue;
+			}
 
-			if ( ! $include_hidden && '.' == $struc['name'][0] )
+			if ( ! $include_hidden && '.' == $struc['name'][0] ) {
 				continue;
+			}
 
-			if ( $limit_file && $struc['name'] != $limit_file)
+			if ( $limit_file && $struc['name'] != $limit_file ) {
 				continue;
+			}
 
-			$struc['perms'] 	= $this->gethchmod($path.'/'.$entry);
-			$struc['permsn']	= $this->getnumchmodfromh($struc['perms']);
+			$struc['perms'] 	= $this->gethchmod( $path . '/' . $entry );
+			$struc['permsn']	= $this->getnumchmodfromh( $struc['perms'] );
 			$struc['number'] 	= false;
-			$struc['owner']    	= $this->owner($path.'/'.$entry);
-			$struc['group']    	= $this->group($path.'/'.$entry);
-			$struc['size']    	= $this->size($path.'/'.$entry);
-			$struc['lastmodunix']= $this->mtime($path.'/'.$entry);
-			$struc['lastmod']   = date('M j',$struc['lastmodunix']);
-			$struc['time']    	= date('h:i:s',$struc['lastmodunix']);
-			$struc['type']		= $this->is_dir($path.'/'.$entry) ? 'd' : 'f';
+			$struc['owner']    	= $this->owner( $path . '/' . $entry );
+			$struc['group']    	= $this->group( $path . '/' . $entry );
+			$struc['size']    	= $this->size( $path . '/' . $entry );
+			$struc['lastmodunix'] = $this->mtime( $path . '/' . $entry );
+			$struc['lastmod']   = date( 'M j',$struc['lastmodunix'] );
+			$struc['time']    	= date( 'h:i:s',$struc['lastmodunix'] );
+			$struc['type']		= $this->is_dir( $path . '/' . $entry ) ? 'd' : 'f';
 
 			if ( 'd' == $struc['type'] ) {
-				if ( $recursive )
-					$struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive);
-				else
-					$struc['files'] = array();
+				if ( $recursive ) {
+					$struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
+				} else { $struc['files'] = array();
+				}
 			}
 
 			$ret[ $struc['name'] ] = $struc;
-		}
+		}// End while().
 		$dir->close();
-		unset($dir);
+		unset( $dir );
 		return $ret;
 	}
 }
Index: src/wp-admin/includes/class-wp-filesystem-ftpext.php
===================================================================
--- src/wp-admin/includes/class-wp-filesystem-ftpext.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-filesystem-ftpext.php	(working copy)
@@ -27,40 +27,42 @@
 		$this->errors = new WP_Error();
 
 		// Check if possible to use ftp functions.
-		if ( ! extension_loaded('ftp') ) {
-			$this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available'));
+		if ( ! extension_loaded( 'ftp' ) ) {
+			$this->errors->add( 'no_ftp_ext', __( 'The ftp PHP extension is not available' ) );
 			return;
 		}
 
 		// This Class uses the timeout on a per-connection basis, Others use it on a per-action basis.
 
-		if ( ! defined('FS_TIMEOUT') )
-			define('FS_TIMEOUT', 240);
+		if ( ! defined( 'FS_TIMEOUT' ) ) {
+			define( 'FS_TIMEOUT', 240 );
+		}
 
-		if ( empty($opt['port']) )
+		if ( empty( $opt['port'] ) ) {
 			$this->options['port'] = 21;
-		else
-			$this->options['port'] = $opt['port'];
+		} else { $this->options['port'] = $opt['port'];
+		}
 
-		if ( empty($opt['hostname']) )
-			$this->errors->add('empty_hostname', __('FTP hostname is required'));
-		else
-			$this->options['hostname'] = $opt['hostname'];
+		if ( empty( $opt['hostname'] ) ) {
+			$this->errors->add( 'empty_hostname', __( 'FTP hostname is required' ) );
+		} else { $this->options['hostname'] = $opt['hostname'];
+		}
 
 		// Check if the options provided are OK.
-		if ( empty($opt['username']) )
-			$this->errors->add('empty_username', __('FTP username is required'));
-		else
-			$this->options['username'] = $opt['username'];
-
-		if ( empty($opt['password']) )
-			$this->errors->add('empty_password', __('FTP password is required'));
-		else
-			$this->options['password'] = $opt['password'];
+		if ( empty( $opt['username'] ) ) {
+			$this->errors->add( 'empty_username', __( 'FTP username is required' ) );
+		} else { $this->options['username'] = $opt['username'];
+		}
+
+		if ( empty( $opt['password'] ) ) {
+			$this->errors->add( 'empty_password', __( 'FTP password is required' ) );
+		} else { $this->options['password'] = $opt['password'];
+		}
 
 		$this->options['ssl'] = false;
-		if ( isset($opt['connection_type']) && 'ftps' == $opt['connection_type'] )
+		if ( isset( $opt['connection_type'] ) && 'ftps' == $opt['connection_type'] ) {
 			$this->options['ssl'] = true;
+		}
 	}
 
 	/**
@@ -69,10 +71,10 @@
 	 * @return bool
 	 */
 	public function connect() {
-		if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') )
-			$this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);
-		else
-			$this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT);
+		if ( isset( $this->options['ssl'] ) && $this->options['ssl'] && function_exists( 'ftp_ssl_connect' ) ) {
+			$this->link = @ftp_ssl_connect( $this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT );
+		} else { $this->link = @ftp_connect( $this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT );
+		}
 
 		if ( ! $this->link ) {
 			$this->errors->add( 'connect',
@@ -96,8 +98,9 @@
 
 		// Set the Connection to use Passive FTP
 		@ftp_pasv( $this->link, true );
-		if ( @ftp_get_option($this->link, FTP_TIMEOUT_SEC) < FS_TIMEOUT )
-			@ftp_set_option($this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT);
+		if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) {
+			@ftp_set_option( $this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT );
+		}
 
 		return true;
 	}
@@ -113,8 +116,8 @@
 	 *                      or if the file couldn't be retrieved.
 	 */
 	public function get_contents( $file ) {
-		$tempfile = wp_tempnam($file);
-		$temp = fopen($tempfile, 'w+');
+		$tempfile = wp_tempnam( $file );
+		$temp = fopen( $tempfile, 'w+' );
 
 		if ( ! $temp ) {
 			unlink( $tempfile );
@@ -130,11 +133,11 @@
 		fseek( $temp, 0 ); // Skip back to the start of the file being written to
 		$contents = '';
 
-		while ( ! feof($temp) )
-			$contents .= fread($temp, 8192);
+		while ( ! feof( $temp ) ) {			$contents .= fread( $temp, 8192 );
+		}
 
-		fclose($temp);
-		unlink($tempfile);
+		fclose( $temp );
+		unlink( $tempfile );
 		return $contents;
 	}
 
@@ -144,8 +147,8 @@
 	 * @param string $file
 	 * @return array
 	 */
-	public function get_contents_array($file) {
-		return explode("\n", $this->get_contents($file));
+	public function get_contents_array( $file ) {
+		return explode( "\n", $this->get_contents( $file ) );
 	}
 
 	/**
@@ -156,8 +159,8 @@
 	 * @param bool|int $mode
 	 * @return bool
 	 */
-	public function put_contents($file, $contents, $mode = false ) {
-		$tempfile = wp_tempnam($file);
+	public function put_contents( $file, $contents, $mode = false ) {
+		$tempfile = wp_tempnam( $file );
 		$temp = fopen( $tempfile, 'wb+' );
 
 		if ( ! $temp ) {
@@ -182,10 +185,10 @@
 
 		$ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY );
 
-		fclose($temp);
-		unlink($tempfile);
+		fclose( $temp );
+		unlink( $tempfile );
 
-		$this->chmod($file, $mode);
+		$this->chmod( $file, $mode );
 
 		return $ret;
 	}
@@ -196,9 +199,10 @@
 	 * @return string
 	 */
 	public function cwd() {
-		$cwd = @ftp_pwd($this->link);
-		if ( $cwd )
-			$cwd = trailingslashit($cwd);
+		$cwd = @ftp_pwd( $this->link );
+		if ( $cwd ) {
+			$cwd = trailingslashit( $cwd );
+		}
 		return $cwd;
 	}
 
@@ -208,8 +212,8 @@
 	 * @param string $dir
 	 * @return bool
 	 */
-	public function chdir($dir) {
-		return @ftp_chdir($this->link, $dir);
+	public function chdir( $dir ) {
+		return @ftp_chdir( $this->link, $dir );
 	}
 
 	/**
@@ -220,27 +224,29 @@
 	 * @param bool $recursive
 	 * @return bool
 	 */
-	public function chmod($file, $mode = false, $recursive = false) {
+	public function chmod( $file, $mode = false, $recursive = false ) {
 		if ( ! $mode ) {
-			if ( $this->is_file($file) )
+			if ( $this->is_file( $file ) ) {
 				$mode = FS_CHMOD_FILE;
-			elseif ( $this->is_dir($file) )
+			} elseif ( $this->is_dir( $file ) ) {
 				$mode = FS_CHMOD_DIR;
-			else
-				return false;
+			} else { return false;
+			}
 		}
 
 		// chmod any sub-objects if recursive.
-		if ( $recursive && $this->is_dir($file) ) {
-			$filelist = $this->dirlist($file);
-			foreach ( (array)$filelist as $filename => $filemeta )
-				$this->chmod($file . '/' . $filename, $mode, $recursive);
+		if ( $recursive && $this->is_dir( $file ) ) {
+			$filelist = $this->dirlist( $file );
+			foreach ( (array) $filelist as $filename => $filemeta ) {
+				$this->chmod( $file . '/' . $filename, $mode, $recursive );
+			}
 		}
 
 		// chmod the file or directory
-		if ( ! function_exists('ftp_chmod') )
-			return (bool)@ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));
-		return (bool)@ftp_chmod($this->link, $mode, $file);
+		if ( ! function_exists( 'ftp_chmod' ) ) {
+			return (bool) @ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
+		}
+		return (bool) @ftp_chmod( $this->link, $mode, $file );
 	}
 
 	/**
@@ -249,9 +255,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function owner($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['owner'];
+	public function owner( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['owner'];
 	}
 	/**
 	 * @access public
@@ -259,9 +265,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function getchmod($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['permsn'];
+	public function getchmod( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['permsn'];
 	}
 
 	/**
@@ -270,9 +276,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function group($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['group'];
+	public function group( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['group'];
 	}
 
 	/**
@@ -284,13 +290,15 @@
 	 * @param string|bool $mode
 	 * @return bool
 	 */
-	public function copy($source, $destination, $overwrite = false, $mode = false) {
-		if ( ! $overwrite && $this->exists($destination) )
+	public function copy( $source, $destination, $overwrite = false, $mode = false ) {
+		if ( ! $overwrite && $this->exists( $destination ) ) {
 			return false;
-		$content = $this->get_contents($source);
-		if ( false === $content )
+		}
+		$content = $this->get_contents( $source );
+		if ( false === $content ) {
 			return false;
-		return $this->put_contents($destination, $content, $mode);
+		}
+		return $this->put_contents( $destination, $content, $mode );
 	}
 
 	/**
@@ -301,8 +309,8 @@
 	 * @param bool $overwrite
 	 * @return bool
 	 */
-	public function move($source, $destination, $overwrite = false) {
-		return ftp_rename($this->link, $source, $destination);
+	public function move( $source, $destination, $overwrite = false ) {
+		return ftp_rename( $this->link, $source, $destination );
 	}
 
 	/**
@@ -313,19 +321,24 @@
 	 * @param string $type
 	 * @return bool
 	 */
-	public function delete($file, $recursive = false, $type = false) {
-		if ( empty($file) )
+	public function delete( $file, $recursive = false, $type = false ) {
+		if ( empty( $file ) ) {
 			return false;
-		if ( 'f' == $type || $this->is_file($file) )
-			return @ftp_delete($this->link, $file);
-		if ( !$recursive )
-			return @ftp_rmdir($this->link, $file);
+		}
+		if ( 'f' == $type || $this->is_file( $file ) ) {
+			return @ftp_delete( $this->link, $file );
+		}
+		if ( ! $recursive ) {
+			return @ftp_rmdir( $this->link, $file );
+		}
 
-		$filelist = $this->dirlist( trailingslashit($file) );
-		if ( !empty($filelist) )
-			foreach ( $filelist as $delete_file )
-				$this->delete( trailingslashit($file) . $delete_file['name'], $recursive, $delete_file['type'] );
-		return @ftp_rmdir($this->link, $file);
+		$filelist = $this->dirlist( trailingslashit( $file ) );
+		if ( ! empty( $filelist ) ) {
+			foreach ( $filelist as $delete_file ) {
+				$this->delete( trailingslashit( $file ) . $delete_file['name'], $recursive, $delete_file['type'] );
+			}
+		}
+		return @ftp_rmdir( $this->link, $file );
 	}
 
 	/**
@@ -334,14 +347,14 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function exists($file) {
-		$list = @ftp_nlist($this->link, $file);
+	public function exists( $file ) {
+		$list = @ftp_nlist( $this->link, $file );
 
 		if ( empty( $list ) && $this->is_dir( $file ) ) {
 			return true; // File is an empty directory.
 		}
 
-		return !empty($list); //empty list = no file, so invert.
+		return ! empty( $list ); //empty list = no file, so invert.
 	}
 
 	/**
@@ -350,8 +363,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_file($file) {
-		return $this->exists($file) && !$this->is_dir($file);
+	public function is_file( $file ) {
+		return $this->exists( $file ) && ! $this->is_dir( $file );
 	}
 
 	/**
@@ -360,11 +373,11 @@
 	 * @param string $path
 	 * @return bool
 	 */
-	public function is_dir($path) {
+	public function is_dir( $path ) {
 		$cwd = $this->cwd();
-		$result = @ftp_chdir($this->link, trailingslashit($path) );
+		$result = @ftp_chdir( $this->link, trailingslashit( $path ) );
 		if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) {
-			@ftp_chdir($this->link, $cwd);
+			@ftp_chdir( $this->link, $cwd );
 			return true;
 		}
 		return false;
@@ -376,7 +389,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_readable($file) {
+	public function is_readable( $file ) {
 		return true;
 	}
 
@@ -386,7 +399,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_writable($file) {
+	public function is_writable( $file ) {
 		return true;
 	}
 
@@ -396,7 +409,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function atime($file) {
+	public function atime( $file ) {
 		return false;
 	}
 
@@ -406,8 +419,8 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function mtime($file) {
-		return ftp_mdtm($this->link, $file);
+	public function mtime( $file ) {
+		return ftp_mdtm( $this->link, $file );
 	}
 
 	/**
@@ -416,8 +429,8 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function size($file) {
-		return ftp_size($this->link, $file);
+	public function size( $file ) {
+		return ftp_size( $this->link, $file );
 	}
 
 	/**
@@ -426,7 +439,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function touch($file, $time = 0, $atime = 0) {
+	public function touch( $file, $time = 0, $atime = 0 ) {
 		return false;
 	}
 
@@ -439,14 +452,16 @@
 	 * @param mixed $chgrp
 	 * @return bool
 	 */
-	public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
-		$path = untrailingslashit($path);
-		if ( empty($path) )
+	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
+		$path = untrailingslashit( $path );
+		if ( empty( $path ) ) {
 			return false;
+		}
 
-		if ( !@ftp_mkdir($this->link, $path) )
+		if ( ! @ftp_mkdir( $this->link, $path ) ) {
 			return false;
-		$this->chmod($path, $chmod);
+		}
+		$this->chmod( $path, $chmod );
 		return true;
 	}
 
@@ -457,8 +472,8 @@
 	 * @param bool $recursive
 	 * @return bool
 	 */
-	public function rmdir($path, $recursive = false) {
-		return $this->delete($path, $recursive);
+	public function rmdir( $path, $recursive = false ) {
+		return $this->delete( $path, $recursive );
 	}
 
 	/**
@@ -468,45 +483,47 @@
 	 * @param string $line
 	 * @return array
 	 */
-	public function parselisting($line) {
+	public function parselisting( $line ) {
 		static $is_windows = null;
-		if ( is_null($is_windows) )
-			$is_windows = stripos( ftp_systype($this->link), 'win') !== false;
+		if ( is_null( $is_windows ) ) {
+			$is_windows = stripos( ftp_systype( $this->link ), 'win' ) !== false;
+		}
 
-		if ( $is_windows && preg_match('/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/', $line, $lucifer) ) {
+		if ( $is_windows && preg_match( '/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/', $line, $lucifer ) ) {
 			$b = array();
-			if ( $lucifer[3] < 70 )
-				$lucifer[3] +=2000;
-			else
-				$lucifer[3] += 1900; // 4digit year fix
+			if ( $lucifer[3] < 70 ) {
+				$lucifer[3] += 2000;
+			} else { $lucifer[3] += 1900; // End if().
+			}
 			$b['isdir'] = ( $lucifer[7] == '<DIR>');
-			if ( $b['isdir'] )
+			if ( $b['isdir'] ) {
 				$b['type'] = 'd';
-			else
-				$b['type'] = 'f';
+			} else { $b['type'] = 'f';
+			}
 			$b['size'] = $lucifer[7];
 			$b['month'] = $lucifer[1];
 			$b['day'] = $lucifer[2];
 			$b['year'] = $lucifer[3];
 			$b['hour'] = $lucifer[4];
 			$b['minute'] = $lucifer[5];
-			$b['time'] = @mktime($lucifer[4] + (strcasecmp($lucifer[6], "PM") == 0 ? 12 : 0), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3]);
+			$b['time'] = @mktime( $lucifer[4] + (strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );
 			$b['am/pm'] = $lucifer[6];
 			$b['name'] = $lucifer[8];
-		} elseif ( !$is_windows && $lucifer = preg_split('/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY)) {
+		} elseif ( ! $is_windows && $lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY ) ) {
 			//echo $line."\n";
-			$lcount = count($lucifer);
-			if ( $lcount < 8 )
+			$lcount = count( $lucifer );
+			if ( $lcount < 8 ) {
 				return '';
+			}
 			$b = array();
 			$b['isdir'] = $lucifer[0]{0} === 'd';
 			$b['islink'] = $lucifer[0]{0} === 'l';
-			if ( $b['isdir'] )
+			if ( $b['isdir'] ) {
 				$b['type'] = 'd';
-			elseif ( $b['islink'] )
+			} elseif ( $b['islink'] ) {
 				$b['type'] = 'l';
-			else
-				$b['type'] = 'f';
+			} else { $b['type'] = 'f';
+			}
 			$b['perms'] = $lucifer[0];
 			$b['permsn'] = $this->getnumchmodfromh( $b['perms'] );
 			$b['number'] = $lucifer[1];
@@ -514,15 +531,15 @@
 			$b['group'] = $lucifer[3];
 			$b['size'] = $lucifer[4];
 			if ( $lcount == 8 ) {
-				sscanf($lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day']);
-				sscanf($lucifer[6], '%d:%d', $b['hour'], $b['minute']);
-				$b['time'] = @mktime($b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year']);
+				sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] );
+				sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] );
+				$b['time'] = @mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] );
 				$b['name'] = $lucifer[7];
 			} else {
 				$b['month'] = $lucifer[5];
 				$b['day'] = $lucifer[6];
-				if ( preg_match('/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2) ) {
-					$b['year'] = date("Y");
+				if ( preg_match( '/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2 ) ) {
+					$b['year'] = date( 'Y' );
 					$b['hour'] = $l2[1];
 					$b['minute'] = $l2[2];
 				} else {
@@ -530,10 +547,10 @@
 					$b['hour'] = 0;
 					$b['minute'] = 0;
 				}
-				$b['time'] = strtotime( sprintf('%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute']) );
+				$b['time'] = strtotime( sprintf( '%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute'] ) );
 				$b['name'] = $lucifer[8];
 			}
-		}
+		}// End if().
 
 		// Replace symlinks formatted as "source -> target" with just the source name
 		if ( isset( $b['islink'] ) && $b['islink'] ) {
@@ -551,48 +568,54 @@
 	 * @param bool $recursive
 	 * @return bool|array
 	 */
-	public function dirlist($path = '.', $include_hidden = true, $recursive = false) {
-		if ( $this->is_file($path) ) {
-			$limit_file = basename($path);
-			$path = dirname($path) . '/';
+	public function dirlist( $path = '.', $include_hidden = true, $recursive = false ) {
+		if ( $this->is_file( $path ) ) {
+			$limit_file = basename( $path );
+			$path = dirname( $path ) . '/';
 		} else {
 			$limit_file = false;
 		}
 
-		$pwd = @ftp_pwd($this->link);
-		if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesn't exist
+		$pwd = @ftp_pwd( $this->link );
+		if ( ! @ftp_chdir( $this->link, $path ) ) { // Cant change to folder = folder doesn't exist
 			return false;
-		$list = @ftp_rawlist($this->link, '-a', false);
-		@ftp_chdir($this->link, $pwd);
+		}
+		$list = @ftp_rawlist( $this->link, '-a', false );
+		@ftp_chdir( $this->link, $pwd );
 
-		if ( empty($list) ) // Empty array = non-existent folder (real folder will show . at least)
+		if ( empty( $list ) ) { // Empty array = non-existent folder (real folder will show . at least)
 			return false;
+		}
 
 		$dirlist = array();
 		foreach ( $list as $k => $v ) {
-			$entry = $this->parselisting($v);
-			if ( empty($entry) )
+			$entry = $this->parselisting( $v );
+			if ( empty( $entry ) ) {
 				continue;
+			}
 
-			if ( '.' == $entry['name'] || '..' == $entry['name'] )
+			if ( '.' == $entry['name'] || '..' == $entry['name'] ) {
 				continue;
+			}
 
-			if ( ! $include_hidden && '.' == $entry['name'][0] )
+			if ( ! $include_hidden && '.' == $entry['name'][0] ) {
 				continue;
+			}
 
-			if ( $limit_file && $entry['name'] != $limit_file)
+			if ( $limit_file && $entry['name'] != $limit_file ) {
 				continue;
+			}
 
 			$dirlist[ $entry['name'] ] = $entry;
 		}
 
 		$ret = array();
-		foreach ( (array)$dirlist as $struc ) {
+		foreach ( (array) $dirlist as $struc ) {
 			if ( 'd' == $struc['type'] ) {
-				if ( $recursive )
-					$struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive);
-				else
-					$struc['files'] = array();
+				if ( $recursive ) {
+					$struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
+				} else { $struc['files'] = array();
+				}
 			}
 
 			$ret[ $struc['name'] ] = $struc;
@@ -604,7 +627,8 @@
 	 * @access public
 	 */
 	public function __destruct() {
-		if ( $this->link )
-			ftp_close($this->link);
+		if ( $this->link ) {
+			ftp_close( $this->link );
+		}
 	}
 }
Index: src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
===================================================================
--- src/wp-admin/includes/class-wp-filesystem-ftpsockets.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-filesystem-ftpsockets.php	(working copy)
@@ -26,7 +26,7 @@
 	 *
 	 * @param array $opt
 	 */
-	public function __construct( $opt  = '' ) {
+	public function __construct( $opt = '' ) {
 		$this->method = 'ftpsockets';
 		$this->errors = new WP_Error();
 
@@ -36,26 +36,26 @@
 		}
 		$this->ftp = new ftp();
 
-		if ( empty($opt['port']) )
+		if ( empty( $opt['port'] ) ) {
 			$this->options['port'] = 21;
-		else
-			$this->options['port'] = (int) $opt['port'];
+		} else { $this->options['port'] = (int) $opt['port'];
+		}
 
-		if ( empty($opt['hostname']) )
-			$this->errors->add('empty_hostname', __('FTP hostname is required'));
-		else
-			$this->options['hostname'] = $opt['hostname'];
+		if ( empty( $opt['hostname'] ) ) {
+			$this->errors->add( 'empty_hostname', __( 'FTP hostname is required' ) );
+		} else { $this->options['hostname'] = $opt['hostname'];
+		}
 
 		// Check if the options provided are OK.
-		if ( empty ($opt['username']) )
-			$this->errors->add('empty_username', __('FTP username is required'));
-		else
-			$this->options['username'] = $opt['username'];
-
-		if ( empty ($opt['password']) )
-			$this->errors->add('empty_password', __('FTP password is required'));
-		else
-			$this->options['password'] = $opt['password'];
+		if ( empty( $opt['username'] ) ) {
+			$this->errors->add( 'empty_username', __( 'FTP username is required' ) );
+		} else { $this->options['username'] = $opt['username'];
+		}
+
+		if ( empty( $opt['password'] ) ) {
+			$this->errors->add( 'empty_password', __( 'FTP password is required' ) );
+		} else { $this->options['password'] = $opt['password'];
+		}
 	}
 
 	/**
@@ -64,10 +64,11 @@
 	 * @return bool
 	 */
 	public function connect() {
-		if ( ! $this->ftp )
+		if ( ! $this->ftp ) {
 			return false;
+		}
 
-		$this->ftp->setTimeout(FS_CONNECT_TIMEOUT);
+		$this->ftp->setTimeout( FS_CONNECT_TIMEOUT );
 
 		if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) {
 			$this->errors->add( 'connect',
@@ -116,8 +117,9 @@
 	 *                      or if the file doesn't exist.
 	 */
 	public function get_contents( $file ) {
-		if ( ! $this->exists($file) )
+		if ( ! $this->exists( $file ) ) {
 			return false;
+		}
 
 		$temp = wp_tempnam( $file );
 
@@ -128,9 +130,9 @@
 
 		mbstring_binary_safe_encoding();
 
-		if ( ! $this->ftp->fget($temphandle, $file) ) {
-			fclose($temphandle);
-			unlink($temp);
+		if ( ! $this->ftp->fget( $temphandle, $file ) ) {
+			fclose( $temphandle );
+			unlink( $temp );
 
 			reset_mbstring_encoding();
 
@@ -142,11 +144,11 @@
 		fseek( $temphandle, 0 ); // Skip back to the start of the file being written to
 		$contents = '';
 
-		while ( ! feof($temphandle) )
-			$contents .= fread($temphandle, 8192);
+		while ( ! feof( $temphandle ) ) {			$contents .= fread( $temphandle, 8192 );
+		}
 
-		fclose($temphandle);
-		unlink($temp);
+		fclose( $temphandle );
+		unlink( $temp );
 		return $contents;
 	}
 
@@ -156,8 +158,8 @@
 	 * @param string $file
 	 * @return array
 	 */
-	public function get_contents_array($file) {
-		return explode("\n", $this->get_contents($file) );
+	public function get_contents_array( $file ) {
+		return explode( "\n", $this->get_contents( $file ) );
 	}
 
 	/**
@@ -168,10 +170,10 @@
 	 * @param int|bool $mode
 	 * @return bool
 	 */
-	public function put_contents($file, $contents, $mode = false ) {
+	public function put_contents( $file, $contents, $mode = false ) {
 		$temp = wp_tempnam( $file );
-		if ( ! $temphandle = @fopen($temp, 'w+') ) {
-			unlink($temp);
+		if ( ! $temphandle = @fopen( $temp, 'w+' ) ) {
+			unlink( $temp );
 			return false;
 		}
 
@@ -190,14 +192,14 @@
 
 		fseek( $temphandle, 0 ); // Skip back to the start of the file being written to
 
-		$ret = $this->ftp->fput($file, $temphandle);
+		$ret = $this->ftp->fput( $file, $temphandle );
 
 		reset_mbstring_encoding();
 
-		fclose($temphandle);
-		unlink($temp);
+		fclose( $temphandle );
+		unlink( $temp );
 
-		$this->chmod($file, $mode);
+		$this->chmod( $file, $mode );
 
 		return $ret;
 	}
@@ -209,8 +211,9 @@
 	 */
 	public function cwd() {
 		$cwd = $this->ftp->pwd();
-		if ( $cwd )
-			$cwd = trailingslashit($cwd);
+		if ( $cwd ) {
+			$cwd = trailingslashit( $cwd );
+		}
 		return $cwd;
 	}
 
@@ -220,8 +223,8 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function chdir($file) {
-		return $this->ftp->chdir($file);
+	public function chdir( $file ) {
+		return $this->ftp->chdir( $file );
 	}
 
 	/**
@@ -232,25 +235,26 @@
 	 * @param bool $recursive
 	 * @return bool
 	 */
-	public function chmod($file, $mode = false, $recursive = false ) {
+	public function chmod( $file, $mode = false, $recursive = false ) {
 		if ( ! $mode ) {
-			if ( $this->is_file($file) )
+			if ( $this->is_file( $file ) ) {
 				$mode = FS_CHMOD_FILE;
-			elseif ( $this->is_dir($file) )
+			} elseif ( $this->is_dir( $file ) ) {
 				$mode = FS_CHMOD_DIR;
-			else
-				return false;
+			} else { return false;
+			}
 		}
 
 		// chmod any sub-objects if recursive.
-		if ( $recursive && $this->is_dir($file) ) {
-			$filelist = $this->dirlist($file);
-			foreach ( (array)$filelist as $filename => $filemeta )
-				$this->chmod($file . '/' . $filename, $mode, $recursive);
+		if ( $recursive && $this->is_dir( $file ) ) {
+			$filelist = $this->dirlist( $file );
+			foreach ( (array) $filelist as $filename => $filemeta ) {
+				$this->chmod( $file . '/' . $filename, $mode, $recursive );
+			}
 		}
 
 		// chmod the file or directory
-		return $this->ftp->chmod($file, $mode);
+		return $this->ftp->chmod( $file, $mode );
 	}
 
 	/**
@@ -259,9 +263,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function owner($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['owner'];
+	public function owner( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['owner'];
 	}
 
 	/**
@@ -270,9 +274,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function getchmod($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['permsn'];
+	public function getchmod( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['permsn'];
 	}
 
 	/**
@@ -281,9 +285,9 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function group($file) {
-		$dir = $this->dirlist($file);
-		return $dir[$file]['group'];
+	public function group( $file ) {
+		$dir = $this->dirlist( $file );
+		return $dir[ $file ]['group'];
 	}
 
 	/**
@@ -295,15 +299,17 @@
 	 * @param int|bool $mode
 	 * @return bool
 	 */
-	public function copy($source, $destination, $overwrite = false, $mode = false) {
-		if ( ! $overwrite && $this->exists($destination) )
+	public function copy( $source, $destination, $overwrite = false, $mode = false ) {
+		if ( ! $overwrite && $this->exists( $destination ) ) {
 			return false;
+		}
 
-		$content = $this->get_contents($source);
-		if ( false === $content )
+		$content = $this->get_contents( $source );
+		if ( false === $content ) {
 			return false;
+		}
 
-		return $this->put_contents($destination, $content, $mode);
+		return $this->put_contents( $destination, $content, $mode );
 	}
 
 	/**
@@ -314,8 +320,8 @@
 	 * @param bool   $overwrite
 	 * @return bool
 	 */
-	public function move($source, $destination, $overwrite = false ) {
-		return $this->ftp->rename($source, $destination);
+	public function move( $source, $destination, $overwrite = false ) {
+		return $this->ftp->rename( $source, $destination );
 	}
 
 	/**
@@ -326,15 +332,18 @@
 	 * @param string $type
 	 * @return bool
 	 */
-	public function delete($file, $recursive = false, $type = false) {
-		if ( empty($file) )
+	public function delete( $file, $recursive = false, $type = false ) {
+		if ( empty( $file ) ) {
 			return false;
-		if ( 'f' == $type || $this->is_file($file) )
-			return $this->ftp->delete($file);
-		if ( !$recursive )
-			return $this->ftp->rmdir($file);
+		}
+		if ( 'f' == $type || $this->is_file( $file ) ) {
+			return $this->ftp->delete( $file );
+		}
+		if ( ! $recursive ) {
+			return $this->ftp->rmdir( $file );
+		}
 
-		return $this->ftp->mdel($file);
+		return $this->ftp->mdel( $file );
 	}
 
 	/**
@@ -350,7 +359,7 @@
 			return true; // File is an empty directory.
 		}
 
-		return !empty( $list ); //empty list = no file, so invert.
+		return ! empty( $list ); //empty list = no file, so invert.
 		// Return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server.
 	}
 
@@ -360,11 +369,13 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_file($file) {
-		if ( $this->is_dir($file) )
+	public function is_file( $file ) {
+		if ( $this->is_dir( $file ) ) {
 			return false;
-		if ( $this->exists($file) )
+		}
+		if ( $this->exists( $file ) ) {
 			return true;
+		}
 		return false;
 	}
 
@@ -374,10 +385,10 @@
 	 * @param string $path
 	 * @return bool
 	 */
-	public function is_dir($path) {
+	public function is_dir( $path ) {
 		$cwd = $this->cwd();
-		if ( $this->chdir($path) ) {
-			$this->chdir($cwd);
+		if ( $this->chdir( $path ) ) {
+			$this->chdir( $cwd );
 			return true;
 		}
 		return false;
@@ -389,7 +400,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_readable($file) {
+	public function is_readable( $file ) {
 		return true;
 	}
 
@@ -399,7 +410,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_writable($file) {
+	public function is_writable( $file ) {
 		return true;
 	}
 
@@ -409,7 +420,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function atime($file) {
+	public function atime( $file ) {
 		return false;
 	}
 
@@ -419,16 +430,16 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function mtime($file) {
-		return $this->ftp->mdtm($file);
+	public function mtime( $file ) {
+		return $this->ftp->mdtm( $file );
 	}
 
 	/**
 	 * @param string $file
 	 * @return int
 	 */
-	public function size($file) {
-		return $this->ftp->filesize($file);
+	public function size( $file ) {
+		return $this->ftp->filesize( $file );
 	}
 
 	/**
@@ -439,7 +450,7 @@
 	 * @param int $atime
 	 * @return bool
 	 */
-	public function touch($file, $time = 0, $atime = 0 ) {
+	public function touch( $file, $time = 0, $atime = 0 ) {
 		return false;
 	}
 
@@ -452,16 +463,19 @@
 	 * @param mixed  $chgrp
 	 * @return bool
 	 */
-	public function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) {
-		$path = untrailingslashit($path);
-		if ( empty($path) )
+	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
+		$path = untrailingslashit( $path );
+		if ( empty( $path ) ) {
 			return false;
+		}
 
-		if ( ! $this->ftp->mkdir($path) )
+		if ( ! $this->ftp->mkdir( $path ) ) {
 			return false;
-		if ( ! $chmod )
+		}
+		if ( ! $chmod ) {
 			$chmod = FS_CHMOD_DIR;
-		$this->chmod($path, $chmod);
+		}
+		$this->chmod( $path, $chmod );
 		return true;
 	}
 
@@ -472,8 +486,8 @@
 	 * @param bool $recursive
 	 * @return bool
 	 */
-	public function rmdir($path, $recursive = false ) {
-		return $this->delete($path, $recursive);
+	public function rmdir( $path, $recursive = false ) {
+		return $this->delete( $path, $recursive );
 	}
 
 	/**
@@ -484,17 +498,17 @@
 	 * @param bool   $recursive
 	 * @return bool|array
 	 */
-	public function dirlist($path = '.', $include_hidden = true, $recursive = false ) {
-		if ( $this->is_file($path) ) {
-			$limit_file = basename($path);
-			$path = dirname($path) . '/';
+	public function dirlist( $path = '.', $include_hidden = true, $recursive = false ) {
+		if ( $this->is_file( $path ) ) {
+			$limit_file = basename( $path );
+			$path = dirname( $path ) . '/';
 		} else {
 			$limit_file = false;
 		}
 
 		mbstring_binary_safe_encoding();
 
-		$list = $this->ftp->dirlist($path);
+		$list = $this->ftp->dirlist( $path );
 		if ( empty( $list ) && ! $this->exists( $path ) ) {
 
 			reset_mbstring_encoding();
@@ -505,25 +519,29 @@
 		$ret = array();
 		foreach ( $list as $struc ) {
 
-			if ( '.' == $struc['name'] || '..' == $struc['name'] )
+			if ( '.' == $struc['name'] || '..' == $struc['name'] ) {
 				continue;
+			}
 
-			if ( ! $include_hidden && '.' == $struc['name'][0] )
+			if ( ! $include_hidden && '.' == $struc['name'][0] ) {
 				continue;
+			}
 
-			if ( $limit_file && $struc['name'] != $limit_file )
+			if ( $limit_file && $struc['name'] != $limit_file ) {
 				continue;
+			}
 
 			if ( 'd' == $struc['type'] ) {
-				if ( $recursive )
-					$struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive);
-				else
-					$struc['files'] = array();
+				if ( $recursive ) {
+					$struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
+				} else { $struc['files'] = array();
+				}
 			}
 
 			// Replace symlinks formatted as "source -> target" with just the source name
-			if ( $struc['islink'] )
+			if ( $struc['islink'] ) {
 				$struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] );
+			}
 
 			// Add the Octal representation of the file permissions
 			$struc['permsn'] = $this->getnumchmodfromh( $struc['perms'] );
Index: src/wp-admin/includes/class-wp-filesystem-ssh2.php
===================================================================
--- src/wp-admin/includes/class-wp-filesystem-ssh2.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-filesystem-ssh2.php	(working copy)
@@ -57,11 +57,11 @@
 		$this->errors = new WP_Error();
 
 		//Check if possible to use ssh2 functions.
-		if ( ! extension_loaded('ssh2') ) {
-			$this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available'));
+		if ( ! extension_loaded( 'ssh2' ) ) {
+			$this->errors->add( 'no_ssh2_ext', __( 'The ssh2 PHP extension is not available' ) );
 			return;
 		}
-		if ( !function_exists('stream_get_contents') ) {
+		if ( ! function_exists( 'stream_get_contents' ) ) {
 			$this->errors->add(
 				'ssh2_php_requirement',
 				sprintf(
@@ -74,35 +74,39 @@
 		}
 
 		// Set defaults:
-		if ( empty($opt['port']) )
+		if ( empty( $opt['port'] ) ) {
 			$this->options['port'] = 22;
-		else
-			$this->options['port'] = $opt['port'];
+		} else { $this->options['port'] = $opt['port'];
+		}
 
-		if ( empty($opt['hostname']) )
-			$this->errors->add('empty_hostname', __('SSH2 hostname is required'));
-		else
-			$this->options['hostname'] = $opt['hostname'];
+		if ( empty( $opt['hostname'] ) ) {
+			$this->errors->add( 'empty_hostname', __( 'SSH2 hostname is required' ) );
+		} else { $this->options['hostname'] = $opt['hostname'];
+		}
 
 		// Check if the options provided are OK.
-		if ( !empty ($opt['public_key']) && !empty ($opt['private_key']) ) {
+		if ( ! empty( $opt['public_key'] ) && ! empty( $opt['private_key'] ) ) {
 			$this->options['public_key'] = $opt['public_key'];
 			$this->options['private_key'] = $opt['private_key'];
 
-			$this->options['hostkey'] = array('hostkey' => 'ssh-rsa');
+			$this->options['hostkey'] = array(
+				'hostkey' => 'ssh-rsa',
+			);
 
 			$this->keys = true;
-		} elseif ( empty ($opt['username']) ) {
-			$this->errors->add('empty_username', __('SSH2 username is required'));
+		} elseif ( empty( $opt['username'] ) ) {
+			$this->errors->add( 'empty_username', __( 'SSH2 username is required' ) );
 		}
 
-		if ( !empty($opt['username']) )
+		if ( ! empty( $opt['username'] ) ) {
 			$this->options['username'] = $opt['username'];
+		}
 
-		if ( empty ($opt['password']) ) {
+		if ( empty( $opt['password'] ) ) {
 			// Password can be blank if we are using keys.
-			if ( !$this->keys )
-				$this->errors->add('empty_password', __('SSH2 password is required'));
+			if ( ! $this->keys ) {
+				$this->errors->add( 'empty_password', __( 'SSH2 password is required' ) );
+			}
 		} else {
 			$this->options['password'] = $opt['password'];
 		}
@@ -115,9 +119,9 @@
 	 */
 	public function connect() {
 		if ( ! $this->keys ) {
-			$this->link = @ssh2_connect($this->options['hostname'], $this->options['port']);
+			$this->link = @ssh2_connect( $this->options['hostname'], $this->options['port'] );
 		} else {
-			$this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']);
+			$this->link = @ssh2_connect( $this->options['hostname'], $this->options['port'], $this->options['hostkey'] );
 		}
 
 		if ( ! $this->link ) {
@@ -130,8 +134,8 @@
 			return false;
 		}
 
-		if ( !$this->keys ) {
-			if ( ! @ssh2_auth_password($this->link, $this->options['username'], $this->options['password']) ) {
+		if ( ! $this->keys ) {
+			if ( ! @ssh2_auth_password( $this->link, $this->options['username'], $this->options['password'] ) ) {
 				$this->errors->add( 'auth',
 					/* translators: %s: username */
 					sprintf( __( 'Username/Password incorrect for %s' ),
@@ -141,7 +145,7 @@
 				return false;
 			}
 		} else {
-			if ( ! @ssh2_auth_pubkey_file($this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) {
+			if ( ! @ssh2_auth_pubkey_file( $this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) {
 				$this->errors->add( 'auth',
 					/* translators: %s: username */
 					sprintf( __( 'Public and Private keys incorrect for %s' ),
@@ -190,20 +194,21 @@
 
 	/**
 	 * @access public
-	 * 
+	 *
 	 * @param string $command
 	 * @param bool $returnbool
 	 * @return bool|string True on success, false on failure. String if the command was executed, `$returnbool`
 	 *                     is false (default), and data from the resulting stream was retrieved.
 	 */
 	public function run_command( $command, $returnbool = false ) {
-		if ( ! $this->link )
+		if ( ! $this->link ) {
 			return false;
+		}
 
-		if ( ! ($stream = ssh2_exec($this->link, $command)) ) {
+		if ( ! ($stream = ssh2_exec( $this->link, $command )) ) {
 			$this->errors->add( 'command',
 				/* translators: %s: command */
-				sprintf( __( 'Unable to perform command: %s'),
+				sprintf( __( 'Unable to perform command: %s' ),
 					$command
 				)
 			);
@@ -213,10 +218,10 @@
 			$data = stream_get_contents( $stream );
 			fclose( $stream );
 
-			if ( $returnbool )
-				return ( $data === false ) ? false : '' != trim($data);
-			else
-				return $data;
+			if ( $returnbool ) {
+				return ( $data === false ) ? false : '' != trim( $data );
+			} else { return $data;
+			}
 		}
 		return false;
 	}
@@ -237,7 +242,7 @@
 	 * @param string $file
 	 * @return array
 	 */
-	public function get_contents_array($file) {
+	public function get_contents_array( $file ) {
 		return file( $this->sftp_path( $file ) );
 	}
 
@@ -249,13 +254,14 @@
 	 * @param bool|int $mode
 	 * @return bool
 	 */
-	public function put_contents($file, $contents, $mode = false ) {
+	public function put_contents( $file, $contents, $mode = false ) {
 		$ret = file_put_contents( $this->sftp_path( $file ), $contents );
 
-		if ( $ret !== strlen( $contents ) )
+		if ( $ret !== strlen( $contents ) ) {
 			return false;
+		}
 
-		$this->chmod($file, $mode);
+		$this->chmod( $file, $mode );
 
 		return true;
 	}
@@ -279,8 +285,8 @@
 	 * @param string $dir
 	 * @return bool|string
 	 */
-	public function chdir($dir) {
-		return $this->run_command('cd ' . $dir, true);
+	public function chdir( $dir ) {
+		return $this->run_command( 'cd ' . $dir, true );
 	}
 
 	/**
@@ -292,12 +298,14 @@
 	 *
 	 * @return bool
 	 */
-	public function chgrp($file, $group, $recursive = false ) {
-		if ( ! $this->exists($file) )
+	public function chgrp( $file, $group, $recursive = false ) {
+		if ( ! $this->exists( $file ) ) {
 			return false;
-		if ( ! $recursive || ! $this->is_dir($file) )
-			return $this->run_command(sprintf('chgrp %s %s', escapeshellarg($group), escapeshellarg($file)), true);
-		return $this->run_command(sprintf('chgrp -R %s %s', escapeshellarg($group), escapeshellarg($file)), true);
+		}
+		if ( ! $recursive || ! $this->is_dir( $file ) ) {
+			return $this->run_command( sprintf( 'chgrp %s %s', escapeshellarg( $group ), escapeshellarg( $file ) ), true );
+		}
+		return $this->run_command( sprintf( 'chgrp -R %s %s', escapeshellarg( $group ), escapeshellarg( $file ) ), true );
 	}
 
 	/**
@@ -308,22 +316,24 @@
 	 * @param bool   $recursive
 	 * @return bool|string
 	 */
-	public function chmod($file, $mode = false, $recursive = false) {
-		if ( ! $this->exists($file) )
+	public function chmod( $file, $mode = false, $recursive = false ) {
+		if ( ! $this->exists( $file ) ) {
 			return false;
+		}
 
 		if ( ! $mode ) {
-			if ( $this->is_file($file) )
+			if ( $this->is_file( $file ) ) {
 				$mode = FS_CHMOD_FILE;
-			elseif ( $this->is_dir($file) )
+			} elseif ( $this->is_dir( $file ) ) {
 				$mode = FS_CHMOD_DIR;
-			else
-				return false;
+			} else { return false;
+			}
 		}
 
-		if ( ! $recursive || ! $this->is_dir($file) )
-			return $this->run_command(sprintf('chmod %o %s', $mode, escapeshellarg($file)), true);
-		return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true);
+		if ( ! $recursive || ! $this->is_dir( $file ) ) {
+			return $this->run_command( sprintf( 'chmod %o %s', $mode, escapeshellarg( $file ) ), true );
+		}
+		return $this->run_command( sprintf( 'chmod -R %o %s', $mode, escapeshellarg( $file ) ), true );
 	}
 
 	/**
@@ -337,11 +347,13 @@
 	 * @return bool True on success or false on failure.
 	 */
 	public function chown( $file, $owner, $recursive = false ) {
-		if ( ! $this->exists($file) )
+		if ( ! $this->exists( $file ) ) {
 			return false;
-		if ( ! $recursive || ! $this->is_dir($file) )
-			return $this->run_command(sprintf('chown %s %s', escapeshellarg($owner), escapeshellarg($file)), true);
-		return $this->run_command(sprintf('chown -R %s %s', escapeshellarg($owner), escapeshellarg($file)), true);
+		}
+		if ( ! $recursive || ! $this->is_dir( $file ) ) {
+			return $this->run_command( sprintf( 'chown %s %s', escapeshellarg( $owner ), escapeshellarg( $file ) ), true );
+		}
+		return $this->run_command( sprintf( 'chown -R %s %s', escapeshellarg( $owner ), escapeshellarg( $file ) ), true );
 	}
 
 	/**
@@ -350,13 +362,15 @@
 	 * @param string $file
 	 * @return string|false
 	 */
-	public function owner($file) {
+	public function owner( $file ) {
 		$owneruid = @fileowner( $this->sftp_path( $file ) );
-		if ( ! $owneruid )
+		if ( ! $owneruid ) {
 			return false;
-		if ( ! function_exists('posix_getpwuid') )
+		}
+		if ( ! function_exists( 'posix_getpwuid' ) ) {
 			return $owneruid;
-		$ownerarray = posix_getpwuid($owneruid);
+		}
+		$ownerarray = posix_getpwuid( $owneruid );
 		return $ownerarray['name'];
 	}
 
@@ -366,7 +380,7 @@
 	 * @param string $file
 	 * @return string
 	 */
-	public function getchmod($file) {
+	public function getchmod( $file ) {
 		return substr( decoct( @fileperms( $this->sftp_path( $file ) ) ), -3 );
 	}
 
@@ -376,13 +390,15 @@
 	 * @param string $file
 	 * @return string|false
 	 */
-	public function group($file) {
+	public function group( $file ) {
 		$gid = @filegroup( $this->sftp_path( $file ) );
-		if ( ! $gid )
+		if ( ! $gid ) {
 			return false;
-		if ( ! function_exists('posix_getgrgid') )
+		}
+		if ( ! function_exists( 'posix_getgrgid' ) ) {
 			return $gid;
-		$grouparray = posix_getgrgid($gid);
+		}
+		$grouparray = posix_getgrgid( $gid );
 		return $grouparray['name'];
 	}
 
@@ -395,13 +411,15 @@
 	 * @param int|bool $mode
 	 * @return bool
 	 */
-	public function copy($source, $destination, $overwrite = false, $mode = false) {
-		if ( ! $overwrite && $this->exists($destination) )
+	public function copy( $source, $destination, $overwrite = false, $mode = false ) {
+		if ( ! $overwrite && $this->exists( $destination ) ) {
 			return false;
-		$content = $this->get_contents($source);
-		if ( false === $content)
+		}
+		$content = $this->get_contents( $source );
+		if ( false === $content ) {
 			return false;
-		return $this->put_contents($destination, $content, $mode);
+		}
+		return $this->put_contents( $destination, $content, $mode );
 	}
 
 	/**
@@ -412,7 +430,7 @@
 	 * @param bool   $overwrite
 	 * @return bool
 	 */
-	public function move($source, $destination, $overwrite = false) {
+	public function move( $source, $destination, $overwrite = false ) {
 		return @ssh2_sftp_rename( $this->sftp_link, $source, $destination );
 	}
 
@@ -424,18 +442,20 @@
 	 * @param string|bool $type
 	 * @return bool
 	 */
-	public function delete($file, $recursive = false, $type = false) {
-		if ( 'f' == $type || $this->is_file($file) )
-			return ssh2_sftp_unlink($this->sftp_link, $file);
-		if ( ! $recursive )
-			 return ssh2_sftp_rmdir($this->sftp_link, $file);
-		$filelist = $this->dirlist($file);
-		if ( is_array($filelist) ) {
-			foreach ( $filelist as $filename => $fileinfo) {
-				$this->delete($file . '/' . $filename, $recursive, $fileinfo['type']);
+	public function delete( $file, $recursive = false, $type = false ) {
+		if ( 'f' == $type || $this->is_file( $file ) ) {
+			return ssh2_sftp_unlink( $this->sftp_link, $file );
+		}
+		if ( ! $recursive ) {
+			 return ssh2_sftp_rmdir( $this->sftp_link, $file );
+		}
+		$filelist = $this->dirlist( $file );
+		if ( is_array( $filelist ) ) {
+			foreach ( $filelist as $filename => $fileinfo ) {
+				$this->delete( $file . '/' . $filename, $recursive, $fileinfo['type'] );
 			}
 		}
-		return ssh2_sftp_rmdir($this->sftp_link, $file);
+		return ssh2_sftp_rmdir( $this->sftp_link, $file );
 	}
 
 	/**
@@ -444,7 +464,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function exists($file) {
+	public function exists( $file ) {
 		return file_exists( $this->sftp_path( $file ) );
 	}
 
@@ -454,7 +474,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_file($file) {
+	public function is_file( $file ) {
 		return is_file( $this->sftp_path( $file ) );
 	}
 
@@ -464,7 +484,7 @@
 	 * @param string $path
 	 * @return bool
 	 */
-	public function is_dir($path) {
+	public function is_dir( $path ) {
 		return is_dir( $this->sftp_path( $path ) );
 	}
 
@@ -474,7 +494,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_readable($file) {
+	public function is_readable( $file ) {
 		return is_readable( $this->sftp_path( $file ) );
 	}
 
@@ -484,7 +504,7 @@
 	 * @param string $file
 	 * @return bool
 	 */
-	public function is_writable($file) {
+	public function is_writable( $file ) {
 		// PHP will base it's writable checks on system_user === file_owner, not ssh_user === file_owner
 		return true;
 	}
@@ -495,7 +515,7 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function atime($file) {
+	public function atime( $file ) {
 		return fileatime( $this->sftp_path( $file ) );
 	}
 
@@ -505,7 +525,7 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function mtime($file) {
+	public function mtime( $file ) {
 		return filemtime( $this->sftp_path( $file ) );
 	}
 
@@ -515,7 +535,7 @@
 	 * @param string $file
 	 * @return int
 	 */
-	public function size($file) {
+	public function size( $file ) {
 		return filesize( $this->sftp_path( $file ) );
 	}
 
@@ -526,7 +546,7 @@
 	 * @param int    $time
 	 * @param int    $atime
 	 */
-	public function touch($file, $time = 0, $atime = 0) {
+	public function touch( $file, $time = 0, $atime = 0 ) {
 		//Not implemented.
 	}
 
@@ -539,19 +559,24 @@
 	 * @param mixed  $chgrp
 	 * @return bool
 	 */
-	public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
-		$path = untrailingslashit($path);
-		if ( empty($path) )
+	public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
+		$path = untrailingslashit( $path );
+		if ( empty( $path ) ) {
 			return false;
+		}
 
-		if ( ! $chmod )
+		if ( ! $chmod ) {
 			$chmod = FS_CHMOD_DIR;
-		if ( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) )
+		}
+		if ( ! ssh2_sftp_mkdir( $this->sftp_link, $path, $chmod, true ) ) {
 			return false;
-		if ( $chown )
-			$this->chown($path, $chown);
-		if ( $chgrp )
-			$this->chgrp($path, $chgrp);
+		}
+		if ( $chown ) {
+			$this->chown( $path, $chown );
+		}
+		if ( $chgrp ) {
+			$this->chgrp( $path, $chgrp );
+		}
 		return true;
 	}
 
@@ -562,8 +587,8 @@
 	 * @param bool   $recursive
 	 * @return bool
 	 */
-	public function rmdir($path, $recursive = false) {
-		return $this->delete($path, $recursive);
+	public function rmdir( $path, $recursive = false ) {
+		return $this->delete( $path, $recursive );
 	}
 
 	/**
@@ -574,58 +599,63 @@
 	 * @param bool   $recursive
 	 * @return bool|array
 	 */
-	public function dirlist($path, $include_hidden = true, $recursive = false) {
-		if ( $this->is_file($path) ) {
-			$limit_file = basename($path);
-			$path = dirname($path);
+	public function dirlist( $path, $include_hidden = true, $recursive = false ) {
+		if ( $this->is_file( $path ) ) {
+			$limit_file = basename( $path );
+			$path = dirname( $path );
 		} else {
 			$limit_file = false;
 		}
 
-		if ( ! $this->is_dir($path) )
+		if ( ! $this->is_dir( $path ) ) {
 			return false;
+		}
 
 		$ret = array();
 		$dir = @dir( $this->sftp_path( $path ) );
 
-		if ( ! $dir )
+		if ( ! $dir ) {
 			return false;
+		}
 
-		while (false !== ($entry = $dir->read()) ) {
+		while ( false !== ($entry = $dir->read()) ) {
 			$struc = array();
 			$struc['name'] = $entry;
 
-			if ( '.' == $struc['name'] || '..' == $struc['name'] )
+			if ( '.' == $struc['name'] || '..' == $struc['name'] ) {
 				continue; //Do not care about these folders.
+			}
 
-			if ( ! $include_hidden && '.' == $struc['name'][0] )
+			if ( ! $include_hidden && '.' == $struc['name'][0] ) {
 				continue;
+			}
 
-			if ( $limit_file && $struc['name'] != $limit_file )
+			if ( $limit_file && $struc['name'] != $limit_file ) {
 				continue;
+			}
 
-			$struc['perms'] 	= $this->gethchmod($path.'/'.$entry);
-			$struc['permsn']	= $this->getnumchmodfromh($struc['perms']);
+			$struc['perms'] 	= $this->gethchmod( $path . '/' . $entry );
+			$struc['permsn']	= $this->getnumchmodfromh( $struc['perms'] );
 			$struc['number'] 	= false;
-			$struc['owner']    	= $this->owner($path.'/'.$entry);
-			$struc['group']    	= $this->group($path.'/'.$entry);
-			$struc['size']    	= $this->size($path.'/'.$entry);
-			$struc['lastmodunix']= $this->mtime($path.'/'.$entry);
-			$struc['lastmod']   = date('M j',$struc['lastmodunix']);
-			$struc['time']    	= date('h:i:s',$struc['lastmodunix']);
-			$struc['type']		= $this->is_dir($path.'/'.$entry) ? 'd' : 'f';
+			$struc['owner']    	= $this->owner( $path . '/' . $entry );
+			$struc['group']    	= $this->group( $path . '/' . $entry );
+			$struc['size']    	= $this->size( $path . '/' . $entry );
+			$struc['lastmodunix'] = $this->mtime( $path . '/' . $entry );
+			$struc['lastmod']   = date( 'M j',$struc['lastmodunix'] );
+			$struc['time']    	= date( 'h:i:s',$struc['lastmodunix'] );
+			$struc['type']		= $this->is_dir( $path . '/' . $entry ) ? 'd' : 'f';
 
 			if ( 'd' == $struc['type'] ) {
-				if ( $recursive )
-					$struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive);
-				else
-					$struc['files'] = array();
+				if ( $recursive ) {
+					$struc['files'] = $this->dirlist( $path . '/' . $struc['name'], $include_hidden, $recursive );
+				} else { $struc['files'] = array();
+				}
 			}
 
 			$ret[ $struc['name'] ] = $struc;
-		}
+		}// End while().
 		$dir->close();
-		unset($dir);
+		unset( $dir );
 		return $ret;
 	}
 }
Index: src/wp-admin/includes/class-wp-importer.php
===================================================================
--- src/wp-admin/includes/class-wp-importer.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-importer.php	(working copy)
@@ -35,10 +35,10 @@
 			// Increment offset
 			$offset = ( $limit + $offset );
 
-			if ( !empty( $results ) ) {
+			if ( ! empty( $results ) ) {
 				foreach ( $results as $r ) {
 					// Set permalinks into array
-					$hashtable[$r->meta_value] = intval( $r->post_id );
+					$hashtable[ $r->meta_value ] = intval( $r->post_id );
 				}
 			}
 		} while ( count( $results ) == $limit );
@@ -69,8 +69,9 @@
 
 		$result = $wpdb->get_results( $sql );
 
-		if ( !empty( $result ) )
+		if ( ! empty( $result ) ) {
 			$count = intval( $result[0]->cnt );
+		}
 
 		// Unset to save memory.
 		unset( $results );
@@ -102,7 +103,7 @@
 			// Increment offset
 			$offset = ( $limit + $offset );
 
-			if ( !empty( $results ) ) {
+			if ( ! empty( $results ) ) {
 				foreach ( $results as $r ) {
 					// Explode comment_agent key
 					list ( $ca_bid, $source_comment_id ) = explode( '-', $r->comment_agent );
@@ -110,7 +111,7 @@
 
 					// Check if this comment came from this blog
 					if ( $bid == $ca_bid ) {
-						$hashtable[$source_comment_id] = intval( $r->comment_ID );
+						$hashtable[ $source_comment_id ] = intval( $r->comment_ID );
 					}
 				}
 			}
@@ -132,14 +133,18 @@
 			$blog_id = (int) $blog_id;
 		} else {
 			$blog = 'http://' . preg_replace( '#^https?://#', '', $blog_id );
-			if ( ( !$parsed = parse_url( $blog ) ) || empty( $parsed['host'] ) ) {
+			if ( ( ! $parsed = parse_url( $blog ) ) || empty( $parsed['host'] ) ) {
 				fwrite( STDERR, "Error: can not determine blog_id from $blog_id\n" );
 				exit();
 			}
 			if ( empty( $parsed['path'] ) ) {
 				$parsed['path'] = '/';
 			}
-			$blogs = get_sites( array( 'domain' => $parsed['host'], 'number' => 1, 'path' => $parsed['path'] ) );
+			$blogs = get_sites( array(
+				'domain' => $parsed['host'],
+				'number' => 1,
+				'path' => $parsed['path'],
+			) );
 			if ( ! $blogs ) {
 				fwrite( STDERR, "Error: Could not find blog\n" );
 				exit();
@@ -149,8 +154,9 @@
 		}
 
 		if ( function_exists( 'is_multisite' ) ) {
-			if ( is_multisite() )
+			if ( is_multisite() ) {
 				switch_to_blog( $blog_id );
+			}
 		}
 
 		return $blog_id;
@@ -168,7 +174,7 @@
 			$user_id = (int) username_exists( $user_id );
 		}
 
-		if ( !$user_id || !wp_set_current_user( $user_id ) ) {
+		if ( ! $user_id || ! wp_set_current_user( $user_id ) ) {
 			fwrite( STDERR, "Error: can not find user\n" );
 			exit();
 		}
@@ -202,10 +208,12 @@
 
 		$headers = array();
 		$args = array();
-		if ( true === $head )
+		if ( true === $head ) {
 			$args['method'] = 'HEAD';
-		if ( !empty( $username ) && !empty( $password ) )
+		}
+		if ( ! empty( $username ) && ! empty( $password ) ) {
 			$headers['Authorization'] = 'Basic ' . base64_encode( "$username:$password" );
+		}
 
 		$args['headers'] = $headers;
 
@@ -281,37 +289,37 @@
 	$il = sizeof( $args );
 
 	for ( $i = 1, $il; $i < $il; $i++ ) {
-		if ( (bool) preg_match( "/^--(.+)/", $args[$i], $match ) ) {
-			$parts = explode( "=", $match[1] );
-			$key = preg_replace( "/[^a-z0-9]+/", "", $parts[0] );
+		if ( (bool) preg_match( '/^--(.+)/', $args[ $i ], $match ) ) {
+			$parts = explode( '=', $match[1] );
+			$key = preg_replace( '/[^a-z0-9]+/', '', $parts[0] );
 
 			if ( isset( $parts[1] ) ) {
-				$out[$key] = $parts[1];
+				$out[ $key ] = $parts[1];
 			} else {
-				$out[$key] = true;
+				$out[ $key ] = true;
 			}
 
 			$last_arg = $key;
-		} elseif ( (bool) preg_match( "/^-([a-zA-Z0-9]+)/", $args[$i], $match ) ) {
+		} elseif ( (bool) preg_match( '/^-([a-zA-Z0-9]+)/', $args[ $i ], $match ) ) {
 			for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) {
 				$key = $match[1]{$j};
-				$out[$key] = true;
+				$out[ $key ] = true;
 			}
 
 			$last_arg = $key;
 		} elseif ( $last_arg !== null ) {
-			$out[$last_arg] = $args[$i];
+			$out[ $last_arg ] = $args[ $i ];
 		}
 	}
 
 	// Check array for specified param
-	if ( isset( $out[$param] ) ) {
+	if ( isset( $out[ $param ] ) ) {
 		// Set return value
-		$return = $out[$param];
+		$return = $out[ $param ];
 	}
 
 	// Check for missing required param
-	if ( !isset( $out[$param] ) && $required ) {
+	if ( ! isset( $out[ $param ] ) && $required ) {
 		// Display message and exit
 		echo "\"$param\" parameter is required but was not specified\n";
 		exit();
Index: src/wp-admin/includes/class-wp-internal-pointers.php
===================================================================
--- src/wp-admin/includes/class-wp-internal-pointers.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-internal-pointers.php	(working copy)
@@ -47,8 +47,9 @@
 		);
 
 		// Check if screen related pointer is registered
-		if ( empty( $registered_pointers[ $hook_suffix ] ) )
+		if ( empty( $registered_pointers[ $hook_suffix ] ) ) {
 			return;
+		}
 
 		$pointers = (array) $registered_pointers[ $hook_suffix ];
 
@@ -76,8 +77,9 @@
 		foreach ( array_diff( $pointers, $dismissed ) as $pointer ) {
 			if ( isset( $caps_required[ $pointer ] ) ) {
 				foreach ( $caps_required[ $pointer ] as $cap ) {
-					if ( ! current_user_can( $cap ) )
+					if ( ! current_user_can( $cap ) ) {
 						continue 2;
+					}
 				}
 			}
 
@@ -86,8 +88,9 @@
 			$got_pointers = true;
 		}
 
-		if ( ! $got_pointers )
+		if ( ! $got_pointers ) {
 			return;
+		}
 
 		// Add pointers script and style to queue
 		wp_enqueue_style( 'wp-pointer' );
@@ -106,8 +109,9 @@
 	 * @param array  $args Arguments to be passed to the pointer JS (see wp-pointer.js).
 	 */
 	private static function print_js( $pointer_id, $selector, $args ) {
-		if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) )
+		if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) {
 			return;
+		}
 
 		?>
 		<script type="text/javascript">
Index: src/wp-admin/includes/class-wp-links-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-links-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-links-list-table.php	(working copy)
@@ -54,16 +54,23 @@
 
 		wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) );
 
-		$args = array( 'hide_invisible' => 0, 'hide_empty' => 0 );
+		$args = array(
+			'hide_invisible' => 0,
+			'hide_empty' => 0,
+		);
 
-		if ( 'all' != $cat_id )
+		if ( 'all' != $cat_id ) {
 			$args['category'] = $cat_id;
-		if ( !empty( $s ) )
+		}
+		if ( ! empty( $s ) ) {
 			$args['search'] = $s;
-		if ( !empty( $orderby ) )
+		}
+		if ( ! empty( $orderby ) ) {
 			$args['orderby'] = $orderby;
-		if ( !empty( $order ) )
+		}
+		if ( ! empty( $order ) ) {
 			$args['order'] = $order;
+		}
 
 		$this->items = get_bookmarks( $args );
 	}
@@ -94,8 +101,9 @@
 	protected function extra_tablenav( $which ) {
 		global $cat_id;
 
-		if ( 'top' != $which )
+		if ( 'top' != $which ) {
 			return;
+		}
 ?>
 		<div class="alignleft actions">
 <?php
@@ -112,7 +120,9 @@
 
 			echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
 			wp_dropdown_categories( $dropdown_options );
-			submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+			submit_button( __( 'Filter' ), '', 'filter_action', false, array(
+				'id' => 'post-query-submit',
+			) );
 ?>
 		</div>
 <?php
@@ -130,7 +140,7 @@
 			'categories' => __( 'Categories' ),
 			'rel'        => __( 'Relationship' ),
 			'visible'    => __( 'Visible' ),
-			'rating'     => __( 'Rating' )
+			'rating'     => __( 'Rating' ),
 		);
 	}
 
@@ -143,7 +153,7 @@
 			'name'    => 'name',
 			'url'     => 'url',
 			'visible' => 'visible',
-			'rating'  => 'rating'
+			'rating'  => 'rating',
 		);
 	}
 
@@ -326,8 +336,8 @@
 		$edit_link = get_edit_bookmark_link( $link );
 
 		$actions = array();
-		$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
-		$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm( '" . esc_js(sprintf(__("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name)) . "' ) ) { return true;}return false;\">" . __('Delete') . "</a>";
+		$actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
+		$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ) . "' ) ) { return true;}return false;\">" . __( 'Delete' ) . '</a>';
 		return $this->row_actions( $actions );
 	}
 }
Index: src/wp-admin/includes/class-wp-list-table-compat.php
===================================================================
--- src/wp-admin/includes/class-wp-list-table-compat.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-list-table-compat.php	(working copy)
@@ -17,12 +17,13 @@
 	public $_columns;
 
 	public function __construct( $screen, $columns = array() ) {
-		if ( is_string( $screen ) )
+		if ( is_string( $screen ) ) {
 			$screen = convert_to_screen( $screen );
+		}
 
 		$this->_screen = $screen;
 
-		if ( !empty( $columns ) ) {
+		if ( ! empty( $columns ) ) {
 			$this->_columns = $columns;
 			add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
 		}
Index: src/wp-admin/includes/class-wp-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-list-table.php	(working copy)
@@ -101,10 +101,24 @@
 	 * @access protected
 	 * @var array
 	 */
-	protected $compat_methods = array( 'set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions',
-		'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination',
-		'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav',
-		'single_row_columns' );
+	protected $compat_methods = array(
+	'set_pagination_args',
+	'get_views',
+	'get_bulk_actions',
+	'bulk_actions',
+		'row_actions',
+	'months_dropdown',
+	'view_switcher',
+	'comments_bubble',
+	'get_items_per_page',
+	'pagination',
+		'get_sortable_columns',
+	'get_column_info',
+	'get_table_classes',
+	'display_tablenav',
+	'extra_tablenav',
+		'single_row_columns',
+	);
 
 	/**
 	 * Constructor.
@@ -144,8 +158,9 @@
 
 		add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
 
-		if ( !$args['plural'] )
+		if ( ! $args['plural'] ) {
 			$args['plural'] = $this->screen->base;
+		}
 
 		$args['plural'] = sanitize_key( $args['plural'] );
 		$args['singular'] = sanitize_key( $args['singular'] );
@@ -160,7 +175,7 @@
 		if ( empty( $this->modes ) ) {
 			$this->modes = array(
 				'list'    => __( 'List View' ),
-				'excerpt' => __( 'Excerpt View' )
+				'excerpt' => __( 'Excerpt View' ),
 			);
 		}
 	}
@@ -280,8 +295,9 @@
 			'per_page' => 0,
 		) );
 
-		if ( !$args['total_pages'] && $args['per_page'] > 0 )
+		if ( ! $args['total_pages'] && $args['per_page'] > 0 ) {
 			$args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
+		}
 
 		// Redirect if page number is invalid and headers are not already sent.
 		if ( ! headers_sent() && ! wp_doing_ajax() && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
@@ -307,8 +323,8 @@
 			return $this->get_pagenum();
 		}
 
-		if ( isset( $this->_pagination_args[$key] ) ) {
-			return $this->_pagination_args[$key];
+		if ( isset( $this->_pagination_args[ $key ] ) ) {
+			return $this->_pagination_args[ $key ];
 		}
 	}
 
@@ -321,7 +337,7 @@
 	 * @return bool
 	 */
 	public function has_items() {
-		return !empty( $this->items );
+		return ! empty( $this->items );
 	}
 
 	/**
@@ -344,24 +360,31 @@
 	 * @param string $input_id ID attribute value for the search input field.
 	 */
 	public function search_box( $text, $input_id ) {
-		if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
+		if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
 			return;
+		}
 
 		$input_id = $input_id . '-search-input';
 
-		if ( ! empty( $_REQUEST['orderby'] ) )
+		if ( ! empty( $_REQUEST['orderby'] ) ) {
 			echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
-		if ( ! empty( $_REQUEST['order'] ) )
+		}
+		if ( ! empty( $_REQUEST['order'] ) ) {
 			echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
-		if ( ! empty( $_REQUEST['post_mime_type'] ) )
+		}
+		if ( ! empty( $_REQUEST['post_mime_type'] ) ) {
 			echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
-		if ( ! empty( $_REQUEST['detached'] ) )
+		}
+		if ( ! empty( $_REQUEST['detached'] ) ) {
 			echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
+		}
 ?>
 <p class="search-box">
 	<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
 	<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
-	<?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
+	<?php submit_button( $text, '', '', false, array(
+		'id' => 'search-submit',
+	) ); ?>
 </p>
 <?php
 	}
@@ -399,8 +422,9 @@
 		 */
 		$views = apply_filters( "views_{$this->screen->id}", $views );
 
-		if ( empty( $views ) )
+		if ( empty( $views ) ) {
 			return;
+		}
 
 		$this->screen->render_screen_reader_content( 'heading_views' );
 
@@ -409,7 +433,7 @@
 			$views[ $class ] = "\t<li class='$class'>$view";
 		}
 		echo implode( " |</li>\n", $views ) . "</li>\n";
-		echo "</ul>";
+		echo '</ul>';
 	}
 
 	/**
@@ -455,8 +479,9 @@
 			$two = '2';
 		}
 
-		if ( empty( $this->_actions ) )
+		if ( empty( $this->_actions ) ) {
 			return;
+		}
 
 		echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action' ) . '</label>';
 		echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
@@ -470,7 +495,9 @@
 
 		echo "</select>\n";
 
-		submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
+		submit_button( __( 'Apply' ), 'action', '', false, array(
+			'id' => "doaction$two",
+		) );
 		echo "\n";
 	}
 
@@ -483,14 +510,17 @@
 	 * @return string|false The action name or False if no action was selected
 	 */
 	public function current_action() {
-		if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
+		if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) ) {
 			return false;
+		}
 
-		if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
+		if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
 			return $_REQUEST['action'];
+		}
 
-		if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
+		if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
 			return $_REQUEST['action2'];
+		}
 
 		return false;
 	}
@@ -509,8 +539,9 @@
 		$action_count = count( $actions );
 		$i = 0;
 
-		if ( !$action_count )
+		if ( ! $action_count ) {
 			return '';
+		}
 
 		$out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
 		foreach ( $actions as $action => $link ) {
@@ -578,8 +609,9 @@
 
 		$month_count = count( $months );
 
-		if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
+		if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {
 			return;
+		}
 
 		$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
 ?>
@@ -587,20 +619,21 @@
 		<select name="m" id="filter-by-date">
 			<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
 <?php
-		foreach ( $months as $arc_row ) {
-			if ( 0 == $arc_row->year )
-				continue;
-
-			$month = zeroise( $arc_row->month, 2 );
-			$year = $arc_row->year;
+foreach ( $months as $arc_row ) {
+	if ( 0 == $arc_row->year ) {
+		continue;
+	}
 
-			printf( "<option %s value='%s'>%s</option>\n",
-				selected( $m, $year . $month, false ),
-				esc_attr( $arc_row->year . $month ),
-				/* translators: 1: month name, 2: 4-digit year */
-				sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
-			);
-		}
+	$month = zeroise( $arc_row->month, 2 );
+	$year = $arc_row->year;
+
+	printf( "<option %s value='%s'>%s</option>\n",
+		selected( $m, $year . $month, false ),
+		esc_attr( $arc_row->year . $month ),
+		/* translators: 1: month name, 2: 4-digit year */
+		sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
+	);
+}
 ?>
 		</select>
 <?php
@@ -619,17 +652,18 @@
 		<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
 		<div class="view-switch">
 <?php
-			foreach ( $this->modes as $mode => $title ) {
-				$classes = array( 'view-' . $mode );
-				if ( $current_mode === $mode )
-					$classes[] = 'current';
-				printf(
-					"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
-					esc_url( add_query_arg( 'mode', $mode ) ),
-					implode( ' ', $classes ),
-					$title
-				);
-			}
+foreach ( $this->modes as $mode => $title ) {
+	$classes = array( 'view-' . $mode );
+	if ( $current_mode === $mode ) {
+		$classes[] = 'current';
+	}
+	printf(
+		"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
+		esc_url( add_query_arg( 'mode', $mode ) ),
+		implode( ' ', $classes ),
+		$title
+	);
+}
 		?>
 		</div>
 <?php
@@ -659,10 +693,13 @@
 			printf( '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
 				__( 'No comments' )
 			);
-		// Approved comments have different display depending on some conditions.
+			// Approved comments have different display depending on some conditions.
 		} elseif ( $approved_comments ) {
 			printf( '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
-				esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'approved' ), admin_url( 'edit-comments.php' ) ) ),
+				esc_url( add_query_arg( array(
+					'p' => $post_id,
+					'comment_status' => 'approved',
+				), admin_url( 'edit-comments.php' ) ) ),
 				$approved_comments_number,
 				$pending_comments ? $approved_phrase : $approved_only_phrase
 			);
@@ -675,7 +712,10 @@
 
 		if ( $pending_comments ) {
 			printf( '<a href="%s" class="post-com-count post-com-count-pending"><span class="comment-count-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
-				esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'moderated' ), admin_url( 'edit-comments.php' ) ) ),
+				esc_url( add_query_arg( array(
+					'p' => $post_id,
+					'comment_status' => 'moderated',
+				), admin_url( 'edit-comments.php' ) ) ),
 				$pending_comments_number,
 				$pending_phrase
 			);
@@ -698,8 +738,9 @@
 	public function get_pagenum() {
 		$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
 
-		if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
+		if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
 			$pagenum = $this->_pagination_args['total_pages'];
+		}
 
 		return max( 1, $pagenum );
 	}
@@ -716,8 +757,9 @@
 	 */
 	protected function get_items_per_page( $option, $default = 20 ) {
 		$per_page = (int) get_user_option( $option );
-		if ( empty( $per_page ) || $per_page < 1 )
+		if ( empty( $per_page ) || $per_page < 1 ) {
 			$per_page = $default;
+		}
 
 		/**
 		 * Filters the number of items to be displayed on each page of the list table.
@@ -775,17 +817,17 @@
 
 		$disable_first = $disable_last = $disable_prev = $disable_next = false;
 
- 		if ( $current == 1 ) {
+		if ( $current == 1 ) {
 			$disable_first = true;
 			$disable_prev = true;
- 		}
+		}
 		if ( $current == 2 ) {
 			$disable_first = true;
 		}
- 		if ( $current == $total_pages ) {
+		if ( $current == $total_pages ) {
 			$disable_last = true;
 			$disable_next = true;
- 		}
+		}
 		if ( $current == $total_pages - 1 ) {
 			$disable_last = true;
 		}
@@ -804,7 +846,7 @@
 			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
 		} else {
 			$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
-				esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
+				esc_url( add_query_arg( 'paged', max( 1, $current -1 ), $current_url ) ),
 				__( 'Previous page' ),
 				'&lsaquo;'
 			);
@@ -827,7 +869,7 @@
 			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
 		} else {
 			$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
-				esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
+				esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
 				__( 'Next page' ),
 				'&rsaquo;'
 			);
@@ -1006,14 +1048,16 @@
 
 		$sortable = array();
 		foreach ( $_sortable as $id => $data ) {
-			if ( empty( $data ) )
+			if ( empty( $data ) ) {
 				continue;
+			}
 
 			$data = (array) $data;
-			if ( !isset( $data[1] ) )
+			if ( ! isset( $data[1] ) ) {
 				$data[1] = false;
+			}
 
-			$sortable[$id] = $data;
+			$sortable[ $id ] = $data;
 		}
 
 		$primary = $this->get_primary_column_name();
@@ -1078,17 +1122,18 @@
 				$class[] = 'hidden';
 			}
 
-			if ( 'cb' === $column_key )
+			if ( 'cb' === $column_key ) {
 				$class[] = 'check-column';
-			elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
+			} elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) {
 				$class[] = 'num';
+			}
 
 			if ( $column_key === $primary ) {
 				$class[] = 'column-primary';
 			}
 
-			if ( isset( $sortable[$column_key] ) ) {
-				list( $orderby, $desc_first ) = $sortable[$column_key];
+			if ( isset( $sortable[ $column_key ] ) ) {
+				list( $orderby, $desc_first ) = $sortable[ $column_key ];
 
 				if ( $current_orderby === $orderby ) {
 					$order = 'asc' === $current_order ? 'desc' : 'asc';
@@ -1107,11 +1152,12 @@
 			$scope = ( 'th' === $tag ) ? 'scope="col"' : '';
 			$id = $with_id ? "id='$column_key'" : '';
 
-			if ( !empty( $class ) )
+			if ( ! empty( $class ) ) {
 				$class = "class='" . join( ' ', $class ) . "'";
+			}
 
 			echo "<$tag $scope $id $class>$column_display_name</$tag>";
-		}
+		}// End foreach().
 	}
 
 	/**
@@ -1135,9 +1181,9 @@
 	</thead>
 
 	<tbody id="the-list"<?php
-		if ( $singular ) {
-			echo " data-wp-lists='list:$singular'";
-		} ?>>
+	if ( $singular ) {
+		echo " data-wp-lists='list:$singular'";
+	} ?>>
 		<?php $this->display_rows_or_placeholder(); ?>
 	</tbody>
 
@@ -1178,7 +1224,7 @@
 		?>
 	<div class="tablenav <?php echo esc_attr( $which ); ?>">
 
-		<?php if ( $this->has_items() ): ?>
+		<?php if ( $this->has_items() ) : ?>
 		<div class="alignleft actions bulkactions">
 			<?php $this->bulk_actions( $which ); ?>
 		</div>
@@ -1225,8 +1271,9 @@
 	 * @access public
 	 */
 	public function display_rows() {
-		foreach ( $this->items as $item )
+		foreach ( $this->items as $item ) {
 			$this->single_row( $item );
+		}
 	}
 
 	/**
@@ -1299,14 +1346,14 @@
 				echo "<td $attributes>";
 				echo call_user_func( array( $this, 'column_' . $column_name ), $item );
 				echo $this->handle_row_actions( $item, $column_name, $primary );
-				echo "</td>";
+				echo '</td>';
 			} else {
 				echo "<td $attributes>";
 				echo $this->column_default( $item, $column_name );
 				echo $this->handle_row_actions( $item, $column_name, $primary );
-				echo "</td>";
+				echo '</td>';
 			}
-		}
+		}// End foreach().
 	}
 
 	/**
@@ -1322,7 +1369,7 @@
 	 */
 	protected function handle_row_actions( $item, $column_name, $primary ) {
 		return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>' : '';
- 	}
+	}
 
 	/**
 	 * Handle an incoming ajax request (called from admin-ajax.php)
@@ -1342,7 +1389,9 @@
 
 		$rows = ob_get_clean();
 
-		$response = array( 'rows' => $rows );
+		$response = array(
+			'rows' => $rows,
+		);
 
 		if ( isset( $this->_pagination_args['total_items'] ) ) {
 			$response['total_items_i18n'] = sprintf(
@@ -1369,7 +1418,7 @@
 			'screen' => array(
 				'id'   => $this->screen->id,
 				'base' => $this->screen->base,
-			)
+			),
 		);
 
 		printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args ) );
Index: src/wp-admin/includes/class-wp-media-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-media-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-media-list-table.php	(working copy)
@@ -44,7 +44,7 @@
 
 		$this->modes = array(
 			'list' => __( 'List View' ),
-			'grid' => __( 'Grid View' )
+			'grid' => __( 'Grid View' ),
 		);
 
 		parent::__construct( array(
@@ -58,7 +58,7 @@
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		return current_user_can('upload_files');
+		return current_user_can( 'upload_files' );
 	}
 
 	/**
@@ -73,9 +73,9 @@
 
 		list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $_REQUEST );
 
- 		$this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' === $_REQUEST['attachment-filter'];
+		 $this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' === $_REQUEST['attachment-filter'];
 
- 		$mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
+		 $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
 
 		$this->set_pagination_args( array(
 			'total_items' => $wp_query->found_posts,
@@ -114,7 +114,7 @@
 				false
 			);
 
-			$type_links[$mime_type] = sprintf(
+			$type_links[ $mime_type ] = sprintf(
 				'<option value="post_mime_type:%s"%s>%s</option>',
 				esc_attr( $mime_type ),
 				$selected,
@@ -123,7 +123,7 @@
 		}
 		$type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . __( 'Unattached' ) . '</option>';
 
-		if ( $this->is_trash || ( defined( 'MEDIA_TRASH') && MEDIA_TRASH ) ) {
+		if ( $this->is_trash || ( defined( 'MEDIA_TRASH' ) && MEDIA_TRASH ) ) {
 			$type_links['trash'] = sprintf(
 				'<option value="trash"%s>%s</option>',
 				selected( 'trash' === $filter, true, false ),
@@ -150,8 +150,9 @@
 			$actions['delete'] = __( 'Delete Permanently' );
 		}
 
-		if ( $this->detached )
+		if ( $this->detached ) {
 			$actions['attach'] = __( 'Attach' );
+		}
 
 		return $actions;
 	}
@@ -166,20 +167,22 @@
 ?>
 		<div class="actions">
 <?php
-		if ( ! is_singular() ) {
-			if ( ! $this->is_trash ) {
-				$this->months_dropdown( 'attachment' );
-			}
+if ( ! is_singular() ) {
+	if ( ! $this->is_trash ) {
+		$this->months_dropdown( 'attachment' );
+	}
 
-			/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
-			do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
+	/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
+	do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
 
-			submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
-		}
+	submit_button( __( 'Filter' ), '', 'filter_action', false, array(
+		'id' => 'post-query-submit',
+	) );
+}
 
-		if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {
-			submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
-		} ?>
+if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {
+	submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
+} ?>
 		</div>
 <?php
 	}
@@ -189,14 +192,17 @@
 	 * @return string
 	 */
 	public function current_action() {
-		if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) )
+		if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) ) {
 			return 'attach';
+		}
 
-		if ( isset( $_REQUEST['parent_post_id'] ) && isset( $_REQUEST['media'] ) )
+		if ( isset( $_REQUEST['parent_post_id'] ) && isset( $_REQUEST['media'] ) ) {
 			return 'detach';
+		}
 
-		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
+		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
 			return 'delete_all';
+		}
 
 		return parent::current_action();
 	}
@@ -250,13 +256,13 @@
 		$views = apply_filters( "views_{$this->screen->id}", array() );
 
 		// Back compat for pre-4.0 view links.
-		if ( ! empty( $views ) ) {
-			echo '<ul class="filter-links">';
-			foreach ( $views as $class => $view ) {
-				echo "<li class='$class'>$view</li>";
-			}
-			echo '</ul>';
-		}
+if ( ! empty( $views ) ) {
+	echo '<ul class="filter-links">';
+	foreach ( $views as $class => $view ) {
+		echo "<li class='$class'>$view</li>";
+	}
+	echo '</ul>';
+}
 ?>
 	</div>
 
@@ -279,7 +285,9 @@
 		$posts_columns['author'] = __( 'Author' );
 
 		$taxonomies = get_taxonomies_for_attachments( 'objects' );
-		$taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
+		$taxonomies = wp_filter_object_list( $taxonomies, array(
+			'show_admin_column' => true,
+		), 'and', 'name' );
 
 		/**
 		 * Filters the taxonomy columns for attachments in the Media list table.
@@ -304,10 +312,11 @@
 		}
 
 		/* translators: column name */
-		if ( !$this->detached ) {
+		if ( ! $this->detached ) {
 			$posts_columns['parent'] = _x( 'Uploaded to', 'column name' );
-			if ( post_type_supports( 'attachment', 'comments' ) )
+			if ( post_type_supports( 'attachment', 'comments' ) ) {
 				$posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
+			}
 		}
 		/* translators: column name */
 		$posts_columns['date'] = _x( 'Date', 'column name' );
@@ -366,7 +375,9 @@
 		list( $mime ) = explode( '/', $post->post_mime_type );
 
 		$title = _draft_or_post_title();
-		$thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true, array( 'alt' => '' ) );
+		$thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true, array(
+			'alt' => '',
+		) );
 		$link_start = $link_end = '';
 
 		if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) {
@@ -411,7 +422,9 @@
 	 */
 	public function column_author( $post ) {
 		printf( '<a href="%s">%s</a>',
-			esc_url( add_query_arg( array( 'author' => get_the_author_meta('ID') ), 'upload.php' ) ),
+			esc_url( add_query_arg( array(
+				'author' => get_the_author_meta( 'ID' ),
+			), 'upload.php' ) ),
 			get_the_author()
 		);
 	}
@@ -488,11 +501,11 @@
 				_e( '(Private post)' );
 			}
 
-			if ( $user_can_edit ):
+			if ( $user_can_edit ) :
 				$detach_url = add_query_arg( array(
 					'parent_post_id' => $post->post_parent,
 					'media[]' => $post->ID,
-					'_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] )
+					'_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ),
 				), 'upload.php' );
 				printf(
 					'<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
@@ -513,8 +526,8 @@
 					esc_attr( sprintf( __( 'Attach &#8220;%s&#8221; to existing content' ), $title ) ),
 					__( 'Attach' )
 				);
-			}
-		}
+}
+		}// End if().
 	}
 
 	/**
@@ -694,9 +707,8 @@
 					__( 'Attach' )
 				);
 			}
-		}
-		else {
-			if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash ) {
+		} else {
+			if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) {
 				$actions['edit'] = sprintf(
 					'<a href="%s" aria-label="%s">%s</a>',
 					get_edit_post_link( $post->ID ),
@@ -724,7 +736,7 @@
 					);
 				}
 				if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
-					$delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
+					$delete_ays = ( ! $this->is_trash && ! MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
 					$actions['delete'] = sprintf(
 						'<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>',
 						wp_nonce_url( "post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID ),
@@ -744,7 +756,7 @@
 					__( 'View' )
 				);
 			}
-		}
+		}// End if().
 
 		/**
 		 * Filters the action links for each attachment in the Media list table.
Index: src/wp-admin/includes/class-wp-ms-sites-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-ms-sites-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-ms-sites-list-table.php	(working copy)
@@ -41,7 +41,7 @@
 			'archived' => array( 'site-archived', __( 'Archived' ) ),
 			'spam'     => array( 'site-spammed', _x( 'Spam', 'site' ) ),
 			'deleted'  => array( 'site-deleted', __( 'Deleted' ) ),
-			'mature'   => array( 'site-mature', __( 'Mature' ) )
+			'mature'   => array( 'site-mature', __( 'Mature' ) ),
 		);
 
 		parent::__construct( array(
@@ -81,22 +81,24 @@
 
 		$pagenum = $this->get_pagenum();
 
-		$s = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST[ 's' ] ) ) : '';
+		$s = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
 		$wild = '';
-		if ( false !== strpos($s, '*') ) {
+		if ( false !== strpos( $s, '*' ) ) {
 			$wild = '*';
-			$s = trim($s, '*');
+			$s = trim( $s, '*' );
 		}
 
 		/*
 		 * If the network is large and a search is not being performed, show only
 		 * the latest sites with no paging in order to avoid expensive count queries.
 		 */
-		if ( !$s && wp_is_large_network() ) {
-			if ( !isset($_REQUEST['orderby']) )
+		if ( ! $s && wp_is_large_network() ) {
+			if ( ! isset( $_REQUEST['orderby'] ) ) {
 				$_GET['orderby'] = $_REQUEST['orderby'] = '';
-			if ( !isset($_REQUEST['order']) )
+			}
+			if ( ! isset( $_REQUEST['order'] ) ) {
 				$_GET['order'] = $_REQUEST['order'] = 'DESC';
+			}
 		}
 
 		$args = array(
@@ -105,7 +107,7 @@
 			'network_id' => get_current_network_id(),
 		);
 
-		if ( empty($s) ) {
+		if ( empty( $s ) ) {
 			// Nothing to do.
 		} elseif ( preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $s ) ||
 					preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) ||
@@ -148,7 +150,7 @@
 		$args['orderby'] = $order_by;
 
 		if ( $order_by ) {
-			$args['order'] = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC";
+			$args['order'] = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
 		}
 
 		if ( wp_is_large_network() ) {
@@ -198,8 +200,9 @@
 	 */
 	protected function get_bulk_actions() {
 		$actions = array();
-		if ( current_user_can( 'delete_sites' ) )
+		if ( current_user_can( 'delete_sites' ) ) {
 			$actions['delete'] = __( 'Delete' );
+		}
 		$actions['spam'] = _x( 'Mark as Spam', 'site' );
 		$actions['notspam'] = _x( 'Not Spam', 'site' );
 
@@ -216,8 +219,9 @@
 
 		parent::pagination( $which );
 
-		if ( 'top' === $which )
+		if ( 'top' === $which ) {
 			$this->view_switcher( $mode );
+		}
 	}
 
 	/**
@@ -402,7 +406,10 @@
 	public function column_users( $blog ) {
 		$user_count = wp_cache_get( $blog['blog_id'] . '_user_count', 'blog-details' );
 		if ( ! $user_count ) {
-			$blog_users = get_users( array( 'blog_id' => $blog['blog_id'], 'fields' => 'ID' ) );
+			$blog_users = get_users( array(
+				'blog_id' => $blog['blog_id'],
+				'fields' => 'ID',
+			) );
 			$user_count = count( $blog_users );
 			unset( $blog_users );
 			wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS );
@@ -515,10 +522,14 @@
 
 		// Preordered.
 		$actions = array(
-			'edit' => '', 'backend' => '',
-			'activate' => '', 'deactivate' => '',
-			'archive' => '', 'unarchive' => '',
-			'spam' => '', 'unspam' => '',
+			'edit' => '',
+		'backend' => '',
+			'activate' => '',
+		'deactivate' => '',
+			'archive' => '',
+		'unarchive' => '',
+			'spam' => '',
+		'unspam' => '',
 			'delete' => '',
 			'visit' => '',
 		);
Index: src/wp-admin/includes/class-wp-ms-themes-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-ms-themes-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-ms-themes-list-table.php	(working copy)
@@ -44,15 +44,17 @@
 		) );
 
 		$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
-		if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) )
+		if ( ! in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) ) {
 			$status = 'all';
+		}
 
 		$page = $this->get_pagenum();
 
 		$this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false;
 
-		if ( $this->is_site_themes )
+		if ( $this->is_site_themes ) {
 			$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+		}
 	}
 
 	/**
@@ -69,10 +71,10 @@
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		if ( $this->is_site_themes )
+		if ( $this->is_site_themes ) {
 			return current_user_can( 'manage_sites' );
-		else
-			return current_user_can( 'manage_network_themes' );
+		} else { return current_user_can( 'manage_network_themes' );
+		}
 	}
 
 	/**
@@ -103,7 +105,9 @@
 			'enabled' => array(),
 			'disabled' => array(),
 			'upgrade' => array(),
-			'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ),
+			'broken' => $this->is_site_themes ? array() : wp_get_themes( array(
+				'errors' => true,
+			) ),
 		);
 
 		if ( $this->is_site_themes ) {
@@ -137,11 +141,13 @@
 		}
 
 		$totals = array();
-		foreach ( $themes as $type => $list )
+		foreach ( $themes as $type => $list ) {
 			$totals[ $type ] = count( $list );
+		}
 
-		if ( empty( $themes[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) )
+		if ( empty( $themes[ $status ] ) && ! in_array( $status, array( 'all', 'search' ) ) ) {
 			$status = 'all';
+		}
 
 		$this->items = $themes[ $status ];
 		WP_Theme::sort_by_name( $this->items );
@@ -169,8 +175,9 @@
 
 		$start = ( $page - 1 ) * $themes_per_page;
 
-		if ( $total_this_page > $themes_per_page )
+		if ( $total_this_page > $themes_per_page ) {
 			$this->items = array_slice( $this->items, $start, $themes_per_page, true );
+		}
 
 		$this->set_pagination_args( array(
 			'total_items' => $total_this_page,
@@ -185,20 +192,24 @@
 	 */
 	public function _search_callback( $theme ) {
 		static $term = null;
-		if ( is_null( $term ) )
+		if ( is_null( $term ) ) {
 			$term = wp_unslash( $_REQUEST['s'] );
+		}
 
 		foreach ( array( 'Name', 'Description', 'Author', 'Author', 'AuthorURI' ) as $field ) {
 			// Don't mark up; Do translate.
-			if ( false !== stripos( $theme->display( $field, false, true ), $term ) )
+			if ( false !== stripos( $theme->display( $field, false, true ), $term ) ) {
 				return true;
+			}
 		}
 
-		if ( false !== stripos( $theme->get_stylesheet(), $term ) )
+		if ( false !== stripos( $theme->get_stylesheet(), $term ) ) {
 			return true;
+		}
 
-		if ( false !== stripos( $theme->get_template(), $term ) )
+		if ( false !== stripos( $theme->get_template(), $term ) ) {
 			return true;
+		}
 
 		return false;
 	}
@@ -217,13 +228,14 @@
 		$a = $theme_a[ $orderby ];
 		$b = $theme_b[ $orderby ];
 
-		if ( $a == $b )
+		if ( $a == $b ) {
 			return 0;
+		}
 
-		if ( 'DESC' === $order )
+		if ( 'DESC' === $order ) {
 			return ( $a < $b ) ? 1 : -1;
-		else
-			return ( $a < $b ) ? -1 : 1;
+		} else { return ( $a < $b ) ? -1 : 1;
+		}
 	}
 
 	/**
@@ -282,8 +294,9 @@
 
 		$status_links = array();
 		foreach ( $totals as $type => $count ) {
-			if ( !$count )
+			if ( ! $count ) {
 				continue;
+			}
 
 			switch ( $type ) {
 				case 'all':
@@ -303,19 +316,19 @@
 					break;
 			}
 
-			if ( $this->is_site_themes )
+			if ( $this->is_site_themes ) {
 				$url = 'site-themes.php?id=' . $this->site_id;
-			else
-				$url = 'themes.php';
+			} else { $url = 'themes.php';
+			}
 
 			if ( 'search' != $type ) {
-				$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
-					esc_url( add_query_arg('theme_status', $type, $url) ),
+				$status_links[ $type ] = sprintf( "<a href='%s' %s>%s</a>",
+					esc_url( add_query_arg( 'theme_status', $type, $url ) ),
 					( $type === $status ) ? ' class="current"' : '',
 					sprintf( $text, number_format_i18n( $count ) )
 				);
 			}
-		}
+		}// End foreach().
 
 		return $status_links;
 	}
@@ -329,15 +342,19 @@
 		global $status;
 
 		$actions = array();
-		if ( 'enabled' != $status )
+		if ( 'enabled' != $status ) {
 			$actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' );
-		if ( 'disabled' != $status )
+		}
+		if ( 'disabled' != $status ) {
 			$actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' );
+		}
 		if ( ! $this->is_site_themes ) {
-			if ( current_user_can( 'update_themes' ) )
+			if ( current_user_can( 'update_themes' ) ) {
 				$actions['update-selected'] = __( 'Update' );
-			if ( current_user_can( 'delete_themes' ) )
+			}
+			if ( current_user_can( 'delete_themes' ) ) {
 				$actions['delete-selected'] = __( 'Delete' );
+			}
 		}
 		return $actions;
 	}
@@ -346,8 +363,9 @@
 	 * @access public
 	 */
 	public function display_rows() {
-		foreach ( $this->items as $theme )
+		foreach ( $this->items as $theme ) {
 			$this->single_row( $theme );
+		}
 	}
 
 	/**
@@ -359,7 +377,7 @@
 	 * @param WP_Theme $theme The current WP_Theme object.
 	 */
 	public function column_cb( $theme ) {
-		$checkbox_id = 'checkbox_' . md5( $theme->get('Name') );
+		$checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
 		?>
 		<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ) ?>" id="<?php echo $checkbox_id ?>" />
 		<label class="screen-reader-text" for="<?php echo $checkbox_id ?>" ><?php _e( 'Select' ) ?>  <?php echo $theme->display( 'Name' ) ?></label>
@@ -396,7 +414,7 @@
 			'enable' => '',
 			'disable' => '',
 			'edit' => '',
-			'delete' => ''
+			'delete' => '',
 		);
 
 		$stylesheet = $theme->get_stylesheet();
@@ -446,9 +464,9 @@
 				esc_attr( $aria_label ),
 				( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) )
 			);
-		}
+		}// End if().
 
-		if ( current_user_can('edit_themes') ) {
+		if ( current_user_can( 'edit_themes' ) ) {
 			$url = add_query_arg( array(
 				'theme' => $theme_key,
 			), 'theme-editor.php' );
@@ -549,8 +567,9 @@
 		}
 
 		$class = ! $allowed ? 'inactive' : 'active';
-		if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) )
+		if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) {
 			$class .= ' update';
+		}
 
 		echo "<div class='theme-description'><p>" . $theme->display( 'Description' ) . "</p></div>
 			<div class='$class second theme-version-author-uri'>";
@@ -558,12 +577,12 @@
 		$stylesheet = $theme->get_stylesheet();
 		$theme_meta = array();
 
-		if ( $theme->get('Version') ) {
-			$theme_meta[] = sprintf( __( 'Version %s' ), $theme->display('Version') );
+		if ( $theme->get( 'Version' ) ) {
+			$theme_meta[] = sprintf( __( 'Version %s' ), $theme->display( 'Version' ) );
 		}
-		$theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') );
+		$theme_meta[] = sprintf( __( 'By %s' ), $theme->display( 'Author' ) );
 
-		if ( $theme->get('ThemeURI') ) {
+		if ( $theme->get( 'ThemeURI' ) ) {
 			/* translators: %s: theme name */
 			$aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) );
 
@@ -643,11 +662,11 @@
 					break;
 
 				case 'name':
-					echo "<td class='theme-title column-primary{$extra_classes}'><strong>" . $item->display('Name') . "</strong>";
+					echo "<td class='theme-title column-primary{$extra_classes}'><strong>" . $item->display( 'Name' ) . '</strong>';
 
 					$this->column_name( $item );
 
-					echo "</td>";
+					echo '</td>';
 					break;
 
 				case 'description':
@@ -663,10 +682,10 @@
 
 					$this->column_default( $item, $column_name );
 
-					echo "</td>";
+					echo '</td>';
 					break;
 			}
-		}
+		}// End foreach().
 	}
 
 	/**
@@ -698,10 +717,11 @@
 
 		$this->single_row_columns( $theme );
 
-		echo "</tr>";
+		echo '</tr>';
 
-		if ( $this->is_site_themes )
+		if ( $this->is_site_themes ) {
 			remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' );
+		}
 
 		/**
 		 * Fires after each row in the Multisite themes list table.
Index: src/wp-admin/includes/class-wp-ms-users-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-ms-users-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-ms-users-list-table.php	(working copy)
@@ -44,15 +44,15 @@
 
 		$args = array(
 			'number' => $users_per_page,
-			'offset' => ( $paged-1 ) * $users_per_page,
+			'offset' => ( $paged -1 ) * $users_per_page,
 			'search' => $usersearch,
 			'blog_id' => 0,
-			'fields' => 'all_with_meta'
+			'fields' => 'all_with_meta',
 		);
 
 		if ( wp_is_large_network( 'users' ) ) {
 			$args['search'] = ltrim( $args['search'], '*' );
-		} else if ( '' !== $args['search'] ) {
+		} elseif ( '' !== $args['search'] ) {
 			$args['search'] = trim( $args['search'], '*' );
 			$args['search'] = '*' . $args['search'] . '*';
 		}
@@ -67,19 +67,23 @@
 		 * show only the latest users with no paging in order to avoid
 		 * expensive count queries.
 		 */
-		if ( !$usersearch && wp_is_large_network( 'users' ) ) {
-			if ( !isset($_REQUEST['orderby']) )
+		if ( ! $usersearch && wp_is_large_network( 'users' ) ) {
+			if ( ! isset( $_REQUEST['orderby'] ) ) {
 				$_GET['orderby'] = $_REQUEST['orderby'] = 'id';
-			if ( !isset($_REQUEST['order']) )
+			}
+			if ( ! isset( $_REQUEST['order'] ) ) {
 				$_GET['order'] = $_REQUEST['order'] = 'DESC';
+			}
 			$args['count_total'] = false;
 		}
 
-		if ( isset( $_REQUEST['orderby'] ) )
+		if ( isset( $_REQUEST['orderby'] ) ) {
 			$args['orderby'] = $_REQUEST['orderby'];
+		}
 
-		if ( isset( $_REQUEST['order'] ) )
+		if ( isset( $_REQUEST['order'] ) ) {
 			$args['order'] = $_REQUEST['order'];
+		}
 
 		if ( ! empty( $_REQUEST['mode'] ) ) {
 			$mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
@@ -108,8 +112,9 @@
 	 */
 	protected function get_bulk_actions() {
 		$actions = array();
-		if ( current_user_can( 'delete_users' ) )
+		if ( current_user_can( 'delete_users' ) ) {
 			$actions['delete'] = __( 'Delete' );
+		}
 		$actions['spam'] = _x( 'Mark as Spam', 'user' );
 		$actions['notspam'] = _x( 'Not Spam', 'user' );
 
@@ -137,9 +142,9 @@
 
 		$class = $role != 'super' ? ' class="current"' : '';
 		$role_links = array();
-		$role_links['all'] = "<a href='" . network_admin_url('users.php') . "'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
+		$role_links['all'] = "<a href='" . network_admin_url( 'users.php' ) . "'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
 		$class = $role === 'super' ? ' class="current"' : '';
-		$role_links['super'] = "<a href='" . network_admin_url('users.php?role=super') . "'$class>" . sprintf( _n( 'Super Admin <span class="count">(%s)</span>', 'Super Admins <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>';
+		$role_links['super'] = "<a href='" . network_admin_url( 'users.php?role=super' ) . "'$class>" . sprintf( _n( 'Super Admin <span class="count">(%s)</span>', 'Super Admins <span class="count">(%s)</span>', $total_admins ), number_format_i18n( $total_admins ) ) . '</a>';
 
 		return $role_links;
 	}
@@ -152,7 +157,7 @@
 	protected function pagination( $which ) {
 		global $mode;
 
-		parent::pagination ( $which );
+		parent::pagination( $which );
 
 		if ( 'top' === $which ) {
 			$this->view_switcher( $mode );
@@ -170,7 +175,7 @@
 			'name'       => __( 'Name' ),
 			'email'      => __( 'Email' ),
 			'registered' => _x( 'Registered', 'user' ),
-			'blogs'      => __( 'Sites' )
+			'blogs'      => __( 'Sites' ),
 		);
 		/**
 		 * Filters the columns displayed in the Network Admin Users list table.
@@ -242,9 +247,9 @@
 		echo $avatar;
 
 		?><strong><a href="<?php echo $edit_link; ?>" class="edit"><?php echo $user->user_login; ?></a><?php
-		if ( in_array( $user->user_login, $super_admins ) ) {
-			echo ' - ' . __( 'Super Admin' );
-		}
+if ( in_array( $user->user_login, $super_admins ) ) {
+	echo ' - ' . __( 'Super Admin' );
+}
 		?></strong>
 	<?php
 	}
@@ -330,10 +335,10 @@
 
 			$path	= ( $val->path === '/' ) ? '' : $val->path;
 			echo '<span class="site-' . $val->site_id . '" >';
-			echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
+			echo '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . str_replace( '.' . get_network()->domain, '', $val->domain . $path ) . '</a>';
 			echo ' <small class="row-actions">';
 			$actions = array();
-			$actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
+			$actions['edit'] = '<a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) . '">' . __( 'Edit' ) . '</a>';
 
 			$class = '';
 			if ( $val->spam == 1 ) {
@@ -363,7 +368,7 @@
 			 */
 			$actions = apply_filters( 'ms_user_list_site_actions', $actions, $val->userblog_id );
 
-			$i=0;
+			$i = 0;
 			$action_count = count( $actions );
 			foreach ( $actions as $action => $link ) {
 				++$i;
@@ -371,7 +376,7 @@
 				echo "<span class='$action'>$link$sep</span>";
 			}
 			echo '</small></span><br/>';
-		}
+		}// End foreach().
 	}
 
 	/**
@@ -392,7 +397,10 @@
 		foreach ( $this->items as $user ) {
 			$class = '';
 
-			$status_list = array( 'spam' => 'site-spammed', 'deleted' => 'site-deleted' );
+			$status_list = array(
+				'spam' => 'site-spammed',
+				'deleted' => 'site-deleted',
+			);
 
 			foreach ( $status_list as $status => $col ) {
 				if ( $user->$status ) {
Index: src/wp-admin/includes/class-wp-plugin-install-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-plugin-install-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-plugin-install-list-table.php	(working copy)
@@ -28,7 +28,7 @@
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		return current_user_can('install_plugins');
+		return current_user_can( 'install_plugins' );
 	}
 
 	/**
@@ -122,8 +122,9 @@
 		$nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
 
 		// If a non-valid menu tab has been selected, And it's not a non-menu action.
-		if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) )
+		if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) ) {
 			$tab = key( $tabs );
+		}
 
 		$args = array(
 			'page' => $paged,
@@ -131,7 +132,7 @@
 			'fields' => array(
 				'last_updated' => true,
 				'icons' => true,
-				'active_installs' => true
+				'active_installs' => true,
 			),
 			// Send the locale and installed plugin slugs to the API so it can provide context-sensitive results.
 			'locale' => get_user_locale(),
@@ -176,10 +177,10 @@
 				} else {
 					$user = get_user_option( 'wporg_favorites' );
 				}
-				if ( $user )
+				if ( $user ) {
 					$args['user'] = $user;
-				else
-					$args = false;
+				} else { $args = false;
+				}
 
 				add_action( 'install_plugins_favorites', 'install_plugins_favorites_form', 9, 0 );
 				break;
@@ -187,7 +188,7 @@
 			default:
 				$args = false;
 				break;
-		}
+		}// End switch().
 
 		/**
 		 * Filters API request arguments for each Plugin Install screen tab.
@@ -201,8 +202,9 @@
 		 */
 		$args = apply_filters( "install_plugins_table_api_args_{$tab}", $args );
 
-		if ( !$args )
+		if ( ! $args ) {
 			return;
+		}
 
 		$api = plugins_api( 'query_plugins', $args );
 
@@ -252,8 +254,8 @@
 		$display_tabs = array();
 		foreach ( (array) $tabs as $action => $text ) {
 			$class = ( $action === $tab ) ? ' current' : '';
-			$href = self_admin_url('plugin-install.php?tab=' . $action);
-			$display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>";
+			$href = self_admin_url( 'plugin-install.php?tab=' . $action );
+			$display_tabs[ 'plugin-install-' . $action ] = "<a href='$href' class='$class'>$text</a>";
 		}
 		// No longer a real tab.
 		unset( $display_tabs['plugin-install-upload'] );
@@ -348,7 +350,7 @@
 				<br class="clear" />
 			</div>
 		<?php
-		}
+}
 	}
 
 	/**
@@ -392,10 +394,26 @@
 
 	public function display_rows() {
 		$plugins_allowedtags = array(
-			'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
-			'abbr' => array( 'title' => array() ),'acronym' => array( 'title' => array() ),
-			'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),
-			'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
+			'a' => array(
+				'href' => array(),
+				'title' => array(),
+				'target' => array(),
+			),
+			'abbr' => array(
+				'title' => array(),
+			),
+		'acronym' => array(
+		'title' => array(),
+		),
+			'code' => array(),
+		'pre' => array(),
+		'em' => array(),
+		'strong' => array(),
+			'ul' => array(),
+		'ol' => array(),
+		'li' => array(),
+		'p' => array(),
+		'br' => array(),
 		);
 
 		$plugins_group_titles = array(
@@ -484,7 +502,9 @@
 								$button_text  = __( 'Network Activate' );
 								/* translators: %s: Plugin name */
 								$button_label = _x( 'Network Activate %s', 'plugin' );
-								$activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
+								$activate_url = add_query_arg( array(
+									'networkwide' => 1,
+								), $activate_url );
 							}
 
 							$action_links[] = sprintf(
@@ -497,20 +517,20 @@
 							$action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Installed', 'plugin' ) . '</button>';
 						}
 						break;
-				}
-			}
+				}// End switch().
+			}// End if().
 
 			$details_link   = self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
-								'&amp;TB_iframe=true&amp;width=600&amp;height=550' );
+			'&amp;TB_iframe=true&amp;width=600&amp;height=550' );
 
 			/* translators: 1: Plugin name and version. */
 			$action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox open-plugin-details-modal" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
 
-			if ( !empty( $plugin['icons']['svg'] ) ) {
+			if ( ! empty( $plugin['icons']['svg'] ) ) {
 				$plugin_icon_url = $plugin['icons']['svg'];
-			} elseif ( !empty( $plugin['icons']['2x'] ) ) {
+			} elseif ( ! empty( $plugin['icons']['2x'] ) ) {
 				$plugin_icon_url = $plugin['icons']['2x'];
-			} elseif ( !empty( $plugin['icons']['1x'] ) ) {
+			} elseif ( ! empty( $plugin['icons']['1x'] ) ) {
 				$plugin_icon_url = $plugin['icons']['1x'];
 			} else {
 				$plugin_icon_url = $plugin['icons']['default'];
@@ -540,9 +560,9 @@
 				</div>
 				<div class="action-links">
 					<?php
-						if ( $action_links ) {
-							echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
-						}
+					if ( $action_links ) {
+						echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
+					}
 					?>
 				</div>
 				<div class="desc column-description">
@@ -552,7 +572,11 @@
 			</div>
 			<div class="plugin-card-bottom">
 				<div class="vers column-rating">
-					<?php wp_star_rating( array( 'rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
+					<?php wp_star_rating( array(
+						'rating' => $plugin['rating'],
+						'type' => 'percent',
+						'number' => $plugin['num_ratings'],
+					) ); ?>
 					<span class="num-ratings" aria-hidden="true">(<?php echo number_format_i18n( $plugin['num_ratings'] ); ?>)</span>
 				</div>
 				<div class="column-updated">
@@ -586,7 +610,7 @@
 			</div>
 		</div>
 		<?php
-		}
+		}// End foreach().
 
 		// Close off the group divs of the last one
 		if ( ! empty( $group ) ) {
Index: src/wp-admin/includes/class-wp-plugins-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-plugins-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-plugins-list-table.php	(working copy)
@@ -39,11 +39,13 @@
 		) );
 
 		$status = 'all';
-		if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) )
+		if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) ) {
 			$status = $_REQUEST['plugin_status'];
+		}
 
-		if ( isset($_REQUEST['s']) )
-			$_SERVER['REQUEST_URI'] = add_query_arg('s', wp_unslash($_REQUEST['s']) );
+		if ( isset( $_REQUEST['s'] ) ) {
+			$_SERVER['REQUEST_URI'] = add_query_arg( 's', wp_unslash( $_REQUEST['s'] ) );
+		}
 
 		$page = $this->get_pagenum();
 	}
@@ -59,7 +61,7 @@
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		return current_user_can('activate_plugins');
+		return current_user_can( 'activate_plugins' );
 	}
 
 	/**
@@ -123,8 +125,9 @@
 			}
 
 			/** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */
-			if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
+			if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {
 				$plugins['dropins'] = get_dropins();
+			}
 
 			if ( current_user_can( 'update_plugins' ) ) {
 				$current = get_site_transient( 'update_plugins' );
@@ -135,7 +138,7 @@
 					}
 				}
 			}
-		}
+		}// End if().
 
 		if ( ! $screen->in_admin( 'network' ) ) {
 			$show = current_user_can( 'manage_network_plugins' );
@@ -165,7 +168,7 @@
 
 		foreach ( $recently_activated as $key => $time ) {
 			if ( $time + WEEK_IN_SECONDS < time() ) {
-				unset( $recently_activated[$key] );
+				unset( $recently_activated[ $key ] );
 			}
 		}
 
@@ -185,7 +188,6 @@
 				if ( isset( $plugins['upgrade'][ $plugin_file ] ) ) {
 					$plugins['upgrade'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
 				}
-
 			} elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) {
 				$plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
 				// Make sure that $plugins['upgrade'] also receives the extra info since it is used on ?plugin_status=upgrade
@@ -224,7 +226,7 @@
 				// Populate the inactive list with plugins that aren't activated
 				$plugins['inactive'][ $plugin_file ] = $plugin_data;
 			}
-		}
+		}// End foreach().
 
 		if ( strlen( $s ) ) {
 			$status = 'search';
@@ -232,16 +234,18 @@
 		}
 
 		$totals = array();
-		foreach ( $plugins as $type => $list )
+		foreach ( $plugins as $type => $list ) {
 			$totals[ $type ] = count( $list );
+		}
 
-		if ( empty( $plugins[ $status ] ) && !in_array( $status, array( 'all', 'search' ) ) )
+		if ( empty( $plugins[ $status ] ) && ! in_array( $status, array( 'all', 'search' ) ) ) {
 			$status = 'all';
+		}
 
 		$this->items = array();
 		foreach ( $plugins[ $status ] as $plugin_file => $plugin_data ) {
 			// Translate, Don't Apply Markup, Sanitize HTML
-			$this->items[$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
+			$this->items[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
 		}
 
 		$total_this_page = $totals[ $status ];
@@ -270,8 +274,9 @@
 
 		$start = ( $page - 1 ) * $plugins_per_page;
 
-		if ( $total_this_page > $plugins_per_page )
+		if ( $total_this_page > $plugins_per_page ) {
 			$this->items = array_slice( $this->items, $start, $plugins_per_page );
+		}
 
 		$this->set_pagination_args( array(
 			'total_items' => $total_this_page,
@@ -307,11 +312,12 @@
 	public function _order_callback( $plugin_a, $plugin_b ) {
 		global $orderby, $order;
 
-		$a = $plugin_a[$orderby];
-		$b = $plugin_b[$orderby];
+		$a = $plugin_a[ $orderby ];
+		$b = $plugin_b[ $orderby ];
 
-		if ( $a == $b )
+		if ( $a == $b ) {
 			return 0;
+		}
 
 		if ( 'DESC' === $order ) {
 			return strcasecmp( $b, $a );
@@ -336,10 +342,10 @@
 			if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) {
 				echo ' <a href="' . esc_url( admin_url( 'plugin-install.php?tab=search&s=' . urlencode( $s ) ) ) . '">' . __( 'Search for plugins in the WordPress Plugin Directory.' ) . '</a>';
 			}
-		} elseif ( ! empty( $plugins['all'] ) )
+		} elseif ( ! empty( $plugins['all'] ) ) {
 			_e( 'No plugins found.' );
-		else
-			_e( 'You do not appear to have any plugins available at this time.' );
+		} else { _e( 'You do not appear to have any plugins available at this time.' );
+		}
 	}
 
 	/**
@@ -368,7 +374,9 @@
 		<p class="search-box">
 			<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
 			<input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" placeholder="<?php esc_attr_e( 'Search installed plugins...' ); ?>"/>
-			<?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
+			<?php submit_button( $text, 'hide-if-js', '', false, array(
+				'id' => 'search-submit',
+			) ); ?>
 		</p>
 		<?php
 	}
@@ -382,7 +390,7 @@
 		global $status;
 
 		return array(
-			'cb'          => !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',
+			'cb'          => ! in_array( $status, array( 'mustuse', 'dropins' ) ) ? '<input type="checkbox" />' : '',
 			'name'        => __( 'Plugin' ),
 			'description' => __( 'Description' ),
 		);
@@ -406,8 +414,9 @@
 
 		$status_links = array();
 		foreach ( $totals as $type => $count ) {
-			if ( !$count )
+			if ( ! $count ) {
 				continue;
+			}
 
 			switch ( $type ) {
 				case 'all':
@@ -434,13 +443,13 @@
 			}
 
 			if ( 'search' !== $type ) {
-				$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
-					add_query_arg('plugin_status', $type, 'plugins.php'),
+				$status_links[ $type ] = sprintf( "<a href='%s' %s>%s</a>",
+					add_query_arg( 'plugin_status', $type, 'plugins.php' ),
 					( $type === $status ) ? ' class="current"' : '',
 					sprintf( $text, number_format_i18n( $count ) )
-					);
+				);
 			}
-		}
+		}// End foreach().
 
 		return $status_links;
 	}
@@ -455,17 +464,21 @@
 
 		$actions = array();
 
-		if ( 'active' != $status )
+		if ( 'active' != $status ) {
 			$actions['activate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Activate' ) : __( 'Activate' );
+		}
 
-		if ( 'inactive' != $status && 'recent' != $status )
+		if ( 'inactive' != $status && 'recent' != $status ) {
 			$actions['deactivate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Deactivate' ) : __( 'Deactivate' );
+		}
 
-		if ( !is_multisite() || $this->screen->in_admin( 'network' ) ) {
-			if ( current_user_can( 'update_plugins' ) )
+		if ( ! is_multisite() || $this->screen->in_admin( 'network' ) ) {
+			if ( current_user_can( 'update_plugins' ) ) {
 				$actions['update-selected'] = __( 'Update' );
-			if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) )
+			}
+			if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) {
 				$actions['delete-selected'] = __( 'Delete' );
+			}
 		}
 
 		return $actions;
@@ -478,8 +491,9 @@
 	public function bulk_actions( $which = '' ) {
 		global $status;
 
-		if ( in_array( $status, array( 'mustuse', 'dropins' ) ) )
+		if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
 			return;
+		}
 
 		parent::bulk_actions( $which );
 	}
@@ -491,8 +505,9 @@
 	protected function extra_tablenav( $which ) {
 		global $status;
 
-		if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) )
+		if ( ! in_array( $status, array( 'recently_activated', 'mustuse', 'dropins' ) ) ) {
 			return;
+		}
 
 		echo '<div class="alignleft actions">';
 
@@ -516,8 +531,9 @@
 	 * @return string
 	 */
 	public function current_action() {
-		if ( isset($_POST['clear-recent-list']) )
+		if ( isset( $_POST['clear-recent-list'] ) ) {
 			return 'clear-recent-list';
+		}
 
 		return parent::current_action();
 	}
@@ -529,11 +545,13 @@
 	public function display_rows() {
 		global $status;
 
-		if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) )
+		if ( is_multisite() && ! $this->screen->in_admin( 'network' ) && in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
 			return;
+		}
 
-		foreach ( $this->items as $plugin_file => $plugin_data )
+		foreach ( $this->items as $plugin_file => $plugin_data ) {
 			$this->single_row( array( $plugin_file, $plugin_data ) );
+		}
 	}
 
 	/**
@@ -569,8 +587,9 @@
 		} elseif ( 'dropins' === $context ) {
 			$dropins = _get_dropins();
 			$plugin_name = $plugin_file;
-			if ( $plugin_file != $plugin_data['Name'] )
+			if ( $plugin_file != $plugin_data['Name'] ) {
 				$plugin_name .= '<br/>' . $plugin_data['Name'];
+			}
 			if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant
 				$is_active = true;
 				$description = '<p><strong>' . $dropins[ $plugin_file ][0] . '</strong></p>';
@@ -586,8 +605,9 @@
 						'<code>wp-config.php</code>'
 					) . '</p>';
 			}
-			if ( $plugin_data['Description'] )
+			if ( $plugin_data['Description'] ) {
 				$description .= '<p>' . $plugin_data['Description'] . '</p>';
+			}
 		} else {
 			if ( $screen->in_admin( 'network' ) ) {
 				$is_active = is_plugin_active_for_network( $plugin_file );
@@ -602,7 +622,7 @@
 					if ( current_user_can( 'manage_network_plugins' ) ) {
 						/* translators: %s: plugin name */
 						$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
-						}
+					}
 				} else {
 					if ( current_user_can( 'manage_network_plugins' ) ) {
 						/* translators: %s: plugin name */
@@ -633,15 +653,14 @@
 						/* translators: %s: plugin name */
 						$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
 					}
-				} // end if $is_active
-
-			 } // end if $screen->in_admin( 'network' )
+				}
+			} // End if().
 
 			if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
 				/* translators: %s: plugin name */
 				$actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
 			}
-		} // end if $context
+		} // End if().
 
 		$actions = array_filter( $actions );
 
@@ -719,14 +738,14 @@
 			 */
 			$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
 
-		}
+		}// End if().
 
 		$class = $is_active ? 'active' : 'inactive';
-		$checkbox_id =  "checkbox_" . md5($plugin_data['Name']);
+		$checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] );
 		if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
 			$checkbox = '';
 		} else {
-			$checkbox = "<label class='screen-reader-text' for='" . $checkbox_id . "' >" . sprintf( __( 'Select %s' ), $plugin_data['Name'] ) . "</label>"
+			$checkbox = "<label class='screen-reader-text' for='" . $checkbox_id . "' >" . sprintf( __( 'Select %s' ), $plugin_data['Name'] ) . '</label>'
 				. "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' />";
 		}
 		if ( 'dropins' != $context ) {
@@ -734,8 +753,9 @@
 			$plugin_name = $plugin_data['Name'];
 		}
 
-		if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) )
+		if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) {
 			$class .= ' update';
+		}
 
 		$plugin_slug = isset( $plugin_data['slug'] ) ? $plugin_data['slug'] : sanitize_title( $plugin_name );
 		printf( '<tr class="%s" data-slug="%s" data-plugin="%s">',
@@ -759,7 +779,7 @@
 				case 'name':
 					echo "<td class='plugin-title column-primary'><strong>$plugin_name</strong>";
 					echo $this->row_actions( $actions, true );
-					echo "</td>";
+					echo '</td>';
 					break;
 				case 'description':
 					$classes = 'column-description desc';
@@ -769,12 +789,14 @@
 						<div class='$class second plugin-version-author-uri'>";
 
 					$plugin_meta = array();
-					if ( !empty( $plugin_data['Version'] ) )
+					if ( ! empty( $plugin_data['Version'] ) ) {
 						$plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
-					if ( !empty( $plugin_data['Author'] ) ) {
+					}
+					if ( ! empty( $plugin_data['Author'] ) ) {
 						$author = $plugin_data['Author'];
-						if ( !empty( $plugin_data['AuthorURI'] ) )
+						if ( ! empty( $plugin_data['AuthorURI'] ) ) {
 							$author = '<a href="' . $plugin_data['AuthorURI'] . '">' . $plugin_data['Author'] . '</a>';
+						}
 						$plugin_meta[] = sprintf( __( 'By %s' ), $author );
 					}
 
@@ -782,7 +804,7 @@
 					if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
 						$plugin_meta[] = sprintf( '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
 							esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
-								'&TB_iframe=true&width=600&height=550' ) ),
+							'&TB_iframe=true&width=600&height=550' ) ),
 							esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
 							esc_attr( $plugin_name ),
 							__( 'View details' )
@@ -811,7 +833,7 @@
 					$plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
 					echo implode( ' | ', $plugin_meta );
 
-					echo "</div></td>";
+					echo '</div></td>';
 					break;
 				default:
 					$classes = "$column_name column-$column_name $class";
@@ -829,11 +851,11 @@
 					 */
 					do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data );
 
-					echo "</td>";
-			}
-		}
+					echo '</td>';
+			}// End switch().
+		}// End foreach().
 
-		echo "</tr>";
+		echo '</tr>';
 
 		/**
 		 * Fires after each row in the Plugins list table.
Index: src/wp-admin/includes/class-wp-post-comments-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-post-comments-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-post-comments-list-table.php	(working copy)
@@ -51,16 +51,16 @@
 	public function display( $output_empty = false ) {
 		$singular = $this->_args['singular'];
 
-		wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
+		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
 ?>
 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
 	<tbody id="the-comment-list"<?php
-		if ( $singular ) {
-			echo " data-wp-lists='list:$singular'";
-		} ?>>
+	if ( $singular ) {
+		echo " data-wp-lists='list:$singular'";
+	} ?>>
 		<?php if ( ! $output_empty ) {
 			$this->display_rows_or_placeholder();
-		} ?>
+} ?>
 	</tbody>
 </table>
 <?php
Index: src/wp-admin/includes/class-wp-posts-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-posts-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-posts-list-table.php	(working copy)
@@ -147,7 +147,7 @@
 		$per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );
 
 		/** This filter is documented in wp-admin/includes/post.php */
- 		$per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
+		 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
 
 		if ( $this->hierarchical_display ) {
 			$total_items = $wp_query->post_count;
@@ -166,7 +166,9 @@
 				$total_items = array_sum( $post_counts );
 
 				// Subtract post types that are not included in the admin all list.
-				foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
+				foreach ( get_post_stati( array(
+					'show_in_admin_all_list' => false,
+				) ) as $state ) {
 					$total_items -= $post_counts[ $state ];
 				}
 			}
@@ -183,7 +185,7 @@
 
 		$this->set_pagination_args( array(
 			'total_items' => $total_items,
-			'per_page' => $per_page
+			'per_page' => $per_page,
 		) );
 	}
 
@@ -199,10 +201,10 @@
 	 * @access public
 	 */
 	public function no_items() {
-		if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] )
+		if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) {
 			echo get_post_type_object( $this->screen->post_type )->labels->not_found_in_trash;
-		else
-			echo get_post_type_object( $this->screen->post_type )->labels->not_found;
+		} else { echo get_post_type_object( $this->screen->post_type )->labels->not_found;
+		}
 	}
 
 	/**
@@ -242,9 +244,9 @@
 		$class_html = '';
 		if ( ! empty( $class ) ) {
 			 $class_html = sprintf(
-				' class="%s"',
-				esc_attr( $class )
-			);
+				 ' class="%s"',
+				 esc_attr( $class )
+			 );
 		}
 
 		return sprintf(
@@ -266,8 +268,9 @@
 
 		$post_type = $this->screen->post_type;
 
-		if ( !empty($locked_post_status) )
+		if ( ! empty( $locked_post_status ) ) {
 			return array();
+		}
 
 		$status_links = array();
 		$num_posts = wp_count_posts( $post_type, 'readable' );
@@ -275,11 +278,15 @@
 		$class = '';
 
 		$current_user_id = get_current_user_id();
-		$all_args = array( 'post_type' => $post_type );
+		$all_args = array(
+			'post_type' => $post_type,
+		);
 		$mine = '';
 
 		// Subtract post types that are not included in the admin all list.
-		foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
+		foreach ( get_post_stati( array(
+			'show_in_admin_all_list' => false,
+		) ) as $state ) {
 			$total_posts -= $num_posts->$state;
 		}
 
@@ -290,7 +297,7 @@
 
 			$mine_args = array(
 				'post_type' => $post_type,
-				'author' => $current_user_id
+				'author' => $current_user_id,
 			);
 
 			$mine_inner_html = sprintf(
@@ -328,7 +335,9 @@
 			$status_links['mine'] = $mine;
 		}
 
-		foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
+		foreach ( get_post_stati( array(
+			'show_in_admin_status_list' => true,
+		), 'objects' ) as $status ) {
 			$class = '';
 
 			$status_name = $status->name;
@@ -337,7 +346,7 @@
 				continue;
 			}
 
-			if ( isset($_REQUEST['post_status']) && $status_name === $_REQUEST['post_status'] ) {
+			if ( isset( $_REQUEST['post_status'] ) && $status_name === $_REQUEST['post_status'] ) {
 				$class = 'current';
 			}
 
@@ -359,7 +368,7 @@
 
 			$sticky_args = array(
 				'post_type'	=> $post_type,
-				'show_sticky' => 1
+				'show_sticky' => 1,
 			);
 
 			$sticky_inner_html = sprintf(
@@ -373,7 +382,7 @@
 			);
 
 			$sticky_link = array(
-				'sticky' => $this->get_edit_link( $sticky_args, $sticky_inner_html, $class )
+				'sticky' => $this->get_edit_link( $sticky_args, $sticky_inner_html, $class ),
 			);
 
 			// Sticky comes after Publish, or if not listed, after All.
@@ -443,7 +452,7 @@
 				'hierarchical' => 1,
 				'show_count' => 0,
 				'orderby' => 'name',
-				'selected' => $cat
+				'selected' => $cat,
 			);
 
 			echo '<label class="screen-reader-text" for="cat">' . __( 'Filter by category' ) . '</label>';
@@ -458,13 +467,13 @@
 ?>
 		<div class="alignleft actions">
 <?php
-		if ( 'top' === $which && !is_singular() ) {
-			ob_start();
+if ( 'top' === $which && ! is_singular() ) {
+	ob_start();
 
-			$this->months_dropdown( $this->screen->post_type );
-			$this->categories_dropdown( $this->screen->post_type );
+	$this->months_dropdown( $this->screen->post_type );
+	$this->categories_dropdown( $this->screen->post_type );
 
-			/**
+	/**
 			 * Fires before the Filter button on the Posts and Pages list tables.
 			 *
 			 * The Filter button allows sorting by date and/or category on the
@@ -479,19 +488,21 @@
 			 *                          'top' or 'bottom' for WP_Posts_List_Table,
 			 *                          'bar' for WP_Media_List_Table.
 			 */
-			do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
+	do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
 
-			$output = ob_get_clean();
+	$output = ob_get_clean();
 
-			if ( ! empty( $output ) ) {
-				echo $output;
-				submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
-			}
-		}
+	if ( ! empty( $output ) ) {
+		echo $output;
+		submit_button( __( 'Filter' ), '', 'filter_action', false, array(
+			'id' => 'post-query-submit',
+		) );
+	}
+}
 
-		if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
-			submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
-		}
+if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
+	submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
+}
 ?>
 		</div>
 <?php
@@ -511,8 +522,9 @@
 	 * @return string
 	 */
 	public function current_action() {
-		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
+		if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
 			return 'delete_all';
+		}
 
 		return parent::current_action();
 	}
@@ -544,7 +556,9 @@
 		}
 
 		$taxonomies = get_object_taxonomies( $post_type, 'objects' );
-		$taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
+		$taxonomies = wp_filter_object_list( $taxonomies, array(
+			'show_admin_column' => true,
+		), 'and', 'name' );
 
 		/**
 		 * Filters the taxonomy columns in the Posts list table.
@@ -561,19 +575,20 @@
 		$taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
 
 		foreach ( $taxonomies as $taxonomy ) {
-			if ( 'category' === $taxonomy )
+			if ( 'category' === $taxonomy ) {
 				$column_key = 'categories';
-			elseif ( 'post_tag' === $taxonomy )
+			} elseif ( 'post_tag' === $taxonomy ) {
 				$column_key = 'tags';
-			else
-				$column_key = 'taxonomy-' . $taxonomy;
+			} else { $column_key = 'taxonomy-' . $taxonomy;
+			}
 
 			$posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name;
 		}
 
-		$post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
-		if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) )
+		$post_status = ! empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
+		if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ) ) ) {
 			$posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
+		}
 
 		$posts_columns['date'] = __( 'Date' );
 
@@ -621,7 +636,7 @@
 			'title'    => 'title',
 			'parent'   => 'parent',
 			'comments' => 'comment_count',
-			'date'     => array( 'date', true )
+			'date'     => array( 'date', true ),
 		);
 	}
 
@@ -634,8 +649,9 @@
 	public function display_rows( $posts = array(), $level = 0 ) {
 		global $wp_query, $per_page;
 
-		if ( empty( $posts ) )
+		if ( empty( $posts ) ) {
 			$posts = $wp_query->posts;
+		}
 
 		add_filter( 'the_title', 'esc_html' );
 
@@ -654,13 +670,15 @@
 		// Create array of post IDs.
 		$post_ids = array();
 
-		foreach ( $posts as $a_post )
+		foreach ( $posts as $a_post ) {
 			$post_ids[] = $a_post->ID;
+		}
 
 		$this->comment_pending_count = get_pending_comments_num( $post_ids );
 
-		foreach ( $posts as $post )
+		foreach ( $posts as $post ) {
 			$this->single_row( $post, $level );
+		}
 	}
 
 	/**
@@ -676,10 +694,13 @@
 		$level = 0;
 
 		if ( ! $pages ) {
-			$pages = get_pages( array( 'sort_column' => 'menu_order' ) );
+			$pages = get_pages( array(
+				'sort_column' => 'menu_order',
+			) );
 
-			if ( ! $pages )
+			if ( ! $pages ) {
 				return;
+			}
 		}
 
 		/*
@@ -699,14 +720,18 @@
 				// Catch and repair bad pages.
 				if ( $page->post_parent == $page->ID ) {
 					$page->post_parent = 0;
-					$wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
+					$wpdb->update( $wpdb->posts, array(
+						'post_parent' => 0,
+						), array(
+						'ID' => $page->ID,
+					) );
 					clean_post_cache( $page );
 				}
 
-				if ( 0 == $page->post_parent )
+				if ( 0 == $page->post_parent ) {
 					$top_level_pages[] = $page;
-				else
-					$children_pages[ $page->post_parent ][] = $page;
+				} else { $children_pages[ $page->post_parent ][] = $page;
+				}
 			}
 
 			$pages = &$top_level_pages;
@@ -718,28 +743,31 @@
 		$to_display = array();
 
 		foreach ( $pages as $page ) {
-			if ( $count >= $end )
+			if ( $count >= $end ) {
 				break;
+			}
 
 			if ( $count >= $start ) {
-				$to_display[$page->ID] = $level;
+				$to_display[ $page->ID ] = $level;
 			}
 
 			$count++;
 
-			if ( isset( $children_pages ) )
+			if ( isset( $children_pages ) ) {
 				$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
+			}
 		}
 
 		// If it is the last pagenum and there are orphaned pages, display them with paging as well.
-		if ( isset( $children_pages ) && $count < $end ){
-			foreach ( $children_pages as $orphans ){
+		if ( isset( $children_pages ) && $count < $end ) {
+			foreach ( $children_pages as $orphans ) {
 				foreach ( $orphans as $op ) {
-					if ( $count >= $end )
+					if ( $count >= $end ) {
 						break;
+					}
 
 					if ( $count >= $start ) {
-						$to_display[$op->ID] = 0;
+						$to_display[ $op->ID ] = 0;
 					}
 
 					$count++;
@@ -776,15 +804,17 @@
 	 * @param array $to_display List of pages to be displayed. Passed by reference.
 	 */
 	private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
-		if ( ! isset( $children_pages[$parent] ) )
+		if ( ! isset( $children_pages[ $parent ] ) ) {
 			return;
+		}
 
 		$start = ( $pagenum - 1 ) * $per_page;
 		$end = $start + $per_page;
 
-		foreach ( $children_pages[$parent] as $page ) {
-			if ( $count >= $end )
+		foreach ( $children_pages[ $parent ] as $page ) {
+			if ( $count >= $end ) {
 				break;
+			}
 
 			// If the page starts in a subtree, print the parents.
 			if ( $count == $start && $page->post_parent > 0 ) {
@@ -799,27 +829,28 @@
 
 					$my_parent = get_post( $parent_id );
 					$my_parents[] = $my_parent;
-					if ( !$my_parent->post_parent )
+					if ( ! $my_parent->post_parent ) {
 						break;
+					}
 					$my_parent = $my_parent->post_parent;
 				}
 				$num_parents = count( $my_parents );
 				while ( $my_parent = array_pop( $my_parents ) ) {
-					$to_display[$my_parent->ID] = $level - $num_parents;
+					$to_display[ $my_parent->ID ] = $level - $num_parents;
 					$num_parents--;
 				}
 			}
 
 			if ( $count >= $start ) {
-				$to_display[$page->ID] = $level;
+				$to_display[ $page->ID ] = $level;
 			}
 
 			$count++;
 
 			$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
-		}
+		}// End foreach().
 
-		unset( $children_pages[$parent] ); //required in order to keep track of orphans
+		unset( $children_pages[ $parent ] ); //required in order to keep track of orphans
 	}
 
 	/**
@@ -831,7 +862,7 @@
 	 * @param WP_Post $post The current WP_Post object.
 	 */
 	public function column_cb( $post ) {
-		if ( current_user_can( 'edit_post', $post->ID ) ): ?>
+		if ( current_user_can( 'edit_post', $post->ID ) ) : ?>
 			<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php
 				printf( __( 'Select %s' ), _draft_or_post_title() );
 			?></label>
@@ -843,7 +874,7 @@
 					/* translators: %s: post title */
 					__( '&#8220;%s&#8221; is locked' ),
 					_draft_or_post_title()
-				);
+												 );
 				?></span>
 			</div>
 		<?php endif;
@@ -917,7 +948,7 @@
 		}
 
 		$pad = str_repeat( '&#8212; ', $this->current_level );
-		echo "<strong>";
+		echo '<strong>';
 
 		$format = get_post_format( $post->ID );
 		if ( $format ) {
@@ -927,7 +958,7 @@
 
 			$format_args = array(
 				'post_format' => $format,
-				'post_type' => $post->post_type
+				'post_type' => $post->post_type,
 			);
 
 			echo $this->get_edit_link( $format_args, $label . ':', $format_class );
@@ -1055,7 +1086,7 @@
 		?>
 		<div class="post-com-count-wrapper">
 		<?php
-			$pending_comments = isset( $this->comment_pending_count[$post->ID] ) ? $this->comment_pending_count[$post->ID] : 0;
+			$pending_comments = isset( $this->comment_pending_count[ $post->ID ] ) ? $this->comment_pending_count[ $post->ID ] : 0;
 
 			$this->comments_bubble( $post->ID, $pending_comments );
 		?>
@@ -1074,7 +1105,7 @@
 	public function column_author( $post ) {
 		$args = array(
 			'post_type' => $post->post_type,
-			'author' => get_the_author_meta( 'ID' )
+			'author' => get_the_author_meta( 'ID' ),
 		);
 		echo $this->get_edit_link( $args, get_the_author() );
 	}
@@ -1192,10 +1223,10 @@
 		}
 
 		if ( $post->post_parent ) {
-		    $count = count( get_post_ancestors( $post->ID ) );
-		    $classes .= ' level-'. $count;
+			$count = count( get_post_ancestors( $post->ID ) );
+			$classes .= ' level-' . $count;
 		} else {
-		    $classes .= ' level-0';
+			$classes .= ' level-0';
 		}
 	?>
 		<tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>">
@@ -1378,15 +1409,23 @@
 				continue;
 			}
 
-			if ( $taxonomy->hierarchical )
+			if ( $taxonomy->hierarchical ) {
 				$hierarchical_taxonomies[] = $taxonomy;
-			else
-				$flat_taxonomies[] = $taxonomy;
+			} else { $flat_taxonomies[] = $taxonomy;
+			}
 		}
 
 		$m = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list';
 		$can_publish = current_user_can( $post_type_object->cap->publish_posts );
-		$core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true );
+		$core_columns = array(
+			'cb' => true,
+			'date' => true,
+			'title' => true,
+			'categories' => true,
+			'tags' => true,
+			'comments' => true,
+			'author' => true,
+		);
 
 	?>
 
@@ -1426,7 +1465,7 @@
 	<?php endif; // $bulk
 	endif; // post_type_supports title ?>
 
-	<?php if ( !$bulk ) : ?>
+	<?php if ( ! $bulk ) : ?>
 			<fieldset class="inline-edit-date">
 			<legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
 				<?php touch_time( 1, 1, 0, 1 ); ?>
@@ -1434,52 +1473,53 @@
 			<br class="clear" />
 	<?php endif; // $bulk
 
-		if ( post_type_supports( $screen->post_type, 'author' ) ) :
-			$authors_dropdown = '';
+if ( post_type_supports( $screen->post_type, 'author' ) ) :
+	$authors_dropdown = '';
 
-			if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
-				$users_opt = array(
-					'hide_if_only_one_author' => false,
-					'who' => 'authors',
-					'name' => 'post_author',
-					'class'=> 'authors',
-					'multi' => 1,
-					'echo' => 0,
-					'show' => 'display_name_with_login',
-				);
-				if ( $bulk )
-					$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
+	if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
+		$users_opt = array(
+			'hide_if_only_one_author' => false,
+			'who' => 'authors',
+			'name' => 'post_author',
+			'class' => 'authors',
+			'multi' => 1,
+			'echo' => 0,
+			'show' => 'display_name_with_login',
+		);
+		if ( $bulk ) {
+			$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
+		}
 
-				if ( $authors = wp_dropdown_users( $users_opt ) ) :
-					$authors_dropdown  = '<label class="inline-edit-author">';
-					$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
-					$authors_dropdown .= $authors;
-					$authors_dropdown .= '</label>';
-				endif;
-			endif; // authors
+		if ( $authors = wp_dropdown_users( $users_opt ) ) :
+			$authors_dropdown  = '<label class="inline-edit-author">';
+			$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
+			$authors_dropdown .= $authors;
+			$authors_dropdown .= '</label>';
+		endif;
+	endif; // authors
 	?>
 
-	<?php if ( !$bulk ) echo $authors_dropdown;
+	<?php if ( ! $bulk ) { echo $authors_dropdown;}
 	endif; // post_type_supports author
 
-	if ( !$bulk && $can_publish ) :
+if ( ! $bulk && $can_publish ) :
 	?>
 
-			<div class="inline-edit-group wp-clearfix">
-				<label class="alignleft">
-					<span class="title"><?php _e( 'Password' ); ?></span>
-					<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
-				</label>
+	<div class="inline-edit-group wp-clearfix">
+		<label class="alignleft">
+			<span class="title"><?php _e( 'Password' ); ?></span>
+			<span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
+		</label>
 
-				<em class="alignleft inline-edit-or">
-					<?php
-					/* translators: Between password field and private checkbox on post quick edit interface */
-					_e( '&ndash;OR&ndash;' );
-					?>
-				</em>
-				<label class="alignleft inline-edit-private">
-					<input type="checkbox" name="keep_private" value="private" />
-					<span class="checkbox-title"><?php _e( 'Private' ); ?></span>
+		<em class="alignleft inline-edit-or">
+			<?php
+			/* translators: Between password field and private checkbox on post quick edit interface */
+			_e( '&ndash;OR&ndash;' );
+			?>
+			</em>
+			<label class="alignleft inline-edit-private">
+			<input type="checkbox" name="keep_private" value="private" />
+			<span class="checkbox-title"><?php _e( 'Private' ); ?></span>
 				</label>
 			</div>
 
@@ -1487,7 +1527,7 @@
 
 		</div></fieldset>
 
-	<?php if ( count( $hierarchical_taxonomies ) && !$bulk ) : ?>
+	<?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
 
 		<fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
 
@@ -1496,7 +1536,9 @@
 			<span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ) ?></span>
 			<input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
 			<ul class="cat-checklist <?php echo esc_attr( $taxonomy->name )?>-checklist">
-				<?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ) ?>
+				<?php wp_terms_checklist( null, array(
+					'taxonomy' => $taxonomy->name,
+				) ) ?>
 			</ul>
 
 	<?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
@@ -1508,29 +1550,31 @@
 		<fieldset class="inline-edit-col-right"><div class="inline-edit-col">
 
 	<?php
-		if ( post_type_supports( $screen->post_type, 'author' ) && $bulk )
-			echo $authors_dropdown;
+	if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
+		echo $authors_dropdown;
+	}
 
-		if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
+	if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
 
-			if ( $post_type_object->hierarchical ) :
+		if ( $post_type_object->hierarchical ) :
 		?>
-			<label>
-				<span class="title"><?php _e( 'Parent' ); ?></span>
+		<label>
+			<span class="title"><?php _e( 'Parent' ); ?></span>
 	<?php
-		$dropdown_args = array(
-			'post_type'         => $post_type_object->name,
-			'selected'          => $post->post_parent,
-			'name'              => 'post_parent',
-			'show_option_none'  => __( 'Main Page (no parent)' ),
-			'option_none_value' => 0,
-			'sort_column'       => 'menu_order, post_title',
-		);
+	$dropdown_args = array(
+		'post_type'         => $post_type_object->name,
+		'selected'          => $post->post_parent,
+		'name'              => 'post_parent',
+		'show_option_none'  => __( 'Main Page (no parent)' ),
+		'option_none_value' => 0,
+		'sort_column'       => 'menu_order, post_title',
+	);
 
-		if ( $bulk )
-			$dropdown_args['show_option_no_change'] =  __( '&mdash; No Change &mdash;' );
+	if ( $bulk ) {
+		$dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
+	}
 
-		/**
+	/**
 		 * Filters the arguments used to generate the Quick Edit page-parent drop-down.
 		 *
 		 * @since 2.7.0
@@ -1539,16 +1583,16 @@
 		 *
 		 * @param array $dropdown_args An array of arguments.
 		 */
-		$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
+	$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
 
-		wp_dropdown_pages( $dropdown_args );
-	?>
-			</label>
+	wp_dropdown_pages( $dropdown_args );
+?>
+		</label>
 
-	<?php
-			endif; // hierarchical
+<?php
+	endif; // hierarchical
 
-			if ( !$bulk ) : ?>
+		if ( ! $bulk ) : ?>
 
 			<label>
 				<span class="title"><?php _e( 'Order' ); ?></span>
@@ -1556,7 +1600,7 @@
 			</label>
 
 	<?php
-			endif; // !$bulk
+	endif; // !$bulk
 		endif; // page-attributes
 	?>
 
@@ -1567,17 +1611,17 @@
 <?php	if ( $bulk ) : ?>
 				<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
 <?php	endif; // $bulk ?>
-                <?php
+				<?php
 				/** This filter is documented in wp-admin/includes/meta-boxes.php */
 				$default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'quick-edit' );
-                ?>
+				?>
 				<option value="default"><?php echo esc_html( $default_title ); ?></option>
 				<?php page_template_dropdown( '', $screen->post_type ) ?>
 			</select>
 		</label>
 	<?php endif; ?>
 
-	<?php if ( count( $flat_taxonomies ) && !$bulk ) : ?>
+	<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
 
 	<?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
 		<?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
@@ -1715,13 +1759,14 @@
 	<?php
 		list( $columns ) = $this->get_column_info();
 
-		foreach ( $columns as $column_name => $column_display_name ) {
-			if ( isset( $core_columns[$column_name] ) )
-				continue;
+	foreach ( $columns as $column_name => $column_display_name ) {
+		if ( isset( $core_columns[ $column_name ] ) ) {
+			continue;
+		}
 
-			if ( $bulk ) {
+		if ( $bulk ) {
 
-				/**
+			/**
 				 * Fires once for each column in Bulk Edit mode.
 				 *
 				 * @since 2.7.0
@@ -1729,10 +1774,10 @@
 				 * @param string  $column_name Name of the column to edit.
 				 * @param WP_Post $post_type   The post type slug.
 				 */
-				do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
-			} else {
+			do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
+		} else {
 
-				/**
+			/**
 				 * Fires once for each column in Quick Edit mode.
 				 *
 				 * @since 2.7.0
@@ -1740,10 +1785,9 @@
 				 * @param string $column_name Name of the column to edit.
 				 * @param string $post_type   The post type slug.
 				 */
-				do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
-			}
-
+			do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
 		}
+	}
 	?>
 		<p class="submit inline-edit-save">
 			<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
@@ -1754,7 +1798,7 @@
 				<span class="spinner"></span>
 			<?php } else {
 				submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
-			} ?>
+} ?>
 			<input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
 			<input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
 			<?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) { ?>
@@ -1766,7 +1810,7 @@
 		</td></tr>
 	<?php
 		$bulk++;
-		}
+		}// End while().
 ?>
 		</tbody></table></form>
 <?php
Index: src/wp-admin/includes/class-wp-press-this.php
===================================================================
--- src/wp-admin/includes/class-wp-press-this.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-press-this.php	(working copy)
@@ -103,13 +103,17 @@
 	 */
 	public function save_post() {
 		if ( empty( $_POST['post_ID'] ) || ! $post_id = (int) $_POST['post_ID'] ) {
-			wp_send_json_error( array( 'errorMessage' => __( 'Missing post ID.' ) ) );
+			wp_send_json_error( array(
+				'errorMessage' => __( 'Missing post ID.' ),
+			) );
 		}
 
 		if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $post_id ) ||
 			! current_user_can( 'edit_post', $post_id ) ) {
 
-			wp_send_json_error( array( 'errorMessage' => __( 'Invalid post.' ) ) );
+			wp_send_json_error( array(
+				'errorMessage' => __( 'Invalid post.' ),
+			) );
 		}
 
 		$post_data = array(
@@ -165,7 +169,9 @@
 		$updated = wp_update_post( $post_data, true );
 
 		if ( is_wp_error( $updated ) ) {
-			wp_send_json_error( array( 'errorMessage' => $updated->get_error_message() ) );
+			wp_send_json_error( array(
+				'errorMessage' => $updated->get_error_message(),
+			) );
 		} else {
 			if ( isset( $post_data['post_format'] ) ) {
 				if ( current_theme_supports( 'post-formats', $post_data['post_format'] ) ) {
@@ -199,11 +205,16 @@
 			$redirect = apply_filters( 'press_this_save_redirect', $redirect, $post_id, $post_data['post_status'] );
 
 			if ( $redirect ) {
-				wp_send_json_success( array( 'redirect' => $redirect, 'force' => $forceRedirect ) );
+				wp_send_json_success( array(
+					'redirect' => $redirect,
+					'force' => $forceRedirect,
+				) );
 			} else {
-				wp_send_json_success( array( 'postSaved' => true ) );
+				wp_send_json_success( array(
+					'postSaved' => true,
+				) );
 			}
-		}
+		}// End if().
 	}
 
 	/**
@@ -238,13 +249,17 @@
 			// @todo Find a more performant way to check existence, maybe get_term() with a separate parent check.
 			if ( term_exists( $cat_name, $taxonomy->name, $parent ) ) {
 				if ( count( $names ) === 1 ) {
-					wp_send_json_error( array( 'errorMessage' => __( 'This category already exists.' ) ) );
+					wp_send_json_error( array(
+						'errorMessage' => __( 'This category already exists.' ),
+					) );
 				} else {
 					continue;
 				}
 			}
 
-			$cat_id = wp_insert_term( $cat_name, $taxonomy->name, array( 'parent' => $parent ) );
+			$cat_id = wp_insert_term( $cat_name, $taxonomy->name, array(
+				'parent' => $parent,
+			) );
 
 			if ( is_wp_error( $cat_id ) ) {
 				continue;
@@ -256,14 +271,18 @@
 		}
 
 		if ( empty( $added ) ) {
-			wp_send_json_error( array( 'errorMessage' => __( 'This category cannot be added. Please change the name and try again.' ) ) );
+			wp_send_json_error( array(
+				'errorMessage' => __( 'This category cannot be added. Please change the name and try again.' ),
+			) );
 		}
 
 		foreach ( $added as $new_cat_id ) {
 			$new_cat = get_category( $new_cat_id );
 
 			if ( is_wp_error( $new_cat ) ) {
-				wp_send_json_error( array( 'errorMessage' => __( 'Error while adding the category. Please try again later.' ) ) );
+				wp_send_json_error( array(
+					'errorMessage' => __( 'Error while adding the category. Please try again later.' ),
+				) );
 			}
 
 			$data[] = array(
@@ -292,7 +311,7 @@
 		$remote_url = wp_safe_remote_get( $url, array(
 			'timeout' => 30,
 			// Use an explicit user-agent for Press This
-			'user-agent' => 'Press This (WordPress/' . get_bloginfo( 'version' ) . '); ' . get_bloginfo( 'url' )
+			'user-agent' => 'Press This (WordPress/' . get_bloginfo( 'version' ) . '); ' . get_bloginfo( 'url' ),
 		) );
 
 		if ( is_wp_error( $remote_url ) ) {
@@ -317,7 +336,7 @@
 				'property' => true,
 				'name'     => true,
 				'content'  => true,
-			)
+			),
 		);
 
 		$source_content = wp_remote_retrieve_body( $remote_url );
@@ -363,7 +382,7 @@
 
 		if ( is_numeric( $value ) || is_bool( $value ) ) {
 			$return = $value;
-		} else if ( is_string( $value ) ) {
+		} elseif ( is_string( $value ) ) {
 			if ( mb_strlen( $value ) > 5000 ) {
 				$return = mb_substr( $value, 0, 5000 );
 			} else {
@@ -432,28 +451,28 @@
 		if ( preg_match( '!/ad[sx]?/!i', $src ) ) {
 			// Ads
 			return '';
-		} else if ( preg_match( '!(/share-?this[^.]+?\.[a-z0-9]{3,4})(\?.*)?$!i', $src ) ) {
+		} elseif ( preg_match( '!(/share-?this[^.]+?\.[a-z0-9]{3,4})(\?.*)?$!i', $src ) ) {
 			// Share-this type button
 			return '';
-		} else if ( preg_match( '!/(spinner|loading|spacer|blank|rss)\.(gif|jpg|png)!i', $src ) ) {
+		} elseif ( preg_match( '!/(spinner|loading|spacer|blank|rss)\.(gif|jpg|png)!i', $src ) ) {
 			// Loaders, spinners, spacers
 			return '';
-		} else if ( preg_match( '!/([^./]+[-_])?(spinner|loading|spacer|blank)s?([-_][^./]+)?\.[a-z0-9]{3,4}!i', $src ) ) {
+		} elseif ( preg_match( '!/([^./]+[-_])?(spinner|loading|spacer|blank)s?([-_][^./]+)?\.[a-z0-9]{3,4}!i', $src ) ) {
 			// Fancy loaders, spinners, spacers
 			return '';
-		} else if ( preg_match( '!([^./]+[-_])?thumb[^.]*\.(gif|jpg|png)$!i', $src ) ) {
+		} elseif ( preg_match( '!([^./]+[-_])?thumb[^.]*\.(gif|jpg|png)$!i', $src ) ) {
 			// Thumbnails, too small, usually irrelevant to context
 			return '';
-		} else if ( false !== stripos( $src, '/wp-includes/' ) ) {
+		} elseif ( false !== stripos( $src, '/wp-includes/' ) ) {
 			// Classic WordPress interface images
 			return '';
-		} else if ( preg_match( '![^\d]\d{1,2}x\d+\.(gif|jpg|png)$!i', $src ) ) {
+		} elseif ( preg_match( '![^\d]\d{1,2}x\d+\.(gif|jpg|png)$!i', $src ) ) {
 			// Most often tiny buttons/thumbs (< 100px wide)
 			return '';
-		} else if ( preg_match( '!/pixel\.(mathtag|quantserve)\.com!i', $src ) ) {
+		} elseif ( preg_match( '!/pixel\.(mathtag|quantserve)\.com!i', $src ) ) {
 			// See mathtag.com and https://www.quantcast.com/how-we-do-it/iab-standard-measurement/how-we-collect-data/
 			return '';
-		} else if ( preg_match( '!/[gb]\.gif(\?.+)?$!i', $src ) ) {
+		} elseif ( preg_match( '!/[gb]\.gif(\?.+)?$!i', $src ) ) {
 			// WordPress.com stats gif
 			return '';
 		}
@@ -476,28 +495,31 @@
 	private function _limit_embed( $src ) {
 		$src = $this->_limit_url( $src );
 
-		if ( empty( $src ) )
+		if ( empty( $src ) ) {
 			return '';
+		}
 
 		if ( preg_match( '!//(m|www)\.youtube\.com/(embed|v)/([^?]+)\?.+$!i', $src, $src_matches ) ) {
 			// Embedded Youtube videos (www or mobile)
 			$src = 'https://www.youtube.com/watch?v=' . $src_matches[3];
-		} else if ( preg_match( '!//player\.vimeo\.com/video/([\d]+)([?/].*)?$!i', $src, $src_matches ) ) {
+		} elseif ( preg_match( '!//player\.vimeo\.com/video/([\d]+)([?/].*)?$!i', $src, $src_matches ) ) {
 			// Embedded Vimeo iframe videos
 			$src = 'https://vimeo.com/' . (int) $src_matches[1];
-		} else if ( preg_match( '!//vimeo\.com/moogaloop\.swf\?clip_id=([\d]+)$!i', $src, $src_matches ) ) {
+		} elseif ( preg_match( '!//vimeo\.com/moogaloop\.swf\?clip_id=([\d]+)$!i', $src, $src_matches ) ) {
 			// Embedded Vimeo Flash videos
 			$src = 'https://vimeo.com/' . (int) $src_matches[1];
-		} else if ( preg_match( '!//vine\.co/v/([^/]+)/embed!i', $src, $src_matches ) ) {
+		} elseif ( preg_match( '!//vine\.co/v/([^/]+)/embed!i', $src, $src_matches ) ) {
 			// Embedded Vine videos
 			$src = 'https://vine.co/v/' . $src_matches[1];
-		} else if ( preg_match( '!//(www\.)?dailymotion\.com/embed/video/([^/?]+)([/?].+)?!i', $src, $src_matches ) ) {
+		} elseif ( preg_match( '!//(www\.)?dailymotion\.com/embed/video/([^/?]+)([/?].+)?!i', $src, $src_matches ) ) {
 			// Embedded Daily Motion videos
 			$src = 'https://www.dailymotion.com/video/' . $src_matches[2];
 		} else {
 			$oembed = _wp_oembed_get_object();
 
-			if ( ! $oembed->get_provider( $src, array( 'discover' => false ) ) ) {
+			if ( ! $oembed->get_provider( $src, array(
+				'discover' => false,
+			) ) ) {
 				$src = '';
 			}
 		}
@@ -553,7 +575,7 @@
 
 					break;
 			}
-		}
+		}// End if().
 
 		return $data;
 	}
@@ -576,7 +598,9 @@
 		// Download source page to tmp file.
 		$source_content = $this->fetch_source_html( $url );
 		if ( is_wp_error( $source_content ) ) {
-			return array( 'errors' => $source_content->get_error_messages() );
+			return array(
+				'errors' => $source_content->get_error_messages(),
+			);
 		}
 
 		// Fetch and gather <meta> data first, so discovered media is offered 1st to user.
@@ -684,7 +708,7 @@
 		foreach ( array( 'u', 's', 't', 'v' ) as $key ) {
 			if ( ! empty( $_POST[ $key ] ) ) {
 				$value = wp_unslash( $_POST[ $key ] );
-			} else if ( ! empty( $_GET[ $key ] ) ) {
+			} elseif ( ! empty( $_GET[ $key ] ) ) {
 				$value = wp_unslash( $_GET[ $key ] );
 			} else {
 				continue;
@@ -772,7 +796,7 @@
 						}
 					}
 				}
-			}
+			}// End if().
 
 			// Support passing a single image src as `i`
 			if ( ! empty( $_REQUEST['i'] ) && ( $img_src = $this->_limit_img( wp_unslash( $_REQUEST['i'] ) ) ) ) {
@@ -782,7 +806,7 @@
 					array_unshift( $data['_images'], $img_src );
 				}
 			}
-		}
+		}// End if().
 
 		/**
 		 * Filters the Press This data array.
@@ -854,14 +878,14 @@
 						<input type="radio" name="post_format" class="post-format" id="post-format-<?php echo $attr_format; ?>" value="<?php echo $attr_format; ?>" <?php checked( $post_format, $format ); ?> />
 						<label for="post-format-<?php echo $attr_format ?>" class="post-format-icon post-format-<?php echo $attr_format; ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
 						<?php
-					 }
+					}
 
-					 ?>
+						?>
 				</fieldset>
 				</div>
 				<?php
 			}
-		}
+		}// End if().
 	}
 
 	/**
@@ -898,7 +922,7 @@
 						'name'             => 'new-category-parent',
 						'orderby'          => 'name',
 						'hierarchical'     => 1,
-						'show_option_none' => '&mdash; ' . $taxonomy->labels->parent_item . ' &mdash;'
+						'show_option_none' => '&mdash; ' . $taxonomy->labels->parent_item . ' &mdash;',
 					) );
 					?>
 				</div>
@@ -916,7 +940,10 @@
 		</div>
 		<div aria-label="<?php esc_attr_e( 'Categories' ); ?>">
 			<ul class="categories-select">
-				<?php wp_terms_checklist( $post->ID, array( 'taxonomy' => 'category', 'list_only' => true ) ); ?>
+				<?php wp_terms_checklist( $post->ID, array(
+					'taxonomy' => 'category',
+					'list_only' => true,
+				) ); ?>
 			</ul>
 		</div>
 		<?php
@@ -943,11 +970,11 @@
 		<div class="tagsdiv" id="post_tag">
 			<div class="jaxtag">
 			<input type="hidden" name="tax_input[post_tag]" class="the-tags" value="<?php echo $esc_tags; // escaped in get_terms_to_edit() ?>">
-		 	<?php
+				<?php
 
-			if ( $user_can_assign_terms ) {
-				?>
-				<div class="ajaxtag hide-if-no-js">
+				if ( $user_can_assign_terms ) {
+					?>
+					<div class="ajaxtag hide-if-no-js">
 					<label class="screen-reader-text" for="new-tag-post_tag"><?php _e( 'Tags' ); ?></label>
 					<p>
 						<input type="text" id="new-tag-post_tag" name="newtag[post_tag]" class="newtag form-input-tip" size="16" autocomplete="off" value="" aria-describedby="new-tag-desc" />
@@ -958,7 +985,7 @@
 					<?php echo $taxonomy->labels->separate_items_with_commas; ?>
 				</p>
 				<?php
-			}
+				}
 
 			?>
 			</div>
@@ -986,7 +1013,7 @@
 		$selected_embeds = array();
 
 		// Make sure to add the Pressed page if it's a valid oembed itself
-		if ( ! empty ( $data['u'] ) && $this->_limit_embed( $data['u'] ) ) {
+		if ( ! empty( $data['u'] ) && $this->_limit_embed( $data['u'] ) ) {
 			$data['_embeds'][] = $data['u'];
 		}
 
@@ -1046,7 +1073,7 @@
 	 * @since 4.2.0
 	 * @access public
 	 *
- 	 * @param array $data The site's data.
+	  * @param array $data The site's data.
 	 * @return string Discovered canonical URL, or empty
 	 */
 	public function get_canonical_link( $data ) {
@@ -1059,7 +1086,7 @@
 		} elseif ( ! empty( $data['_meta'] ) ) {
 			if ( ! empty( $data['_meta']['twitter:url'] ) ) {
 				$link = $data['_meta']['twitter:url'];
-			} else if ( ! empty( $data['_meta']['og:url'] ) ) {
+			} elseif ( ! empty( $data['_meta']['og:url'] ) ) {
 				$link = $data['_meta']['og:url'];
 			}
 		}
@@ -1086,7 +1113,7 @@
 		if ( ! empty( $data['_meta'] ) ) {
 			if ( ! empty( $data['_meta']['og:site_name'] ) ) {
 				$name = $data['_meta']['og:site_name'];
-			} else if ( ! empty( $data['_meta']['application-name'] ) ) {
+			} elseif ( ! empty( $data['_meta']['application-name'] ) ) {
 				$name = $data['_meta']['application-name'];
 			}
 		}
@@ -1111,9 +1138,9 @@
 		} elseif ( ! empty( $data['_meta'] ) ) {
 			if ( ! empty( $data['_meta']['twitter:title'] ) ) {
 				$title = $data['_meta']['twitter:title'];
-			} else if ( ! empty( $data['_meta']['og:title'] ) ) {
+			} elseif ( ! empty( $data['_meta']['og:title'] ) ) {
 				$title = $data['_meta']['og:title'];
-			} else if ( ! empty( $data['_meta']['title'] ) ) {
+			} elseif ( ! empty( $data['_meta']['title'] ) ) {
 				$title = $data['_meta']['title'];
 			}
 		}
@@ -1137,12 +1164,12 @@
 
 		if ( ! empty( $data['s'] ) ) {
 			$text = $data['s'];
-		} else if ( ! empty( $data['_meta'] ) ) {
+		} elseif ( ! empty( $data['_meta'] ) ) {
 			if ( ! empty( $data['_meta']['twitter:description'] ) ) {
 				$text = $data['_meta']['twitter:description'];
-			} else if ( ! empty( $data['_meta']['og:description'] ) ) {
+			} elseif ( ! empty( $data['_meta']['og:description'] ) ) {
 				$text = $data['_meta']['og:description'];
-			} else if ( ! empty( $data['_meta']['description'] ) ) {
+			} elseif ( ! empty( $data['_meta']['description'] ) ) {
 				$text = $data['_meta']['description'];
 			}
 
@@ -1152,7 +1179,11 @@
 			}
 		}
 
-		$default_html = array( 'quote' => '', 'link' => '', 'embed' => '' );
+		$default_html = array(
+			'quote' => '',
+			'link' => '',
+			'embed' => '',
+		);
 
 		if ( ! empty( $data['u'] ) && $this->_limit_embed( $data['u'] ) ) {
 			$default_html['embed'] = '<p>[embed]' . $data['u'] . '[/embed]</p>';
@@ -1294,7 +1325,9 @@
 		$post = get_default_post_to_edit( 'post', true );
 		$post_ID = (int) $post->ID;
 
-		wp_enqueue_media( array( 'post' => $post_ID ) );
+		wp_enqueue_media( array(
+			'post' => $post_ID,
+		) );
 		wp_enqueue_style( 'press-this' );
 		wp_enqueue_script( 'press-this' );
 		wp_enqueue_script( 'json2' );
@@ -1309,13 +1342,13 @@
 		$supports_formats = false;
 		$post_format      = 0;
 
-		if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) {
-			$supports_formats = true;
+	if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) {
+		$supports_formats = true;
 
-			if ( ! ( $post_format = get_post_format( $post_ID ) ) ) {
-				$post_format = 0;
-			}
+		if ( ! ( $post_format = get_post_format( $post_ID ) ) ) {
+			$post_format = 0;
 		}
+	}
 
 		/** This action is documented in wp-admin/admin-header.php */
 		do_action( 'admin_enqueue_scripts', 'press-this.php' );
@@ -1526,7 +1559,7 @@
 						<span class="saving-draft"><?php _e( 'Saving&hellip;' ); ?></span>
 					</button><button type="button" class="split-button-toggle" aria-haspopup="true" aria-expanded="false">
 						<i class="dashicons dashicons-arrow-down-alt2"></i>
-						<span class="screen-reader-text"><?php _e('More actions'); ?></span>
+						<span class="screen-reader-text"><?php _e( 'More actions' ); ?></span>
 					</button>
 				</div>
 				<ul class="split-button-body">
Index: src/wp-admin/includes/class-wp-screen.php
===================================================================
--- src/wp-admin/includes/class-wp-screen.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-screen.php	(working copy)
@@ -142,7 +142,7 @@
 	 */
 	private $_help_sidebar = '';
 
- 	/**
+	 /**
 	 * The accessible hidden headings and text associated with the screen, if any.
 	 *
 	 * @since 4.4.0
@@ -223,18 +223,19 @@
 		$in_admin = false;
 		$action = '';
 
-		if ( $hook_name )
+		if ( $hook_name ) {
 			$id = $hook_name;
-		else
-			$id = $GLOBALS['hook_suffix'];
+		} else { $id = $GLOBALS['hook_suffix'];
+		}
 
 		// For those pesky meta boxes.
 		if ( $hook_name && post_type_exists( $hook_name ) ) {
 			$post_type = $id;
 			$id = 'post'; // changes later. ends up being $base.
 		} else {
-			if ( '.php' == substr( $id, -4 ) )
+			if ( '.php' == substr( $id, -4 ) ) {
 				$id = substr( $id, 0, -4 );
+			}
 
 			if ( 'post-new' == $id || 'link-add' == $id || 'media-new' == $id || 'user-new' == $id ) {
 				$id = substr( $id, 0, -4 );
@@ -263,50 +264,56 @@
 				}
 			}
 
-			if ( ! $in_admin )
+			if ( ! $in_admin ) {
 				$in_admin = 'site';
+			}
 		} else {
-			if ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN )
+			if ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) {
 				$in_admin = 'network';
-			elseif ( defined( 'WP_USER_ADMIN' ) && WP_USER_ADMIN )
+			} elseif ( defined( 'WP_USER_ADMIN' ) && WP_USER_ADMIN ) {
 				$in_admin = 'user';
-			else
-				$in_admin = 'site';
+			} else { $in_admin = 'site';
+			}
 		}
 
-		if ( 'index' == $id )
+		if ( 'index' == $id ) {
 			$id = 'dashboard';
-		elseif ( 'front' == $id )
+		} elseif ( 'front' == $id ) {
 			$in_admin = false;
+		}
 
 		$base = $id;
 
 		// If this is the current screen, see if we can be more accurate for post types and taxonomies.
 		if ( ! $hook_name ) {
-			if ( isset( $_REQUEST['post_type'] ) )
+			if ( isset( $_REQUEST['post_type'] ) ) {
 				$post_type = post_type_exists( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : false;
-			if ( isset( $_REQUEST['taxonomy'] ) )
+			}
+			if ( isset( $_REQUEST['taxonomy'] ) ) {
 				$taxonomy = taxonomy_exists( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : false;
+			}
 
 			switch ( $base ) {
 				case 'post' :
-					if ( isset( $_GET['post'] ) )
+					if ( isset( $_GET['post'] ) ) {
 						$post_id = (int) $_GET['post'];
-					elseif ( isset( $_POST['post_ID'] ) )
+					} elseif ( isset( $_POST['post_ID'] ) ) {
 						$post_id = (int) $_POST['post_ID'];
-					else
-						$post_id = 0;
+					} else { $post_id = 0;
+					}
 
 					if ( $post_id ) {
 						$post = get_post( $post_id );
-						if ( $post )
+						if ( $post ) {
 							$post_type = $post->post_type;
+						}
 					}
 					break;
 				case 'edit-tags' :
 				case 'term' :
-					if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) )
+					if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) ) {
 						$post_type = 'post';
+					}
 					break;
 				case 'upload':
 					$post_type = 'attachment';
@@ -316,24 +323,28 @@
 
 		switch ( $base ) {
 			case 'post' :
-				if ( null === $post_type )
+				if ( null === $post_type ) {
 					$post_type = 'post';
+				}
 				$id = $post_type;
 				break;
 			case 'edit' :
-				if ( null === $post_type )
+				if ( null === $post_type ) {
 					$post_type = 'post';
+				}
 				$id .= '-' . $post_type;
 				break;
 			case 'edit-tags' :
 			case 'term' :
-				if ( null === $taxonomy )
+				if ( null === $taxonomy ) {
 					$taxonomy = 'post_tag';
+				}
 				// The edit-tags ID does not contain the post type. Look for it in the request.
 				if ( null === $post_type ) {
 					$post_type = 'post';
-					if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
+					if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) {
 						$post_type = $_REQUEST['post_type'];
+					}
 				}
 
 				$id = 'edit-' . $taxonomy;
@@ -350,8 +361,9 @@
 
 		if ( isset( self::$_registry[ $id ] ) ) {
 			$screen = self::$_registry[ $id ];
-			if ( $screen === get_current_screen() )
+			if ( $screen === get_current_screen() ) {
 				return $screen;
+			}
 		} else {
 			$screen = new WP_Screen();
 			$screen->id     = $id;
@@ -414,8 +426,9 @@
 	 * @return bool True if the screen is in the indicated admin, false otherwise.
 	 */
 	public function in_admin( $admin = null ) {
-		if ( empty( $admin ) )
+		if ( empty( $admin ) ) {
 			return (bool) $this->in_admin;
+		}
 
 		return ( $admin == $this->in_admin );
 	}
@@ -503,11 +516,13 @@
 	 * @return string The option value if set, null otherwise.
 	 */
 	public function get_option( $option, $key = false ) {
-		if ( ! isset( $this->_options[ $option ] ) )
+		if ( ! isset( $this->_options[ $option ] ) ) {
 			return null;
+		}
 		if ( $key ) {
-			if ( isset( $this->_options[ $option ][ $key ] ) )
+			if ( isset( $this->_options[ $option ][ $key ] ) ) {
 				return $this->_options[ $option ][ $key ];
+			}
 			return null;
 		}
 		return $this->_options[ $option ];
@@ -554,8 +569,9 @@
 	 * @return array Help tab arguments.
 	 */
 	public function get_help_tab( $id ) {
-		if ( ! isset( $this->_help_tabs[ $id ] ) )
+		if ( ! isset( $this->_help_tabs[ $id ] ) ) {
 			return null;
+		}
 		return $this->_help_tabs[ $id ];
 	}
 
@@ -589,8 +605,9 @@
 		$args['id'] = sanitize_html_class( $args['id'] );
 
 		// Ensure we have an ID and title.
-		if ( ! $args['id'] || ! $args['title'] )
+		if ( ! $args['id'] || ! $args['title'] ) {
 			return;
+		}
 
 		// Allows for overriding an existing tab with that ID.
 		$this->_help_tabs[ $args['id'] ] = $args;
@@ -656,7 +673,7 @@
 		return $this->columns;
 	}
 
- 	/**
+	 /**
 	 * Get the accessible hidden headings and text used in the screen.
 	 *
 	 * @since 4.4.0
@@ -772,14 +789,15 @@
 			 * @param string $old_help_default Default contextual help text.
 			 */
 			$default_help = apply_filters( 'default_contextual_help', '' );
-			if ( $default_help )
+			if ( $default_help ) {
 				$old_help = '<p>' . $default_help . '</p>';
+			}
 		}
 
 		if ( $old_help ) {
 			$this->add_help_tab( array(
 				'id'      => 'old-contextual-help',
-				'title'   => __('Overview'),
+				'title'   => __( 'Overview' ),
 				'content' => $old_help,
 			) );
 		}
@@ -787,14 +805,15 @@
 		$help_sidebar = $this->get_help_sidebar();
 
 		$help_class = 'hidden';
-		if ( ! $help_sidebar )
+		if ( ! $help_sidebar ) {
 			$help_class .= ' no-sidebar';
+		}
 
 		// Time to render!
 		?>
 		<div id="screen-meta" class="metabox-prefs">
 
-			<div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>" tabindex="-1" aria-label="<?php esc_attr_e('Contextual Help Tab'); ?>">
+			<div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>" tabindex="-1" aria-label="<?php esc_attr_e( 'Contextual Help Tab' ); ?>">
 				<div id="contextual-help-back"></div>
 				<div id="contextual-help-columns">
 					<div class="contextual-help-tabs">
@@ -827,7 +846,7 @@
 					<div class="contextual-help-tabs-wrap">
 						<?php
 						$classes = 'help-tab-content active';
-						foreach ( $this->get_help_tabs() as $tab ):
+						foreach ( $this->get_help_tabs() as $tab ) :
 							$panel_id = "tab-panel-{$tab['id']}";
 							?>
 
@@ -837,8 +856,9 @@
 								echo $tab['content'];
 
 								// If it exists, fire tab callback.
-								if ( ! empty( $tab['callback'] ) )
+								if ( ! empty( $tab['callback'] ) ) {
 									call_user_func_array( $tab['callback'], array( $this, $tab ) );
+								}
 								?>
 							</div>
 						<?php
@@ -865,25 +885,31 @@
 		 */
 		$columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this );
 
-		if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) )
-			$this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) );
+		if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) ) {
+			$this->add_option( 'layout_columns', array(
+				'max' => $columns[ $this->id ],
+			) );
+		}
 
 		if ( $this->get_option( 'layout_columns' ) ) {
-			$this->columns = (int) get_user_option("screen_layout_$this->id");
+			$this->columns = (int) get_user_option( "screen_layout_$this->id" );
 
-			if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) )
+			if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) {
 				$this->columns = $this->get_option( 'layout_columns', 'default' );
+			}
 		}
-		$GLOBALS[ 'screen_layout_columns' ] = $this->columns; // Set the global for back-compat.
+		$GLOBALS['screen_layout_columns'] = $this->columns; // Set the global for back-compat.
 
 		// Add screen options
-		if ( $this->show_screen_options() )
+		if ( $this->show_screen_options() ) {
 			$this->render_screen_options();
+		}
 		?>
 		</div>
 		<?php
-		if ( ! $this->get_help_tabs() && ! $this->show_screen_options() )
+		if ( ! $this->get_help_tabs() && ! $this->show_screen_options() ) {
 			return;
+		}
 		?>
 		<div id="screen-meta-links">
 		<?php if ( $this->get_help_tabs() ) : ?>
@@ -891,7 +917,7 @@
 			<button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
 			</div>
 		<?php endif;
-		if ( $this->show_screen_options() ) : ?>
+if ( $this->show_screen_options() ) : ?>
 			<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
 			<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
 			</div>
@@ -909,8 +935,9 @@
 	public function show_screen_options() {
 		global $wp_meta_boxes;
 
-		if ( is_bool( $this->_show_screen_options ) )
+		if ( is_bool( $this->_show_screen_options ) ) {
 			return $this->_show_screen_options;
+		}
 
 		$columns = get_column_headers( $this );
 
@@ -919,7 +946,7 @@
 		switch ( $this->base ) {
 			case 'widgets':
 				$nonce = wp_create_nonce( 'widgets-access' );
-				$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n";
+				$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Enable accessibility mode' ) . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Disable accessibility mode' ) . "</a></p>\n";
 				break;
 			case 'post' :
 				$expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
@@ -945,8 +972,9 @@
 		 */
 		$this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this );
 
-		if ( $this->_screen_settings || $this->_options )
+		if ( $this->_screen_settings || $this->_options ) {
 			$show_screen = true;
+		}
 
 		/**
 		 * Filters whether to show the Screen Options tab.
@@ -1035,20 +1063,20 @@
 		<?php
 			meta_box_prefs( $this );
 
-			if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
-				if ( isset( $_GET['welcome'] ) ) {
-					$welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1;
-					update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked );
-				} else {
-					$welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
-					if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) {
-						$welcome_checked = false;
-					}
+		if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
+			if ( isset( $_GET['welcome'] ) ) {
+				$welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1;
+				update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked );
+			} else {
+				$welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
+				if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) {
+					$welcome_checked = false;
 				}
-				echo '<label for="wp_welcome_panel-hide">';
-				echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
-				echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
 			}
+			echo '<label for="wp_welcome_panel-hide">';
+			echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
+			echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
+		}
 		?>
 		</fieldset>
 		<?php
@@ -1115,14 +1143,14 @@
 		?>
 		<fieldset class='columns-prefs'>
 		<legend class="screen-layout"><?php _e( 'Layout' ); ?></legend><?php
-			for ( $i = 1; $i <= $num; ++$i ):
-				?>
-				<label class="columns-prefs-<?php echo $i; ?>">
-					<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
-						<?php checked( $screen_layout_columns, $i ); ?> />
-					<?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
-				</label>
-				<?php
+		for ( $i = 1; $i <= $num; ++$i ) :
+			?>
+			<label class="columns-prefs-<?php echo $i; ?>">
+			<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
+				<?php checked( $screen_layout_columns, $i ); ?> />
+			<?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
+			</label>
+			<?php
 			endfor; ?>
 		</fieldset>
 		<?php
@@ -1207,7 +1235,10 @@
 			return;
 		}
 
-		$view_mode_post_types = get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) );
+		$view_mode_post_types = get_post_types( array(
+			'hierarchical' => false,
+			'show_ui' => true,
+		) );
 
 		/**
 		 * Filters the post types that have different view mode options.
Index: src/wp-admin/includes/class-wp-site-icon.php
===================================================================
--- src/wp-admin/includes/class-wp-site-icon.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-site-icon.php	(working copy)
@@ -100,7 +100,7 @@
 			'post_content'   => $url,
 			'post_mime_type' => $image_type,
 			'guid'           => $url,
-			'context'        => 'site-icon'
+			'context'        => 'site-icon',
 		);
 
 		return $object;
Index: src/wp-admin/includes/class-wp-terms-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-terms-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-terms-list-table.php	(working copy)
@@ -49,17 +49,22 @@
 		$post_type = $this->screen->post_type;
 		$taxonomy  = $this->screen->taxonomy;
 
-		if ( empty( $taxonomy ) )
+		if ( empty( $taxonomy ) ) {
 			$taxonomy = 'post_tag';
+		}
 
-		if ( ! taxonomy_exists( $taxonomy ) )
+		if ( ! taxonomy_exists( $taxonomy ) ) {
 			wp_die( __( 'Invalid taxonomy.' ) );
+		}
 
 		$tax = get_taxonomy( $taxonomy );
 
 		// @todo Still needed? Maybe just the show_ui part.
-		if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array( 'show_ui' => true ) ) ) )
+		if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array(
+			'show_ui' => true,
+		) ) ) ) {
 			$post_type = 'post';
+		}
 
 	}
 
@@ -107,7 +112,7 @@
 			$tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page );
 		}
 
-		$search = !empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : '';
+		$search = ! empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : '';
 
 		$args = array(
 			'search' => $search,
@@ -115,11 +120,13 @@
 			'number' => $tags_per_page,
 		);
 
-		if ( !empty( $_REQUEST['orderby'] ) )
+		if ( ! empty( $_REQUEST['orderby'] ) ) {
 			$args['orderby'] = trim( wp_unslash( $_REQUEST['orderby'] ) );
+		}
 
-		if ( !empty( $_REQUEST['order'] ) )
+		if ( ! empty( $_REQUEST['order'] ) ) {
 			$args['order'] = trim( wp_unslash( $_REQUEST['order'] ) );
+		}
 
 		$this->callback_args = $args;
 
@@ -164,8 +171,9 @@
 	 * @return string
 	 */
 	public function current_action() {
-		if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' === $_REQUEST['action'] || 'delete' === $_REQUEST['action2'] ) )
+		if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' === $_REQUEST['action'] || 'delete' === $_REQUEST['action2'] ) ) {
 			return 'bulk-delete';
+		}
 
 		return parent::current_action();
 	}
@@ -201,7 +209,7 @@
 			'description' => 'description',
 			'slug'        => 'slug',
 			'posts'       => 'count',
-			'links'       => 'count'
+			'links'       => 'count',
 		);
 	}
 
@@ -215,7 +223,7 @@
 			'page' => 1,
 			'number' => 20,
 			'search' => '',
-			'hide_empty' => 0
+			'hide_empty' => 0,
 		) );
 
 		$page = $args['page'];
@@ -272,11 +280,13 @@
 
 		foreach ( $terms as $key => $term ) {
 
-			if ( $count >= $end )
+			if ( $count >= $end ) {
 				break;
+			}
 
-			if ( $term->parent != $parent && empty( $_REQUEST['s'] ) )
+			if ( $term->parent != $parent && empty( $_REQUEST['s'] ) ) {
 				continue;
+			}
 
 			// If the page starts in a subtree, print the parents.
 			if ( $count == $start && $term->parent > 0 && empty( $_REQUEST['s'] ) ) {
@@ -286,8 +296,9 @@
 					$my_parent = get_term( $p, $taxonomy );
 					$my_parents[] = $my_parent;
 					$p = $my_parent->parent;
-					if ( in_array( $p, $parent_ids ) ) // Prevent parent loops.
+					if ( in_array( $p, $parent_ids ) ) { // Prevent parent loops.
 						break;
+					}
 					$parent_ids[] = $p;
 				}
 				unset( $parent_ids );
@@ -307,11 +318,12 @@
 
 			++$count;
 
-			unset( $terms[$key] );
+			unset( $terms[ $key ] );
 
-			if ( isset( $children[$term->term_id] ) && empty( $_REQUEST['s'] ) )
+			if ( isset( $children[ $term->term_id ] ) && empty( $_REQUEST['s'] ) ) {
 				$this->_rows( $taxonomy, $terms, $children, $start, $per_page, $count, $term->term_id, $level + 1 );
-		}
+			}
+		}// End foreach().
 	}
 
 	/**
@@ -321,7 +333,7 @@
 	 */
 	public function single_row( $tag, $level = 0 ) {
 		global $taxonomy;
- 		$tag = sanitize_term( $tag, $taxonomy );
+		 $tag = sanitize_term( $tag, $taxonomy );
 
 		$this->level = $level;
 
@@ -523,22 +535,30 @@
 		$tax = get_taxonomy( $this->screen->taxonomy );
 
 		$ptype_object = get_post_type_object( $this->screen->post_type );
-		if ( ! $ptype_object->show_ui )
+		if ( ! $ptype_object->show_ui ) {
 			return $count;
+		}
 
 		if ( $tax->query_var ) {
-			$args = array( $tax->query_var => $tag->slug );
+			$args = array(
+				$tax->query_var => $tag->slug,
+			);
 		} else {
-			$args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug );
+			$args = array(
+				'taxonomy' => $tax->name,
+				'term' => $tag->slug,
+			);
 		}
 
-		if ( 'post' != $this->screen->post_type )
+		if ( 'post' != $this->screen->post_type ) {
 			$args['post_type'] = $this->screen->post_type;
+		}
 
-		if ( 'attachment' === $this->screen->post_type )
-			return "<a href='" . esc_url ( add_query_arg( $args, 'upload.php' ) ) . "'>$count</a>";
+		if ( 'attachment' === $this->screen->post_type ) {
+			return "<a href='" . esc_url( add_query_arg( $args, 'upload.php' ) ) . "'>$count</a>";
+		}
 
-		return "<a href='" . esc_url ( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
+		return "<a href='" . esc_url( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
 	}
 
 	/**
@@ -547,8 +567,9 @@
 	 */
 	public function column_links( $tag ) {
 		$count = number_format_i18n( $tag->count );
-		if ( $count )
+		if ( $count ) {
 			$count = "<a href='link-manager.php?cat_id=$tag->term_id'>$count</a>";
+		}
 		return $count;
 	}
 
@@ -581,8 +602,9 @@
 	public function inline_edit() {
 		$tax = get_taxonomy( $this->screen->taxonomy );
 
-		if ( ! current_user_can( $tax->cap->edit_terms ) )
+		if ( ! current_user_can( $tax->cap->edit_terms ) ) {
 			return;
+		}
 ?>
 
 	<form method="get"><table style="display: none"><tbody id="inlineedit">
@@ -595,7 +617,7 @@
 					<span class="title"><?php _ex( 'Name', 'term name' ); ?></span>
 					<span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
 				</label>
-	<?php if ( !global_terms_enabled() ) { ?>
+	<?php if ( ! global_terms_enabled() ) { ?>
 				<label>
 					<span class="title"><?php _e( 'Slug' ); ?></span>
 					<span class="input-text-wrap"><input type="text" name="slug" class="ptitle" value="" /></span>
@@ -604,18 +626,25 @@
 			</div></fieldset>
 	<?php
 
-		$core_columns = array( 'cb' => true, 'description' => true, 'name' => true, 'slug' => true, 'posts' => true );
+		$core_columns = array(
+			'cb' => true,
+			'description' => true,
+			'name' => true,
+			'slug' => true,
+			'posts' => true,
+		);
 
 		list( $columns ) = $this->get_column_info();
 
-		foreach ( $columns as $column_name => $column_display_name ) {
-			if ( isset( $core_columns[$column_name] ) )
-				continue;
-
-			/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
-			do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
+	foreach ( $columns as $column_name => $column_display_name ) {
+		if ( isset( $core_columns[ $column_name ] ) ) {
+			continue;
 		}
 
+		/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
+		do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
+	}
+
 	?>
 
 		<p class="inline-edit-save submit">
Index: src/wp-admin/includes/class-wp-theme-install-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-theme-install-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-theme-install-list-table.php	(working copy)
@@ -43,13 +43,14 @@
 
 		$search_terms = array();
 		$search_string = '';
-		if ( ! empty( $_REQUEST['s'] ) ){
+		if ( ! empty( $_REQUEST['s'] ) ) {
 			$search_string = strtolower( wp_unslash( $_REQUEST['s'] ) );
 			$search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', $search_string ) ) ) );
 		}
 
-		if ( ! empty( $_REQUEST['features'] ) )
+		if ( ! empty( $_REQUEST['features'] ) ) {
 			$this->features = $_REQUEST['features'];
+		}
 
 		$paged = $this->get_pagenum();
 
@@ -58,8 +59,9 @@
 		// These are the tabs which are shown on the page,
 		$tabs = array();
 		$tabs['dashboard'] = __( 'Search' );
-		if ( 'search' === $tab )
+		if ( 'search' === $tab ) {
 			$tabs['search']	= __( 'Search Results' );
+		}
 		$tabs['upload'] = __( 'Upload' );
 		$tabs['featured'] = _x( 'Featured', 'themes' );
 		//$tabs['popular']  = _x( 'Popular', 'themes' );
@@ -82,10 +84,15 @@
 		$nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
 
 		// If a non-valid menu tab has been selected, And it's not a non-menu action.
-		if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) )
+		if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) ) {
 			$tab = key( $tabs );
+		}
 
-		$args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults );
+		$args = array(
+			'page' => $paged,
+			'per_page' => $per_page,
+			'fields' => $theme_field_defaults,
+		);
 
 		switch ( $tab ) {
 			case 'search':
@@ -112,7 +119,7 @@
 				break;
 
 			case 'featured':
-			// case 'popular':
+				// case 'popular':
 			case 'new':
 			case 'updated':
 				$args['browse'] = $tab;
@@ -136,13 +143,15 @@
 		 */
 		$args = apply_filters( "install_themes_table_api_args_{$tab}", $args );
 
-		if ( ! $args )
+		if ( ! $args ) {
 			return;
+		}
 
 		$api = themes_api( 'query_themes', $args );
 
-		if ( is_wp_error( $api ) )
+		if ( is_wp_error( $api ) ) {
 			wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' );
+		}
 
 		$this->items = $api->themes;
 
@@ -172,8 +181,8 @@
 		$display_tabs = array();
 		foreach ( (array) $tabs as $action => $text ) {
 			$class = ( $action === $tab ) ? ' class="current"' : '';
-			$href = self_admin_url('theme-install.php?tab=' . $action);
-			$display_tabs['theme-install-'.$action] = "<a href='$href'$class>$text</a>";
+			$href = self_admin_url( 'theme-install.php?tab=' . $action );
+			$display_tabs[ 'theme-install-' . $action ] = "<a href='$href'$class>$text</a>";
 		}
 
 		return $display_tabs;
@@ -183,7 +192,7 @@
 	 * @access public
 	 */
 	public function display() {
-		wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
+		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
 ?>
 		<div class="tablenav top themes">
 			<div class="alignleft actions">
@@ -218,7 +227,7 @@
 				<div class="available-theme installable-theme"><?php
 					$this->single_row( $theme );
 				?></div>
-		<?php } // end foreach $theme_names
+		<?php } // End foreach().
 
 		$this->theme_installer();
 	}
@@ -250,13 +259,14 @@
 	public function single_row( $theme ) {
 		global $themes_allowedtags;
 
-		if ( empty( $theme ) )
+		if ( empty( $theme ) ) {
 			return;
+		}
 
 		$name   = wp_kses( $theme->name,   $themes_allowedtags );
 		$author = wp_kses( $theme->author, $themes_allowedtags );
 
-		$preview_title = sprintf( __('Preview &#8220;%s&#8221;'), $name );
+		$preview_title = sprintf( __( 'Preview &#8220;%s&#8221;' ), $name );
 		$preview_url   = add_query_arg( array(
 			'tab'   => 'theme-information',
 			'theme' => $theme->slug,
@@ -313,10 +323,10 @@
 
 		<div class="action-links">
 			<ul>
-				<?php foreach ( $actions as $action ): ?>
+				<?php foreach ( $actions as $action ) : ?>
 					<li><?php echo $action; ?></li>
 				<?php endforeach; ?>
-				<li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
+				<li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e( 'Details' ) ?></a></li>
 			</ul>
 		</div>
 
@@ -379,8 +389,9 @@
 	public function install_theme_info( $theme ) {
 		global $themes_allowedtags;
 
-		if ( empty( $theme ) )
+		if ( empty( $theme ) ) {
 			return;
+		}
 
 		$name   = wp_kses( $theme->name,   $themes_allowedtags );
 		$author = wp_kses( $theme->author, $themes_allowedtags );
@@ -399,28 +410,32 @@
 
 		?>
 		<div class="install-theme-info"><?php
-			switch ( $status ) {
-				case 'update_available':
-					echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
-					break;
-				case 'newer_installed':
-				case 'latest_installed':
-					echo '<span class="theme-install" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
-					break;
-				case 'install':
-				default:
-					echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
-					break;
-			} ?>
+		switch ( $status ) {
+			case 'update_available':
+				echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
+				break;
+			case 'newer_installed':
+			case 'latest_installed':
+				echo '<span class="theme-install" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
+				break;
+			case 'install':
+			default:
+				echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
+				break;
+		} ?>
 			<h3 class="theme-name"><?php echo $name; ?></h3>
 			<span class="theme-by"><?php printf( __( 'By %s' ), $author ); ?></span>
-			<?php if ( isset( $theme->screenshot_url ) ): ?>
+			<?php if ( isset( $theme->screenshot_url ) ) : ?>
 				<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
 			<?php endif; ?>
 			<div class="theme-details">
-				<?php wp_star_rating( array( 'rating' => $theme->rating, 'type' => 'percent', 'number' => $theme->num_ratings ) ); ?>
+				<?php wp_star_rating( array(
+					'rating' => $theme->rating,
+					'type' => 'percent',
+					'number' => $theme->num_ratings,
+				) ); ?>
 				<div class="theme-version">
-					<strong><?php _e('Version:') ?> </strong>
+					<strong><?php _e( 'Version:' ) ?> </strong>
 					<?php echo wp_kses( $theme->version, $themes_allowedtags ); ?>
 				</div>
 				<div class="theme-description">
@@ -462,12 +477,12 @@
 
 		$installed_theme = wp_get_theme( $theme->slug );
 		if ( $installed_theme->exists() ) {
-			if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
+			if ( version_compare( $installed_theme->get( 'Version' ), $theme->version, '=' ) ) {
 				$status = 'latest_installed';
-			elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
+			} elseif ( version_compare( $installed_theme->get( 'Version' ), $theme->version, '>' ) ) {
 				$status = 'newer_installed';
-			else
-				$status = 'update_available';
+			} else { $status = 'update_available';
+			}
 		}
 
 		return $status;
Index: src/wp-admin/includes/class-wp-themes-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-themes-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-themes-list-table.php	(working copy)
@@ -50,18 +50,23 @@
 	 * @access public
 	 */
 	public function prepare_items() {
-		$themes = wp_get_themes( array( 'allowed' => true ) );
+		$themes = wp_get_themes( array(
+			'allowed' => true,
+		) );
 
-		if ( ! empty( $_REQUEST['s'] ) )
+		if ( ! empty( $_REQUEST['s'] ) ) {
 			$this->search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', strtolower( wp_unslash( $_REQUEST['s'] ) ) ) ) ) );
+		}
 
-		if ( ! empty( $_REQUEST['features'] ) )
+		if ( ! empty( $_REQUEST['features'] ) ) {
 			$this->features = $_REQUEST['features'];
+		}
 
 		if ( $this->search_terms || $this->features ) {
 			foreach ( $themes as $key => $theme ) {
-				if ( ! $this->search_theme( $theme ) )
+				if ( ! $this->search_theme( $theme ) ) {
 					unset( $themes[ $key ] );
+				}
 			}
 		}
 
@@ -102,7 +107,6 @@
 
 				return;
 			}
-			// Else, fallthrough. install_themes doesn't help if you can't enable it.
 		} else {
 			if ( current_user_can( 'install_themes' ) ) {
 				printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) );
@@ -118,8 +122,9 @@
 	 * @param string $which
 	 */
 	public function tablenav( $which = 'top' ) {
-		if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
+		if ( $this->get_pagination_arg( 'total_pages' ) <= 1 ) {
 			return;
+		}
 		?>
 		<div class="tablenav themes <?php echo $which; ?>">
 			<?php $this->pagination( $which ); ?>
@@ -133,7 +138,7 @@
 	 * @access public
 	 */
 	public function display() {
-		wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
+		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
 ?>
 		<?php $this->tablenav( 'top' ); ?>
 
@@ -172,30 +177,31 @@
 	public function display_rows() {
 		$themes = $this->items;
 
-		foreach ( $themes as $theme ):
+		foreach ( $themes as $theme ) :
 			?><div class="available-theme"><?php
 
 			$template   = $theme->get_template();
 			$stylesheet = $theme->get_stylesheet();
-			$title      = $theme->display('Name');
-			$version    = $theme->display('Version');
-			$author     = $theme->display('Author');
+			$title      = $theme->display( 'Name' );
+			$version    = $theme->display( 'Version' );
+			$author     = $theme->display( 'Author' );
 
-			$activate_link = wp_nonce_url( "themes.php?action=activate&amp;template=" . urlencode( $template ) . "&amp;stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
+			$activate_link = wp_nonce_url( 'themes.php?action=activate&amp;template=' . urlencode( $template ) . '&amp;stylesheet=' . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
 
 			$actions = array();
 			$actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="'
 				. esc_attr( sprintf( __( 'Activate &#8220;%s&#8221;' ), $title ) ) . '">' . __( 'Activate' ) . '</a>';
 
-			if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-				$actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">'
-					. __( 'Live Preview' ) . '</a>';
-			}
+if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+	$actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">'
+	. __( 'Live Preview' ) . '</a>';
+}
 
-			if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
-				$actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( 'themes.php?action=delete&amp;stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet )
-					. '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete." ), $title ) )
-					. "' );" . '">' . __( 'Delete' ) . '</a>';
+if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) {
+	$actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( 'themes.php?action=delete&amp;stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet )
+		. '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete." ), $title ) )
+		. "' );" . '">' . __( 'Delete' ) . '</a>';
+}
 
 			/** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
 			$actions       = apply_filters( 'theme_action_links', $actions, $theme );
@@ -222,10 +228,10 @@
 			<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
 			<div class="action-links">
 				<ul>
-					<?php foreach ( $actions as $action ): ?>
+					<?php foreach ( $actions as $action ) : ?>
 						<li><?php echo $action; ?></li>
 					<?php endforeach; ?>
-					<li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
+					<li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e( 'Details' ) ?></a></li>
 				</ul>
 				<?php echo $delete_action; ?>
 
@@ -233,13 +239,13 @@
 			</div>
 
 			<div class="themedetaildiv hide-if-js">
-				<p><strong><?php _e('Version:'); ?></strong> <?php echo $version; ?></p>
-				<p><?php echo $theme->display('Description'); ?></p>
+				<p><strong><?php _e( 'Version:' ); ?></strong> <?php echo $version; ?></p>
+				<p><?php echo $theme->display( 'Description' ); ?></p>
 				<?php if ( $theme->parent() ) {
 					printf( ' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
 						__( 'https://codex.wordpress.org/Child_Themes' ),
-						$theme->parent()->display( 'Name' ) );
-				} ?>
+					$theme->parent()->display( 'Name' ) );
+} ?>
 			</div>
 
 			</div>
@@ -254,14 +260,16 @@
 	public function search_theme( $theme ) {
 		// Search the features
 		foreach ( $this->features as $word ) {
-			if ( ! in_array( $word, $theme->get('Tags') ) )
+			if ( ! in_array( $word, $theme->get( 'Tags' ) ) ) {
 				return false;
+			}
 		}
 
 		// Match all phrases
 		foreach ( $this->search_terms as $word ) {
-			if ( in_array( $word, $theme->get('Tags') ) )
+			if ( in_array( $word, $theme->get( 'Tags' ) ) ) {
 				continue;
+			}
 
 			foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) {
 				// Don't mark up; Do translate.
@@ -270,11 +278,13 @@
 				}
 			}
 
-			if ( false !== stripos( $theme->get_stylesheet(), $word ) )
+			if ( false !== stripos( $theme->get_stylesheet(), $word ) ) {
 				continue;
+			}
 
-			if ( false !== stripos( $theme->get_template(), $word ) )
+			if ( false !== stripos( $theme->get_template(), $word ) ) {
 				continue;
+			}
 
 			return false;
 		}
@@ -300,8 +310,9 @@
 			'total_pages' => ! empty( $this->_pagination_args['total_pages'] ) ? $this->_pagination_args['total_pages'] : 1,
 		);
 
-		if ( is_array( $extra_args ) )
+		if ( is_array( $extra_args ) ) {
 			$args = array_merge( $args, $extra_args );
+		}
 
 		printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", wp_json_encode( $args ) );
 		parent::_js_vars();
Index: src/wp-admin/includes/class-wp-upgrader-skin.php
===================================================================
--- src/wp-admin/includes/class-wp-upgrader-skin.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-upgrader-skin.php	(working copy)
@@ -33,17 +33,23 @@
 	 *
 	 * @param array $args
 	 */
-	public function __construct($args = array()) {
-		$defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
-		$this->options = wp_parse_args($args, $defaults);
+	public function __construct( $args = array() ) {
+		$defaults = array(
+			'url' => '',
+			'nonce' => '',
+			'title' => '',
+			'context' => false,
+		);
+		$this->options = wp_parse_args( $args, $defaults );
 	}
 
 	/**
 	 * @param WP_Upgrader $upgrader
 	 */
-	public function set_upgrader(&$upgrader) {
-		if ( is_object($upgrader) )
+	public function set_upgrader( &$upgrader ) {
+		if ( is_object( $upgrader ) ) {
 			$this->upgrader =& $upgrader;
+		}
 		$this->add_strings();
 	}
 
@@ -86,8 +92,8 @@
 		if ( ! $context ) {
 			$context = $this->options['context'];
 		}
-		if ( !empty($this->options['nonce']) ) {
-			$url = wp_nonce_url($url, $this->options['nonce']);
+		if ( ! empty( $this->options['nonce'] ) ) {
+			$url = wp_nonce_url( $url, $this->options['nonce'] );
 		}
 
 		$extra_fields = array();
@@ -122,17 +128,18 @@
 	 *
 	 * @param string|WP_Error $errors
 	 */
-	public function error($errors) {
-		if ( ! $this->done_header )
+	public function error( $errors ) {
+		if ( ! $this->done_header ) {
 			$this->header();
-		if ( is_string($errors) ) {
-			$this->feedback($errors);
-		} elseif ( is_wp_error($errors) && $errors->get_error_code() ) {
+		}
+		if ( is_string( $errors ) ) {
+			$this->feedback( $errors );
+		} elseif ( is_wp_error( $errors ) && $errors->get_error_code() ) {
 			foreach ( $errors->get_error_messages() as $message ) {
-				if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) )
-					$this->feedback($message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
-				else
-					$this->feedback($message);
+				if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) {
+					$this->feedback( $message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
+				} else { $this->feedback( $message );
+				}
 			}
 		}
 	}
@@ -141,22 +148,24 @@
 	 *
 	 * @param string $string
 	 */
-	public function feedback($string) {
-		if ( isset( $this->upgrader->strings[$string] ) )
-			$string = $this->upgrader->strings[$string];
+	public function feedback( $string ) {
+		if ( isset( $this->upgrader->strings[ $string ] ) ) {
+			$string = $this->upgrader->strings[ $string ];
+		}
 
-		if ( strpos($string, '%') !== false ) {
+		if ( strpos( $string, '%' ) !== false ) {
 			$args = func_get_args();
-			$args = array_splice($args, 1);
+			$args = array_splice( $args, 1 );
 			if ( $args ) {
 				$args = array_map( 'strip_tags', $args );
 				$args = array_map( 'esc_html', $args );
-				$string = vsprintf($string, $args);
+				$string = vsprintf( $string, $args );
 			}
 		}
-		if ( empty($string) )
+		if ( empty( $string ) ) {
 			return;
-		show_message($string);
+		}
+		show_message( $string );
 	}
 
 	/**
Index: src/wp-admin/includes/class-wp-upgrader.php
===================================================================
--- src/wp-admin/includes/class-wp-upgrader.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -126,10 +126,10 @@
 	 *                               instance.
 	 */
 	public function __construct( $skin = null ) {
-		if ( null == $skin )
+		if ( null == $skin ) {
 			$this->skin = new WP_Upgrader_Skin();
-		else
-			$this->skin = $skin;
+		} else { $this->skin = $skin;
+		}
 	}
 
 	/**
@@ -142,7 +142,7 @@
 	 * @access public
 	 */
 	public function init() {
-		$this->skin->set_upgrader($this);
+		$this->skin->set_upgrader( $this );
 		$this->generic_strings();
 	}
 
@@ -153,26 +153,26 @@
 	 * @access public
 	 */
 	public function generic_strings() {
-		$this->strings['bad_request'] = __('Invalid data provided.');
-		$this->strings['fs_unavailable'] = __('Could not access filesystem.');
-		$this->strings['fs_error'] = __('Filesystem error.');
-		$this->strings['fs_no_root_dir'] = __('Unable to locate WordPress root directory.');
-		$this->strings['fs_no_content_dir'] = __('Unable to locate WordPress content directory (wp-content).');
-		$this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress plugin directory.');
-		$this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress theme directory.');
+		$this->strings['bad_request'] = __( 'Invalid data provided.' );
+		$this->strings['fs_unavailable'] = __( 'Could not access filesystem.' );
+		$this->strings['fs_error'] = __( 'Filesystem error.' );
+		$this->strings['fs_no_root_dir'] = __( 'Unable to locate WordPress root directory.' );
+		$this->strings['fs_no_content_dir'] = __( 'Unable to locate WordPress content directory (wp-content).' );
+		$this->strings['fs_no_plugins_dir'] = __( 'Unable to locate WordPress plugin directory.' );
+		$this->strings['fs_no_themes_dir'] = __( 'Unable to locate WordPress theme directory.' );
 		/* translators: %s: directory name */
-		$this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).');
+		$this->strings['fs_no_folder'] = __( 'Unable to locate needed folder (%s).' );
 
-		$this->strings['download_failed'] = __('Download failed.');
-		$this->strings['installing_package'] = __('Installing the latest version&#8230;');
-		$this->strings['no_files'] = __('The package contains no files.');
-		$this->strings['folder_exists'] = __('Destination folder already exists.');
-		$this->strings['mkdir_failed'] = __('Could not create directory.');
-		$this->strings['incompatible_archive'] = __('The package could not be installed.');
+		$this->strings['download_failed'] = __( 'Download failed.' );
+		$this->strings['installing_package'] = __( 'Installing the latest version&#8230;' );
+		$this->strings['no_files'] = __( 'The package contains no files.' );
+		$this->strings['folder_exists'] = __( 'Destination folder already exists.' );
+		$this->strings['mkdir_failed'] = __( 'Could not create directory.' );
+		$this->strings['incompatible_archive'] = __( 'The package could not be installed.' );
 		$this->strings['files_not_writable'] = __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' );
 
-		$this->strings['maintenance_start'] = __('Enabling Maintenance mode&#8230;');
-		$this->strings['maintenance_end'] = __('Disabling Maintenance mode&#8230;');
+		$this->strings['maintenance_start'] = __( 'Enabling Maintenance mode&#8230;' );
+		$this->strings['maintenance_end'] = __( 'Disabling Maintenance mode&#8230;' );
 	}
 
 	/**
@@ -199,40 +199,48 @@
 
 		if ( ! WP_Filesystem( $credentials, $directories[0], $allow_relaxed_file_ownership ) ) {
 			$error = true;
-			if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() )
+			if ( is_object( $wp_filesystem ) && $wp_filesystem->errors->get_error_code() ) {
 				$error = $wp_filesystem->errors;
+			}
 			// Failed to connect, Error and request again
 			$this->skin->request_filesystem_credentials( $error, $directories[0], $allow_relaxed_file_ownership );
 			return false;
 		}
 
-		if ( ! is_object($wp_filesystem) )
-			return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] );
+		if ( ! is_object( $wp_filesystem ) ) {
+			return new WP_Error( 'fs_unavailable', $this->strings['fs_unavailable'] );
+		}
 
-		if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
-			return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors);
+		if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+			return new WP_Error( 'fs_error', $this->strings['fs_error'], $wp_filesystem->errors );
+		}
 
-		foreach ( (array)$directories as $dir ) {
+		foreach ( (array) $directories as $dir ) {
 			switch ( $dir ) {
 				case ABSPATH:
-					if ( ! $wp_filesystem->abspath() )
-						return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']);
+					if ( ! $wp_filesystem->abspath() ) {
+						return new WP_Error( 'fs_no_root_dir', $this->strings['fs_no_root_dir'] );
+					}
 					break;
 				case WP_CONTENT_DIR:
-					if ( ! $wp_filesystem->wp_content_dir() )
-						return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']);
+					if ( ! $wp_filesystem->wp_content_dir() ) {
+						return new WP_Error( 'fs_no_content_dir', $this->strings['fs_no_content_dir'] );
+					}
 					break;
 				case WP_PLUGIN_DIR:
-					if ( ! $wp_filesystem->wp_plugins_dir() )
-						return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']);
+					if ( ! $wp_filesystem->wp_plugins_dir() ) {
+						return new WP_Error( 'fs_no_plugins_dir', $this->strings['fs_no_plugins_dir'] );
+					}
 					break;
 				case get_theme_root():
-					if ( ! $wp_filesystem->wp_themes_dir() )
-						return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']);
+					if ( ! $wp_filesystem->wp_themes_dir() ) {
+						return new WP_Error( 'fs_no_themes_dir', $this->strings['fs_no_themes_dir'] );
+					}
 					break;
 				default:
-					if ( ! $wp_filesystem->find_folder($dir) )
+					if ( ! $wp_filesystem->find_folder( $dir ) ) {
 						return new WP_Error( 'fs_no_folder', sprintf( $this->strings['fs_no_folder'], esc_html( basename( $dir ) ) ) );
+					}
 					break;
 			}
 		}
@@ -263,21 +271,25 @@
 		 * @param WP_Upgrader $this    The WP_Upgrader instance.
 		 */
 		$reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
-		if ( false !== $reply )
+		if ( false !== $reply ) {
 			return $reply;
+		}
 
-		if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote?
+		if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
 			return $package; //must be a local file..
+		}
 
-		if ( empty($package) )
-			return new WP_Error('no_package', $this->strings['no_package']);
+		if ( empty( $package ) ) {
+			return new WP_Error( 'no_package', $this->strings['no_package'] );
+		}
 
-		$this->skin->feedback('downloading_package', $package);
+		$this->skin->feedback( 'downloading_package', $package );
 
-		$download_file = download_url($package);
+		$download_file = download_url( $package );
 
-		if ( is_wp_error($download_file) )
-			return new WP_Error('download_failed', $this->strings['download_failed'], $download_file->get_error_message());
+		if ( is_wp_error( $download_file ) ) {
+			return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
+		}
 
 		return $download_file;
 	}
@@ -298,33 +310,36 @@
 	public function unpack_package( $package, $delete_package = true ) {
 		global $wp_filesystem;
 
-		$this->skin->feedback('unpack_package');
+		$this->skin->feedback( 'unpack_package' );
 
 		$upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
 
 		//Clean up contents of upgrade directory beforehand.
-		$upgrade_files = $wp_filesystem->dirlist($upgrade_folder);
-		if ( !empty($upgrade_files) ) {
-			foreach ( $upgrade_files as $file )
-				$wp_filesystem->delete($upgrade_folder . $file['name'], true);
+		$upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
+		if ( ! empty( $upgrade_files ) ) {
+			foreach ( $upgrade_files as $file ) {
+				$wp_filesystem->delete( $upgrade_folder . $file['name'], true );
+			}
 		}
 
 		// We need a working directory - Strip off any .tmp or .zip suffixes
 		$working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
 
 		// Clean up working directory
-		if ( $wp_filesystem->is_dir($working_dir) )
-			$wp_filesystem->delete($working_dir, true);
+		if ( $wp_filesystem->is_dir( $working_dir ) ) {
+			$wp_filesystem->delete( $working_dir, true );
+		}
 
 		// Unzip package to working directory
 		$result = unzip_file( $package, $working_dir );
 
 		// Once extracted, delete the package if required.
-		if ( $delete_package )
-			unlink($package);
+		if ( $delete_package ) {
+			unlink( $package );
+		}
 
-		if ( is_wp_error($result) ) {
-			$wp_filesystem->delete($working_dir, true);
+		if ( is_wp_error( $result ) ) {
+			$wp_filesystem->delete( $working_dir, true );
 			if ( 'incompatible_archive' == $result->get_error_code() ) {
 				return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
 			}
@@ -434,10 +449,10 @@
 			'clear_destination' => false,
 			'clear_working' => false,
 			'abort_if_destination_exists' => true,
-			'hook_extra' => array()
+			'hook_extra' => array(),
 		);
 
-		$args = wp_parse_args($args, $defaults);
+		$args = wp_parse_args( $args, $defaults );
 
 		// These were previously extract()'d.
 		$source = $args['source'];
@@ -527,7 +542,7 @@
 
 		if ( $clear_destination ) {
 			// We're going to clear the destination if there's something there.
-			$this->skin->feedback('remove_old');
+			$this->skin->feedback( 'remove_old' );
 
 			$removed = $this->clear_destination( $remote_destination );
 
@@ -546,13 +561,13 @@
 			if ( is_wp_error( $removed ) ) {
 				return $removed;
 			}
-		} elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists($remote_destination) ) {
+		} elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
 			//If we're not clearing the destination folder and something exists there already, Bail.
 			//But first check to see if there are actually any files in the folder.
-			$_files = $wp_filesystem->dirlist($remote_destination);
-			if ( ! empty($_files) ) {
-				$wp_filesystem->delete($remote_source, true); //Clear out the source files.
-				return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination );
+			$_files = $wp_filesystem->dirlist( $remote_destination );
+			if ( ! empty( $_files ) ) {
+				$wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
+				return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
 			}
 		}
 
@@ -563,8 +578,8 @@
 			}
 		}
 		// Copy new version of item into place.
-		$result = copy_dir($source, $remote_destination);
-		if ( is_wp_error($result) ) {
+		$result = copy_dir( $source, $remote_destination );
+		if ( is_wp_error( $result ) ) {
 			if ( $args['clear_working'] ) {
 				$wp_filesystem->delete( $remote_source, true );
 			}
@@ -576,7 +591,7 @@
 			$wp_filesystem->delete( $remote_source, true );
 		}
 
-		$destination_name = basename( str_replace($local_destination, '', $destination) );
+		$destination_name = basename( str_replace( $local_destination, '', $destination ) );
 		if ( '.' == $destination_name ) {
 			$destination_name = '';
 		}
@@ -594,7 +609,7 @@
 		 */
 		$res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
 
-		if ( is_wp_error($res) ) {
+		if ( is_wp_error( $res ) ) {
 			$this->result = $res;
 			return $res;
 		}
@@ -646,7 +661,7 @@
 			'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please
 			'clear_working' => true,
 			'is_multi' => false,
-			'hook_extra' => array() // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
+			'hook_extra' => array(),// Pass any extra $hook_extra args here, this will be passed to any hooked filters.
 		);
 
 		$options = wp_parse_args( $options, $defaults );
@@ -699,8 +714,8 @@
 
 		$this->skin->before();
 
-		if ( is_wp_error($res) ) {
-			$this->skin->error($res);
+		if ( is_wp_error( $res ) ) {
+			$this->skin->error( $res );
 			$this->skin->after();
 			if ( ! $options['is_multi'] ) {
 				$this->skin->footer();
@@ -713,8 +728,8 @@
 		 * of the file if the package is a local file)
 		 */
 		$download = $this->download_package( $options['package'] );
-		if ( is_wp_error($download) ) {
-			$this->skin->error($download);
+		if ( is_wp_error( $download ) ) {
+			$this->skin->error( $download );
 			$this->skin->after();
 			if ( ! $options['is_multi'] ) {
 				$this->skin->footer();
@@ -726,8 +741,8 @@
 
 		// Unzips the file into a temporary directory.
 		$working_dir = $this->unpack_package( $download, $delete_package );
-		if ( is_wp_error($working_dir) ) {
-			$this->skin->error($working_dir);
+		if ( is_wp_error( $working_dir ) ) {
+			$this->skin->error( $working_dir );
 			$this->skin->after();
 			if ( ! $options['is_multi'] ) {
 				$this->skin->footer();
@@ -742,16 +757,16 @@
 			'clear_destination' => $options['clear_destination'],
 			'abort_if_destination_exists' => $options['abort_if_destination_exists'],
 			'clear_working' => $options['clear_working'],
-			'hook_extra' => $options['hook_extra']
+			'hook_extra' => $options['hook_extra'],
 		) );
 
-		$this->skin->set_result($result);
-		if ( is_wp_error($result) ) {
-			$this->skin->error($result);
-			$this->skin->feedback('process_failed');
+		$this->skin->set_result( $result );
+		if ( is_wp_error( $result ) ) {
+			$this->skin->error( $result );
+			$this->skin->feedback( 'process_failed' );
 		} else {
 			// Install succeeded.
-			$this->skin->feedback('process_success');
+			$this->skin->feedback( 'process_success' );
 		}
 
 		$this->skin->after();
@@ -791,7 +806,7 @@
 			do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
 
 			$this->skin->footer();
-		}
+		}// End if().
 
 		return $result;
 	}
@@ -812,29 +827,29 @@
 		global $wp_filesystem;
 		$file = $wp_filesystem->abspath() . '.maintenance';
 		if ( $enable ) {
-			$this->skin->feedback('maintenance_start');
+			$this->skin->feedback( 'maintenance_start' );
 			// Create maintenance file to signal that we are upgrading
 			$maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
-			$wp_filesystem->delete($file);
-			$wp_filesystem->put_contents($file, $maintenance_string, FS_CHMOD_FILE);
+			$wp_filesystem->delete( $file );
+			$wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
 		} elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
-			$this->skin->feedback('maintenance_end');
-			$wp_filesystem->delete($file);
+			$this->skin->feedback( 'maintenance_end' );
+			$wp_filesystem->delete( $file );
 		}
 	}
 
 	/**
- 	 * Creates a lock using WordPress options.
- 	 *
- 	 * @since 4.5.0
- 	 * @access public
- 	 * @static
- 	 *
- 	 * @param string $lock_name       The name of this unique lock.
- 	 * @param int    $release_timeout Optional. The duration in seconds to respect an existing lock.
+	  * Creates a lock using WordPress options.
+	  *
+	  * @since 4.5.0
+	  * @access public
+	  * @static
+	  *
+	  * @param string $lock_name       The name of this unique lock.
+	  * @param int    $release_timeout Optional. The duration in seconds to respect an existing lock.
 	 *                                Default: 1 hour.
- 	 * @return bool False if a lock couldn't be created or if the lock is still valid. True otherwise.
- 	 */
+	  * @return bool False if a lock couldn't be created or if the lock is still valid. True otherwise.
+	  */
 	public static function create_lock( $lock_name, $release_timeout = null ) {
 		global $wpdb;
 		if ( ! $release_timeout ) {
@@ -871,17 +886,17 @@
 	}
 
 	/**
- 	 * Releases an upgrader lock.
- 	 *
- 	 * @since 4.5.0
- 	 * @access public
- 	 * @static
+	  * Releases an upgrader lock.
+	  *
+	  * @since 4.5.0
+	  * @access public
+	  * @static
 	 *
 	 * @see WP_Upgrader::create_lock()
- 	 *
- 	 * @param string $lock_name The name of this unique lock.
+	  *
+	  * @param string $lock_name The name of this unique lock.
 	 * @return bool True if the lock was successfully released. False on failure.
- 	 */
+	  */
 	public static function release_lock( $lock_name ) {
 		return delete_option( $lock_name . '.lock' );
 	}
Index: src/wp-admin/includes/class-wp-users-list-table.php
===================================================================
--- src/wp-admin/includes/class-wp-users-list-table.php	(revision 40901)
+++ src/wp-admin/includes/class-wp-users-list-table.php	(working copy)
@@ -54,23 +54,24 @@
 
 		$this->is_site_users = 'site-users-network' === $this->screen->id;
 
-		if ( $this->is_site_users )
+		if ( $this->is_site_users ) {
 			$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+		}
 	}
 
 	/**
 	 * Check the current user's permissions.
 	 *
- 	 * @since 3.1.0
+	  * @since 3.1.0
 	 * @access public
 	 *
 	 * @return bool
 	 */
 	public function ajax_user_can() {
-		if ( $this->is_site_users )
+		if ( $this->is_site_users ) {
 			return current_user_can( 'manage_sites' );
-		else
-			return current_user_can( 'list_users' );
+		} else { return current_user_can( 'list_users' );
+		}
 	}
 
 	/**
@@ -97,32 +98,36 @@
 		if ( 'none' === $role ) {
 			$args = array(
 				'number' => $users_per_page,
-				'offset' => ( $paged-1 ) * $users_per_page,
+				'offset' => ( $paged -1 ) * $users_per_page,
 				'include' => wp_get_users_with_no_role(),
 				'search' => $usersearch,
-				'fields' => 'all_with_meta'
+				'fields' => 'all_with_meta',
 			);
 		} else {
 			$args = array(
 				'number' => $users_per_page,
-				'offset' => ( $paged-1 ) * $users_per_page,
+				'offset' => ( $paged -1 ) * $users_per_page,
 				'role' => $role,
 				'search' => $usersearch,
-				'fields' => 'all_with_meta'
+				'fields' => 'all_with_meta',
 			);
 		}
 
-		if ( '' !== $args['search'] )
+		if ( '' !== $args['search'] ) {
 			$args['search'] = '*' . $args['search'] . '*';
+		}
 
-		if ( $this->is_site_users )
+		if ( $this->is_site_users ) {
 			$args['blog_id'] = $this->site_id;
+		}
 
-		if ( isset( $_REQUEST['orderby'] ) )
+		if ( isset( $_REQUEST['orderby'] ) ) {
 			$args['orderby'] = $_REQUEST['orderby'];
+		}
 
-		if ( isset( $_REQUEST['order'] ) )
+		if ( isset( $_REQUEST['order'] ) ) {
 			$args['order'] = $_REQUEST['order'];
+		}
 
 		/**
 		 * Filters the query arguments used to retrieve users for the current users list table.
@@ -186,14 +191,15 @@
 
 		$total_users = $users_of_blog['total_users'];
 		$avail_roles =& $users_of_blog['avail_roles'];
-		unset($users_of_blog);
+		unset( $users_of_blog );
 
-		$class = empty($role) ? ' class="current"' : '';
+		$class = empty( $role ) ? ' class="current"' : '';
 		$role_links = array();
 		$role_links['all'] = "<a href='$url'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>';
 		foreach ( $wp_roles->get_names() as $this_role => $name ) {
-			if ( !isset($avail_roles[$this_role]) )
+			if ( ! isset( $avail_roles[ $this_role ] ) ) {
 				continue;
+			}
 
 			$class = '';
 
@@ -203,11 +209,11 @@
 
 			$name = translate_user_role( $name );
 			/* translators: User role name with count */
-			$name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, number_format_i18n( $avail_roles[$this_role] ) );
-			$role_links[$this_role] = "<a href='" . esc_url( add_query_arg( 'role', $this_role, $url ) ) . "'$class>$name</a>";
+			$name = sprintf( __( '%1$s <span class="count">(%2$s)</span>' ), $name, number_format_i18n( $avail_roles[ $this_role ] ) );
+			$role_links[ $this_role ] = "<a href='" . esc_url( add_query_arg( 'role', $this_role, $url ) ) . "'$class>$name</a>";
 		}
 
-		if ( ! empty( $avail_roles['none' ] ) ) {
+		if ( ! empty( $avail_roles['none'] ) ) {
 
 			$class = '';
 
@@ -217,7 +223,7 @@
 
 			$name = __( 'No role' );
 			/* translators: User role name with count */
-			$name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, number_format_i18n( $avail_roles['none' ] ) );
+			$name = sprintf( __( '%1$s <span class="count">(%2$s)</span>' ), $name, number_format_i18n( $avail_roles['none'] ) );
 			$role_links['none'] = "<a href='" . esc_url( add_query_arg( 'role', 'none', $url ) ) . "'$class>$name</a>";
 
 		}
@@ -237,11 +243,13 @@
 		$actions = array();
 
 		if ( is_multisite() ) {
-			if ( current_user_can( 'remove_users' ) )
+			if ( current_user_can( 'remove_users' ) ) {
 				$actions['remove'] = __( 'Remove' );
+			}
 		} else {
-			if ( current_user_can( 'delete_users' ) )
+			if ( current_user_can( 'delete_users' ) ) {
 				$actions['delete'] = __( 'Delete' );
+			}
 		}
 
 		return $actions;
@@ -320,11 +328,12 @@
 			'name'     => __( 'Name' ),
 			'email'    => __( 'Email' ),
 			'role'     => __( 'Role' ),
-			'posts'    => __( 'Posts' )
+			'posts'    => __( 'Posts' ),
 		);
 
-		if ( $this->is_site_users )
+		if ( $this->is_site_users ) {
 			unset( $c['posts'] );
+		}
 
 		return $c;
 	}
@@ -354,12 +363,14 @@
 	 */
 	public function display_rows() {
 		// Query the post counts for this page
-		if ( ! $this->is_site_users )
+		if ( ! $this->is_site_users ) {
 			$post_counts = count_many_users_posts( array_keys( $this->items ) );
+		}
 
 		foreach ( $this->items as $userid => $user_object ) {
-			if ( is_multisite() && empty( $user_object->allcaps ) )
+			if ( is_multisite() && empty( $user_object->allcaps ) ) {
 				continue;
+			}
 
 			echo "\n\t" . $this->single_row( $user_object, '', '', isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
 		}
@@ -387,10 +398,10 @@
 		$user_object->filter = 'display';
 		$email = $user_object->user_email;
 
-		if ( $this->is_site_users )
+		if ( $this->is_site_users ) {
 			$url = "site-users.php?id={$this->site_id}&amp;";
-		else
-			$url = 'users.php?';
+		} else { $url = 'users.php?';
+		}
 
 		$user_roles = $this->get_role_list( $user_object );
 
@@ -409,10 +420,12 @@
 				$edit = "<strong>$user_object->user_login</strong><br />";
 			}
 
-			if ( !is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) )
-				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . "</a>";
-			if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) )
-				$actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url."action=remove&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . "</a>";
+			if ( ! is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) ) {
+				$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . '</a>';
+			}
+			if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) ) {
+				$actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url . "action=remove&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . '</a>';
+			}
 
 			/**
 			 * Filters the action links displayed under each user in the Users list table.
@@ -435,7 +448,7 @@
 
 		} else {
 			$edit = '<strong>' . $user_object->user_login . '</strong>';
-		}
+		}// End if().
 		$avatar = get_avatar( $user_object->ID, 32 );
 
 		// Comma-separated list of user roles.
@@ -505,9 +518,9 @@
 				if ( $primary === $column_name ) {
 					$r .= $this->row_actions( $actions );
 				}
-				$r .= "</td>";
-			}
-		}
+				$r .= '</td>';
+			}// End if().
+		}// End foreach().
 		$r .= '</tr>';
 
 		return $r;
Index: src/wp-admin/includes/comment.php
===================================================================
--- src/wp-admin/includes/comment.php	(revision 40901)
+++ src/wp-admin/includes/comment.php	(working copy)
@@ -34,8 +34,8 @@
 
 	return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
 			WHERE comment_author = %s AND $date_field = %s",
-			stripslashes( $comment_author ),
-			stripslashes( $comment_date )
+		stripslashes( $comment_author ),
+		stripslashes( $comment_date )
 	) );
 }
 
@@ -45,30 +45,37 @@
  * @since 2.0.0
  */
 function edit_comment() {
-	if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
-		wp_die ( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
+	if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) ) {
+		wp_die( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
+	}
 
-	if ( isset( $_POST['newcomment_author'] ) )
+	if ( isset( $_POST['newcomment_author'] ) ) {
 		$_POST['comment_author'] = $_POST['newcomment_author'];
-	if ( isset( $_POST['newcomment_author_email'] ) )
+	}
+	if ( isset( $_POST['newcomment_author_email'] ) ) {
 		$_POST['comment_author_email'] = $_POST['newcomment_author_email'];
-	if ( isset( $_POST['newcomment_author_url'] ) )
+	}
+	if ( isset( $_POST['newcomment_author_url'] ) ) {
 		$_POST['comment_author_url'] = $_POST['newcomment_author_url'];
-	if ( isset( $_POST['comment_status'] ) )
+	}
+	if ( isset( $_POST['comment_status'] ) ) {
 		$_POST['comment_approved'] = $_POST['comment_status'];
-	if ( isset( $_POST['content'] ) )
+	}
+	if ( isset( $_POST['content'] ) ) {
 		$_POST['comment_content'] = $_POST['content'];
-	if ( isset( $_POST['comment_ID'] ) )
+	}
+	if ( isset( $_POST['comment_ID'] ) ) {
 		$_POST['comment_ID'] = (int) $_POST['comment_ID'];
+	}
 
-	foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
-		if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
+	foreach ( array( 'aa', 'mm', 'jj', 'hh', 'mn' ) as $timeunit ) {
+		if ( ! empty( $_POST[ 'hidden_' . $timeunit ] ) && $_POST[ 'hidden_' . $timeunit ] != $_POST[ $timeunit ] ) {
 			$_POST['edit_date'] = '1';
 			break;
 		}
 	}
 
-	if ( !empty ( $_POST['edit_date'] ) ) {
+	if ( ! empty( $_POST['edit_date'] ) ) {
 		$aa = $_POST['aa'];
 		$mm = $_POST['mm'];
 		$jj = $_POST['jj'];
@@ -94,8 +101,9 @@
  * @return WP_Comment|false Comment if found. False on failure.
  */
 function get_comment_to_edit( $id ) {
-	if ( !$comment = get_comment($id) )
+	if ( ! $comment = get_comment( $id ) ) {
 		return false;
+	}
 
 	$comment->comment_ID = (int) $comment->comment_ID;
 	$comment->comment_post_ID = (int) $comment->comment_post_ID;
@@ -113,7 +121,7 @@
 	$comment->comment_author = format_to_edit( $comment->comment_author );
 	$comment->comment_author_email = format_to_edit( $comment->comment_author_email );
 	$comment->comment_author_url = format_to_edit( $comment->comment_author_url );
-	$comment->comment_author_url = esc_url($comment->comment_author_url);
+	$comment->comment_author_url = esc_url( $comment->comment_author_url );
 
 	return $comment;
 }
@@ -132,33 +140,36 @@
 	global $wpdb;
 
 	$single = false;
-	if ( !is_array($post_id) ) {
+	if ( ! is_array( $post_id ) ) {
 		$post_id_array = (array) $post_id;
 		$single = true;
 	} else {
 		$post_id_array = $post_id;
 	}
-	$post_id_array = array_map('intval', $post_id_array);
-	$post_id_in = "'" . implode("', '", $post_id_array) . "'";
+	$post_id_array = array_map( 'intval', $post_id_array );
+	$post_id_in = "'" . implode( "', '", $post_id_array ) . "'";
 
 	$pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' GROUP BY comment_post_ID", ARRAY_A );
 
 	if ( $single ) {
-		if ( empty($pending) )
+		if ( empty( $pending ) ) {
 			return 0;
-		else
-			return absint($pending[0]['num_comments']);
+		} else { return absint( $pending[0]['num_comments'] );
+		}
 	}
 
 	$pending_keyed = array();
 
 	// Default to zero pending for all posts in request
-	foreach ( $post_id_array as $id )
-		$pending_keyed[$id] = 0;
+	foreach ( $post_id_array as $id ) {
+		$pending_keyed[ $id ] = 0;
+	}
 
-	if ( !empty($pending) )
-		foreach ( $pending as $pend )
-			$pending_keyed[$pend['comment_post_ID']] = absint($pend['num_comments']);
+	if ( ! empty( $pending ) ) {
+		foreach ( $pending as $pend ) {
+			$pending_keyed[ $pend['comment_post_ID'] ] = absint( $pend['num_comments'] );
+		}
+	}
 
 	return $pending_keyed;
 }
@@ -180,8 +191,9 @@
  * @since 2.7.0
  */
 function enqueue_comment_hotkeys_js() {
-	if ( 'true' == get_user_option( 'comment_shortcuts' ) )
+	if ( 'true' == get_user_option( 'comment_shortcuts' ) ) {
 		wp_enqueue_script( 'jquery-table-hotkeys' );
+	}
 }
 
 /**
@@ -193,4 +205,4 @@
 	echo "<div class='wrap'><p>$msg</p></div>";
 	include( ABSPATH . 'wp-admin/admin-footer.php' );
 	die;
-}
\ No newline at end of file
+}
Index: src/wp-admin/includes/continents-cities.php
===================================================================
--- src/wp-admin/includes/continents-cities.php	(revision 40901)
+++ src/wp-admin/includes/continents-cities.php	(working copy)
@@ -9,541 +9,541 @@
  * @since 2.8.0
  */
 
-__('Africa', 'continents-cities');
-__('Abidjan', 'continents-cities');
-__('Accra', 'continents-cities');
-__('Addis Ababa', 'continents-cities');
-__('Algiers', 'continents-cities');
-__('Asmara', 'continents-cities');
-__('Asmera', 'continents-cities');
-__('Bamako', 'continents-cities');
-__('Bangui', 'continents-cities');
-__('Banjul', 'continents-cities');
-__('Bissau', 'continents-cities');
-__('Blantyre', 'continents-cities');
-__('Brazzaville', 'continents-cities');
-__('Bujumbura', 'continents-cities');
-__('Cairo', 'continents-cities');
-__('Casablanca', 'continents-cities');
-__('Ceuta', 'continents-cities');
-__('Conakry', 'continents-cities');
-__('Dakar', 'continents-cities');
-__('Dar es Salaam', 'continents-cities');
-__('Djibouti', 'continents-cities');
-__('Douala', 'continents-cities');
-__('El Aaiun', 'continents-cities');
-__('Freetown', 'continents-cities');
-__('Gaborone', 'continents-cities');
-__('Harare', 'continents-cities');
-__('Johannesburg', 'continents-cities');
-__('Juba', 'continents-cities');
-__('Kampala', 'continents-cities');
-__('Khartoum', 'continents-cities');
-__('Kigali', 'continents-cities');
-__('Kinshasa', 'continents-cities');
-__('Lagos', 'continents-cities');
-__('Libreville', 'continents-cities');
-__('Lome', 'continents-cities');
-__('Luanda', 'continents-cities');
-__('Lubumbashi', 'continents-cities');
-__('Lusaka', 'continents-cities');
-__('Malabo', 'continents-cities');
-__('Maputo', 'continents-cities');
-__('Maseru', 'continents-cities');
-__('Mbabane', 'continents-cities');
-__('Mogadishu', 'continents-cities');
-__('Monrovia', 'continents-cities');
-__('Nairobi', 'continents-cities');
-__('Ndjamena', 'continents-cities');
-__('Niamey', 'continents-cities');
-__('Nouakchott', 'continents-cities');
-__('Ouagadougou', 'continents-cities');
-__('Porto-Novo', 'continents-cities');
-__('Sao Tome', 'continents-cities');
-__('Timbuktu', 'continents-cities');
-__('Tripoli', 'continents-cities');
-__('Tunis', 'continents-cities');
-__('Windhoek', 'continents-cities');
-
-__('America', 'continents-cities');
-__('Adak', 'continents-cities');
-__('Anchorage', 'continents-cities');
-__('Anguilla', 'continents-cities');
-__('Antigua', 'continents-cities');
-__('Araguaina', 'continents-cities');
-__('Argentina', 'continents-cities');
-__('Buenos Aires', 'continents-cities');
-__('Catamarca', 'continents-cities');
-__('ComodRivadavia', 'continents-cities');
-__('Cordoba', 'continents-cities');
-__('Jujuy', 'continents-cities');
-__('La Rioja', 'continents-cities');
-__('Mendoza', 'continents-cities');
-__('Rio Gallegos', 'continents-cities');
-__('Salta', 'continents-cities');
-__('San Juan', 'continents-cities');
-__('San Luis', 'continents-cities');
-__('Tucuman', 'continents-cities');
-__('Ushuaia', 'continents-cities');
-__('Aruba', 'continents-cities');
-__('Asuncion', 'continents-cities');
-__('Atikokan', 'continents-cities');
-__('Atka', 'continents-cities');
-__('Bahia', 'continents-cities');
-__('Bahia Banderas', 'continents-cities');
-__('Barbados', 'continents-cities');
-__('Belem', 'continents-cities');
-__('Belize', 'continents-cities');
-__('Blanc-Sablon', 'continents-cities');
-__('Boa Vista', 'continents-cities');
-__('Bogota', 'continents-cities');
-__('Boise', 'continents-cities');
-__('Buenos Aires', 'continents-cities');
-__('Cambridge Bay', 'continents-cities');
-__('Campo Grande', 'continents-cities');
-__('Cancun', 'continents-cities');
-__('Caracas', 'continents-cities');
-__('Catamarca', 'continents-cities');
-__('Cayenne', 'continents-cities');
-__('Cayman', 'continents-cities');
-__('Chicago', 'continents-cities');
-__('Chihuahua', 'continents-cities');
-__('Coral Harbour', 'continents-cities');
-__('Cordoba', 'continents-cities');
-__('Costa Rica', 'continents-cities');
-__('Creston', 'continents-cities');
-__('Cuiaba', 'continents-cities');
-__('Curacao', 'continents-cities');
-__('Danmarkshavn', 'continents-cities');
-__('Dawson', 'continents-cities');
-__('Dawson Creek', 'continents-cities');
-__('Denver', 'continents-cities');
-__('Detroit', 'continents-cities');
-__('Dominica', 'continents-cities');
-__('Edmonton', 'continents-cities');
-__('Eirunepe', 'continents-cities');
-__('El Salvador', 'continents-cities');
-__('Ensenada', 'continents-cities');
-__('Fort Nelson', 'continents-cities');
-__('Fort Wayne', 'continents-cities');
-__('Fortaleza', 'continents-cities');
-__('Glace Bay', 'continents-cities');
-__('Godthab', 'continents-cities');
-__('Goose Bay', 'continents-cities');
-__('Grand Turk', 'continents-cities');
-__('Grenada', 'continents-cities');
-__('Guadeloupe', 'continents-cities');
-__('Guatemala', 'continents-cities');
-__('Guayaquil', 'continents-cities');
-__('Guyana', 'continents-cities');
-__('Halifax', 'continents-cities');
-__('Havana', 'continents-cities');
-__('Hermosillo', 'continents-cities');
-__('Indiana', 'continents-cities');
-__('Indianapolis', 'continents-cities');
-__('Knox', 'continents-cities');
-__('Marengo', 'continents-cities');
-__('Petersburg', 'continents-cities');
-__('Tell City', 'continents-cities');
-__('Vevay', 'continents-cities');
-__('Vincennes', 'continents-cities');
-__('Winamac', 'continents-cities');
-__('Indianapolis', 'continents-cities');
-__('Inuvik', 'continents-cities');
-__('Iqaluit', 'continents-cities');
-__('Jamaica', 'continents-cities');
-__('Jujuy', 'continents-cities');
-__('Juneau', 'continents-cities');
-__('Kentucky', 'continents-cities');
-__('Louisville', 'continents-cities');
-__('Monticello', 'continents-cities');
-__('Knox IN', 'continents-cities');
-__('Kralendijk', 'continents-cities');
-__('La Paz', 'continents-cities');
-__('Lima', 'continents-cities');
-__('Los Angeles', 'continents-cities');
-__('Louisville', 'continents-cities');
-__('Lower Princes', 'continents-cities');
-__('Maceio', 'continents-cities');
-__('Managua', 'continents-cities');
-__('Manaus', 'continents-cities');
-__('Marigot', 'continents-cities');
-__('Martinique', 'continents-cities');
-__('Matamoros', 'continents-cities');
-__('Mazatlan', 'continents-cities');
-__('Mendoza', 'continents-cities');
-__('Menominee', 'continents-cities');
-__('Merida', 'continents-cities');
-__('Metlakatla', 'continents-cities');
-__('Mexico City', 'continents-cities');
-__('Miquelon', 'continents-cities');
-__('Moncton', 'continents-cities');
-__('Monterrey', 'continents-cities');
-__('Montevideo', 'continents-cities');
-__('Montreal', 'continents-cities');
-__('Montserrat', 'continents-cities');
-__('Nassau', 'continents-cities');
-__('New York', 'continents-cities');
-__('Nipigon', 'continents-cities');
-__('Nome', 'continents-cities');
-__('Noronha', 'continents-cities');
-__('North Dakota', 'continents-cities');
-__('Beulah', 'continents-cities');
-__('Center', 'continents-cities');
-__('New Salem', 'continents-cities');
-__('Ojinaga', 'continents-cities');
-__('Panama', 'continents-cities');
-__('Pangnirtung', 'continents-cities');
-__('Paramaribo', 'continents-cities');
-__('Phoenix', 'continents-cities');
-__('Port of Spain', 'continents-cities');
-__('Port-au-Prince', 'continents-cities');
-__('Porto Acre', 'continents-cities');
-__('Porto Velho', 'continents-cities');
-__('Puerto Rico', 'continents-cities');
-__('Rainy River', 'continents-cities');
-__('Rankin Inlet', 'continents-cities');
-__('Recife', 'continents-cities');
-__('Regina', 'continents-cities');
-__('Resolute', 'continents-cities');
-__('Rio Branco', 'continents-cities');
-__('Rosario', 'continents-cities');
-__('Santa Isabel', 'continents-cities');
-__('Santarem', 'continents-cities');
-__('Santiago', 'continents-cities');
-__('Santo Domingo', 'continents-cities');
-__('Sao Paulo', 'continents-cities');
-__('Scoresbysund', 'continents-cities');
-__('Shiprock', 'continents-cities');
-__('Sitka', 'continents-cities');
-__('St Barthelemy', 'continents-cities');
-__('St Johns', 'continents-cities');
-__('St Kitts', 'continents-cities');
-__('St Lucia', 'continents-cities');
-__('St Thomas', 'continents-cities');
-__('St Vincent', 'continents-cities');
-__('Swift Current', 'continents-cities');
-__('Tegucigalpa', 'continents-cities');
-__('Thule', 'continents-cities');
-__('Thunder Bay', 'continents-cities');
-__('Tijuana', 'continents-cities');
-__('Toronto', 'continents-cities');
-__('Tortola', 'continents-cities');
-__('Vancouver', 'continents-cities');
-__('Virgin', 'continents-cities');
-__('Whitehorse', 'continents-cities');
-__('Winnipeg', 'continents-cities');
-__('Yakutat', 'continents-cities');
-__('Yellowknife', 'continents-cities');
-
-__('Antarctica', 'continents-cities');
-__('Casey', 'continents-cities');
-__('Davis', 'continents-cities');
-__('DumontDUrville', 'continents-cities');
-__('Macquarie', 'continents-cities');
-__('Mawson', 'continents-cities');
-__('McMurdo', 'continents-cities');
-__('Palmer', 'continents-cities');
-__('Rothera', 'continents-cities');
-__('South Pole', 'continents-cities');
-__('Syowa', 'continents-cities');
-__('Troll', 'continents-cities');
-__('Vostok', 'continents-cities');
-
-__('Arctic', 'continents-cities');
-__('Longyearbyen', 'continents-cities');
-
-__('Asia', 'continents-cities');
-__('Aden', 'continents-cities');
-__('Almaty', 'continents-cities');
-__('Amman', 'continents-cities');
-__('Anadyr', 'continents-cities');
-__('Aqtau', 'continents-cities');
-__('Aqtobe', 'continents-cities');
-__('Ashgabat', 'continents-cities');
-__('Ashkhabad', 'continents-cities');
-__('Baghdad', 'continents-cities');
-__('Bahrain', 'continents-cities');
-__('Baku', 'continents-cities');
-__('Bangkok', 'continents-cities');
-__('Barnaul', 'continents-cities');
-__('Beirut', 'continents-cities');
-__('Bishkek', 'continents-cities');
-__('Brunei', 'continents-cities');
-__('Calcutta', 'continents-cities');
-__('Chita', 'continents-cities');
-__('Choibalsan', 'continents-cities');
-__('Chongqing', 'continents-cities');
-__('Chungking', 'continents-cities');
-__('Colombo', 'continents-cities');
-__('Dacca', 'continents-cities');
-__('Damascus', 'continents-cities');
-__('Dhaka', 'continents-cities');
-__('Dili', 'continents-cities');
-__('Dubai', 'continents-cities');
-__('Dushanbe', 'continents-cities');
-__('Gaza', 'continents-cities');
-__('Harbin', 'continents-cities');
-__('Hebron', 'continents-cities');
-__('Ho Chi Minh', 'continents-cities');
-__('Hong Kong', 'continents-cities');
-__('Hovd', 'continents-cities');
-__('Irkutsk', 'continents-cities');
-__('Istanbul', 'continents-cities');
-__('Jakarta', 'continents-cities');
-__('Jayapura', 'continents-cities');
-__('Jerusalem', 'continents-cities');
-__('Kabul', 'continents-cities');
-__('Kamchatka', 'continents-cities');
-__('Karachi', 'continents-cities');
-__('Kashgar', 'continents-cities');
-__('Kathmandu', 'continents-cities');
-__('Katmandu', 'continents-cities');
-__('Khandyga', 'continents-cities');
-__('Kolkata', 'continents-cities');
-__('Krasnoyarsk', 'continents-cities');
-__('Kuala Lumpur', 'continents-cities');
-__('Kuching', 'continents-cities');
-__('Kuwait', 'continents-cities');
-__('Macao', 'continents-cities');
-__('Macau', 'continents-cities');
-__('Magadan', 'continents-cities');
-__('Makassar', 'continents-cities');
-__('Manila', 'continents-cities');
-__('Muscat', 'continents-cities');
-__('Nicosia', 'continents-cities');
-__('Novokuznetsk', 'continents-cities');
-__('Novosibirsk', 'continents-cities');
-__('Omsk', 'continents-cities');
-__('Oral', 'continents-cities');
-__('Phnom Penh', 'continents-cities');
-__('Pontianak', 'continents-cities');
-__('Pyongyang', 'continents-cities');
-__('Qatar', 'continents-cities');
-__('Qyzylorda', 'continents-cities');
-__('Rangoon', 'continents-cities');
-__('Riyadh', 'continents-cities');
-__('Saigon', 'continents-cities');
-__('Sakhalin', 'continents-cities');
-__('Samarkand', 'continents-cities');
-__('Seoul', 'continents-cities');
-__('Shanghai', 'continents-cities');
-__('Singapore', 'continents-cities');
-__('Srednekolymsk', 'continents-cities');
-__('Taipei', 'continents-cities');
-__('Tashkent', 'continents-cities');
-__('Tbilisi', 'continents-cities');
-__('Tehran', 'continents-cities');
-__('Tel Aviv', 'continents-cities');
-__('Thimbu', 'continents-cities');
-__('Thimphu', 'continents-cities');
-__('Tokyo', 'continents-cities');
-__('Tomsk', 'continents-cities');
-__('Ujung Pandang', 'continents-cities');
-__('Ulaanbaatar', 'continents-cities');
-__('Ulan Bator', 'continents-cities');
-__('Urumqi', 'continents-cities');
-__('Ust-Nera', 'continents-cities');
-__('Vientiane', 'continents-cities');
-__('Vladivostok', 'continents-cities');
-__('Yakutsk', 'continents-cities');
-__('Yekaterinburg', 'continents-cities');
-__('Yerevan', 'continents-cities');
-
-__('Atlantic', 'continents-cities');
-__('Azores', 'continents-cities');
-__('Bermuda', 'continents-cities');
-__('Canary', 'continents-cities');
-__('Cape Verde', 'continents-cities');
-__('Faeroe', 'continents-cities');
-__('Faroe', 'continents-cities');
-__('Jan Mayen', 'continents-cities');
-__('Madeira', 'continents-cities');
-__('Reykjavik', 'continents-cities');
-__('South Georgia', 'continents-cities');
-__('St Helena', 'continents-cities');
-__('Stanley', 'continents-cities');
-
-__('Australia', 'continents-cities');
-__('ACT', 'continents-cities');
-__('Adelaide', 'continents-cities');
-__('Brisbane', 'continents-cities');
-__('Broken Hill', 'continents-cities');
-__('Canberra', 'continents-cities');
-__('Currie', 'continents-cities');
-__('Darwin', 'continents-cities');
-__('Eucla', 'continents-cities');
-__('Hobart', 'continents-cities');
-__('LHI', 'continents-cities');
-__('Lindeman', 'continents-cities');
-__('Lord Howe', 'continents-cities');
-__('Melbourne', 'continents-cities');
-__('NSW', 'continents-cities');
-__('North', 'continents-cities');
-__('Perth', 'continents-cities');
-__('Queensland', 'continents-cities');
-__('South', 'continents-cities');
-__('Sydney', 'continents-cities');
-__('Tasmania', 'continents-cities');
-__('Victoria', 'continents-cities');
-__('West', 'continents-cities');
-__('Yancowinna', 'continents-cities');
-
-__('Etc', 'continents-cities');
-__('GMT', 'continents-cities');
-__('GMT+0', 'continents-cities');
-__('GMT+1', 'continents-cities');
-__('GMT+10', 'continents-cities');
-__('GMT+11', 'continents-cities');
-__('GMT+12', 'continents-cities');
-__('GMT+2', 'continents-cities');
-__('GMT+3', 'continents-cities');
-__('GMT+4', 'continents-cities');
-__('GMT+5', 'continents-cities');
-__('GMT+6', 'continents-cities');
-__('GMT+7', 'continents-cities');
-__('GMT+8', 'continents-cities');
-__('GMT+9', 'continents-cities');
-__('GMT-0', 'continents-cities');
-__('GMT-1', 'continents-cities');
-__('GMT-10', 'continents-cities');
-__('GMT-11', 'continents-cities');
-__('GMT-12', 'continents-cities');
-__('GMT-13', 'continents-cities');
-__('GMT-14', 'continents-cities');
-__('GMT-2', 'continents-cities');
-__('GMT-3', 'continents-cities');
-__('GMT-4', 'continents-cities');
-__('GMT-5', 'continents-cities');
-__('GMT-6', 'continents-cities');
-__('GMT-7', 'continents-cities');
-__('GMT-8', 'continents-cities');
-__('GMT-9', 'continents-cities');
-__('GMT0', 'continents-cities');
-__('Greenwich', 'continents-cities');
-__('UCT', 'continents-cities');
-__('UTC', 'continents-cities');
-__('Universal', 'continents-cities');
-__('Zulu', 'continents-cities');
-
-__('Europe', 'continents-cities');
-__('Amsterdam', 'continents-cities');
-__('Andorra', 'continents-cities');
-__('Astrakhan', 'continents-cities');
-__('Athens', 'continents-cities');
-__('Belfast', 'continents-cities');
-__('Belgrade', 'continents-cities');
-__('Berlin', 'continents-cities');
-__('Bratislava', 'continents-cities');
-__('Brussels', 'continents-cities');
-__('Bucharest', 'continents-cities');
-__('Budapest', 'continents-cities');
-__('Busingen', 'continents-cities');
-__('Chisinau', 'continents-cities');
-__('Copenhagen', 'continents-cities');
-__('Dublin', 'continents-cities');
-__('Gibraltar', 'continents-cities');
-__('Guernsey', 'continents-cities');
-__('Helsinki', 'continents-cities');
-__('Isle of Man', 'continents-cities');
-__('Istanbul', 'continents-cities');
-__('Jersey', 'continents-cities');
-__('Kaliningrad', 'continents-cities');
-__('Kiev', 'continents-cities');
-__('Kirov', 'continents-cities');
-__('Lisbon', 'continents-cities');
-__('Ljubljana', 'continents-cities');
-__('London', 'continents-cities');
-__('Luxembourg', 'continents-cities');
-__('Madrid', 'continents-cities');
-__('Malta', 'continents-cities');
-__('Mariehamn', 'continents-cities');
-__('Minsk', 'continents-cities');
-__('Monaco', 'continents-cities');
-__('Moscow', 'continents-cities');
-__('Nicosia', 'continents-cities');
-__('Oslo', 'continents-cities');
-__('Paris', 'continents-cities');
-__('Podgorica', 'continents-cities');
-__('Prague', 'continents-cities');
-__('Riga', 'continents-cities');
-__('Rome', 'continents-cities');
-__('Samara', 'continents-cities');
-__('San Marino', 'continents-cities');
-__('Sarajevo', 'continents-cities');
-__('Simferopol', 'continents-cities');
-__('Skopje', 'continents-cities');
-__('Sofia', 'continents-cities');
-__('Stockholm', 'continents-cities');
-__('Tallinn', 'continents-cities');
-__('Tirane', 'continents-cities');
-__('Tiraspol', 'continents-cities');
-__('Ulyanovsk', 'continents-cities');
-__('Uzhgorod', 'continents-cities');
-__('Vaduz', 'continents-cities');
-__('Vatican', 'continents-cities');
-__('Vienna', 'continents-cities');
-__('Vilnius', 'continents-cities');
-__('Volgograd', 'continents-cities');
-__('Warsaw', 'continents-cities');
-__('Zagreb', 'continents-cities');
-__('Zaporozhye', 'continents-cities');
-__('Zurich', 'continents-cities');
-
-__('Indian', 'continents-cities');
-__('Antananarivo', 'continents-cities');
-__('Chagos', 'continents-cities');
-__('Christmas', 'continents-cities');
-__('Cocos', 'continents-cities');
-__('Comoro', 'continents-cities');
-__('Kerguelen', 'continents-cities');
-__('Mahe', 'continents-cities');
-__('Maldives', 'continents-cities');
-__('Mauritius', 'continents-cities');
-__('Mayotte', 'continents-cities');
-__('Reunion', 'continents-cities');
-
-__('Pacific', 'continents-cities');
-__('Apia', 'continents-cities');
-__('Auckland', 'continents-cities');
-__('Bougainville', 'continents-cities');
-__('Chatham', 'continents-cities');
-__('Chuuk', 'continents-cities');
-__('Easter', 'continents-cities');
-__('Efate', 'continents-cities');
-__('Enderbury', 'continents-cities');
-__('Fakaofo', 'continents-cities');
-__('Fiji', 'continents-cities');
-__('Funafuti', 'continents-cities');
-__('Galapagos', 'continents-cities');
-__('Gambier', 'continents-cities');
-__('Guadalcanal', 'continents-cities');
-__('Guam', 'continents-cities');
-__('Honolulu', 'continents-cities');
-__('Johnston', 'continents-cities');
-__('Kiritimati', 'continents-cities');
-__('Kosrae', 'continents-cities');
-__('Kwajalein', 'continents-cities');
-__('Majuro', 'continents-cities');
-__('Marquesas', 'continents-cities');
-__('Midway', 'continents-cities');
-__('Nauru', 'continents-cities');
-__('Niue', 'continents-cities');
-__('Norfolk', 'continents-cities');
-__('Noumea', 'continents-cities');
-__('Pago Pago', 'continents-cities');
-__('Palau', 'continents-cities');
-__('Pitcairn', 'continents-cities');
-__('Pohnpei', 'continents-cities');
-__('Ponape', 'continents-cities');
-__('Port Moresby', 'continents-cities');
-__('Rarotonga', 'continents-cities');
-__('Saipan', 'continents-cities');
-__('Samoa', 'continents-cities');
-__('Tahiti', 'continents-cities');
-__('Tarawa', 'continents-cities');
-__('Tongatapu', 'continents-cities');
-__('Truk', 'continents-cities');
-__('Wake', 'continents-cities');
-__('Wallis', 'continents-cities');
-__('Yap', 'continents-cities');
+__( 'Africa', 'continents-cities' );
+__( 'Abidjan', 'continents-cities' );
+__( 'Accra', 'continents-cities' );
+__( 'Addis Ababa', 'continents-cities' );
+__( 'Algiers', 'continents-cities' );
+__( 'Asmara', 'continents-cities' );
+__( 'Asmera', 'continents-cities' );
+__( 'Bamako', 'continents-cities' );
+__( 'Bangui', 'continents-cities' );
+__( 'Banjul', 'continents-cities' );
+__( 'Bissau', 'continents-cities' );
+__( 'Blantyre', 'continents-cities' );
+__( 'Brazzaville', 'continents-cities' );
+__( 'Bujumbura', 'continents-cities' );
+__( 'Cairo', 'continents-cities' );
+__( 'Casablanca', 'continents-cities' );
+__( 'Ceuta', 'continents-cities' );
+__( 'Conakry', 'continents-cities' );
+__( 'Dakar', 'continents-cities' );
+__( 'Dar es Salaam', 'continents-cities' );
+__( 'Djibouti', 'continents-cities' );
+__( 'Douala', 'continents-cities' );
+__( 'El Aaiun', 'continents-cities' );
+__( 'Freetown', 'continents-cities' );
+__( 'Gaborone', 'continents-cities' );
+__( 'Harare', 'continents-cities' );
+__( 'Johannesburg', 'continents-cities' );
+__( 'Juba', 'continents-cities' );
+__( 'Kampala', 'continents-cities' );
+__( 'Khartoum', 'continents-cities' );
+__( 'Kigali', 'continents-cities' );
+__( 'Kinshasa', 'continents-cities' );
+__( 'Lagos', 'continents-cities' );
+__( 'Libreville', 'continents-cities' );
+__( 'Lome', 'continents-cities' );
+__( 'Luanda', 'continents-cities' );
+__( 'Lubumbashi', 'continents-cities' );
+__( 'Lusaka', 'continents-cities' );
+__( 'Malabo', 'continents-cities' );
+__( 'Maputo', 'continents-cities' );
+__( 'Maseru', 'continents-cities' );
+__( 'Mbabane', 'continents-cities' );
+__( 'Mogadishu', 'continents-cities' );
+__( 'Monrovia', 'continents-cities' );
+__( 'Nairobi', 'continents-cities' );
+__( 'Ndjamena', 'continents-cities' );
+__( 'Niamey', 'continents-cities' );
+__( 'Nouakchott', 'continents-cities' );
+__( 'Ouagadougou', 'continents-cities' );
+__( 'Porto-Novo', 'continents-cities' );
+__( 'Sao Tome', 'continents-cities' );
+__( 'Timbuktu', 'continents-cities' );
+__( 'Tripoli', 'continents-cities' );
+__( 'Tunis', 'continents-cities' );
+__( 'Windhoek', 'continents-cities' );
+
+__( 'America', 'continents-cities' );
+__( 'Adak', 'continents-cities' );
+__( 'Anchorage', 'continents-cities' );
+__( 'Anguilla', 'continents-cities' );
+__( 'Antigua', 'continents-cities' );
+__( 'Araguaina', 'continents-cities' );
+__( 'Argentina', 'continents-cities' );
+__( 'Buenos Aires', 'continents-cities' );
+__( 'Catamarca', 'continents-cities' );
+__( 'ComodRivadavia', 'continents-cities' );
+__( 'Cordoba', 'continents-cities' );
+__( 'Jujuy', 'continents-cities' );
+__( 'La Rioja', 'continents-cities' );
+__( 'Mendoza', 'continents-cities' );
+__( 'Rio Gallegos', 'continents-cities' );
+__( 'Salta', 'continents-cities' );
+__( 'San Juan', 'continents-cities' );
+__( 'San Luis', 'continents-cities' );
+__( 'Tucuman', 'continents-cities' );
+__( 'Ushuaia', 'continents-cities' );
+__( 'Aruba', 'continents-cities' );
+__( 'Asuncion', 'continents-cities' );
+__( 'Atikokan', 'continents-cities' );
+__( 'Atka', 'continents-cities' );
+__( 'Bahia', 'continents-cities' );
+__( 'Bahia Banderas', 'continents-cities' );
+__( 'Barbados', 'continents-cities' );
+__( 'Belem', 'continents-cities' );
+__( 'Belize', 'continents-cities' );
+__( 'Blanc-Sablon', 'continents-cities' );
+__( 'Boa Vista', 'continents-cities' );
+__( 'Bogota', 'continents-cities' );
+__( 'Boise', 'continents-cities' );
+__( 'Buenos Aires', 'continents-cities' );
+__( 'Cambridge Bay', 'continents-cities' );
+__( 'Campo Grande', 'continents-cities' );
+__( 'Cancun', 'continents-cities' );
+__( 'Caracas', 'continents-cities' );
+__( 'Catamarca', 'continents-cities' );
+__( 'Cayenne', 'continents-cities' );
+__( 'Cayman', 'continents-cities' );
+__( 'Chicago', 'continents-cities' );
+__( 'Chihuahua', 'continents-cities' );
+__( 'Coral Harbour', 'continents-cities' );
+__( 'Cordoba', 'continents-cities' );
+__( 'Costa Rica', 'continents-cities' );
+__( 'Creston', 'continents-cities' );
+__( 'Cuiaba', 'continents-cities' );
+__( 'Curacao', 'continents-cities' );
+__( 'Danmarkshavn', 'continents-cities' );
+__( 'Dawson', 'continents-cities' );
+__( 'Dawson Creek', 'continents-cities' );
+__( 'Denver', 'continents-cities' );
+__( 'Detroit', 'continents-cities' );
+__( 'Dominica', 'continents-cities' );
+__( 'Edmonton', 'continents-cities' );
+__( 'Eirunepe', 'continents-cities' );
+__( 'El Salvador', 'continents-cities' );
+__( 'Ensenada', 'continents-cities' );
+__( 'Fort Nelson', 'continents-cities' );
+__( 'Fort Wayne', 'continents-cities' );
+__( 'Fortaleza', 'continents-cities' );
+__( 'Glace Bay', 'continents-cities' );
+__( 'Godthab', 'continents-cities' );
+__( 'Goose Bay', 'continents-cities' );
+__( 'Grand Turk', 'continents-cities' );
+__( 'Grenada', 'continents-cities' );
+__( 'Guadeloupe', 'continents-cities' );
+__( 'Guatemala', 'continents-cities' );
+__( 'Guayaquil', 'continents-cities' );
+__( 'Guyana', 'continents-cities' );
+__( 'Halifax', 'continents-cities' );
+__( 'Havana', 'continents-cities' );
+__( 'Hermosillo', 'continents-cities' );
+__( 'Indiana', 'continents-cities' );
+__( 'Indianapolis', 'continents-cities' );
+__( 'Knox', 'continents-cities' );
+__( 'Marengo', 'continents-cities' );
+__( 'Petersburg', 'continents-cities' );
+__( 'Tell City', 'continents-cities' );
+__( 'Vevay', 'continents-cities' );
+__( 'Vincennes', 'continents-cities' );
+__( 'Winamac', 'continents-cities' );
+__( 'Indianapolis', 'continents-cities' );
+__( 'Inuvik', 'continents-cities' );
+__( 'Iqaluit', 'continents-cities' );
+__( 'Jamaica', 'continents-cities' );
+__( 'Jujuy', 'continents-cities' );
+__( 'Juneau', 'continents-cities' );
+__( 'Kentucky', 'continents-cities' );
+__( 'Louisville', 'continents-cities' );
+__( 'Monticello', 'continents-cities' );
+__( 'Knox IN', 'continents-cities' );
+__( 'Kralendijk', 'continents-cities' );
+__( 'La Paz', 'continents-cities' );
+__( 'Lima', 'continents-cities' );
+__( 'Los Angeles', 'continents-cities' );
+__( 'Louisville', 'continents-cities' );
+__( 'Lower Princes', 'continents-cities' );
+__( 'Maceio', 'continents-cities' );
+__( 'Managua', 'continents-cities' );
+__( 'Manaus', 'continents-cities' );
+__( 'Marigot', 'continents-cities' );
+__( 'Martinique', 'continents-cities' );
+__( 'Matamoros', 'continents-cities' );
+__( 'Mazatlan', 'continents-cities' );
+__( 'Mendoza', 'continents-cities' );
+__( 'Menominee', 'continents-cities' );
+__( 'Merida', 'continents-cities' );
+__( 'Metlakatla', 'continents-cities' );
+__( 'Mexico City', 'continents-cities' );
+__( 'Miquelon', 'continents-cities' );
+__( 'Moncton', 'continents-cities' );
+__( 'Monterrey', 'continents-cities' );
+__( 'Montevideo', 'continents-cities' );
+__( 'Montreal', 'continents-cities' );
+__( 'Montserrat', 'continents-cities' );
+__( 'Nassau', 'continents-cities' );
+__( 'New York', 'continents-cities' );
+__( 'Nipigon', 'continents-cities' );
+__( 'Nome', 'continents-cities' );
+__( 'Noronha', 'continents-cities' );
+__( 'North Dakota', 'continents-cities' );
+__( 'Beulah', 'continents-cities' );
+__( 'Center', 'continents-cities' );
+__( 'New Salem', 'continents-cities' );
+__( 'Ojinaga', 'continents-cities' );
+__( 'Panama', 'continents-cities' );
+__( 'Pangnirtung', 'continents-cities' );
+__( 'Paramaribo', 'continents-cities' );
+__( 'Phoenix', 'continents-cities' );
+__( 'Port of Spain', 'continents-cities' );
+__( 'Port-au-Prince', 'continents-cities' );
+__( 'Porto Acre', 'continents-cities' );
+__( 'Porto Velho', 'continents-cities' );
+__( 'Puerto Rico', 'continents-cities' );
+__( 'Rainy River', 'continents-cities' );
+__( 'Rankin Inlet', 'continents-cities' );
+__( 'Recife', 'continents-cities' );
+__( 'Regina', 'continents-cities' );
+__( 'Resolute', 'continents-cities' );
+__( 'Rio Branco', 'continents-cities' );
+__( 'Rosario', 'continents-cities' );
+__( 'Santa Isabel', 'continents-cities' );
+__( 'Santarem', 'continents-cities' );
+__( 'Santiago', 'continents-cities' );
+__( 'Santo Domingo', 'continents-cities' );
+__( 'Sao Paulo', 'continents-cities' );
+__( 'Scoresbysund', 'continents-cities' );
+__( 'Shiprock', 'continents-cities' );
+__( 'Sitka', 'continents-cities' );
+__( 'St Barthelemy', 'continents-cities' );
+__( 'St Johns', 'continents-cities' );
+__( 'St Kitts', 'continents-cities' );
+__( 'St Lucia', 'continents-cities' );
+__( 'St Thomas', 'continents-cities' );
+__( 'St Vincent', 'continents-cities' );
+__( 'Swift Current', 'continents-cities' );
+__( 'Tegucigalpa', 'continents-cities' );
+__( 'Thule', 'continents-cities' );
+__( 'Thunder Bay', 'continents-cities' );
+__( 'Tijuana', 'continents-cities' );
+__( 'Toronto', 'continents-cities' );
+__( 'Tortola', 'continents-cities' );
+__( 'Vancouver', 'continents-cities' );
+__( 'Virgin', 'continents-cities' );
+__( 'Whitehorse', 'continents-cities' );
+__( 'Winnipeg', 'continents-cities' );
+__( 'Yakutat', 'continents-cities' );
+__( 'Yellowknife', 'continents-cities' );
+
+__( 'Antarctica', 'continents-cities' );
+__( 'Casey', 'continents-cities' );
+__( 'Davis', 'continents-cities' );
+__( 'DumontDUrville', 'continents-cities' );
+__( 'Macquarie', 'continents-cities' );
+__( 'Mawson', 'continents-cities' );
+__( 'McMurdo', 'continents-cities' );
+__( 'Palmer', 'continents-cities' );
+__( 'Rothera', 'continents-cities' );
+__( 'South Pole', 'continents-cities' );
+__( 'Syowa', 'continents-cities' );
+__( 'Troll', 'continents-cities' );
+__( 'Vostok', 'continents-cities' );
+
+__( 'Arctic', 'continents-cities' );
+__( 'Longyearbyen', 'continents-cities' );
+
+__( 'Asia', 'continents-cities' );
+__( 'Aden', 'continents-cities' );
+__( 'Almaty', 'continents-cities' );
+__( 'Amman', 'continents-cities' );
+__( 'Anadyr', 'continents-cities' );
+__( 'Aqtau', 'continents-cities' );
+__( 'Aqtobe', 'continents-cities' );
+__( 'Ashgabat', 'continents-cities' );
+__( 'Ashkhabad', 'continents-cities' );
+__( 'Baghdad', 'continents-cities' );
+__( 'Bahrain', 'continents-cities' );
+__( 'Baku', 'continents-cities' );
+__( 'Bangkok', 'continents-cities' );
+__( 'Barnaul', 'continents-cities' );
+__( 'Beirut', 'continents-cities' );
+__( 'Bishkek', 'continents-cities' );
+__( 'Brunei', 'continents-cities' );
+__( 'Calcutta', 'continents-cities' );
+__( 'Chita', 'continents-cities' );
+__( 'Choibalsan', 'continents-cities' );
+__( 'Chongqing', 'continents-cities' );
+__( 'Chungking', 'continents-cities' );
+__( 'Colombo', 'continents-cities' );
+__( 'Dacca', 'continents-cities' );
+__( 'Damascus', 'continents-cities' );
+__( 'Dhaka', 'continents-cities' );
+__( 'Dili', 'continents-cities' );
+__( 'Dubai', 'continents-cities' );
+__( 'Dushanbe', 'continents-cities' );
+__( 'Gaza', 'continents-cities' );
+__( 'Harbin', 'continents-cities' );
+__( 'Hebron', 'continents-cities' );
+__( 'Ho Chi Minh', 'continents-cities' );
+__( 'Hong Kong', 'continents-cities' );
+__( 'Hovd', 'continents-cities' );
+__( 'Irkutsk', 'continents-cities' );
+__( 'Istanbul', 'continents-cities' );
+__( 'Jakarta', 'continents-cities' );
+__( 'Jayapura', 'continents-cities' );
+__( 'Jerusalem', 'continents-cities' );
+__( 'Kabul', 'continents-cities' );
+__( 'Kamchatka', 'continents-cities' );
+__( 'Karachi', 'continents-cities' );
+__( 'Kashgar', 'continents-cities' );
+__( 'Kathmandu', 'continents-cities' );
+__( 'Katmandu', 'continents-cities' );
+__( 'Khandyga', 'continents-cities' );
+__( 'Kolkata', 'continents-cities' );
+__( 'Krasnoyarsk', 'continents-cities' );
+__( 'Kuala Lumpur', 'continents-cities' );
+__( 'Kuching', 'continents-cities' );
+__( 'Kuwait', 'continents-cities' );
+__( 'Macao', 'continents-cities' );
+__( 'Macau', 'continents-cities' );
+__( 'Magadan', 'continents-cities' );
+__( 'Makassar', 'continents-cities' );
+__( 'Manila', 'continents-cities' );
+__( 'Muscat', 'continents-cities' );
+__( 'Nicosia', 'continents-cities' );
+__( 'Novokuznetsk', 'continents-cities' );
+__( 'Novosibirsk', 'continents-cities' );
+__( 'Omsk', 'continents-cities' );
+__( 'Oral', 'continents-cities' );
+__( 'Phnom Penh', 'continents-cities' );
+__( 'Pontianak', 'continents-cities' );
+__( 'Pyongyang', 'continents-cities' );
+__( 'Qatar', 'continents-cities' );
+__( 'Qyzylorda', 'continents-cities' );
+__( 'Rangoon', 'continents-cities' );
+__( 'Riyadh', 'continents-cities' );
+__( 'Saigon', 'continents-cities' );
+__( 'Sakhalin', 'continents-cities' );
+__( 'Samarkand', 'continents-cities' );
+__( 'Seoul', 'continents-cities' );
+__( 'Shanghai', 'continents-cities' );
+__( 'Singapore', 'continents-cities' );
+__( 'Srednekolymsk', 'continents-cities' );
+__( 'Taipei', 'continents-cities' );
+__( 'Tashkent', 'continents-cities' );
+__( 'Tbilisi', 'continents-cities' );
+__( 'Tehran', 'continents-cities' );
+__( 'Tel Aviv', 'continents-cities' );
+__( 'Thimbu', 'continents-cities' );
+__( 'Thimphu', 'continents-cities' );
+__( 'Tokyo', 'continents-cities' );
+__( 'Tomsk', 'continents-cities' );
+__( 'Ujung Pandang', 'continents-cities' );
+__( 'Ulaanbaatar', 'continents-cities' );
+__( 'Ulan Bator', 'continents-cities' );
+__( 'Urumqi', 'continents-cities' );
+__( 'Ust-Nera', 'continents-cities' );
+__( 'Vientiane', 'continents-cities' );
+__( 'Vladivostok', 'continents-cities' );
+__( 'Yakutsk', 'continents-cities' );
+__( 'Yekaterinburg', 'continents-cities' );
+__( 'Yerevan', 'continents-cities' );
+
+__( 'Atlantic', 'continents-cities' );
+__( 'Azores', 'continents-cities' );
+__( 'Bermuda', 'continents-cities' );
+__( 'Canary', 'continents-cities' );
+__( 'Cape Verde', 'continents-cities' );
+__( 'Faeroe', 'continents-cities' );
+__( 'Faroe', 'continents-cities' );
+__( 'Jan Mayen', 'continents-cities' );
+__( 'Madeira', 'continents-cities' );
+__( 'Reykjavik', 'continents-cities' );
+__( 'South Georgia', 'continents-cities' );
+__( 'St Helena', 'continents-cities' );
+__( 'Stanley', 'continents-cities' );
+
+__( 'Australia', 'continents-cities' );
+__( 'ACT', 'continents-cities' );
+__( 'Adelaide', 'continents-cities' );
+__( 'Brisbane', 'continents-cities' );
+__( 'Broken Hill', 'continents-cities' );
+__( 'Canberra', 'continents-cities' );
+__( 'Currie', 'continents-cities' );
+__( 'Darwin', 'continents-cities' );
+__( 'Eucla', 'continents-cities' );
+__( 'Hobart', 'continents-cities' );
+__( 'LHI', 'continents-cities' );
+__( 'Lindeman', 'continents-cities' );
+__( 'Lord Howe', 'continents-cities' );
+__( 'Melbourne', 'continents-cities' );
+__( 'NSW', 'continents-cities' );
+__( 'North', 'continents-cities' );
+__( 'Perth', 'continents-cities' );
+__( 'Queensland', 'continents-cities' );
+__( 'South', 'continents-cities' );
+__( 'Sydney', 'continents-cities' );
+__( 'Tasmania', 'continents-cities' );
+__( 'Victoria', 'continents-cities' );
+__( 'West', 'continents-cities' );
+__( 'Yancowinna', 'continents-cities' );
+
+__( 'Etc', 'continents-cities' );
+__( 'GMT', 'continents-cities' );
+__( 'GMT+0', 'continents-cities' );
+__( 'GMT+1', 'continents-cities' );
+__( 'GMT+10', 'continents-cities' );
+__( 'GMT+11', 'continents-cities' );
+__( 'GMT+12', 'continents-cities' );
+__( 'GMT+2', 'continents-cities' );
+__( 'GMT+3', 'continents-cities' );
+__( 'GMT+4', 'continents-cities' );
+__( 'GMT+5', 'continents-cities' );
+__( 'GMT+6', 'continents-cities' );
+__( 'GMT+7', 'continents-cities' );
+__( 'GMT+8', 'continents-cities' );
+__( 'GMT+9', 'continents-cities' );
+__( 'GMT-0', 'continents-cities' );
+__( 'GMT-1', 'continents-cities' );
+__( 'GMT-10', 'continents-cities' );
+__( 'GMT-11', 'continents-cities' );
+__( 'GMT-12', 'continents-cities' );
+__( 'GMT-13', 'continents-cities' );
+__( 'GMT-14', 'continents-cities' );
+__( 'GMT-2', 'continents-cities' );
+__( 'GMT-3', 'continents-cities' );
+__( 'GMT-4', 'continents-cities' );
+__( 'GMT-5', 'continents-cities' );
+__( 'GMT-6', 'continents-cities' );
+__( 'GMT-7', 'continents-cities' );
+__( 'GMT-8', 'continents-cities' );
+__( 'GMT-9', 'continents-cities' );
+__( 'GMT0', 'continents-cities' );
+__( 'Greenwich', 'continents-cities' );
+__( 'UCT', 'continents-cities' );
+__( 'UTC', 'continents-cities' );
+__( 'Universal', 'continents-cities' );
+__( 'Zulu', 'continents-cities' );
+
+__( 'Europe', 'continents-cities' );
+__( 'Amsterdam', 'continents-cities' );
+__( 'Andorra', 'continents-cities' );
+__( 'Astrakhan', 'continents-cities' );
+__( 'Athens', 'continents-cities' );
+__( 'Belfast', 'continents-cities' );
+__( 'Belgrade', 'continents-cities' );
+__( 'Berlin', 'continents-cities' );
+__( 'Bratislava', 'continents-cities' );
+__( 'Brussels', 'continents-cities' );
+__( 'Bucharest', 'continents-cities' );
+__( 'Budapest', 'continents-cities' );
+__( 'Busingen', 'continents-cities' );
+__( 'Chisinau', 'continents-cities' );
+__( 'Copenhagen', 'continents-cities' );
+__( 'Dublin', 'continents-cities' );
+__( 'Gibraltar', 'continents-cities' );
+__( 'Guernsey', 'continents-cities' );
+__( 'Helsinki', 'continents-cities' );
+__( 'Isle of Man', 'continents-cities' );
+__( 'Istanbul', 'continents-cities' );
+__( 'Jersey', 'continents-cities' );
+__( 'Kaliningrad', 'continents-cities' );
+__( 'Kiev', 'continents-cities' );
+__( 'Kirov', 'continents-cities' );
+__( 'Lisbon', 'continents-cities' );
+__( 'Ljubljana', 'continents-cities' );
+__( 'London', 'continents-cities' );
+__( 'Luxembourg', 'continents-cities' );
+__( 'Madrid', 'continents-cities' );
+__( 'Malta', 'continents-cities' );
+__( 'Mariehamn', 'continents-cities' );
+__( 'Minsk', 'continents-cities' );
+__( 'Monaco', 'continents-cities' );
+__( 'Moscow', 'continents-cities' );
+__( 'Nicosia', 'continents-cities' );
+__( 'Oslo', 'continents-cities' );
+__( 'Paris', 'continents-cities' );
+__( 'Podgorica', 'continents-cities' );
+__( 'Prague', 'continents-cities' );
+__( 'Riga', 'continents-cities' );
+__( 'Rome', 'continents-cities' );
+__( 'Samara', 'continents-cities' );
+__( 'San Marino', 'continents-cities' );
+__( 'Sarajevo', 'continents-cities' );
+__( 'Simferopol', 'continents-cities' );
+__( 'Skopje', 'continents-cities' );
+__( 'Sofia', 'continents-cities' );
+__( 'Stockholm', 'continents-cities' );
+__( 'Tallinn', 'continents-cities' );
+__( 'Tirane', 'continents-cities' );
+__( 'Tiraspol', 'continents-cities' );
+__( 'Ulyanovsk', 'continents-cities' );
+__( 'Uzhgorod', 'continents-cities' );
+__( 'Vaduz', 'continents-cities' );
+__( 'Vatican', 'continents-cities' );
+__( 'Vienna', 'continents-cities' );
+__( 'Vilnius', 'continents-cities' );
+__( 'Volgograd', 'continents-cities' );
+__( 'Warsaw', 'continents-cities' );
+__( 'Zagreb', 'continents-cities' );
+__( 'Zaporozhye', 'continents-cities' );
+__( 'Zurich', 'continents-cities' );
+
+__( 'Indian', 'continents-cities' );
+__( 'Antananarivo', 'continents-cities' );
+__( 'Chagos', 'continents-cities' );
+__( 'Christmas', 'continents-cities' );
+__( 'Cocos', 'continents-cities' );
+__( 'Comoro', 'continents-cities' );
+__( 'Kerguelen', 'continents-cities' );
+__( 'Mahe', 'continents-cities' );
+__( 'Maldives', 'continents-cities' );
+__( 'Mauritius', 'continents-cities' );
+__( 'Mayotte', 'continents-cities' );
+__( 'Reunion', 'continents-cities' );
+
+__( 'Pacific', 'continents-cities' );
+__( 'Apia', 'continents-cities' );
+__( 'Auckland', 'continents-cities' );
+__( 'Bougainville', 'continents-cities' );
+__( 'Chatham', 'continents-cities' );
+__( 'Chuuk', 'continents-cities' );
+__( 'Easter', 'continents-cities' );
+__( 'Efate', 'continents-cities' );
+__( 'Enderbury', 'continents-cities' );
+__( 'Fakaofo', 'continents-cities' );
+__( 'Fiji', 'continents-cities' );
+__( 'Funafuti', 'continents-cities' );
+__( 'Galapagos', 'continents-cities' );
+__( 'Gambier', 'continents-cities' );
+__( 'Guadalcanal', 'continents-cities' );
+__( 'Guam', 'continents-cities' );
+__( 'Honolulu', 'continents-cities' );
+__( 'Johnston', 'continents-cities' );
+__( 'Kiritimati', 'continents-cities' );
+__( 'Kosrae', 'continents-cities' );
+__( 'Kwajalein', 'continents-cities' );
+__( 'Majuro', 'continents-cities' );
+__( 'Marquesas', 'continents-cities' );
+__( 'Midway', 'continents-cities' );
+__( 'Nauru', 'continents-cities' );
+__( 'Niue', 'continents-cities' );
+__( 'Norfolk', 'continents-cities' );
+__( 'Noumea', 'continents-cities' );
+__( 'Pago Pago', 'continents-cities' );
+__( 'Palau', 'continents-cities' );
+__( 'Pitcairn', 'continents-cities' );
+__( 'Pohnpei', 'continents-cities' );
+__( 'Ponape', 'continents-cities' );
+__( 'Port Moresby', 'continents-cities' );
+__( 'Rarotonga', 'continents-cities' );
+__( 'Saipan', 'continents-cities' );
+__( 'Samoa', 'continents-cities' );
+__( 'Tahiti', 'continents-cities' );
+__( 'Tarawa', 'continents-cities' );
+__( 'Tongatapu', 'continents-cities' );
+__( 'Truk', 'continents-cities' );
+__( 'Wake', 'continents-cities' );
+__( 'Wallis', 'continents-cities' );
+__( 'Yap', 'continents-cities' );
Index: src/wp-admin/includes/credits.php
===================================================================
--- src/wp-admin/includes/credits.php	(revision 40901)
+++ src/wp-admin/includes/credits.php	(working copy)
@@ -26,13 +26,15 @@
 	) {
 		$response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}" );
 
-		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
+		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
 			return false;
+		}
 
 		$results = json_decode( wp_remote_retrieve_body( $response ), true );
 
-		if ( ! is_array( $results ) )
+		if ( ! is_array( $results ) ) {
 			return false;
+		}
 
 		set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
 	}
Index: src/wp-admin/includes/dashboard.php
===================================================================
--- src/wp-admin/includes/dashboard.php	(revision 40901)
+++ src/wp-admin/includes/dashboard.php	(working copy)
@@ -28,18 +28,20 @@
 
 	if ( $response && $response['upgrade'] ) {
 		add_filter( 'postbox_classes_dashboard_dashboard_browser_nag', 'dashboard_browser_nag_class' );
-		if ( $response['insecure'] )
+		if ( $response['insecure'] ) {
 			wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'You are using an insecure browser!' ), 'wp_dashboard_browser_nag' );
-		else
-			wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'Your browser is out of date!' ), 'wp_dashboard_browser_nag' );
+		} else { wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'Your browser is out of date!' ), 'wp_dashboard_browser_nag' );
+		}
 	}
 
 	// Right Now
-	if ( is_blog_admin() && current_user_can('edit_posts') )
+	if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
 		wp_add_dashboard_widget( 'dashboard_right_now', __( 'At a Glance' ), 'wp_dashboard_right_now' );
+	}
 
-	if ( is_network_admin() )
+	if ( is_network_admin() ) {
 		wp_add_dashboard_widget( 'network_dashboard_right_now', __( 'Right Now' ), 'wp_network_dashboard_right_now' );
+	}
 
 	// Activity Widget
 	if ( is_blog_admin() ) {
@@ -106,14 +108,14 @@
 		 * @param array $dashboard_widgets An array of dashboard widgets.
 		 */
 		$dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() );
-	}
+	}// End if().
 
 	foreach ( $dashboard_widgets as $widget_id ) {
-		$name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " <a href='{$wp_registered_widgets[$widget_id]['all_link']}' class='edit-box open-box'>" . __('View all') . '</a>';
-		wp_add_dashboard_widget( $widget_id, $name, $wp_registered_widgets[$widget_id]['callback'], $wp_registered_widget_controls[$widget_id]['callback'] );
+		$name = empty( $wp_registered_widgets[ $widget_id ]['all_link'] ) ? $wp_registered_widgets[ $widget_id ]['name'] : $wp_registered_widgets[ $widget_id ]['name'] . " <a href='{$wp_registered_widgets[$widget_id]['all_link']}' class='edit-box open-box'>" . __( 'View all' ) . '</a>';
+		wp_add_dashboard_widget( $widget_id, $name, $wp_registered_widgets[ $widget_id ]['callback'], $wp_registered_widget_controls[ $widget_id ]['callback'] );
 	}
 
-	if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget_id']) ) {
+	if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget_id'] ) ) {
 		check_admin_referer( 'edit-dashboard-widget_' . $_POST['widget_id'], 'dashboard-widget-nonce' );
 		ob_start(); // hack - but the same hack wp-admin/widgets.php uses
 		wp_dashboard_trigger_widget_control( $_POST['widget_id'] );
@@ -148,16 +150,18 @@
 	$screen = get_current_screen();
 	global $wp_dashboard_control_callbacks;
 
-	$private_callback_args = array( '__widget_basename' => $widget_name );
+	$private_callback_args = array(
+		'__widget_basename' => $widget_name,
+	);
 
 	if ( is_null( $callback_args ) ) {
 		$callback_args = $private_callback_args;
-	} else if ( is_array( $callback_args ) ) {
+	} elseif ( is_array( $callback_args ) ) {
 		$callback_args = array_merge( $callback_args, $private_callback_args );
 	}
 
 	if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) {
-		$wp_dashboard_control_callbacks[$widget_id] = $control_callback;
+		$wp_dashboard_control_callbacks[ $widget_id ] = $control_callback;
 		if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
 			list($url) = explode( '#', add_query_arg( 'edit', false ), 2 );
 			$widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>';
@@ -171,12 +175,14 @@
 	$side_widgets = array( 'dashboard_quick_press', 'dashboard_primary' );
 
 	$location = 'normal';
-	if ( in_array($widget_id, $side_widgets) )
+	if ( in_array( $widget_id, $side_widgets ) ) {
 		$location = 'side';
+	}
 
 	$priority = 'core';
-	if ( 'dashboard_browser_nag' === $widget_id )
+	if ( 'dashboard_browser_nag' === $widget_id ) {
 		$priority = 'high';
+	}
 
 	add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args );
 }
@@ -194,8 +200,8 @@
 	echo '<form method="post" class="dashboard-widget-control-form wp-clearfix">';
 	wp_dashboard_trigger_widget_control( $meta_box['id'] );
 	wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
-	echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
-	submit_button( __('Submit') );
+	echo '<input type="hidden" name="widget_id" value="' . esc_attr( $meta_box['id'] ) . '" />';
+	submit_button( __( 'Submit' ) );
 	echo '</form>';
 }
 
@@ -266,7 +272,6 @@
 			} else {
 				printf( '<li class="%1$s-count"><span>%2$s</span></li>', $post_type, $text );
 			}
-
 		}
 	}
 	// Comments
@@ -283,9 +288,9 @@
 		$aria_label = sprintf( _nx( '%s comment in moderation', '%s comments in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n );
 		?>
 		<li class="comment-mod-count<?php
-			if ( ! $num_comm->moderated ) {
-				echo ' hidden';
-			}
+		if ( ! $num_comm->moderated ) {
+			echo ' hidden';
+		}
 		?>"><a href="edit-comments.php?comment_status=moderated" aria-label="<?php esc_attr_e( $aria_label ); ?>"><?php echo $text; ?></a></li>
 		<?php
 	}
@@ -372,7 +377,7 @@
 
 	$actions = ob_get_clean();
 
-	if ( !empty( $actions ) ) : ?>
+	if ( ! empty( $actions ) ) : ?>
 	<div class="sub">
 		<?php echo $actions; ?>
 	</div>
@@ -384,10 +389,12 @@
  */
 function wp_network_dashboard_right_now() {
 	$actions = array();
-	if ( current_user_can('create_sites') )
-		$actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( 'Create a New Site' ) . '</a>';
-	if ( current_user_can('create_users') )
-		$actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>';
+	if ( current_user_can( 'create_sites' ) ) {
+		$actions['create-site'] = '<a href="' . network_admin_url( 'site-new.php' ) . '">' . __( 'Create a New Site' ) . '</a>';
+	}
+	if ( current_user_can( 'create_users' ) ) {
+		$actions['create-user'] = '<a href="' . network_admin_url( 'user-new.php' ) . '">' . __( 'Create a New User' ) . '</a>';
+	}
 
 	$c_users = get_user_count();
 	$c_blogs = get_blog_count();
@@ -426,19 +433,23 @@
 		do_action( 'wpmuadminresult', '' );
 	?>
 
-	<form action="<?php echo network_admin_url('users.php'); ?>" method="get">
+	<form action="<?php echo network_admin_url( 'users.php' ); ?>" method="get">
 		<p>
 			<label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
 			<input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
-			<?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
+			<?php submit_button( __( 'Search Users' ), '', false, false, array(
+				'id' => 'submit_users',
+			) ); ?>
 		</p>
 	</form>
 
-	<form action="<?php echo network_admin_url('sites.php'); ?>" method="get">
+	<form action="<?php echo network_admin_url( 'sites.php' ); ?>" method="get">
 		<p>
 			<label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
 			<input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
-			<?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
+			<?php submit_button( __( 'Search Sites' ), '', false, false, array(
+				'id' => 'submit_sites',
+			) ); ?>
 		</p>
 	</form>
 <?php
@@ -484,11 +495,12 @@
 			$post->post_title = ''; // Remove the auto draft title
 		}
 	} else {
-		$post = get_default_post_to_edit( 'post' , true);
+		$post = get_default_post_to_edit( 'post' , true );
 		$user_id = get_current_user_id();
 		// Don't create an option if this is a super admin who does not belong to this site.
-		if ( in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) )
+		if ( in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) {
 			update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID
+		}
 	}
 
 	$post_ID = (int) $post->ID;
@@ -521,7 +533,9 @@
 			<input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" />
 			<input type="hidden" name="post_type" value="post" />
 			<?php wp_nonce_field( 'add-post' ); ?>
-			<?php submit_button( __( 'Save Draft' ), 'primary', 'save', false, array( 'id' => 'save-post' ) ); ?>
+			<?php submit_button( __( 'Save Draft' ), 'primary', 'save', false, array(
+				'id' => 'save-post',
+			) ); ?>
 			<br class="clear" />
 		</p>
 
@@ -545,7 +559,7 @@
 			'author'         => get_current_user_id(),
 			'posts_per_page' => 4,
 			'orderby'        => 'modified',
-			'order'          => 'DESC'
+			'order'          => 'DESC',
 		);
 
 		/**
@@ -560,13 +574,13 @@
 		$drafts = get_posts( $query_args );
 		if ( ! $drafts ) {
 			return;
- 		}
- 	}
+		}
+	}
 
 	echo '<div class="drafts">';
 	if ( count( $drafts ) > 3 ) {
 		echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '">' . __( 'View all drafts' ) . "</a></p>\n";
- 	}
+	}
 	echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n<ul>";
 
 	$drafts = array_slice( $drafts, 0, 3 );
@@ -579,9 +593,9 @@
 		echo '<time datetime="' . get_the_time( 'c', $draft ) . '">' . get_the_time( __( 'F j, Y' ), $draft ) . '</time></div>';
 		if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) {
 			echo '<p>' . $the_content . '</p>';
- 		}
+		}
 		echo "</li>\n";
- 	}
+	}
 	echo "</ul>\n</div>";
 }
 
@@ -612,11 +626,13 @@
 	if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) {
 		// Pre-order it: Approve | Reply | Edit | Spam | Trash.
 		$actions = array(
-			'approve' => '', 'unapprove' => '',
+			'approve' => '',
+		'unapprove' => '',
 			'reply' => '',
 			'edit' => '',
 			'spam' => '',
-			'trash' => '', 'delete' => '',
+			'trash' => '',
+		'delete' => '',
 			'view' => '',
 		);
 
@@ -631,8 +647,8 @@
 
 		$actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' aria-label='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
 		$actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' aria-label='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
-		$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>". __( 'Edit' ) . '</a>';
-		$actions['reply'] = '<a onclick="window.commentReply && commentReply.open(\'' . $comment->comment_ID . '\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" aria-label="' . esc_attr__( 'Reply to this comment' ) . '" href="#">' . __( 'Reply' ) . '</a>';
+		$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' aria-label='" . esc_attr__( 'Edit this comment' ) . "'>" . __( 'Edit' ) . '</a>';
+		$actions['reply'] = '<a onclick="window.commentReply && commentReply.open(\'' . $comment->comment_ID . '\',\'' . $comment->comment_post_ID . '\');return false;" class="vim-r hide-if-no-js" aria-label="' . esc_attr__( 'Reply to this comment' ) . '" href="#">' . __( 'Reply' ) . '</a>';
 		$actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1' class='vim-s vim-destructive' aria-label='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
 
 		if ( ! EMPTY_TRASH_DAYS ) {
@@ -654,7 +670,7 @@
 		 *                            'Delete', and 'Trash'.
 		 * @param WP_Comment $comment The comment object.
 		 */
-		$actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
+		$actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
 
 		$i = 0;
 		foreach ( $actions as $action => $link ) {
@@ -671,35 +687,35 @@
 			}
 			$actions_string .= "<span class='$action'>$sep$link</span>";
 		}
-	}
+	}// End if().
 ?>
 
 		<li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
 
 			<?php echo get_avatar( $comment, 50, 'mystery' ); ?>
 
-			<?php if ( !$comment->comment_type || 'comment' == $comment->comment_type ) : ?>
+			<?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>
 
 			<div class="dashboard-comment-wrap has-row-actions">
 			<p class="comment-meta">
 			<?php
 				// Comments might not have a post they relate to, e.g. programmatically created ones.
-				if ( $comment_post_link ) {
-					printf(
-						/* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
-						__( 'From %1$s on %2$s %3$s' ),
-						'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
-						$comment_post_link,
-						'<span class="approve">' . __( '[Pending]' ) . '</span>'
-					);
-				} else {
-					printf(
-						/* translators: 1: comment author, 2: notification if the comment is pending */
-						__( 'From %1$s %2$s' ),
-						'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
-						'<span class="approve">' . __( '[Pending]' ) . '</span>'
-					);
-				}
+			if ( $comment_post_link ) {
+				printf(
+					/* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
+					__( 'From %1$s on %2$s %3$s' ),
+					'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
+					$comment_post_link,
+					'<span class="approve">' . __( '[Pending]' ) . '</span>'
+				);
+			} else {
+				printf(
+					/* translators: 1: comment author, 2: notification if the comment is pending */
+					__( 'From %1$s %2$s' ),
+					'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
+					'<span class="approve">' . __( '[Pending]' ) . '</span>'
+				);
+			}
 			?>
 			</p>
 
@@ -721,22 +737,22 @@
 			<p class="comment-meta">
 			<?php
 				// Pingbacks, Trackbacks or custom comment types might not have a post they relate to, e.g. programmatically created ones.
-				if ( $comment_post_link ) {
-					printf(
-						/* translators: 1: type of comment, 2: post link, 3: notification if the comment is pending */
-						_x( '%1$s on %2$s %3$s', 'dashboard' ),
-						"<strong>$type</strong>",
-						$comment_post_link,
-						'<span class="approve">' . __( '[Pending]' ) . '</span>'
-					);
-				} else {
-					printf(
-						/* translators: 1: type of comment, 2: notification if the comment is pending */
-						_x( '%1$s %2$s', 'dashboard' ),
-						"<strong>$type</strong>",
-						'<span class="approve">' . __( '[Pending]' ) . '</span>'
-					);
-				}
+			if ( $comment_post_link ) {
+				printf(
+					/* translators: 1: type of comment, 2: post link, 3: notification if the comment is pending */
+					_x( '%1$s on %2$s %3$s', 'dashboard' ),
+					"<strong>$type</strong>",
+					$comment_post_link,
+					'<span class="approve">' . __( '[Pending]' ) . '</span>'
+				);
+			} else {
+				printf(
+					/* translators: 1: type of comment, 2: notification if the comment is pending */
+					_x( '%1$s %2$s', 'dashboard' ),
+					"<strong>$type</strong>",
+					'<span class="approve">' . __( '[Pending]' ) . '</span>'
+				);
+			}
 			?>
 			</p>
 			<p class="comment-author"><?php comment_author_link( $comment ); ?></p>
@@ -778,7 +794,7 @@
 
 	$recent_comments = wp_dashboard_recent_comments();
 
-	if ( !$future_posts && !$recent_posts && !$recent_comments ) {
+	if ( ! $future_posts && ! $recent_posts && ! $recent_comments ) {
 		echo '<div class="no-activity">';
 		echo '<p class="smiley" aria-hidden="true"></p>';
 		echo '<p>' . __( 'No activity yet!' ) . '</p>';
@@ -873,7 +889,7 @@
 
 	} else {
 		return false;
-	}
+	}// End if().
 
 	wp_reset_postdata();
 
@@ -894,21 +910,24 @@
 
 	$comments_query = array(
 		'number' => $total_items * 5,
-		'offset' => 0
+		'offset' => 0,
 	);
-	if ( ! current_user_can( 'edit_posts' ) )
+	if ( ! current_user_can( 'edit_posts' ) ) {
 		$comments_query['status'] = 'approve';
+	}
 
 	while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) {
 		if ( ! is_array( $possible ) ) {
 			break;
 		}
 		foreach ( $possible as $comment ) {
-			if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) )
+			if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) {
 				continue;
+			}
 			$comments[] = $comment;
-			if ( count( $comments ) == $total_items )
+			if ( count( $comments ) == $total_items ) {
 				break 2;
+			}
 		}
 		$comments_query['offset'] += $comments_query['number'];
 		$comments_query['number'] = $total_items * 10;
@@ -919,8 +938,9 @@
 		echo '<h3>' . __( 'Recent Comments' ) . '</h3>';
 
 		echo '<ul id="the-comment-list" data-wp-lists="list:comment">';
-		foreach ( $comments as $comment )
+		foreach ( $comments as $comment ) {
 			_wp_dashboard_recent_comments_row( $comment );
+		}
 		echo '</ul>';
 
 		if ( current_user_can( 'edit_posts' ) ) {
@@ -949,7 +969,7 @@
 	$widgets = get_option( 'dashboard_widget_options' );
 	echo '<div class="rss-widget">';
 	wp_widget_rss_output( $widgets[ $widget_id ] );
-	echo "</div>";
+	echo '</div>';
 }
 
 /**
@@ -971,13 +991,13 @@
 	$loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><div class="hide-if-js notice notice-error inline"><p>' . __( 'This widget requires JavaScript.' ) . '</p></div>';
 	$doing_ajax = wp_doing_ajax();
 
-	if ( empty($check_urls) ) {
+	if ( empty( $check_urls ) ) {
 		$widgets = get_option( 'dashboard_widget_options' );
-		if ( empty($widgets[$widget_id]['url']) && ! $doing_ajax ) {
+		if ( empty( $widgets[ $widget_id ]['url'] ) && ! $doing_ajax ) {
 			echo $loading;
 			return false;
 		}
-		$check_urls = array( $widgets[$widget_id]['url'] );
+		$check_urls = array( $widgets[ $widget_id ]['url'] );
 	}
 
 	$locale = get_user_locale();
@@ -1019,8 +1039,11 @@
 function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
 	global $wp_dashboard_control_callbacks;
 
-	if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) {
-		call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) );
+	if ( is_scalar( $widget_control_id ) && $widget_control_id && isset( $wp_dashboard_control_callbacks[ $widget_control_id ] ) && is_callable( $wp_dashboard_control_callbacks[ $widget_control_id ] ) ) {
+		call_user_func( $wp_dashboard_control_callbacks[ $widget_control_id ], '', array(
+			'id' => $widget_control_id,
+			'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ],
+		) );
 	}
 }
 
@@ -1036,29 +1059,31 @@
  * @param array $form_inputs
  */
 function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
-	if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
+	if ( ! $widget_options = get_option( 'dashboard_widget_options' ) ) {
 		$widget_options = array();
+	}
 
-	if ( !isset($widget_options[$widget_id]) )
-		$widget_options[$widget_id] = array();
+	if ( ! isset( $widget_options[ $widget_id ] ) ) {
+		$widget_options[ $widget_id ] = array();
+	}
 
 	$number = 1; // Hack to use wp_widget_rss_form()
-	$widget_options[$widget_id]['number'] = $number;
+	$widget_options[ $widget_id ]['number'] = $number;
 
-	if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) {
-		$_POST['widget-rss'][$number] = wp_unslash( $_POST['widget-rss'][$number] );
-		$widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] );
-		$widget_options[$widget_id]['number'] = $number;
+	if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget-rss'][ $number ] ) ) {
+		$_POST['widget-rss'][ $number ] = wp_unslash( $_POST['widget-rss'][ $number ] );
+		$widget_options[ $widget_id ] = wp_widget_rss_process( $_POST['widget-rss'][ $number ] );
+		$widget_options[ $widget_id ]['number'] = $number;
 
 		// Title is optional. If black, fill it if possible.
-		if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) {
-			$rss = fetch_feed($widget_options[$widget_id]['url']);
-			if ( is_wp_error($rss) ) {
-				$widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed'));
+		if ( ! $widget_options[ $widget_id ]['title'] && isset( $_POST['widget-rss'][ $number ]['title'] ) ) {
+			$rss = fetch_feed( $widget_options[ $widget_id ]['url'] );
+			if ( is_wp_error( $rss ) ) {
+				$widget_options[ $widget_id ]['title'] = htmlentities( __( 'Unknown Feed' ) );
 			} else {
-				$widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title()));
+				$widget_options[ $widget_id ]['title'] = htmlentities( strip_tags( $rss->get_title() ) );
 				$rss->__destruct();
-				unset($rss);
+				unset( $rss );
 			}
 		}
 		update_option( 'dashboard_widget_options', $widget_options );
@@ -1067,7 +1092,7 @@
 		delete_transient( $cache_key );
 	}
 
-	wp_widget_rss_form( $widget_options[$widget_id], $form_inputs );
+	wp_widget_rss_form( $widget_options[ $widget_id ], $form_inputs );
 }
 
 
@@ -1349,7 +1374,7 @@
 			'show_summary' => 0,
 			'show_author'  => 0,
 			'show_date'    => 0,
-		)
+		),
 	);
 
 	wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_primary_output', $feeds );
@@ -1369,7 +1394,7 @@
 		$args['type'] = $type;
 		echo '<div class="rss-widget">';
 			wp_widget_rss_output( $args['url'], $args );
-		echo "</div>";
+		echo '</div>';
 	}
 }
 
@@ -1383,16 +1408,17 @@
  * @return bool|null True if not multisite, user can't upload files, or the space check option is disabled.
  */
 function wp_dashboard_quota() {
-	if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) )
+	if ( ! is_multisite() || ! current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) ) {
 		return true;
+	}
 
 	$quota = get_space_allowed();
 	$used = get_space_used();
 
-	if ( $used > $quota )
+	if ( $used > $quota ) {
 		$percentused = '100';
-	else
-		$percentused = ( $used / $quota ) * 100;
+	} else { $percentused = ( $used / $quota ) * 100;
+	}
 	$used_class = ( $percentused >= 70 ) ? ' warning' : '';
 	$used = round( $used, 2 );
 	$percentused = number_format( $percentused );
@@ -1451,18 +1477,19 @@
 		}
 
 		$browser_nag_class = '';
-		if ( !empty( $response['img_src'] ) ) {
+		if ( ! empty( $response['img_src'] ) ) {
 			$img_src = ( is_ssl() && ! empty( $response['img_src_ssl'] ) )? $response['img_src_ssl'] : $response['img_src'];
 
-			$notice .= '<div class="alignright browser-icon"><a href="' . esc_attr($response['update_url']) . '"><img src="' . esc_attr( $img_src ) . '" alt="" /></a></div>';
+			$notice .= '<div class="alignright browser-icon"><a href="' . esc_attr( $response['update_url'] ) . '"><img src="' . esc_attr( $img_src ) . '" alt="" /></a></div>';
 			$browser_nag_class = ' has-browser-icon';
 		}
 		$notice .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
 
 		$browsehappy = 'http://browsehappy.com/';
 		$locale = get_user_locale();
-		if ( 'en_US' !== $locale )
+		if ( 'en_US' !== $locale ) {
 			$browsehappy = add_query_arg( 'locale', $locale, $browsehappy );
+		}
 
 		$notice .= '<p>' . sprintf( __( '<a href="%1$s" class="update-browser-link">Update %2$s</a> or learn how to <a href="%3$s" class="browse-happy-link">browse happy</a>' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '</p>';
 		$notice .= '<p class="hide-if-no-js"><a href="" class="dismiss" aria-label="' . esc_attr__( 'Dismiss the browser warning panel' ) . '">' . __( 'Dismiss' ) . '</a></p>';
@@ -1489,8 +1516,9 @@
 function dashboard_browser_nag_class( $classes ) {
 	$response = wp_check_browser_version();
 
-	if ( $response && $response['insecure'] )
+	if ( $response && $response['insecure'] ) {
 		$classes[] = 'browser-insecure';
+	}
 
 	return $classes;
 }
@@ -1503,21 +1531,25 @@
  * @return array|bool False on failure, array of browser data on success.
  */
 function wp_check_browser_version() {
-	if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
+	if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
 		return false;
+	}
 
 	$key = md5( $_SERVER['HTTP_USER_AGENT'] );
 
-	if ( false === ($response = get_site_transient('browser_' . $key) ) ) {
+	if ( false === ($response = get_site_transient( 'browser_' . $key ) ) ) {
 		$options = array(
-			'body'			=> array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ),
-			'user-agent'	=> 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url()
+			'body'			=> array(
+				'useragent' => $_SERVER['HTTP_USER_AGENT'],
+			),
+			'user-agent'	=> 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url(),
 		);
 
 		$response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options );
 
-		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
+		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
 			return false;
+		}
 
 		/**
 		 * Response should be an array with:
@@ -1533,8 +1565,9 @@
 		 */
 		$response = json_decode( wp_remote_retrieve_body( $response ), true );
 
-		if ( ! is_array( $response ) )
+		if ( ! is_array( $response ) ) {
 			return false;
+		}
 
 		set_site_transient( 'browser_' . $key, $response, WEEK_IN_SECONDS );
 	}
@@ -1559,12 +1592,14 @@
 	<p class="about-description"><?php _e( 'We&#8217;ve assembled some links to get you started:' ); ?></p>
 	<div class="welcome-panel-column-container">
 	<div class="welcome-panel-column">
-		<?php if ( current_user_can( 'customize' ) ): ?>
+		<?php if ( current_user_can( 'customize' ) ) : ?>
 			<h3><?php _e( 'Get Started' ); ?></h3>
 			<a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
 		<?php endif; ?>
 		<a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
-		<?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
+		<?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array(
+			'allowed' => true,
+		) ) ) > 1 ) ) : ?>
 			<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), admin_url( 'themes.php' ) ); ?></p>
 		<?php endif; ?>
 	</div>
@@ -1590,14 +1625,14 @@
 		<ul>
 		<?php if ( current_theme_supports( 'widgets' ) || current_theme_supports( 'menus' ) ) : ?>
 			<li><div class="welcome-icon welcome-widgets-menus"><?php
-				if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
-					printf( __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
-						admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) );
-				} elseif ( current_theme_supports( 'widgets' ) ) {
-					echo '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
-				} else {
-					echo '<a href="' . admin_url( 'nav-menus.php' ) . '">' . __( 'Manage menus' ) . '</a>';
-				}
+			if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
+				printf( __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
+				admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) );
+			} elseif ( current_theme_supports( 'widgets' ) ) {
+				echo '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
+			} else {
+				echo '<a href="' . admin_url( 'nav-menus.php' ) . '">' . __( 'Manage menus' ) . '</a>';
+			}
 			?></div></li>
 		<?php endif; ?>
 		<?php if ( current_user_can( 'manage_options' ) ) : ?>
Index: src/wp-admin/includes/deprecated.php
===================================================================
--- src/wp-admin/includes/deprecated.php	(revision 40901)
+++ src/wp-admin/includes/deprecated.php	(working copy)
@@ -132,19 +132,23 @@
  */
 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
 	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
-	if (!$categories )
-		$categories = get_categories( array('hide_empty' => 0) );
+	if ( ! $categories ) {
+		$categories = get_categories( array(
+			'hide_empty' => 0,
+		) );
+	}
 
 	if ( $categories ) {
 		foreach ( $categories as $category ) {
-			if ( $currentcat != $category->term_id && $parent == $category->parent) {
+			if ( $currentcat != $category->term_id && $parent == $category->parent ) {
 				$pad = str_repeat( '&#8211; ', $level );
 				$category->name = esc_html( $category->name );
 				echo "\n\t<option value='$category->term_id'";
-				if ( $currentparent == $category->term_id )
+				if ( $currentparent == $category->term_id ) {
 					echo " selected='selected'";
+				}
 				echo ">$pad$category->name</option>";
-				wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
+				wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level + 1, $categories );
 			}
 		}
 	} else {
@@ -228,12 +232,12 @@
 	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
 	global $wpdb;
-	if ( !is_multisite() )
+	if ( ! is_multisite() ) {
 		$level_key = $wpdb->get_blog_prefix() . 'user_level';
-	else
-		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+	} else { $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // End if().
+	}
 
-	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
+	return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key ) );
 }
 
 /**
@@ -251,14 +255,14 @@
 
 	$editable = get_editable_user_ids( $user_id );
 
-	if ( !$editable ) {
+	if ( ! $editable ) {
 		return false;
 	} else {
-		$editable = join(',', $editable);
+		$editable = join( ',', $editable );
 		$authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
 	}
 
-	return apply_filters('get_editable_authors', $authors);
+	return apply_filters( 'get_editable_authors', $authors );
 }
 
 /**
@@ -275,25 +279,27 @@
 
 	global $wpdb;
 
-	if ( ! $user = get_userdata( $user_id ) )
+	if ( ! $user = get_userdata( $user_id ) ) {
 		return array();
-	$post_type_obj = get_post_type_object($post_type);
+	}
+	$post_type_obj = get_post_type_object( $post_type );
 
-	if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
-		if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros )
-			return array($user->ID);
-		else
-			return array();
+	if ( ! $user->has_cap( $post_type_obj->cap->edit_others_posts ) ) {
+		if ( $user->has_cap( $post_type_obj->cap->edit_posts ) || ! $exclude_zeros ) {
+			return array( $user->ID );
+		} else { return array();
+		}
 	}
 
-	if ( !is_multisite() )
+	if ( ! is_multisite() ) {
 		$level_key = $wpdb->get_blog_prefix() . 'user_level';
-	else
-		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+	} else { $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // End if().
+	}
 
-	$query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
-	if ( $exclude_zeros )
+	$query = $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key );
+	if ( $exclude_zeros ) {
 		$query .= " AND meta_value != '0'";
+	}
 
 	return $wpdb->get_col( $query );
 }
@@ -308,168 +314,168 @@
 
 	global $wpdb;
 
-	if ( !is_multisite() )
+	if ( ! is_multisite() ) {
 		$level_key = $wpdb->get_blog_prefix() . 'user_level';
-	else
-		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+	} else { $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // End if().
+	}
 
-	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
+	return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key ) );
 }
 
 if ( ! class_exists( 'WP_User_Search', false ) ) :
-/**
+	/**
  * WordPress User Search class.
  *
  * @since 2.1.0
  * @deprecated 3.1.0 Use WP_User_Query
  */
-class WP_User_Search {
+	class WP_User_Search {
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var mixed
 	 */
-	var $results;
+		var $results;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var string
 	 */
-	var $search_term;
+		var $search_term;
 
-	/**
+		/**
 	 * Page number.
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var int
 	 */
-	var $page;
+		var $page;
 
-	/**
+		/**
 	 * Role name that users have.
 	 *
 	 * @since 2.5.0
 	 * @access private
 	 * @var string
 	 */
-	var $role;
+		var $role;
 
-	/**
+		/**
 	 * Raw page number.
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var int|bool
 	 */
-	var $raw_page;
+		var $raw_page;
 
-	/**
+		/**
 	 * Amount of users to display per page.
 	 *
 	 * @since 2.1.0
 	 * @access public
 	 * @var int
 	 */
-	var $users_per_page = 50;
+		var $users_per_page = 50;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var int
 	 */
-	var $first_user;
+		var $first_user;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var int
 	 */
-	var $last_user;
+		var $last_user;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var string
 	 */
-	var $query_limit;
+		var $query_limit;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 3.0.0
 	 * @access private
 	 * @var string
 	 */
-	var $query_orderby;
+		var $query_orderby;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 3.0.0
 	 * @access private
 	 * @var string
 	 */
-	var $query_from;
+		var $query_from;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 3.0.0
 	 * @access private
 	 * @var string
 	 */
-	var $query_where;
+		var $query_where;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var int
 	 */
-	var $total_users_for_query = 0;
+		var $total_users_for_query = 0;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var bool
 	 */
-	var $too_many_total_users = false;
+		var $too_many_total_users = false;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.1.0
 	 * @access private
 	 * @var WP_Error
 	 */
-	var $search_errors;
+		var $search_errors;
 
-	/**
+		/**
 	 * {@internal Missing Description}}
 	 *
 	 * @since 2.7.0
 	 * @access private
 	 * @var string
 	 */
-	var $paging_text;
+		var $paging_text;
 
-	/**
+		/**
 	 * PHP5 Constructor - Sets up the object properties.
 	 *
 	 * @since 2.1.0
@@ -479,20 +485,20 @@
 	 * @param string $role Role name.
 	 * @return WP_User_Search
 	 */
-	function __construct( $search_term = '', $page = '', $role = '' ) {
-		_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
+		function __construct( $search_term = '', $page = '', $role = '' ) {
+			_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
 
-		$this->search_term = wp_unslash( $search_term );
-		$this->raw_page = ( '' == $page ) ? false : (int) $page;
-		$this->page = (int) ( '' == $page ) ? 1 : $page;
-		$this->role = $role;
-
-		$this->prepare_query();
-		$this->query();
-		$this->do_paging();
-	}
+			$this->search_term = wp_unslash( $search_term );
+			$this->raw_page = ( '' == $page ) ? false : (int) $page;
+			$this->page = (int) ( '' == $page ) ? 1 : $page;
+			$this->role = $role;
+
+			$this->prepare_query();
+			$this->query();
+			$this->do_paging();
+		}
 
-	/**
+		/**
 	 * PHP4 Constructor - Sets up the object properties.
 	 *
 	 * @since 2.1.0
@@ -502,106 +508,109 @@
 	 * @param string $role Role name.
 	 * @return WP_User_Search
 	 */
-	public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
-		self::__construct( $search_term, $page, $role );
-	}
+		public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
+			self::__construct( $search_term, $page, $role );
+		}
 
-	/**
+		/**
 	 * Prepares the user search query (legacy).
 	 *
 	 * @since 2.1.0
 	 * @access public
 	 */
-	public function prepare_query() {
-		global $wpdb;
-		$this->first_user = ($this->page - 1) * $this->users_per_page;
-
-		$this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page);
-		$this->query_orderby = ' ORDER BY user_login';
-
-		$search_sql = '';
-		if ( $this->search_term ) {
-			$searches = array();
-			$search_sql = 'AND (';
-			foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col )
-				$searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' );
-			$search_sql .= implode(' OR ', $searches);
-			$search_sql .= ')';
-		}
+		public function prepare_query() {
+			global $wpdb;
+			$this->first_user = ($this->page - 1) * $this->users_per_page;
+
+			$this->query_limit = $wpdb->prepare( ' LIMIT %d, %d', $this->first_user, $this->users_per_page );
+			$this->query_orderby = ' ORDER BY user_login';
+
+			$search_sql = '';
+			if ( $this->search_term ) {
+				$searches = array();
+				$search_sql = 'AND (';
+				foreach ( array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'display_name' ) as $col ) {
+					$searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape( $this->search_term ) . '%' );
+				}
+				$search_sql .= implode( ' OR ', $searches );
+				$search_sql .= ')';
+			}
 
-		$this->query_from = " FROM $wpdb->users";
-		$this->query_where = " WHERE 1=1 $search_sql";
+			$this->query_from = " FROM $wpdb->users";
+			$this->query_where = " WHERE 1=1 $search_sql";
 
-		if ( $this->role ) {
-			$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
-			$this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
-		} elseif ( is_multisite() ) {
-			$level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
-			$this->query_from .= ", $wpdb->usermeta";
-			$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
-		}
+			if ( $this->role ) {
+				$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
+				$this->query_where .= $wpdb->prepare( " AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%' );
+			} elseif ( is_multisite() ) {
+				$level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
+				$this->query_from .= ", $wpdb->usermeta";
+				$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
+			}
 
-		do_action_ref_array( 'pre_user_search', array( &$this ) );
-	}
+			do_action_ref_array( 'pre_user_search', array( &$this ) );
+		}
 
-	/**
+		/**
 	 * Executes the user search query.
 	 *
 	 * @since 2.1.0
 	 * @access public
 	 */
-	public function query() {
-		global $wpdb;
+		public function query() {
+			global $wpdb;
 
-		$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
+			$this->results = $wpdb->get_col( "SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit );
 
-		if ( $this->results )
-			$this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit
-		else
-			$this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
-	}
+			if ( $this->results ) {
+				$this->total_users_for_query = $wpdb->get_var( "SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where ); // no limit
+			} else { $this->search_errors = new WP_Error( 'no_matching_users_found', __( 'No users found.' ) );
+			}
+		}
 
-	/**
+		/**
 	 * Prepares variables for use in templates.
 	 *
 	 * @since 2.1.0
 	 * @access public
 	 */
-	function prepare_vars_for_template_usage() {}
+		function prepare_vars_for_template_usage() {}
 
-	/**
+		/**
 	 * Handles paging for the user search query.
 	 *
 	 * @since 2.1.0
 	 * @access public
 	 */
-	public function do_paging() {
-		if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
-			$args = array();
-			if ( ! empty($this->search_term) )
-				$args['usersearch'] = urlencode($this->search_term);
-			if ( ! empty($this->role) )
-				$args['role'] = urlencode($this->role);
-
-			$this->paging_text = paginate_links( array(
-				'total' => ceil($this->total_users_for_query / $this->users_per_page),
-				'current' => $this->page,
-				'base' => 'users.php?%_%',
-				'format' => 'userspage=%#%',
-				'add_args' => $args
-			) );
-			if ( $this->paging_text ) {
-				$this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
-					number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
-					number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
-					number_format_i18n( $this->total_users_for_query ),
-					$this->paging_text
-				);
+		public function do_paging() {
+			if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
+				$args = array();
+				if ( ! empty( $this->search_term ) ) {
+					$args['usersearch'] = urlencode( $this->search_term );
+				}
+				if ( ! empty( $this->role ) ) {
+					$args['role'] = urlencode( $this->role );
+				}
+
+				$this->paging_text = paginate_links( array(
+					'total' => ceil( $this->total_users_for_query / $this->users_per_page ),
+					'current' => $this->page,
+					'base' => 'users.php?%_%',
+					'format' => 'userspage=%#%',
+					'add_args' => $args,
+				) );
+				if ( $this->paging_text ) {
+						$this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %1$s&#8211;%2$s of %3$s' ) . '</span>%s',
+							number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
+							number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
+							number_format_i18n( $this->total_users_for_query ),
+							$this->paging_text
+						);
+				}
 			}
 		}
-	}
 
-	/**
+		/**
 	 * Retrieves the user search query results.
 	 *
 	 * @since 2.1.0
@@ -609,11 +618,11 @@
 	 *
 	 * @return array
 	 */
-	public function get_results() {
-		return (array) $this->results;
-	}
+		public function get_results() {
+			return (array) $this->results;
+		}
 
-	/**
+		/**
 	 * Displaying paging text.
 	 *
 	 * @see do_paging() Builds paging text.
@@ -621,11 +630,11 @@
 	 * @since 2.1.0
 	 * @access public
 	 */
-	function page_links() {
-		echo $this->paging_text;
-	}
+		function page_links() {
+			echo $this->paging_text;
+		}
 
-	/**
+		/**
 	 * Whether paging is enabled.
 	 *
 	 * @see do_paging() Builds paging text.
@@ -635,13 +644,14 @@
 	 *
 	 * @return bool
 	 */
-	function results_are_paged() {
-		if ( $this->paging_text )
-			return true;
-		return false;
-	}
+		function results_are_paged() {
+			if ( $this->paging_text ) {
+				return true;
+			}
+			return false;
+		}
 
-	/**
+		/**
 	 * Whether there are search terms.
 	 *
 	 * @since 2.1.0
@@ -649,12 +659,13 @@
 	 *
 	 * @return bool
 	 */
-	function is_search() {
-		if ( $this->search_term )
-			return true;
-		return false;
+		function is_search() {
+			if ( $this->search_term ) {
+				return true;
+			}
+			return false;
+		}
 	}
-}
 endif;
 
 /**
@@ -676,21 +687,21 @@
 
 	$editable = get_editable_user_ids( $user_id );
 
-	if ( in_array($type, array('draft', 'pending')) )
+	if ( in_array( $type, array( 'draft', 'pending' ) ) ) {
 		$type_sql = " post_status = '$type' ";
-	else
-		$type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
+	} else { $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
+	}
 
 	$dir = ( 'pending' == $type ) ? 'ASC' : 'DESC';
 
-	if ( !$editable ) {
+	if ( ! $editable ) {
 		$other_unpubs = '';
 	} else {
-		$editable = join(',', $editable);
-		$other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) );
+		$editable = join( ',', $editable );
+		$other_unpubs = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id ) );
 	}
 
-	return apply_filters('get_others_drafts', $other_unpubs);
+	return apply_filters( 'get_others_drafts', $other_unpubs );
 }
 
 /**
@@ -702,10 +713,10 @@
  * @param int $user_id User ID.
  * @return array List of drafts from other users.
  */
-function get_others_drafts($user_id) {
+function get_others_drafts( $user_id ) {
 	_deprecated_function( __FUNCTION__, '3.1.0' );
 
-	return get_others_unpublished_posts($user_id, 'draft');
+	return get_others_unpublished_posts( $user_id, 'draft' );
 }
 
 /**
@@ -717,10 +728,10 @@
  * @param int $user_id User ID.
  * @return array List of posts with pending review post type from other users.
  */
-function get_others_pending($user_id) {
+function get_others_pending( $user_id ) {
 	_deprecated_function( __FUNCTION__, '3.1.0' );
 
-	return get_others_unpublished_posts($user_id, 'pending');
+	return get_others_unpublished_posts( $user_id, 'pending' );
 }
 
 /**
@@ -749,19 +760,20 @@
 
 	static $num = 1;
 
-	if ( ! class_exists( '_WP_Editors', false ) )
+	if ( ! class_exists( '_WP_Editors', false ) ) {
 		require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
+	}
 
 	$editor_id = 'content' . $num++;
 
 	$set = array(
 		'teeny' => $teeny,
 		'tinymce' => $settings ? $settings : true,
-		'quicktags' => false
+		'quicktags' => false,
 	);
 
-	$set = _WP_Editors::parse_settings($editor_id, $set);
-	_WP_Editors::editor_settings($editor_id, $set);
+	$set = _WP_Editors::parse_settings( $editor_id, $set );
+	_WP_Editors::editor_settings( $editor_id, $set );
 }
 
 /**
@@ -806,8 +818,9 @@
 
 	$current_screen = get_current_screen();
 
-	if ( ! $current_screen )
+	if ( ! $current_screen ) {
 		return '';
+	}
 
 	ob_start();
 	$current_screen->render_screen_layout();
@@ -826,8 +839,9 @@
 
 	$current_screen = get_current_screen();
 
-	if ( ! $current_screen )
+	if ( ! $current_screen ) {
 		return '';
+	}
 
 	ob_start();
 	$current_screen->render_per_page_options();
@@ -976,8 +990,9 @@
 function add_contextual_help( $screen, $help ) {
 	_deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
 
-	if ( is_string( $screen ) )
+	if ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
 	WP_Screen::add_old_compat_help( $screen, $help );
 }
@@ -994,11 +1009,13 @@
 function get_allowed_themes() {
 	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
 
-	$themes = wp_get_themes( array( 'allowed' => true ) );
+	$themes = wp_get_themes( array(
+		'allowed' => true,
+	) );
 
 	$wp_themes = array();
 	foreach ( $themes as $theme ) {
-		$wp_themes[ $theme->get('Name') ] = $theme;
+		$wp_themes[ $theme->get( 'Name' ) ] = $theme;
 	}
 
 	return $wp_themes;
@@ -1016,10 +1033,12 @@
 function get_broken_themes() {
 	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
 
-	$themes = wp_get_themes( array( 'errors' => true ) );
+	$themes = wp_get_themes( array(
+		'errors' => true,
+	) );
 	$broken = array();
 	foreach ( $themes as $theme ) {
-		$name = $theme->get('Name');
+		$name = $theme->get( 'Name' );
 		$broken[ $name ] = array(
 			'Name' => $name,
 			'Title' => $name,
@@ -1062,7 +1081,7 @@
  *
  * @deprecated 3.5.0
  */
-function _media_button($title, $icon, $type, $id) {
+function _media_button( $title, $icon, $type, $id ) {
 	_deprecated_function( __FUNCTION__, '3.5.0' );
 }
 
@@ -1138,15 +1157,16 @@
  * @deprecated 3.7.0 Use Core_Upgrader
  * @see Core_Upgrader
  */
-function wp_update_core($current, $feedback = '') {
+function wp_update_core( $current, $feedback = '' ) {
 	_deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
 
-	if ( !empty($feedback) )
-		add_filter('update_feedback', $feedback);
+	if ( ! empty( $feedback ) ) {
+		add_filter( 'update_feedback', $feedback );
+	}
 
 	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Core_Upgrader();
-	return $upgrader->upgrade($current);
+	return $upgrader->upgrade( $current );
 
 }
 
@@ -1161,15 +1181,16 @@
  * @deprecated 3.7.0 Use Plugin_Upgrader
  * @see Plugin_Upgrader
  */
-function wp_update_plugin($plugin, $feedback = '') {
+function wp_update_plugin( $plugin, $feedback = '' ) {
 	_deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
 
-	if ( !empty($feedback) )
-		add_filter('update_feedback', $feedback);
+	if ( ! empty( $feedback ) ) {
+		add_filter( 'update_feedback', $feedback );
+	}
 
 	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Plugin_Upgrader();
-	return $upgrader->upgrade($plugin);
+	return $upgrader->upgrade( $plugin );
 }
 
 /**
@@ -1183,15 +1204,16 @@
  * @deprecated 3.7.0 Use Theme_Upgrader
  * @see Theme_Upgrader
  */
-function wp_update_theme($theme, $feedback = '') {
+function wp_update_theme( $theme, $feedback = '' ) {
 	_deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
 
-	if ( !empty($feedback) )
-		add_filter('update_feedback', $feedback);
+	if ( ! empty( $feedback ) ) {
+		add_filter( 'update_feedback', $feedback );
+	}
 
 	include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 	$upgrader = new Theme_Upgrader();
-	return $upgrader->upgrade($theme);
+	return $upgrader->upgrade( $theme );
 }
 
 /**
@@ -1317,27 +1339,29 @@
 	echo '<ul>';
 
 	foreach ( array( $popular ) as $feed ) {
-		if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
+		if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() ) {
 			continue;
+		}
 
-		$items = $feed->get_items(0, 5);
+		$items = $feed->get_items( 0, 5 );
 
 		// Pick a random, non-installed plugin
 		while ( true ) {
 			// Abort this foreach loop iteration if there's no plugins left of this type
-			if ( 0 == count($items) )
+			if ( 0 == count( $items ) ) {
 				continue 2;
+			}
 
-			$item_key = array_rand($items);
-			$item = $items[$item_key];
+			$item_key = array_rand( $items );
+			$item = $items[ $item_key ];
 
 			list($link, $frag) = explode( '#', $item->get_link() );
 
-			$link = esc_url($link);
-			if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )
+			$link = esc_url( $link );
+			if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) ) {
 				$slug = $matches[1];
-			else {
-				unset( $items[$item_key] );
+			} else {
+				unset( $items[ $item_key ] );
 				continue;
 			}
 
@@ -1345,7 +1369,7 @@
 			reset( $plugin_slugs );
 			foreach ( $plugin_slugs as $plugin_slug ) {
 				if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) {
-					unset( $items[$item_key] );
+					unset( $items[ $item_key ] );
 					continue 2;
 				}
 			}
@@ -1355,15 +1379,16 @@
 		}
 
 		// Eliminate some common badly formed plugin descriptions
-		while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
-			unset($items[$item_key]);
+		while ( ( null !== $item_key = array_rand( $items ) ) && false !== strpos( $items[ $item_key ]->get_description(), 'Plugin Name:' ) ) {			unset( $items[ $item_key ] );
+		}
 
-		if ( !isset($items[$item_key]) )
+		if ( ! isset( $items[ $item_key ] ) ) {
 			continue;
+		}
 
 		$raw_title = $item->get_title();
 
-		$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
+		$ilink = wp_nonce_url( 'plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug ) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
 		echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
 			'&nbsp;<a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
 			/* translators: %s: plugin name */
@@ -1371,7 +1396,7 @@
 
 		$feed->__destruct();
 		unset( $feed );
-	}
+	}// End foreach().
 
 	echo '</ul>';
 }
@@ -1413,14 +1438,14 @@
  * @param string   $icon_url   The url to the icon to be used for this menu.
  * @return string The resulting page's hook_suffix.
  */
-function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
+function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) {
 	_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
 
 	global $_wp_last_object_menu;
 
 	$_wp_last_object_menu++;
 
-	return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu);
+	return add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu );
 }
 
 /**
@@ -1446,14 +1471,14 @@
  * @param string   $icon_url   The url to the icon to be used for this menu.
  * @return string The resulting page's hook_suffix.
  */
-function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
+function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) {
 	_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
 
 	global $_wp_last_utility_menu;
 
 	$_wp_last_utility_menu++;
 
-	return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu);
+	return add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu );
 }
 
 /**
Index: src/wp-admin/includes/edit-tag-messages.php
===================================================================
--- src/wp-admin/includes/edit-tag-messages.php	(revision 40901)
+++ src/wp-admin/includes/edit-tag-messages.php	(working copy)
@@ -55,4 +55,4 @@
 	} elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) ) {
 		$message = $messages['_item'][ $msg ];
 	}
-}
\ No newline at end of file
+}
Index: src/wp-admin/includes/export.php
===================================================================
--- src/wp-admin/includes/export.php	(revision 40901)
+++ src/wp-admin/includes/export.php	(working copy)
@@ -56,8 +56,13 @@
 function export_wp( $args = array() ) {
 	global $wpdb, $post;
 
-	$defaults = array( 'content' => 'all', 'author' => false, 'category' => false,
-		'start_date' => false, 'end_date' => false, 'status' => false,
+	$defaults = array(
+	'content' => 'all',
+	'author' => false,
+	'category' => false,
+		'start_date' => false,
+	'end_date' => false,
+	'status' => false,
 	);
 	$args = wp_parse_args( $args, $defaults );
 
@@ -93,20 +98,23 @@
 
 	if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) {
 		$ptype = get_post_type_object( $args['content'] );
-		if ( ! $ptype->can_export )
+		if ( ! $ptype->can_export ) {
 			$args['content'] = 'post';
+		}
 
 		$where = $wpdb->prepare( "{$wpdb->posts}.post_type = %s", $args['content'] );
 	} else {
-		$post_types = get_post_types( array( 'can_export' => true ) );
-		$esses = array_fill( 0, count($post_types), '%s' );
+		$post_types = get_post_types( array(
+			'can_export' => true,
+		) );
+		$esses = array_fill( 0, count( $post_types ), '%s' );
 		$where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (" . implode( ',', $esses ) . ')', $post_types );
 	}
 
-	if ( $args['status'] && ( 'post' == $args['content'] || 'page' == $args['content'] ) )
+	if ( $args['status'] && ( 'post' == $args['content'] || 'page' == $args['content'] ) ) {
 		$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_status = %s", $args['status'] );
-	else
-		$where .= " AND {$wpdb->posts}.post_status != 'auto-draft'";
+	} else { $where .= " AND {$wpdb->posts}.post_status != 'auto-draft'";
+	}
 
 	$join = '';
 	if ( $args['category'] && 'post' == $args['content'] ) {
@@ -117,14 +125,17 @@
 	}
 
 	if ( 'post' == $args['content'] || 'page' == $args['content'] || 'attachment' == $args['content'] ) {
-		if ( $args['author'] )
+		if ( $args['author'] ) {
 			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $args['author'] );
+		}
 
-		if ( $args['start_date'] )
-			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", date( 'Y-m-d', strtotime($args['start_date']) ) );
+		if ( $args['start_date'] ) {
+			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", date( 'Y-m-d', strtotime( $args['start_date'] ) ) );
+		}
 
-		if ( $args['end_date'] )
-			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", date( 'Y-m-d', strtotime('+1 month', strtotime($args['end_date'])) ) );
+		if ( $args['end_date'] ) {
+			$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", date( 'Y-m-d', strtotime( '+1 month', strtotime( $args['end_date'] ) ) ) );
+		}
 	}
 
 	// Grab a snapshot of post IDs, just in case it changes during the export.
@@ -137,33 +148,43 @@
 	$cats = $tags = $terms = array();
 	if ( isset( $term ) && $term ) {
 		$cat = get_term( $term['term_id'], 'category' );
-		$cats = array( $cat->term_id => $cat );
+		$cats = array(
+			$cat->term_id => $cat,
+		);
 		unset( $term, $cat );
 	} elseif ( 'all' == $args['content'] ) {
-		$categories = (array) get_categories( array( 'get' => 'all' ) );
-		$tags = (array) get_tags( array( 'get' => 'all' ) );
-
-		$custom_taxonomies = get_taxonomies( array( '_builtin' => false ) );
-		$custom_terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) );
+		$categories = (array) get_categories( array(
+			'get' => 'all',
+		) );
+		$tags = (array) get_tags( array(
+			'get' => 'all',
+		) );
+
+		$custom_taxonomies = get_taxonomies( array(
+			'_builtin' => false,
+		) );
+		$custom_terms = (array) get_terms( $custom_taxonomies, array(
+			'get' => 'all',
+		) );
 
 		// Put categories in order with no child going before its parent.
 		while ( $cat = array_shift( $categories ) ) {
-			if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) )
-				$cats[$cat->term_id] = $cat;
-			else
-				$categories[] = $cat;
+			if ( $cat->parent == 0 || isset( $cats[ $cat->parent ] ) ) {
+				$cats[ $cat->term_id ] = $cat;
+			} else { $categories[] = $cat;
+			}
 		}
 
 		// Put terms in order with no child going before its parent.
 		while ( $t = array_shift( $custom_terms ) ) {
-			if ( $t->parent == 0 || isset( $terms[$t->parent] ) )
-				$terms[$t->term_id] = $t;
-			else
-				$custom_terms[] = $t;
+			if ( $t->parent == 0 || isset( $terms[ $t->parent ] ) ) {
+				$terms[ $t->term_id ] = $t;
+			} else { $custom_terms[] = $t;
+			}
 		}
 
 		unset( $categories, $custom_taxonomies, $custom_terms );
-	}
+	}// End if().
 
 	/**
 	 * Wrap given string in XML CDATA tag.
@@ -192,11 +213,11 @@
 	 */
 	function wxr_site_url() {
 		// Multisite: the base URL.
-		if ( is_multisite() )
+		if ( is_multisite() ) {
 			return network_home_url();
-		// WordPress (single site): the blog URL.
-		else
-			return get_bloginfo_rss( 'url' );
+		} // End if().
+		else { 			return get_bloginfo_rss( 'url' );
+		}
 	}
 
 	/**
@@ -207,8 +228,9 @@
 	 * @param object $category Category Object
 	 */
 	function wxr_cat_name( $category ) {
-		if ( empty( $category->name ) )
+		if ( empty( $category->name ) ) {
 			return;
+		}
 
 		echo '<wp:cat_name>' . wxr_cdata( $category->name ) . "</wp:cat_name>\n";
 	}
@@ -221,8 +243,9 @@
 	 * @param object $category Category Object
 	 */
 	function wxr_category_description( $category ) {
-		if ( empty( $category->description ) )
+		if ( empty( $category->description ) ) {
 			return;
+		}
 
 		echo '<wp:category_description>' . wxr_cdata( $category->description ) . "</wp:category_description>\n";
 	}
@@ -235,8 +258,9 @@
 	 * @param object $tag Tag Object
 	 */
 	function wxr_tag_name( $tag ) {
-		if ( empty( $tag->name ) )
+		if ( empty( $tag->name ) ) {
 			return;
+		}
 
 		echo '<wp:tag_name>' . wxr_cdata( $tag->name ) . "</wp:tag_name>\n";
 	}
@@ -249,8 +273,9 @@
 	 * @param object $tag Tag Object
 	 */
 	function wxr_tag_description( $tag ) {
-		if ( empty( $tag->description ) )
+		if ( empty( $tag->description ) ) {
 			return;
+		}
 
 		echo '<wp:tag_description>' . wxr_cdata( $tag->description ) . "</wp:tag_description>\n";
 	}
@@ -263,8 +288,9 @@
 	 * @param object $term Term Object
 	 */
 	function wxr_term_name( $term ) {
-		if ( empty( $term->name ) )
+		if ( empty( $term->name ) ) {
 			return;
+		}
 
 		echo '<wp:term_name>' . wxr_cdata( $term->name ) . "</wp:term_name>\n";
 	}
@@ -277,8 +303,9 @@
 	 * @param object $term Term Object
 	 */
 	function wxr_term_description( $term ) {
-		if ( empty( $term->description ) )
+		if ( empty( $term->description ) ) {
 			return;
+		}
 
 		echo "\t\t<wp:term_description>" . wxr_cdata( $term->description ) . "</wp:term_description>\n";
 	}
@@ -326,7 +353,7 @@
 	function wxr_authors_list( array $post_ids = null ) {
 		global $wpdb;
 
-		if ( !empty( $post_ids ) ) {
+		if ( ! empty( $post_ids ) ) {
 			$post_ids = array_map( 'absint', $post_ids );
 			$and = 'AND ID IN ( ' . implode( ', ', $post_ids ) . ')';
 		} else {
@@ -335,8 +362,9 @@
 
 		$authors = array();
 		$results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft' $and" );
-		foreach ( (array) $results as $result )
+		foreach ( (array) $results as $result ) {
 			$authors[] = get_userdata( $result->post_author );
+		}
 
 		$authors = array_filter( $authors );
 
@@ -359,8 +387,9 @@
 	 */
 	function wxr_nav_menu_terms() {
 		$nav_menus = wp_get_nav_menus();
-		if ( empty( $nav_menus ) || ! is_array( $nav_menus ) )
+		if ( empty( $nav_menus ) || ! is_array( $nav_menus ) ) {
 			return;
+		}
 
 		foreach ( $nav_menus as $menu ) {
 			echo "\t<wp:term>";
@@ -381,8 +410,9 @@
 		$post = get_post();
 
 		$taxonomies = get_object_taxonomies( $post->post_type );
-		if ( empty( $taxonomies ) )
+		if ( empty( $taxonomies ) ) {
 			return;
+		}
 		$terms = wp_get_object_terms( $post->ID, $taxonomies );
 
 		foreach ( (array) $terms as $term ) {
@@ -397,13 +427,14 @@
 	 * @return bool
 	 */
 	function wxr_filter_postmeta( $return_me, $meta_key ) {
-		if ( '_edit_lock' == $meta_key )
+		if ( '_edit_lock' == $meta_key ) {
 			$return_me = true;
+		}
 		return $return_me;
 	}
 	add_filter( 'wxr_export_skip_postmeta', 'wxr_filter_postmeta', 10, 2 );
 
-	echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . "\" ?>\n";
+	echo '<?xml version="1.0" encoding="' . get_bloginfo( 'charset' ) . "\" ?>\n";
 
 	?>
 <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
@@ -448,7 +479,7 @@
 	<wp:category>
 		<wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
 		<wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
-		<wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[$c->parent]->slug : '' ); ?></wp:category_parent>
+		<wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[ $c->parent ]->slug : '' ); ?></wp:category_parent>
 		<?php wxr_cat_name( $c );
 		wxr_category_description( $c );
 		wxr_term_meta( $c ); ?>
@@ -468,13 +499,13 @@
 		<wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
 		<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
 		<wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
-		<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[$t->parent]->slug : '' ); ?></wp:term_parent>
+		<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[ $t->parent ]->slug : '' ); ?></wp:term_parent>
 		<?php wxr_term_name( $t );
 		wxr_term_description( $t );
 		wxr_term_meta( $t ); ?>
 	</wp:term>
 <?php endforeach; ?>
-<?php if ( 'all' == $args['content'] ) wxr_nav_menu_terms(); ?>
+<?php if ( 'all' == $args['content'] ) { wxr_nav_menu_terms();} ?>
 
 	<?php
 	/** This action is documented in wp-includes/feed-rss2.php */
@@ -492,15 +523,15 @@
 
 	// Fetch 20 posts at a time rather than loading the entire table into memory.
 	while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
-	$where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
-	$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
+		$where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
+		$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
 
-	// Begin Loop.
-	foreach ( $posts as $post ) {
-		setup_postdata( $post );
-		$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
-?>
-	<item>
+		// Begin Loop.
+		foreach ( $posts as $post ) {
+			setup_postdata( $post );
+			$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
+		?>
+		<item>
 		<title><?php
 			/** This filter is documented in wp-includes/feed.php */
 			echo apply_filters( 'the_title_rss', $post->post_title );
@@ -542,11 +573,11 @@
 		<wp:post_type><?php echo wxr_cdata( $post->post_type ); ?></wp:post_type>
 		<wp:post_password><?php echo wxr_cdata( $post->post_password ); ?></wp:post_password>
 		<wp:is_sticky><?php echo intval( $is_sticky ); ?></wp:is_sticky>
-<?php	if ( $post->post_type == 'attachment' ) : ?>
+		<?php	if ( $post->post_type == 'attachment' ) : ?>
 		<wp:attachment_url><?php echo wxr_cdata( wp_get_attachment_url( $post->ID ) ); ?></wp:attachment_url>
-<?php 	endif; ?>
-<?php 	wxr_post_taxonomy(); ?>
-<?php	$postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
+	<?php 	endif; ?>
+		<?php 	wxr_post_taxonomy(); ?>
+		<?php	$postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
 		foreach ( $postmeta as $meta ) :
 			/**
 			 * Filters whether to selectively skip post meta used for WXR exports.
@@ -560,12 +591,13 @@
 			 * @param string $meta_key Current meta key.
 			 * @param object $meta     Current meta object.
 			 */
-			if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) )
+			if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
 				continue;
+			}
 		?>
 		<wp:postmeta>
-			<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
-			<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
+		<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
+		<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
 		</wp:postmeta>
 <?php	endforeach;
 
@@ -586,8 +618,8 @@
 			<wp:comment_parent><?php echo intval( $c->comment_parent ); ?></wp:comment_parent>
 			<wp:comment_user_id><?php echo intval( $c->user_id ); ?></wp:comment_user_id>
 <?php		$c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
-			foreach ( $c_meta as $meta ) :
-				/**
+foreach ( $c_meta as $meta ) :
+	/**
 				 * Filters whether to selectively skip comment meta used for WXR exports.
 				 *
 				 * Returning a truthy value to the filter will skip the current meta
@@ -599,22 +631,23 @@
 				 * @param string $meta_key Current meta key.
 				 * @param object $meta     Current meta object.
 				 */
-				if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) {
-					continue;
-				}
-			?>
-			<wp:commentmeta>
-				<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
-				<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
-			</wp:commentmeta>
+	if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) {
+		continue;
+	}
+?>
+<wp:commentmeta>
+<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
+<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
+	</wp:commentmeta>
 <?php		endforeach; ?>
 		</wp:comment>
 <?php	endforeach; ?>
-	</item>
-<?php
-	}
-	}
-} ?>
+		</item>
+	<?php
+		}// End foreach().
+	}// End while().
+}// End if().
+	?>
 </channel>
 </rss>
 <?php
Index: src/wp-admin/includes/file.php
===================================================================
--- src/wp-admin/includes/file.php	(revision 40901)
+++ src/wp-admin/includes/file.php	(working copy)
@@ -125,23 +125,26 @@
  * @return bool|array False on failure, Else array of files
  */
 function list_files( $folder = '', $levels = 100 ) {
-	if ( empty($folder) )
+	if ( empty( $folder ) ) {
 		return false;
+	}
 
-	if ( ! $levels )
+	if ( ! $levels ) {
 		return false;
+	}
 
 	$files = array();
 	if ( $dir = @opendir( $folder ) ) {
-		while (($file = readdir( $dir ) ) !== false ) {
-			if ( in_array($file, array('.', '..') ) )
+		while ( ($file = readdir( $dir ) ) !== false ) {
+			if ( in_array( $file, array( '.', '..' ) ) ) {
 				continue;
+			}
 			if ( is_dir( $folder . '/' . $file ) ) {
-				$files2 = list_files( $folder . '/' . $file, $levels - 1);
-				if ( $files2 )
-					$files = array_merge($files, $files2 );
-				else
-					$files[] = $folder . '/' . $file . '/';
+				$files2 = list_files( $folder . '/' . $file, $levels - 1 );
+				if ( $files2 ) {
+					$files = array_merge( $files, $files2 );
+				} else { $files[] = $folder . '/' . $file . '/';
+				}
 			} else {
 				$files[] = $folder . '/' . $file;
 			}
@@ -212,15 +215,16 @@
 function validate_file_to_edit( $file, $allowed_files = '' ) {
 	$code = validate_file( $file, $allowed_files );
 
-	if (!$code )
+	if ( ! $code ) {
 		return $file;
+	}
 
 	switch ( $code ) {
 		case 1 :
 			wp_die( __( 'Sorry, that file cannot be edited.' ) );
 
-		// case 2 :
-		// wp_die( __('Sorry, can&#8217;t call files with their real path.' ));
+			// case 2 :
+			// wp_die( __('Sorry, can&#8217;t call files with their real path.' ));
 
 		case 3 :
 			wp_die( __( 'Sorry, that file cannot be edited.' ) );
@@ -247,7 +251,9 @@
 	// The default error handler.
 	if ( ! function_exists( 'wp_handle_upload_error' ) ) {
 		function wp_handle_upload_error( &$file, $message ) {
-			return array( 'error' => $message );
+			return array(
+				'error' => $message,
+			);
 		}
 	}
 
@@ -299,7 +305,7 @@
 			'',
 			__( 'Missing a temporary folder.' ),
 			__( 'Failed to write file to disk.' ),
-			__( 'File upload stopped by extension.' )
+			__( 'File upload stopped by extension.' ),
 		);
 	}
 
@@ -348,7 +354,7 @@
 		if ( $proper_filename ) {
 			$file['name'] = $proper_filename;
 		}
-		if ( ( ! $type || !$ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
+		if ( ( ! $type || ! $ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
 			return call_user_func_array( $upload_error_handler, array( &$file, __( 'Sorry, this file type is not permitted for security reasons.' ) ) );
 		}
 		if ( ! $type ) {
@@ -384,11 +390,11 @@
 		} else {
 			$error_path = basename( $uploads['basedir'] ) . $uploads['subdir'];
 		}
-		return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $error_path ) );
+		return $upload_error_handler( $file, sprintf( __( 'The uploaded file could not be moved to %s.' ), $error_path ) );
 	}
 
 	// Set correct file permissions.
-	$stat = stat( dirname( $new_file ));
+	$stat = stat( dirname( $new_file ) );
 	$perms = $stat['mode'] & 0000666;
 	@ chmod( $new_file, $perms );
 
@@ -416,7 +422,7 @@
 	return apply_filters( 'wp_handle_upload', array(
 		'file' => $new_file,
 		'url'  => $url,
-		'type' => $type
+		'type' => $type,
 	), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' );
 }
 
@@ -491,23 +497,29 @@
  */
 function download_url( $url, $timeout = 300 ) {
 	//WARNING: The file is not automatically deleted, The script must unlink() the file.
-	if ( ! $url )
-		return new WP_Error('http_no_url', __('Invalid URL Provided.'));
+	if ( ! $url ) {
+		return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) );
+	}
 
 	$url_filename = basename( parse_url( $url, PHP_URL_PATH ) );
 
 	$tmpfname = wp_tempnam( $url_filename );
-	if ( ! $tmpfname )
-		return new WP_Error('http_no_file', __('Could not create Temporary file.'));
+	if ( ! $tmpfname ) {
+		return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.' ) );
+	}
 
-	$response = wp_safe_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) );
+	$response = wp_safe_remote_get( $url, array(
+		'timeout' => $timeout,
+		'stream' => true,
+		'filename' => $tmpfname,
+	) );
 
 	if ( is_wp_error( $response ) ) {
 		unlink( $tmpfname );
 		return $response;
 	}
 
-	if ( 200 != wp_remote_retrieve_response_code( $response ) ){
+	if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
 		unlink( $tmpfname );
 		return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ) );
 	}
@@ -534,17 +546,18 @@
  * @return bool|object WP_Error on failure, true on success, false when the MD5 format is unknown/unexpected
  */
 function verify_file_md5( $filename, $expected_md5 ) {
-	if ( 32 == strlen( $expected_md5 ) )
+	if ( 32 == strlen( $expected_md5 ) ) {
 		$expected_raw_md5 = pack( 'H*', $expected_md5 );
-	elseif ( 24 == strlen( $expected_md5 ) )
+	} elseif ( 24 == strlen( $expected_md5 ) ) {
 		$expected_raw_md5 = base64_decode( $expected_md5 );
-	else
-		return false; // unknown format
+	} else { return false; // End if().
+	}
 
 	$file_md5 = md5_file( $filename, true );
 
-	if ( $file_md5 === $expected_raw_md5 )
+	if ( $file_md5 === $expected_raw_md5 ) {
 		return true;
+	}
 
 	return new WP_Error( 'md5_mismatch', sprintf( __( 'The checksum of the file (%1$s) does not match the expected checksum value (%2$s).' ), bin2hex( $file_md5 ), bin2hex( $expected_raw_md5 ) ) );
 }
@@ -564,33 +577,36 @@
  * @param string $to Full path on the filesystem to extract archive to
  * @return mixed WP_Error on failure, True on success
  */
-function unzip_file($file, $to) {
+function unzip_file( $file, $to ) {
 	global $wp_filesystem;
 
-	if ( ! $wp_filesystem || !is_object($wp_filesystem) )
-		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
+	if ( ! $wp_filesystem || ! is_object( $wp_filesystem ) ) {
+		return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
+	}
 
 	// Unzip can use a lot of memory, but not this much hopefully.
 	wp_raise_memory_limit( 'admin' );
 
 	$needed_dirs = array();
-	$to = trailingslashit($to);
+	$to = trailingslashit( $to );
 
 	// Determine any parent dir's needed (of the upgrade directory)
-	if ( ! $wp_filesystem->is_dir($to) ) { //Only do parents if no children exist
-		$path = preg_split('![/\\\]!', untrailingslashit($to));
-		for ( $i = count($path); $i >= 0; $i-- ) {
-			if ( empty($path[$i]) )
+	if ( ! $wp_filesystem->is_dir( $to ) ) { //Only do parents if no children exist
+		$path = preg_split( '![/\\\]!', untrailingslashit( $to ) );
+		for ( $i = count( $path ); $i >= 0; $i-- ) {
+			if ( empty( $path[ $i ] ) ) {
 				continue;
+			}
 
-			$dir = implode('/', array_slice($path, 0, $i+1) );
-			if ( preg_match('!^[a-z]:$!i', $dir) ) // Skip it if it looks like a Windows Drive letter.
+			$dir = implode( '/', array_slice( $path, 0, $i + 1 ) );
+			if ( preg_match( '!^[a-z]:$!i', $dir ) ) { // Skip it if it looks like a Windows Drive letter.
 				continue;
+			}
 
-			if ( ! $wp_filesystem->is_dir($dir) )
+			if ( ! $wp_filesystem->is_dir( $dir ) ) {
 				$needed_dirs[] = $dir;
-			else
-				break; // A folder exists, therefor, we dont need the check the levels below this
+			} else { break; // End if().
+			}
 		}
 	}
 
@@ -602,16 +618,17 @@
 	 * @param bool $ziparchive Whether to use ZipArchive. Default true.
 	 */
 	if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {
-		$result = _unzip_file_ziparchive($file, $to, $needed_dirs);
+		$result = _unzip_file_ziparchive( $file, $to, $needed_dirs );
 		if ( true === $result ) {
 			return $result;
-		} elseif ( is_wp_error($result) ) {
-			if ( 'incompatible_archive' != $result->get_error_code() )
+		} elseif ( is_wp_error( $result ) ) {
+			if ( 'incompatible_archive' != $result->get_error_code() ) {
 				return $result;
+			}
 		}
 	}
 	// Fall through to PclZip if ZipArchive is not available, or encountered an error opening the file.
-	return _unzip_file_pclzip($file, $to, $needed_dirs);
+	return _unzip_file_pclzip( $file, $to, $needed_dirs );
 }
 
 /**
@@ -629,23 +646,28 @@
  * @param array $needed_dirs A partial list of required folders needed to be created.
  * @return mixed WP_Error on failure, True on success
  */
-function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
+function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) {
 	global $wp_filesystem;
 
 	$z = new ZipArchive();
 
 	$zopen = $z->open( $file, ZIPARCHIVE::CHECKCONS );
-	if ( true !== $zopen )
-		return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), array( 'ziparchive_error' => $zopen ) );
+	if ( true !== $zopen ) {
+		return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), array(
+			'ziparchive_error' => $zopen,
+		) );
+	}
 
 	$uncompressed_size = 0;
 
 	for ( $i = 0; $i < $z->numFiles; $i++ ) {
-		if ( ! $info = $z->statIndex($i) )
+		if ( ! $info = $z->statIndex( $i ) ) {
 			return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
+		}
 
-		if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Skip the OS X-created __MACOSX directory
+		if ( '__MACOSX/' === substr( $info['name'], 0, 9 ) ) { // Skip the OS X-created __MACOSX directory
 			continue;
+		}
 
 		$uncompressed_size += $info['size'];
 
@@ -665,25 +687,28 @@
 	 */
 	if ( wp_doing_cron() ) {
 		$available_space = @disk_free_space( WP_CONTENT_DIR );
-		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
+		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) {
 			return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) );
+		}
 	}
 
-	$needed_dirs = array_unique($needed_dirs);
+	$needed_dirs = array_unique( $needed_dirs );
 	foreach ( $needed_dirs as $dir ) {
 		// Check the parent folders of the folders all exist within the creation array.
-		if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
+		if ( untrailingslashit( $to ) == $dir ) { // Skip over the working directory, We know this exists (or will exist)
 			continue;
-		if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it
+		}
+		if ( strpos( $dir, $to ) === false ) { // If the directory is not within the working directory, Skip it
 			continue;
+		}
 
-		$parent_folder = dirname($dir);
-		while ( !empty($parent_folder) && untrailingslashit($to) != $parent_folder && !in_array($parent_folder, $needed_dirs) ) {
+		$parent_folder = dirname( $dir );
+		while ( ! empty( $parent_folder ) && untrailingslashit( $to ) != $parent_folder && ! in_array( $parent_folder, $needed_dirs ) ) {
 			$needed_dirs[] = $parent_folder;
-			$parent_folder = dirname($parent_folder);
+			$parent_folder = dirname( $parent_folder );
 		}
 	}
-	asort($needed_dirs);
+	asort( $needed_dirs );
 
 	// Create those directories if need be:
 	foreach ( $needed_dirs as $_dir ) {
@@ -692,24 +717,29 @@
 			return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) );
 		}
 	}
-	unset($needed_dirs);
+	unset( $needed_dirs );
 
 	for ( $i = 0; $i < $z->numFiles; $i++ ) {
-		if ( ! $info = $z->statIndex($i) )
+		if ( ! $info = $z->statIndex( $i ) ) {
 			return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) );
+		}
 
-		if ( '/' == substr($info['name'], -1) ) // directory
+		if ( '/' == substr( $info['name'], -1 ) ) { // directory
 			continue;
+		}
 
-		if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
+		if ( '__MACOSX/' === substr( $info['name'], 0, 9 ) ) { // Don't extract the OS X-created __MACOSX directory files
 			continue;
+		}
 
-		$contents = $z->getFromIndex($i);
-		if ( false === $contents )
+		$contents = $z->getFromIndex( $i );
+		if ( false === $contents ) {
 			return new WP_Error( 'extract_failed_ziparchive', __( 'Could not extract file from archive.' ), $info['name'] );
+		}
 
-		if ( ! $wp_filesystem->put_contents( $to . $info['name'], $contents, FS_CHMOD_FILE) )
+		if ( ! $wp_filesystem->put_contents( $to . $info['name'], $contents, FS_CHMOD_FILE ) ) {
 			return new WP_Error( 'copy_failed_ziparchive', __( 'Could not copy file.' ), $info['name'] );
+		}
 	}
 
 	$z->close();
@@ -732,36 +762,39 @@
  * @param array $needed_dirs A partial list of required folders needed to be created.
  * @return mixed WP_Error on failure, True on success
  */
-function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
+function _unzip_file_pclzip( $file, $to, $needed_dirs = array() ) {
 	global $wp_filesystem;
 
 	mbstring_binary_safe_encoding();
 
-	require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
+	require_once( ABSPATH . 'wp-admin/includes/class-pclzip.php' );
 
-	$archive = new PclZip($file);
+	$archive = new PclZip( $file );
 
-	$archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING);
+	$archive_files = $archive->extract( PCLZIP_OPT_EXTRACT_AS_STRING );
 
 	reset_mbstring_encoding();
 
 	// Is the archive valid?
-	if ( !is_array($archive_files) )
-		return new WP_Error('incompatible_archive', __('Incompatible Archive.'), $archive->errorInfo(true));
+	if ( ! is_array( $archive_files ) ) {
+		return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), $archive->errorInfo( true ) );
+	}
 
-	if ( 0 == count($archive_files) )
+	if ( 0 == count( $archive_files ) ) {
 		return new WP_Error( 'empty_archive_pclzip', __( 'Empty archive.' ) );
+	}
 
 	$uncompressed_size = 0;
 
 	// Determine any children directories needed (From within the archive)
 	foreach ( $archive_files as $file ) {
-		if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory
+		if ( '__MACOSX/' === substr( $file['filename'], 0, 9 ) ) { // Skip the OS X-created __MACOSX directory
 			continue;
+		}
 
 		$uncompressed_size += $file['size'];
 
-		$needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname($file['filename']) );
+		$needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname( $file['filename'] ) );
 	}
 
 	/*
@@ -771,44 +804,51 @@
 	 */
 	if ( wp_doing_cron() ) {
 		$available_space = @disk_free_space( WP_CONTENT_DIR );
-		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
+		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) {
 			return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) );
+		}
 	}
 
-	$needed_dirs = array_unique($needed_dirs);
+	$needed_dirs = array_unique( $needed_dirs );
 	foreach ( $needed_dirs as $dir ) {
 		// Check the parent folders of the folders all exist within the creation array.
-		if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
+		if ( untrailingslashit( $to ) == $dir ) { // Skip over the working directory, We know this exists (or will exist)
 			continue;
-		if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it
+		}
+		if ( strpos( $dir, $to ) === false ) { // If the directory is not within the working directory, Skip it
 			continue;
+		}
 
-		$parent_folder = dirname($dir);
-		while ( !empty($parent_folder) && untrailingslashit($to) != $parent_folder && !in_array($parent_folder, $needed_dirs) ) {
+		$parent_folder = dirname( $dir );
+		while ( ! empty( $parent_folder ) && untrailingslashit( $to ) != $parent_folder && ! in_array( $parent_folder, $needed_dirs ) ) {
 			$needed_dirs[] = $parent_folder;
-			$parent_folder = dirname($parent_folder);
+			$parent_folder = dirname( $parent_folder );
 		}
 	}
-	asort($needed_dirs);
+	asort( $needed_dirs );
 
 	// Create those directories if need be:
 	foreach ( $needed_dirs as $_dir ) {
 		// Only check to see if the dir exists upon creation failure. Less I/O this way.
-		if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) )
+		if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) {
 			return new WP_Error( 'mkdir_failed_pclzip', __( 'Could not create directory.' ), substr( $_dir, strlen( $to ) ) );
+		}
 	}
-	unset($needed_dirs);
+	unset( $needed_dirs );
 
 	// Extract the files from the zip
 	foreach ( $archive_files as $file ) {
-		if ( $file['folder'] )
+		if ( $file['folder'] ) {
 			continue;
+		}
 
-		if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
+		if ( '__MACOSX/' === substr( $file['filename'], 0, 9 ) ) { // Don't extract the OS X-created __MACOSX directory files
 			continue;
+		}
 
-		if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
+		if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE ) ) {
 			return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] );
+		}
 	}
 	return true;
 }
@@ -826,41 +866,46 @@
  * @param array $skip_list a list of files/folders to skip copying
  * @return mixed WP_Error on failure, True on success.
  */
-function copy_dir($from, $to, $skip_list = array() ) {
+function copy_dir( $from, $to, $skip_list = array() ) {
 	global $wp_filesystem;
 
-	$dirlist = $wp_filesystem->dirlist($from);
+	$dirlist = $wp_filesystem->dirlist( $from );
 
-	$from = trailingslashit($from);
-	$to = trailingslashit($to);
+	$from = trailingslashit( $from );
+	$to = trailingslashit( $to );
 
 	foreach ( (array) $dirlist as $filename => $fileinfo ) {
-		if ( in_array( $filename, $skip_list ) )
+		if ( in_array( $filename, $skip_list ) ) {
 			continue;
+		}
 
 		if ( 'f' == $fileinfo['type'] ) {
-			if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) {
+			if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) {
 				// If copy failed, chmod file to 0644 and try again.
 				$wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE );
-				if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) )
+				if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) {
 					return new WP_Error( 'copy_failed_copy_dir', __( 'Could not copy file.' ), $to . $filename );
+				}
 			}
 		} elseif ( 'd' == $fileinfo['type'] ) {
-			if ( !$wp_filesystem->is_dir($to . $filename) ) {
-				if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) )
+			if ( ! $wp_filesystem->is_dir( $to . $filename ) ) {
+				if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) {
 					return new WP_Error( 'mkdir_failed_copy_dir', __( 'Could not create directory.' ), $to . $filename );
+				}
 			}
 
 			// generate the $sub_skip_list for the subdirectory as a sub-set of the existing $skip_list
 			$sub_skip_list = array();
 			foreach ( $skip_list as $skip_item ) {
-				if ( 0 === strpos( $skip_item, $filename . '/' ) )
+				if ( 0 === strpos( $skip_item, $filename . '/' ) ) {
 					$sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item );
+				}
 			}
 
-			$result = copy_dir($from . $filename, $to . $filename, $sub_skip_list);
-			if ( is_wp_error($result) )
+			$result = copy_dir( $from . $filename, $to . $filename, $sub_skip_list );
+			if ( is_wp_error( $result ) ) {
 				return $result;
+			}
 		}
 	}
 	return true;
@@ -886,12 +931,13 @@
 function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
 	global $wp_filesystem;
 
-	require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php');
+	require_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php' );
 
 	$method = get_filesystem_method( $args, $context, $allow_relaxed_file_ownership );
 
-	if ( ! $method )
+	if ( ! $method ) {
 		return false;
+	}
 
 	if ( ! class_exists( "WP_Filesystem_$method" ) ) {
 
@@ -907,32 +953,39 @@
 		 */
 		$abstraction_file = apply_filters( 'filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method );
 
-		if ( ! file_exists($abstraction_file) )
+		if ( ! file_exists( $abstraction_file ) ) {
 			return;
+		}
 
-		require_once($abstraction_file);
+		require_once( $abstraction_file );
 	}
 	$method = "WP_Filesystem_$method";
 
 	$wp_filesystem = new $method($args);
 
 	//Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default.
-	if ( ! defined('FS_CONNECT_TIMEOUT') )
-		define('FS_CONNECT_TIMEOUT', 30);
-	if ( ! defined('FS_TIMEOUT') )
-		define('FS_TIMEOUT', 30);
+	if ( ! defined( 'FS_CONNECT_TIMEOUT' ) ) {
+		define( 'FS_CONNECT_TIMEOUT', 30 );
+	}
+	if ( ! defined( 'FS_TIMEOUT' ) ) {
+		define( 'FS_TIMEOUT', 30 );
+	}
 
-	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
+	if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
 		return false;
+	}
 
-	if ( !$wp_filesystem->connect() )
+	if ( ! $wp_filesystem->connect() ) {
 		return false; //There was an error connecting to the server.
+	}
 
 	// Set the permission constants if not already set.
-	if ( ! defined('FS_CHMOD_DIR') )
-		define('FS_CHMOD_DIR', ( fileperms( ABSPATH ) & 0777 | 0755 ) );
-	if ( ! defined('FS_CHMOD_FILE') )
-		define('FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );
+	if ( ! defined( 'FS_CHMOD_DIR' ) ) {
+		define( 'FS_CHMOD_DIR', ( fileperms( ABSPATH ) & 0777 | 0755 ) );
+	}
+	if ( ! defined( 'FS_CHMOD_FILE' ) ) {
+		define( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );
+	}
 
 	return true;
 }
@@ -964,7 +1017,7 @@
  * @return string The transport to use, see description for valid return values.
  */
 function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_file_ownership = false ) {
-	$method = defined('FS_METHOD') ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets'
+	$method = defined( 'FS_METHOD' ) ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets'
 
 	if ( ! $context ) {
 		$context = WP_CONTENT_DIR;
@@ -980,12 +1033,12 @@
 	if ( ! $method ) {
 
 		$temp_file_name = $context . 'temp-write-test-' . time();
-		$temp_handle = @fopen($temp_file_name, 'w');
+		$temp_handle = @fopen( $temp_file_name, 'w' );
 		if ( $temp_handle ) {
 
 			// Attempt to determine the file owner of the WordPress files, and that of newly created files
 			$wp_file_owner = $temp_file_owner = false;
-			if ( function_exists('fileowner') ) {
+			if ( function_exists( 'fileowner' ) ) {
 				$wp_file_owner = @fileowner( __FILE__ );
 				$temp_file_owner = @fileowner( $temp_file_name );
 			}
@@ -1002,14 +1055,17 @@
 				$GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership';
 			}
 
-			@fclose($temp_handle);
-			@unlink($temp_file_name);
+			@fclose( $temp_handle );
+			@unlink( $temp_file_name );
 		}
- 	}
+	}
 
-	if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2';
-	if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext';
-	if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
+	if ( ! $method && isset( $args['connection_type'] ) && 'ssh' == $args['connection_type'] && extension_loaded( 'ssh2' ) && function_exists( 'stream_get_contents' ) ) { $method = 'ssh2';
+	}
+	if ( ! $method && extension_loaded( 'ftp' ) ) { $method = 'ftpext';
+	}
+	if ( ! $method && ( extension_loaded( 'sockets' ) || function_exists( 'fsockopen' ) ) ) { $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
+	}
 
 	/**
 	 * Filters the filesystem method to use.
@@ -1076,20 +1132,26 @@
 	 * @param array  $extra_fields                 Extra POST fields.
 	 */
 	$req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );
-	if ( '' !== $req_cred )
+	if ( '' !== $req_cred ) {
 		return $req_cred;
+	}
 
-	if ( empty($type) ) {
+	if ( empty( $type ) ) {
 		$type = get_filesystem_method( array(), $context, $allow_relaxed_file_ownership );
 	}
 
-	if ( 'direct' == $type )
+	if ( 'direct' == $type ) {
 		return true;
+	}
 
-	if ( is_null( $extra_fields ) )
+	if ( is_null( $extra_fields ) ) {
 		$extra_fields = array( 'version', 'locale' );
+	}
 
-	$credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => ''));
+	$credentials = get_option( 'ftp_credentials', array(
+		'hostname' => '',
+		'username' => '',
+	) );
 
 	$submitted_form = wp_unslash( $_POST );
 
@@ -1106,23 +1168,24 @@
 	}
 
 	// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
-	$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($submitted_form['hostname']) ? $submitted_form['hostname'] : $credentials['hostname']);
-	$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($submitted_form['username']) ? $submitted_form['username'] : $credentials['username']);
-	$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($submitted_form['password']) ? $submitted_form['password'] : '');
+	$credentials['hostname'] = defined( 'FTP_HOST' ) ? FTP_HOST : ( ! empty( $submitted_form['hostname'] ) ? $submitted_form['hostname'] : $credentials['hostname']);
+	$credentials['username'] = defined( 'FTP_USER' ) ? FTP_USER : ( ! empty( $submitted_form['username'] ) ? $submitted_form['username'] : $credentials['username']);
+	$credentials['password'] = defined( 'FTP_PASS' ) ? FTP_PASS : ( ! empty( $submitted_form['password'] ) ? $submitted_form['password'] : '');
 
 	// Check to see if we are setting the public/private keys for ssh
-	$credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($submitted_form['public_key']) ? $submitted_form['public_key'] : '');
-	$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($submitted_form['private_key']) ? $submitted_form['private_key'] : '');
+	$credentials['public_key'] = defined( 'FTP_PUBKEY' ) ? FTP_PUBKEY : ( ! empty( $submitted_form['public_key'] ) ? $submitted_form['public_key'] : '');
+	$credentials['private_key'] = defined( 'FTP_PRIKEY' ) ? FTP_PRIKEY : ( ! empty( $submitted_form['private_key'] ) ? $submitted_form['private_key'] : '');
 
 	// Sanitize the hostname, Some people might pass in odd-data:
-	$credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off
+	$credentials['hostname'] = preg_replace( '|\w+://|', '', $credentials['hostname'] ); //Strip any schemes off
 
-	if ( strpos($credentials['hostname'], ':') ) {
-		list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2);
-		if ( ! is_numeric($credentials['port']) )
-			unset($credentials['port']);
+	if ( strpos( $credentials['hostname'], ':' ) ) {
+		list( $credentials['hostname'], $credentials['port'] ) = explode( ':', $credentials['hostname'], 2 );
+		if ( ! is_numeric( $credentials['port'] ) ) {
+			unset( $credentials['port'] );
+		}
 	} else {
-		unset($credentials['port']);
+		unset( $credentials['port'] );
 	}
 
 	if ( ( defined( 'FTP_SSH' ) && FTP_SSH ) || ( defined( 'FS_METHOD' ) && 'ssh2' == FS_METHOD ) ) {
@@ -1136,14 +1199,15 @@
 	}
 	if ( ! $error &&
 			(
-				( !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) ||
-				( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) )
+				( ! empty( $credentials['password'] ) && ! empty( $credentials['username'] ) && ! empty( $credentials['hostname'] ) ) ||
+				( 'ssh' == $credentials['connection_type'] && ! empty( $credentials['public_key'] ) && ! empty( $credentials['private_key'] ) )
 			) ) {
 		$stored_credentials = $credentials;
-		if ( !empty($stored_credentials['port']) ) //save port as part of hostname to simplify above code.
+		if ( ! empty( $stored_credentials['port'] ) ) { //save port as part of hostname to simplify above code.
 			$stored_credentials['hostname'] .= ':' . $stored_credentials['port'];
+		}
 
-		unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']);
+		unset( $stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key'] );
 		if ( ! wp_installing() ) {
 			update_option( 'ftp_credentials', $stored_credentials );
 		}
@@ -1157,19 +1221,23 @@
 	$connection_type = isset( $credentials['connection_type'] ) ? $credentials['connection_type'] : '';
 
 	if ( $error ) {
-		$error_string = __('<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.');
-		if ( is_wp_error($error) )
+		$error_string = __( '<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.' );
+		if ( is_wp_error( $error ) ) {
 			$error_string = esc_html( $error->get_error_message() );
+		}
 		echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
 	}
 
 	$types = array();
-	if ( extension_loaded('ftp') || extension_loaded('sockets') || function_exists('fsockopen') )
-		$types[ 'ftp' ] = __('FTP');
-	if ( extension_loaded('ftp') ) //Only this supports FTPS
-		$types[ 'ftps' ] = __('FTPS (SSL)');
-	if ( extension_loaded('ssh2') && function_exists('stream_get_contents') )
-		$types[ 'ssh' ] = __('SSH2');
+	if ( extension_loaded( 'ftp' ) || extension_loaded( 'sockets' ) || function_exists( 'fsockopen' ) ) {
+		$types['ftp'] = __( 'FTP' );
+	}
+	if ( extension_loaded( 'ftp' ) ) { //Only this supports FTPS
+		$types['ftps'] = __( 'FTPS (SSL)' );
+	}
+	if ( extension_loaded( 'ssh2' ) && function_exists( 'stream_get_contents' ) ) {
+		$types['ssh'] = __( 'SSH2' );
+	}
 
 	/**
 	 * Filters the connection types to output to the filesystem credentials form.
@@ -1198,48 +1266,50 @@
 echo "<$heading_tag id='request-filesystem-credentials-title'>" . __( 'Connection Information' ) . "</$heading_tag>";
 ?>
 <p id="request-filesystem-credentials-desc"><?php
-	$label_user = __('Username');
-	$label_pass = __('Password');
-	_e('To perform the requested action, WordPress needs to access your web server.');
+	$label_user = __( 'Username' );
+	$label_pass = __( 'Password' );
+	_e( 'To perform the requested action, WordPress needs to access your web server.' );
 	echo ' ';
-	if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
-		if ( isset( $types['ssh'] ) ) {
-			_e('Please enter your FTP or SSH credentials to proceed.');
-			$label_user = __('FTP/SSH Username');
-			$label_pass = __('FTP/SSH Password');
-		} else {
-			_e('Please enter your FTP credentials to proceed.');
-			$label_user = __('FTP Username');
-			$label_pass = __('FTP Password');
-		}
-		echo ' ';
+if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
+	if ( isset( $types['ssh'] ) ) {
+		_e( 'Please enter your FTP or SSH credentials to proceed.' );
+		$label_user = __( 'FTP/SSH Username' );
+		$label_pass = __( 'FTP/SSH Password' );
+	} else {
+		_e( 'Please enter your FTP credentials to proceed.' );
+		$label_user = __( 'FTP Username' );
+		$label_pass = __( 'FTP Password' );
 	}
-	_e('If you do not remember your credentials, you should contact your web host.');
+	echo ' ';
+}
+	_e( 'If you do not remember your credentials, you should contact your web host.' );
 ?></p>
 <label for="hostname">
 	<span class="field-title"><?php _e( 'Hostname' ) ?></span>
-	<input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ) ?>" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php disabled( defined('FTP_HOST') ); ?> />
+	<input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ) ?>" value="<?php echo esc_attr( $hostname );
+	if ( ! empty( $port ) ) { echo ":$port";} ?>"<?php disabled( defined( 'FTP_HOST' ) ); ?> />
 </label>
 <div class="ftp-username">
 	<label for="username">
 		<span class="field-title"><?php echo $label_user; ?></span>
-		<input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php disabled( defined('FTP_USER') ); ?> />
+		<input name="username" type="text" id="username" value="<?php echo esc_attr( $username ) ?>"<?php disabled( defined( 'FTP_USER' ) ); ?> />
 	</label>
 </div>
 <div class="ftp-password">
 	<label for="password">
 		<span class="field-title"><?php echo $label_pass; ?></span>
-		<input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> />
-		<em><?php if ( ! defined('FTP_PASS') ) _e( 'This password will not be stored on the server.' ); ?></em>
+		<input name="password" type="password" id="password" value="<?php if ( defined( 'FTP_PASS' ) ) { echo '*****';} ?>"<?php disabled( defined( 'FTP_PASS' ) ); ?> />
+		<em><?php if ( ! defined( 'FTP_PASS' ) ) { _e( 'This password will not be stored on the server.' );} ?></em>
 	</label>
 </div>
 <fieldset>
 <legend><?php _e( 'Connection Type' ); ?></legend>
 <?php
 	$disabled = disabled( ( defined( 'FTP_SSL' ) && FTP_SSL ) || ( defined( 'FTP_SSH' ) && FTP_SSH ), true, false );
-	foreach ( $types as $name => $text ) : ?>
+foreach ( $types as $name => $text ) : ?>
 	<label for="<?php echo esc_attr( $name ) ?>">
-		<input type="radio" name="connection_type" id="<?php echo esc_attr( $name ) ?>" value="<?php echo esc_attr( $name ) ?>"<?php checked( $name, $connection_type ); echo $disabled; ?> />
+		<input type="radio" name="connection_type" id="<?php echo esc_attr( $name ) ?>" value="<?php echo esc_attr( $name ) ?>"<?php checked( $name, $connection_type );
+		echo $disabled; ?> />
 		<?php echo $text; ?>
 	</label>
 <?php
@@ -1256,12 +1326,12 @@
 <fieldset id="ssh-keys"<?php echo $hidden_class; ?>>
 <legend><?php _e( 'Authentication Keys' ); ?></legend>
 <label for="public_key">
-	<span class="field-title"><?php _e('Public Key:') ?></span>
-	<input name="public_key" type="text" id="public_key" aria-describedby="auth-keys-desc" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> />
+	<span class="field-title"><?php _e( 'Public Key:' ) ?></span>
+	<input name="public_key" type="text" id="public_key" aria-describedby="auth-keys-desc" value="<?php echo esc_attr( $public_key ) ?>"<?php disabled( defined( 'FTP_PUBKEY' ) ); ?> />
 </label>
 <label for="private_key">
-	<span class="field-title"><?php _e('Private Key:') ?></span>
-	<input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> />
+	<span class="field-title"><?php _e( 'Private Key:' ) ?></span>
+	<input name="private_key" type="text" id="private_key" value="<?php echo esc_attr( $private_key ) ?>"<?php disabled( defined( 'FTP_PRIKEY' ) ); ?> />
 </label>
 <p id="auth-keys-desc"><?php _e( 'Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.' ) ?></p>
 </fieldset>
@@ -1269,8 +1339,9 @@
 }
 
 foreach ( (array) $extra_fields as $field ) {
-	if ( isset( $submitted_form[ $field ] ) )
+	if ( isset( $submitted_form[ $field ] ) ) {
 		echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( $submitted_form[ $field ] ) . '" />';
+	}
 }
 ?>
 	<p class="request-filesystem-credentials-action-buttons">
Index: src/wp-admin/includes/image-edit.php
===================================================================
--- src/wp-admin/includes/image-edit.php	(revision 40901)
+++ src/wp-admin/includes/image-edit.php	(working copy)
@@ -13,30 +13,32 @@
  * @param bool|object $msg     Optional. Message to display for image editor updates or errors.
  *                             Default false.
  */
-function wp_image_editor($post_id, $msg = false) {
-	$nonce = wp_create_nonce("image_editor-$post_id");
-	$meta = wp_get_attachment_metadata($post_id);
-	$thumb = image_get_intermediate_size($post_id, 'thumbnail');
-	$sub_sizes = isset($meta['sizes']) && is_array($meta['sizes']);
+function wp_image_editor( $post_id, $msg = false ) {
+	$nonce = wp_create_nonce( "image_editor-$post_id" );
+	$meta = wp_get_attachment_metadata( $post_id );
+	$thumb = image_get_intermediate_size( $post_id, 'thumbnail' );
+	$sub_sizes = isset( $meta['sizes'] ) && is_array( $meta['sizes'] );
 	$note = '';
 
-	if ( isset( $meta['width'], $meta['height'] ) )
+	if ( isset( $meta['width'], $meta['height'] ) ) {
 		$big = max( $meta['width'], $meta['height'] );
-	else
-		die( __('Image data does not exist. Please re-upload the image.') );
+	} else { die( __( 'Image data does not exist. Please re-upload the image.' ) );
+	}
 
 	$sizer = $big > 400 ? 400 / $big : 1;
 
 	$backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
 	$can_restore = false;
-	if ( ! empty( $backup_sizes ) && isset( $backup_sizes['full-orig'], $meta['file'] ) )
+	if ( ! empty( $backup_sizes ) && isset( $backup_sizes['full-orig'], $meta['file'] ) ) {
 		$can_restore = $backup_sizes['full-orig']['file'] != basename( $meta['file'] );
+	}
 
 	if ( $msg ) {
-		if ( isset($msg->error) )
+		if ( isset( $msg->error ) ) {
 			$note = "<div class='error'><p>$msg->error</p></div>";
-		elseif ( isset($msg->msg) )
+		} elseif ( isset( $msg->msg ) ) {
 			$note = "<div class='updated'><p>$msg->msg</p></div>";
+		}
 	}
 
 	?>
@@ -49,10 +51,10 @@
 		<h2><?php _e( 'Scale Image' ); ?></h2>
 		<button type="button" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelp(this);return false;" aria-expanded="false"><span class="screen-reader-text"><?php esc_html_e( 'Scale Image Help' ); ?></span></button>
 		<div class="imgedit-help">
-		<p><?php _e('You can proportionally scale the original image. For best results, scaling should be done before you crop, flip, or rotate. Images can only be scaled down, not up.'); ?></p>
+		<p><?php _e( 'You can proportionally scale the original image. For best results, scaling should be done before you crop, flip, or rotate. Images can only be scaled down, not up.' ); ?></p>
 		</div>
-		<?php if ( isset( $meta['width'], $meta['height'] ) ): ?>
-		<p><?php printf( __('Original dimensions %s'), $meta['width'] . ' &times; ' . $meta['height'] ); ?></p>
+		<?php if ( isset( $meta['width'], $meta['height'] ) ) : ?>
+		<p><?php printf( __( 'Original dimensions %s' ), $meta['width'] . ' &times; ' . $meta['height'] ); ?></p>
 		<?php endif ?>
 		<div class="imgedit-submit">
 
@@ -68,7 +70,7 @@
 		</label>
 		<span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>">!</span>
 		<input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" />
- 		</div>
+		 </div>
 		</fieldset>
 
 		</div>
@@ -81,10 +83,11 @@
 	<div class="imgedit-group-top">
 		<h2><button type="button" onclick="imageEdit.toggleHelp(this);" class="button-link"><?php _e( 'Restore Original Image' ); ?> <span class="dashicons dashicons-arrow-down imgedit-help-toggle"></span></button></h2>
 		<div class="imgedit-help">
-		<p><?php _e('Discard any changes and restore the original image.');
+		<p><?php _e( 'Discard any changes and restore the original image.' );
 
-		if ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE )
-			echo ' '.__('Previously edited copies of the image will not be deleted.');
+		if ( ! defined( 'IMAGE_EDIT_OVERWRITE' ) || ! IMAGE_EDIT_OVERWRITE ) {
+			echo ' ' . __( 'Previously edited copies of the image will not be deleted.' );
+		}
 
 		?></p>
 		<div class="imgedit-submit">
@@ -102,13 +105,13 @@
 		<button type="button" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelp(this);return false;" aria-expanded="false"><span class="screen-reader-text"><?php esc_html_e( 'Image Crop Help' ); ?></span></button>
 
 		<div class="imgedit-help">
-		<p><?php _e('To crop the image, click on it and drag to make your selection.'); ?></p>
+		<p><?php _e( 'To crop the image, click on it and drag to make your selection.' ); ?></p>
 
-		<p><strong><?php _e('Crop Aspect Ratio'); ?></strong><br />
-		<?php _e('The aspect ratio is the relationship between the width and height. You can preserve the aspect ratio by holding down the shift key while resizing your selection. Use the input box to specify the aspect ratio, e.g. 1:1 (square), 4:3, 16:9, etc.'); ?></p>
+		<p><strong><?php _e( 'Crop Aspect Ratio' ); ?></strong><br />
+		<?php _e( 'The aspect ratio is the relationship between the width and height. You can preserve the aspect ratio by holding down the shift key while resizing your selection. Use the input box to specify the aspect ratio, e.g. 1:1 (square), 4:3, 16:9, etc.' ); ?></p>
 
-		<p><strong><?php _e('Crop Selection'); ?></strong><br />
-		<?php _e('Once you have made your selection, you can adjust it by entering the size in pixels. The minimum selection size is the thumbnail size as set in the Media settings.'); ?></p>
+		<p><strong><?php _e( 'Crop Selection' ); ?></strong><br />
+		<?php _e( 'Once you have made your selection, you can adjust it by entering the size in pixels. The minimum selection size is the thumbnail size as set in the Media settings.' ); ?></p>
 		</div>
 	</div>
 
@@ -148,7 +151,7 @@
 	<div class="imgedit-group-top">
 		<h2><?php _e( 'Thumbnail Settings' ); ?></h2>
 		<button type="button" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelp(this);return false;" aria-expanded="false"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail Settings Help' ); ?></span></button>
-		<p class="imgedit-help"><?php _e('You can edit the image while preserving the thumbnail. For example, you may wish to have a square thumbnail that displays just a section of the image.'); ?></p>
+		<p class="imgedit-help"><?php _e( 'You can edit the image while preserving the thumbnail. For example, you may wish to have a square thumbnail that displays just a section of the image.' ); ?></p>
 	</div>
 
 	<figure class="imgedit-thumbnail-preview">
@@ -162,20 +165,21 @@
 
 		<label class="imgedit-label">
 		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="all" checked="checked" />
-		<?php _e('All image sizes'); ?></label>
+		<?php _e( 'All image sizes' ); ?></label>
 
 		<label class="imgedit-label">
 		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="thumbnail" />
-		<?php _e('Thumbnail'); ?></label>
+		<?php _e( 'Thumbnail' ); ?></label>
 
 		<label class="imgedit-label">
 		<input type="radio" name="imgedit-target-<?php echo $post_id; ?>" value="nothumb" />
-		<?php _e('All sizes except thumbnail'); ?></label>
+		<?php _e( 'All sizes except thumbnail' ); ?></label>
 	</fieldset>
 	</div>
 	</div>
 
-	<?php } ?>
+	<?php }// End if().
+	?>
 
 	</div>
 
@@ -184,14 +188,17 @@
 		<div class="imgedit-menu wp-clearfix">
 			<button type="button" onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Crop' ); ?></span></button><?php
 
-		// On some setups GD library does not provide imagerotate() - Ticket #11536
-		if ( wp_image_editor_supports( array( 'mime_type' => get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) {
-			$note_no_rotate = '';
-	?>
+			// On some setups GD library does not provide imagerotate() - Ticket #11536
+			if ( wp_image_editor_supports( array(
+				'mime_type' => get_post_mime_type( $post_id ),
+				'methods' => array( 'rotate' ),
+			) ) ) {
+																																																									   $note_no_rotate = '';
+			?>
 			<button type="button" class="imgedit-rleft button" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button>
 			<button type="button" class="imgedit-rright button" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button>
-	<?php } else {
-			$note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
+		<?php } else {
+				$note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
 	?>
 			<button type="button" class="imgedit-rleft button disabled" disabled></button>
 			<button type="button" class="imgedit-rright button disabled" disabled></button>
@@ -213,7 +220,7 @@
 		<input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
 
 		<div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
-		<img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand(1, 99999); ?>" alt="" />
+		<img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
 		</div>
 
 		<div class="imgedit-submit">
@@ -224,7 +231,7 @@
 
 	</div>
 	<div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>"></div>
-	<div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e("There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor."); ?></div>
+	<div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e( "There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor." ); ?></div>
 	</div>
 <?php
 }
@@ -251,8 +258,9 @@
 		 */
 		$image = apply_filters( 'image_editor_save_pre', $image, $post_id );
 
-		if ( is_wp_error( $image->stream( $mime_type ) ) )
+		if ( is_wp_error( $image->stream( $mime_type ) ) ) {
 			return false;
+		}
 
 		return true;
 	} else {
@@ -282,7 +290,7 @@
 			default:
 				return false;
 		}
-	}
+	}// End if().
 }
 
 /**
@@ -316,8 +324,9 @@
 		 */
 		$saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id );
 
-		if ( null !== $saved )
+		if ( null !== $saved ) {
 			return $saved;
+		}
 
 		return $image->save( $filename, $mime_type );
 	} else {
@@ -343,8 +352,9 @@
 		 */
 		$saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id );
 
-		if ( null !== $saved )
+		if ( null !== $saved ) {
 			return $saved;
+		}
 
 		switch ( $mime_type ) {
 			case 'image/jpeg':
@@ -358,7 +368,7 @@
 			default:
 				return false;
 		}
-	}
+	}// End if().
 }
 
 /**
@@ -371,8 +381,8 @@
  * @param int $h Image height in pixels.
  * @return float|int Image preview ratio.
  */
-function _image_get_preview_ratio($w, $h) {
-	$max = max($w, $h);
+function _image_get_preview_ratio( $w, $h ) {
+	$max = max( $w, $h );
 	return $max > 400 ? (400 / $max) : 1;
 }
 
@@ -386,12 +396,12 @@
  * @param float|int $angle Image rotation angle, in degrees.
  * @return resource|false GD image resource, false otherwise.
  */
-function _rotate_image_resource($img, $angle) {
+function _rotate_image_resource( $img, $angle ) {
 	_deprecated_function( __FUNCTION__, '3.5.0', 'WP_Image_Editor::rotate()' );
-	if ( function_exists('imagerotate') ) {
-		$rotated = imagerotate($img, $angle, 0);
-		if ( is_resource($rotated) ) {
-			imagedestroy($img);
+	if ( function_exists( 'imagerotate' ) ) {
+		$rotated = imagerotate( $img, $angle, 0 );
+		if ( is_resource( $rotated ) ) {
+			imagedestroy( $img );
 			$img = $rotated;
 		}
 	}
@@ -409,19 +419,19 @@
  * @param bool     $vert Whether to flip vertically.
  * @return resource (maybe) flipped image resource.
  */
-function _flip_image_resource($img, $horz, $vert) {
+function _flip_image_resource( $img, $horz, $vert ) {
 	_deprecated_function( __FUNCTION__, '3.5.0', 'WP_Image_Editor::flip()' );
-	$w = imagesx($img);
-	$h = imagesy($img);
-	$dst = wp_imagecreatetruecolor($w, $h);
-	if ( is_resource($dst) ) {
+	$w = imagesx( $img );
+	$h = imagesy( $img );
+	$dst = wp_imagecreatetruecolor( $w, $h );
+	if ( is_resource( $dst ) ) {
 		$sx = $vert ? ($w - 1) : 0;
 		$sy = $horz ? ($h - 1) : 0;
 		$sw = $vert ? -$w : $w;
 		$sh = $horz ? -$h : $h;
 
-		if ( imagecopyresampled($dst, $img, 0, 0, $sx, $sy, $w, $h, $sw, $sh) ) {
-			imagedestroy($img);
+		if ( imagecopyresampled( $dst, $img, 0, 0, $sx, $sy, $w, $h, $sw, $sh ) ) {
+			imagedestroy( $img );
 			$img = $dst;
 		}
 	}
@@ -441,11 +451,11 @@
  * @param float    $h   Source height.
  * @return resource (maybe) cropped image resource.
  */
-function _crop_image_resource($img, $x, $y, $w, $h) {
-	$dst = wp_imagecreatetruecolor($w, $h);
-	if ( is_resource($dst) ) {
-		if ( imagecopy($dst, $img, 0, 0, $x, $y, $w, $h) ) {
-			imagedestroy($img);
+function _crop_image_resource( $img, $x, $y, $w, $h ) {
+	$dst = wp_imagecreatetruecolor( $w, $h );
+	if ( is_resource( $dst ) ) {
+		if ( imagecopy( $dst, $img, 0, 0, $x, $y, $w, $h ) ) {
+			imagedestroy( $img );
 			$img = $dst;
 		}
 	}
@@ -462,52 +472,55 @@
  * @return WP_Image_Editor WP_Image_Editor instance with changes applied.
  */
 function image_edit_apply_changes( $image, $changes ) {
-	if ( is_resource( $image ) )
+	if ( is_resource( $image ) ) {
 		_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
+	}
 
-	if ( !is_array($changes) )
+	if ( ! is_array( $changes ) ) {
 		return $image;
+	}
 
 	// Expand change operations.
 	foreach ( $changes as $key => $obj ) {
-		if ( isset($obj->r) ) {
+		if ( isset( $obj->r ) ) {
 			$obj->type = 'rotate';
 			$obj->angle = $obj->r;
-			unset($obj->r);
-		} elseif ( isset($obj->f) ) {
+			unset( $obj->r );
+		} elseif ( isset( $obj->f ) ) {
 			$obj->type = 'flip';
 			$obj->axis = $obj->f;
-			unset($obj->f);
-		} elseif ( isset($obj->c) ) {
+			unset( $obj->f );
+		} elseif ( isset( $obj->c ) ) {
 			$obj->type = 'crop';
 			$obj->sel = $obj->c;
-			unset($obj->c);
+			unset( $obj->c );
 		}
-		$changes[$key] = $obj;
+		$changes[ $key ] = $obj;
 	}
 
 	// Combine operations.
-	if ( count($changes) > 1 ) {
-		$filtered = array($changes[0]);
+	if ( count( $changes ) > 1 ) {
+		$filtered = array( $changes[0] );
 		for ( $i = 0, $j = 1, $c = count( $changes ); $j < $c; $j++ ) {
 			$combined = false;
-			if ( $filtered[$i]->type == $changes[$j]->type ) {
-				switch ( $filtered[$i]->type ) {
+			if ( $filtered[ $i ]->type == $changes[ $j ]->type ) {
+				switch ( $filtered[ $i ]->type ) {
 					case 'rotate':
-						$filtered[$i]->angle += $changes[$j]->angle;
+						$filtered[ $i ]->angle += $changes[ $j ]->angle;
 						$combined = true;
 						break;
 					case 'flip':
-						$filtered[$i]->axis ^= $changes[$j]->axis;
+						$filtered[ $i ]->axis ^= $changes[ $j ]->axis;
 						$combined = true;
 						break;
 				}
 			}
-			if ( !$combined )
-				$filtered[++$i] = $changes[$j];
+			if ( ! $combined ) {
+				$filtered[ ++$i ] = $changes[ $j ];
+			}
 		}
 		$changes = $filtered;
-		unset($filtered);
+		unset( $filtered );
 	}
 
 	// Image resource before applying the changes.
@@ -519,7 +532,7 @@
 		 * @since 3.5.0
 		 *
 		 * @param WP_Image_Editor $image   WP_Image_Editor instance.
- 		 * @param array           $changes Array of change operations.
+		  * @param array           $changes Array of change operations.
 		 */
 		$image = apply_filters( 'wp_image_editor_before_change', $image, $changes );
 	} elseif ( is_resource( $image ) ) {
@@ -531,7 +544,7 @@
 		 * @deprecated 3.5.0 Use wp_image_editor_before_change instead.
 		 *
 		 * @param resource $image   GD image resource.
- 		 * @param array    $changes Array of change operations.
+		  * @param array    $changes Array of change operations.
 		 */
 		$image = apply_filters( 'image_edit_before_change', $image, $changes );
 	}
@@ -540,18 +553,19 @@
 		switch ( $operation->type ) {
 			case 'rotate':
 				if ( $operation->angle != 0 ) {
-					if ( $image instanceof WP_Image_Editor )
+					if ( $image instanceof WP_Image_Editor ) {
 						$image->rotate( $operation->angle );
-					else
-						$image = _rotate_image_resource( $image, $operation->angle );
+					} else { $image = _rotate_image_resource( $image, $operation->angle );
+					}
 				}
 				break;
 			case 'flip':
-				if ( $operation->axis != 0 )
-					if ( $image instanceof WP_Image_Editor )
+				if ( $operation->axis != 0 ) {
+					if ( $image instanceof WP_Image_Editor ) {
 						$image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 );
-					else
-						$image = _flip_image_resource( $image, ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 );
+					} else { $image = _flip_image_resource( $image, ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 );
+					}
+				}
 				break;
 			case 'crop':
 				$sel = $operation->sel;
@@ -593,9 +607,10 @@
 		return false;
 	}
 
-	$changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash($_REQUEST['history']) ) : null;
-	if ( $changes )
+	$changes = ! empty( $_REQUEST['history'] ) ? json_decode( wp_unslash( $_REQUEST['history'] ) ) : null;
+	if ( $changes ) {
 		$img = image_edit_apply_changes( $img, $changes );
+	}
 
 	// Scale the image.
 	$size = $img->get_size();
@@ -603,11 +618,12 @@
 	$h = $size['height'];
 
 	$ratio = _image_get_preview_ratio( $w, $h );
-	$w2 = max ( 1, $w * $ratio );
-	$h2 = max ( 1, $h * $ratio );
+	$w2 = max( 1, $w * $ratio );
+	$h2 = max( 1, $h * $ratio );
 
-	if ( is_wp_error( $img->resize( $w2, $h2 ) ) )
+	if ( is_wp_error( $img->resize( $w2, $h2 ) ) ) {
 		return false;
+	}
 
 	return wp_stream_image( $img, $post->post_mime_type, $post_id );
 }
@@ -620,39 +636,43 @@
  * @param int $post_id Attachment post ID.
  * @return stdClass Image restoration message object.
  */
-function wp_restore_image($post_id) {
-	$meta = wp_get_attachment_metadata($post_id);
-	$file = get_attached_file($post_id);
+function wp_restore_image( $post_id ) {
+	$meta = wp_get_attachment_metadata( $post_id );
+	$file = get_attached_file( $post_id );
 	$backup_sizes = $old_backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
 	$restored = false;
 	$msg = new stdClass;
 
-	if ( !is_array($backup_sizes) ) {
-		$msg->error = __('Cannot load image metadata.');
+	if ( ! is_array( $backup_sizes ) ) {
+		$msg->error = __( 'Cannot load image metadata.' );
 		return $msg;
 	}
 
-	$parts = pathinfo($file);
-	$suffix = time() . rand(100, 999);
+	$parts = pathinfo( $file );
+	$suffix = time() . rand( 100, 999 );
 	$default_sizes = get_intermediate_image_sizes();
 
-	if ( isset($backup_sizes['full-orig']) && is_array($backup_sizes['full-orig']) ) {
+	if ( isset( $backup_sizes['full-orig'] ) && is_array( $backup_sizes['full-orig'] ) ) {
 		$data = $backup_sizes['full-orig'];
 
 		if ( $parts['basename'] != $data['file'] ) {
-			if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
+			if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE ) {
 
 				// Delete only if it's an edited image.
-				if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) {
+				if ( preg_match( '/-e[0-9]{13}\./', $parts['basename'] ) ) {
 					wp_delete_file( $file );
 				}
 			} elseif ( isset( $meta['width'], $meta['height'] ) ) {
-				$backup_sizes["full-$suffix"] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $parts['basename']);
+				$backup_sizes[ "full-$suffix" ] = array(
+					'width' => $meta['width'],
+					'height' => $meta['height'],
+					'file' => $parts['basename'],
+				);
 			}
 		}
 
-		$restored_file = path_join($parts['dirname'], $data['file']);
-		$restored = update_attached_file($post_id, $restored_file);
+		$restored_file = path_join( $parts['dirname'], $data['file'] );
+		$restored = update_attached_file( $post_id, $restored_file );
 
 		$meta['file'] = _wp_relative_upload_path( $restored_file );
 		$meta['width'] = $data['width'];
@@ -660,38 +680,38 @@
 	}
 
 	foreach ( $default_sizes as $default_size ) {
-		if ( isset($backup_sizes["$default_size-orig"]) ) {
-			$data = $backup_sizes["$default_size-orig"];
-			if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) {
-				if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
+		if ( isset( $backup_sizes[ "$default_size-orig" ] ) ) {
+			$data = $backup_sizes[ "$default_size-orig" ];
+			if ( isset( $meta['sizes'][ $default_size ] ) && $meta['sizes'][ $default_size ]['file'] != $data['file'] ) {
+				if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE ) {
 
 					// Delete only if it's an edited image.
-					if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) {
-						$delete_file = path_join( $parts['dirname'], $meta['sizes'][$default_size]['file'] );
+					if ( preg_match( '/-e[0-9]{13}-/', $meta['sizes'][ $default_size ]['file'] ) ) {
+						$delete_file = path_join( $parts['dirname'], $meta['sizes'][ $default_size ]['file'] );
 						wp_delete_file( $delete_file );
 					}
 				} else {
-					$backup_sizes["$default_size-{$suffix}"] = $meta['sizes'][$default_size];
+					$backup_sizes[ "$default_size-{$suffix}" ] = $meta['sizes'][ $default_size ];
 				}
 			}
 
-			$meta['sizes'][$default_size] = $data;
+			$meta['sizes'][ $default_size ] = $data;
 		} else {
-			unset($meta['sizes'][$default_size]);
+			unset( $meta['sizes'][ $default_size ] );
 		}
 	}
 
 	if ( ! wp_update_attachment_metadata( $post_id, $meta ) ||
 		( $old_backup_sizes !== $backup_sizes && ! update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes ) ) ) {
 
-		$msg->error = __('Cannot save image metadata.');
+		$msg->error = __( 'Cannot save image metadata.' );
 		return $msg;
 	}
 
-	if ( !$restored )
-		$msg->error = __('Image metadata is inconsistent.');
-	else
-		$msg->msg = __('Image restored successfully.');
+	if ( ! $restored ) {
+		$msg->error = __( 'Image metadata is inconsistent.' );
+	} else { $msg->msg = __( 'Image restored successfully.' );
+	}
 
 	return $msg;
 }
@@ -712,14 +732,14 @@
 
 	$img = wp_get_image_editor( _load_image_to_edit_path( $post_id, 'full' ) );
 	if ( is_wp_error( $img ) ) {
-		$return->error = esc_js( __('Unable to create new image.') );
+		$return->error = esc_js( __( 'Unable to create new image.' ) );
 		return $return;
 	}
 
-	$fwidth = !empty($_REQUEST['fwidth']) ? intval($_REQUEST['fwidth']) : 0;
-	$fheight = !empty($_REQUEST['fheight']) ? intval($_REQUEST['fheight']) : 0;
-	$target = !empty($_REQUEST['target']) ? preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['target']) : '';
-	$scale = !empty($_REQUEST['do']) && 'scale' == $_REQUEST['do'];
+	$fwidth = ! empty( $_REQUEST['fwidth'] ) ? intval( $_REQUEST['fwidth'] ) : 0;
+	$fheight = ! empty( $_REQUEST['fheight'] ) ? intval( $_REQUEST['fheight'] ) : 0;
+	$target = ! empty( $_REQUEST['target'] ) ? preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['target'] ) : '';
+	$scale = ! empty( $_REQUEST['do'] ) && 'scale' == $_REQUEST['do'];
 
 	if ( $scale && $fwidth > 0 && $fheight > 0 ) {
 		$size = $img->get_size();
@@ -727,36 +747,39 @@
 		$sY = $size['height'];
 
 		// Check if it has roughly the same w / h ratio.
-		$diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
+		$diff = round( $sX / $sY, 2 ) - round( $fwidth / $fheight, 2 );
 		if ( -0.1 < $diff && $diff < 0.1 ) {
 			// Scale the full size image.
-			if ( $img->resize( $fwidth, $fheight ) )
+			if ( $img->resize( $fwidth, $fheight ) ) {
 				$scaled = true;
+			}
 		}
 
-		if ( !$scaled ) {
-			$return->error = esc_js( __('Error while saving the scaled image. Please reload the page and try again.') );
+		if ( ! $scaled ) {
+			$return->error = esc_js( __( 'Error while saving the scaled image. Please reload the page and try again.' ) );
 			return $return;
 		}
-	} elseif ( !empty($_REQUEST['history']) ) {
-		$changes = json_decode( wp_unslash($_REQUEST['history']) );
-		if ( $changes )
-			$img = image_edit_apply_changes($img, $changes);
+	} elseif ( ! empty( $_REQUEST['history'] ) ) {
+		$changes = json_decode( wp_unslash( $_REQUEST['history'] ) );
+		if ( $changes ) {
+			$img = image_edit_apply_changes( $img, $changes );
+		}
 	} else {
-		$return->error = esc_js( __('Nothing to save, the image has not changed.') );
+		$return->error = esc_js( __( 'Nothing to save, the image has not changed.' ) );
 		return $return;
 	}
 
-	$meta = wp_get_attachment_metadata($post_id);
+	$meta = wp_get_attachment_metadata( $post_id );
 	$backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true );
 
-	if ( !is_array($meta) ) {
-		$return->error = esc_js( __('Image data does not exist. Please re-upload the image.') );
+	if ( ! is_array( $meta ) ) {
+		$return->error = esc_js( __( 'Image data does not exist. Please re-upload the image.' ) );
 		return $return;
 	}
 
-	if ( !is_array($backup_sizes) )
+	if ( ! is_array( $backup_sizes ) ) {
 		$backup_sizes = array();
+	}
 
 	// Generate new filename.
 	$path = get_attached_file( $post_id );
@@ -765,10 +788,10 @@
 	$dirname = pathinfo( $path, PATHINFO_DIRNAME );
 	$ext = pathinfo( $path, PATHINFO_EXTENSION );
 	$filename = pathinfo( $path, PATHINFO_FILENAME );
-	$suffix = time() . rand(100, 999);
+	$suffix = time() . rand( 100, 999 );
 
-	if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE &&
-		isset($backup_sizes['full-orig']) && $backup_sizes['full-orig']['file'] != $basename ) {
+	if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE &&
+		isset( $backup_sizes['full-orig'] ) && $backup_sizes['full-orig']['file'] != $basename ) {
 
 		if ( 'thumbnail' == $target ) {
 			$new_path = "{$dirname}/{$filename}-temp.{$ext}";
@@ -781,7 +804,7 @@
 			$filename .= "-e{$suffix}";
 			$new_filename = "{$filename}.{$ext}";
 			$new_path = "{$dirname}/$new_filename";
-			if ( file_exists($new_path) ) {
+			if ( file_exists( $new_path ) ) {
 				$suffix++;
 			} else {
 				break;
@@ -790,8 +813,8 @@
 	}
 
 	// Save the full-size file, also needed to create sub-sizes.
-	if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) {
-		$return->error = esc_js( __('Unable to save the image.') );
+	if ( ! wp_save_image_file( $new_path, $img, $post->post_mime_type, $post_id ) ) {
+		$return->error = esc_js( __( 'Unable to save the image.' ) );
 		return $return;
 	}
 
@@ -806,7 +829,11 @@
 		}
 
 		if ( $tag ) {
-			$backup_sizes[$tag] = array('width' => $meta['width'], 'height' => $meta['height'], 'file' => $basename );
+			$backup_sizes[ $tag ] = array(
+				'width' => $meta['width'],
+				'height' => $meta['height'],
+				'file' => $basename,
+			);
 		}
 		$success = ( $path === $new_path ) || update_attached_file( $post_id, $new_path );
 
@@ -818,8 +845,9 @@
 
 		if ( $success && ('nothumb' == $target || 'all' == $target) ) {
 			$sizes = get_intermediate_image_sizes();
-			if ( 'nothumb' == $target )
-				$sizes = array_diff( $sizes, array('thumbnail') );
+			if ( 'nothumb' == $target ) {
+				$sizes = array_diff( $sizes, array( 'thumbnail' ) );
+			}
 		}
 
 		$return->fw = $meta['width'];
@@ -827,7 +855,7 @@
 	} elseif ( 'thumbnail' == $target ) {
 		$sizes = array( 'thumbnail' );
 		$success = $delete = $nocrop = true;
-	}
+	}// End if().
 
 	/*
 	 * We need to remove any existing resized image files because
@@ -849,16 +877,18 @@
 
 		foreach ( $sizes as $size ) {
 			$tag = false;
-			if ( isset( $meta['sizes'][$size] ) ) {
-				if ( isset($backup_sizes["$size-orig"]) ) {
-					if ( ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE ) && $backup_sizes["$size-orig"]['file'] != $meta['sizes'][$size]['file'] )
+			if ( isset( $meta['sizes'][ $size ] ) ) {
+				if ( isset( $backup_sizes[ "$size-orig" ] ) ) {
+					if ( ( ! defined( 'IMAGE_EDIT_OVERWRITE' ) || ! IMAGE_EDIT_OVERWRITE ) && $backup_sizes[ "$size-orig" ]['file'] != $meta['sizes'][ $size ]['file'] ) {
 						$tag = "$size-$suffix";
+					}
 				} else {
 					$tag = "$size-orig";
 				}
 
-				if ( $tag )
-					$backup_sizes[$tag] = $meta['sizes'][$size];
+				if ( $tag ) {
+					$backup_sizes[ $tag ] = $meta['sizes'][ $size ];
+				}
 			}
 
 			if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
@@ -871,17 +901,21 @@
 				$crop   = ( $nocrop ) ? false : get_option( "{$size}_crop" );
 			}
 
-			$_sizes[ $size ] = array( 'width' => $width, 'height' => $height, 'crop' => $crop );
+			$_sizes[ $size ] = array(
+				'width' => $width,
+				'height' => $height,
+				'crop' => $crop,
+			);
 		}
 
 		$meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) );
-	}
+	}// End if().
 
 	unset( $img );
 
 	if ( $success ) {
 		wp_update_attachment_metadata( $post_id, $meta );
-		update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes);
+		update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes );
 
 		if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
 			// Check if it's an image edit from attachment edit screen
@@ -889,9 +923,9 @@
 				$thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true );
 				$return->thumbnail = $thumb_url[0];
 			} else {
-				$file_url = wp_get_attachment_url($post_id);
+				$file_url = wp_get_attachment_url( $post_id );
 				if ( ! empty( $meta['sizes']['thumbnail'] ) && $thumb = $meta['sizes']['thumbnail'] ) {
-					$return->thumbnail = path_join( dirname($file_url), $thumb['file'] );
+					$return->thumbnail = path_join( dirname( $file_url ), $thumb['file'] );
 				} else {
 					$return->thumbnail = "$file_url?w=128&h=128";
 				}
@@ -905,6 +939,6 @@
 		wp_delete_file( $new_path );
 	}
 
-	$return->msg = esc_js( __('Image saved') );
+	$return->msg = esc_js( __( 'Image saved' ) );
 	return $return;
 }
Index: src/wp-admin/includes/image.php
===================================================================
--- src/wp-admin/includes/image.php	(revision 40901)
+++ src/wp-admin/includes/image.php	(working copy)
@@ -37,15 +37,18 @@
 	}
 
 	$editor = wp_get_image_editor( $src );
-	if ( is_wp_error( $editor ) )
+	if ( is_wp_error( $editor ) ) {
 		return $editor;
+	}
 
 	$src = $editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs );
-	if ( is_wp_error( $src ) )
+	if ( is_wp_error( $src ) ) {
 		return $src;
+	}
 
-	if ( ! $dst_file )
+	if ( ! $dst_file ) {
 		$dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file );
+	}
 
 	/*
 	 * The directory containing the original file may no longer exist when
@@ -56,8 +59,9 @@
 	$dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) );
 
 	$result = $editor->save( $dst_file );
-	if ( is_wp_error( $result ) )
+	if ( is_wp_error( $result ) ) {
 		return $result;
+	}
 
 	return $dst_file;
 }
@@ -84,36 +88,40 @@
 		$metadata['height'] = $imagesize[1];
 
 		// Make the file path relative to the upload dir.
-		$metadata['file'] = _wp_relative_upload_path($file);
+		$metadata['file'] = _wp_relative_upload_path( $file );
 
 		// Make thumbnails and other intermediate sizes.
 		$_wp_additional_image_sizes = wp_get_additional_image_sizes();
 
 		$sizes = array();
 		foreach ( get_intermediate_image_sizes() as $s ) {
-			$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
-			if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) {
+			$sizes[ $s ] = array(
+				'width' => '',
+				'height' => '',
+				'crop' => false,
+			);
+			if ( isset( $_wp_additional_image_sizes[ $s ]['width'] ) ) {
 				// For theme-added sizes
-				$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] );
+				$sizes[ $s ]['width'] = intval( $_wp_additional_image_sizes[ $s ]['width'] );
 			} else {
 				// For default sizes set in options
-				$sizes[$s]['width'] = get_option( "{$s}_size_w" );
+				$sizes[ $s ]['width'] = get_option( "{$s}_size_w" );
 			}
 
-			if ( isset( $_wp_additional_image_sizes[$s]['height'] ) ) {
+			if ( isset( $_wp_additional_image_sizes[ $s ]['height'] ) ) {
 				// For theme-added sizes
-				$sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] );
+				$sizes[ $s ]['height'] = intval( $_wp_additional_image_sizes[ $s ]['height'] );
 			} else {
 				// For default sizes set in options
-				$sizes[$s]['height'] = get_option( "{$s}_size_h" );
+				$sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
 			}
 
-			if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) ) {
+			if ( isset( $_wp_additional_image_sizes[ $s ]['crop'] ) ) {
 				// For theme-added sizes
-				$sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop'];
+				$sizes[ $s ]['crop'] = $_wp_additional_image_sizes[ $s ]['crop'];
 			} else {
 				// For default sizes set in options
-				$sizes[$s]['crop'] = get_option( "{$s}_crop" );
+				$sizes[ $s ]['crop'] = get_option( "{$s}_crop" );
 			}
 		}
 
@@ -131,24 +139,25 @@
 		if ( $sizes ) {
 			$editor = wp_get_image_editor( $file );
 
-			if ( ! is_wp_error( $editor ) )
+			if ( ! is_wp_error( $editor ) ) {
 				$metadata['sizes'] = $editor->multi_resize( $sizes );
+			}
 		} else {
 			$metadata['sizes'] = array();
 		}
 
 		// Fetch additional metadata from EXIF/IPTC.
 		$image_meta = wp_read_image_metadata( $file );
-		if ( $image_meta )
+		if ( $image_meta ) {
 			$metadata['image_meta'] = $image_meta;
-
+		}
 	} elseif ( wp_attachment_is( 'video', $attachment ) ) {
 		$metadata = wp_read_video_metadata( $file );
 		$support = current_theme_supports( 'post-thumbnails', 'attachment:video' ) || post_type_supports( 'attachment:video', 'thumbnail' );
 	} elseif ( wp_attachment_is( 'audio', $attachment ) ) {
 		$metadata = wp_read_audio_metadata( $file );
 		$support = current_theme_supports( 'post-thumbnails', 'attachment:audio' ) || post_type_supports( 'attachment:audio', 'thumbnail' );
-	}
+	}// End if().
 
 	if ( $support && ! empty( $metadata['image']['data'] ) ) {
 		// Check for existing cover.
@@ -160,7 +169,7 @@
 			'post_status' => 'inherit',
 			'posts_per_page' => 1,
 			'meta_key' => '_cover_hash',
-			'meta_value' => $hash
+			'meta_value' => $hash,
 		) );
 		$exists = reset( $posts );
 
@@ -169,11 +178,11 @@
 		} else {
 			$ext = '.jpg';
 			switch ( $metadata['image']['mime'] ) {
-			case 'image/gif':
-				$ext = '.gif';
+				case 'image/gif':
+					$ext = '.gif';
 				break;
-			case 'image/png':
-				$ext = '.png';
+				case 'image/png':
+					$ext = '.png';
 				break;
 			}
 			$basename = str_replace( '.', '-', basename( $file ) ) . '-image' . $ext;
@@ -201,10 +210,9 @@
 				wp_update_attachment_metadata( $sub_attachment_id, $attach_data );
 				update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );
 			}
-		}
-	}
-	// Try to create image thumbnails for PDFs
-	else if ( 'application/pdf' === $mime_type ) {
+		}// End if().
+	} // End if().
+	elseif ( 'application/pdf' === $mime_type ) {
 		$fallback_sizes = array(
 			'thumbnail',
 			'medium',
@@ -300,10 +308,11 @@
  * @param string $str
  * @return int|float
  */
-function wp_exif_frac2dec($str) {
+function wp_exif_frac2dec( $str ) {
 	@list( $n, $d ) = explode( '/', $str );
-	if ( !empty($d) )
+	if ( ! empty( $d ) ) {
 		return $n / $d;
+	}
 	return $str;
 }
 
@@ -315,8 +324,8 @@
  * @param string $str
  * @return int
  */
-function wp_exif_date2ts($str) {
-	@list( $date, $time ) = explode( ' ', trim($str) );
+function wp_exif_date2ts( $str ) {
+	@list( $date, $time ) = explode( ' ', trim( $str ) );
 	@list( $y, $m, $d ) = explode( ':', $date );
 
 	return strtotime( "{$y}-{$m}-{$d} {$time}" );
@@ -339,8 +348,9 @@
  * @return bool|array False on failure. Image metadata array on success.
  */
 function wp_read_image_metadata( $file ) {
-	if ( ! file_exists( $file ) )
+	if ( ! file_exists( $file ) ) {
 		return false;
+	}
 
 	list( , , $sourceImageType ) = getimagesize( $file );
 
@@ -379,10 +389,10 @@
 			// Headline, "A brief synopsis of the caption."
 			if ( ! empty( $iptc['2#105'][0] ) ) {
 				$meta['title'] = trim( $iptc['2#105'][0] );
-			/*
-			 * Title, "Many use the Title field to store the filename of the image,
-			 * though the field may be used in many ways."
-			 */
+				/*
+				* Title, "Many use the Title field to store the filename of the image,
+				* though the field may be used in many ways."
+				*/
 			} elseif ( ! empty( $iptc['2#005'][0] ) ) {
 				$meta['title'] = trim( $iptc['2#005'][0] );
 			}
@@ -402,22 +412,25 @@
 				$meta['caption'] = $caption;
 			}
 
-			if ( ! empty( $iptc['2#110'][0] ) ) // credit
+			if ( ! empty( $iptc['2#110'][0] ) ) { // credit
 				$meta['credit'] = trim( $iptc['2#110'][0] );
-			elseif ( ! empty( $iptc['2#080'][0] ) ) // creator / legacy byline
+			} elseif ( ! empty( $iptc['2#080'][0] ) ) { // creator / legacy byline
 				$meta['credit'] = trim( $iptc['2#080'][0] );
+			}
 
-			if ( ! empty( $iptc['2#055'][0] ) && ! empty( $iptc['2#060'][0] ) ) // created date and time
+			if ( ! empty( $iptc['2#055'][0] ) && ! empty( $iptc['2#060'][0] ) ) { // created date and time
 				$meta['created_timestamp'] = strtotime( $iptc['2#055'][0] . ' ' . $iptc['2#060'][0] );
+			}
 
-			if ( ! empty( $iptc['2#116'][0] ) ) // copyright
+			if ( ! empty( $iptc['2#116'][0] ) ) { // copyright
 				$meta['copyright'] = trim( $iptc['2#116'][0] );
+			}
 
 			if ( ! empty( $iptc['2#025'][0] ) ) { // keywords array
 				$meta['keywords'] = array_values( $iptc['2#025'] );
 			}
-		 }
-	}
+		}// End if().
+	}// End if().
 
 	/**
 	 * Filters the image types to check for exif data.
@@ -453,7 +466,7 @@
 		if ( empty( $meta['credit'] ) ) {
 			if ( ! empty( $exif['Artist'] ) ) {
 				$meta['credit'] = trim( $exif['Artist'] );
-			} elseif ( ! empty($exif['Author'] ) ) {
+			} elseif ( ! empty( $exif['Author'] ) ) {
 				$meta['credit'] = trim( $exif['Author'] );
 			}
 		}
@@ -483,7 +496,7 @@
 		if ( ! empty( $exif['Orientation'] ) ) {
 			$meta['orientation'] = $exif['Orientation'];
 		}
-	}
+	}// End if().
 
 	foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) {
 		if ( $meta[ $key ] && ! seems_utf8( $meta[ $key ] ) ) {
@@ -522,9 +535,9 @@
  * @param string $path File path to test if valid image.
  * @return bool True if valid image, false if not valid image.
  */
-function file_is_valid_image($path) {
-	$size = @getimagesize($path);
-	return !empty($size);
+function file_is_valid_image( $path ) {
+	$size = @getimagesize( $path );
+	return ! empty( $size );
 }
 
 /**
@@ -535,7 +548,7 @@
  * @param string $path File path to test.
  * @return bool True if suitable, false if not suitable.
  */
-function file_is_displayable_image($path) {
+function file_is_displayable_image( $path ) {
 	$displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP );
 
 	$info = @getimagesize( $path );
@@ -570,24 +583,25 @@
  */
 function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) {
 	$filepath = _load_image_to_edit_path( $attachment_id, $size );
-	if ( empty( $filepath ) )
+	if ( empty( $filepath ) ) {
 		return false;
+	}
 
 	switch ( $mime_type ) {
 		case 'image/jpeg':
-			$image = imagecreatefromjpeg($filepath);
+			$image = imagecreatefromjpeg( $filepath );
 			break;
 		case 'image/png':
-			$image = imagecreatefrompng($filepath);
+			$image = imagecreatefrompng( $filepath );
 			break;
 		case 'image/gif':
-			$image = imagecreatefromgif($filepath);
+			$image = imagecreatefromgif( $filepath );
 			break;
 		default:
 			$image = false;
 			break;
 	}
-	if ( is_resource($image) ) {
+	if ( is_resource( $image ) ) {
 		/**
 		 * Filters the current image being loaded for editing.
 		 *
@@ -598,9 +612,9 @@
 		 * @param string   $size          Image size.
 		 */
 		$image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size );
-		if ( function_exists('imagealphablending') && function_exists('imagesavealpha') ) {
-			imagealphablending($image, false);
-			imagesavealpha($image, true);
+		if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
+			imagealphablending( $image, false );
+			imagesavealpha( $image, true );
 		}
 	}
 	return $image;
@@ -675,8 +689,9 @@
  */
 function _copy_image_file( $attachment_id ) {
 	$dst_file = $src_file = get_attached_file( $attachment_id );
-	if ( ! file_exists( $src_file ) )
+	if ( ! file_exists( $src_file ) ) {
 		$src_file = _load_image_to_edit_path( $attachment_id );
+	}
 
 	if ( $src_file ) {
 		$dst_file = str_replace( basename( $dst_file ), 'copy-' . basename( $dst_file ), $dst_file );
@@ -688,8 +703,9 @@
 		 */
 		wp_mkdir_p( dirname( $dst_file ) );
 
-		if ( ! @copy( $src_file, $dst_file ) )
+		if ( ! @copy( $src_file, $dst_file ) ) {
 			$dst_file = false;
+		}
 	} else {
 		$dst_file = false;
 	}
Index: src/wp-admin/includes/import.php
===================================================================
--- src/wp-admin/includes/import.php	(revision 40901)
+++ src/wp-admin/includes/import.php	(working copy)
@@ -53,9 +53,10 @@
  */
 function register_importer( $id, $name, $description, $callback ) {
 	global $wp_importers;
-	if ( is_wp_error( $callback ) )
+	if ( is_wp_error( $callback ) ) {
 		return $callback;
-	$wp_importers[$id] = array ( $name, $description, $callback );
+	}
+	$wp_importers[ $id ] = array( $name, $description, $callback );
 }
 
 /**
@@ -81,11 +82,14 @@
 function wp_import_handle_upload() {
 	if ( ! isset( $_FILES['import'] ) ) {
 		return array(
-			'error' => __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' )
+			'error' => __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ),
 		);
 	}
 
-	$overrides = array( 'test_form' => false, 'test_type' => false );
+	$overrides = array(
+		'test_form' => false,
+		'test_type' => false,
+	);
 	$_FILES['import']['name'] .= '.txt';
 	$upload = wp_handle_upload( $_FILES['import'], $overrides );
 
@@ -100,7 +104,7 @@
 		'post_mime_type' => $upload['type'],
 		'guid' => $upload['url'],
 		'context' => 'import',
-		'post_status' => 'private'
+		'post_status' => 'private',
 	);
 
 	// Save the data
@@ -112,7 +116,10 @@
 	 */
 	wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );
 
-	return array( 'file' => $upload['file'], 'id' => $id );
+	return array(
+		'file' => $upload['file'],
+		'id' => $id,
+	);
 }
 
 /**
@@ -134,7 +141,9 @@
 			'locale'  => get_user_locale(),
 			'version' => $wp_version,
 		), 'http://api.wordpress.org/core/importers/1.1/' );
-		$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
+		$options = array(
+			'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(),
+		);
 		$response = wp_remote_get( $url, $options );
 		$popular_importers = json_decode( wp_remote_retrieve_body( $response ), true );
 
@@ -147,13 +156,15 @@
 
 	if ( is_array( $popular_importers ) ) {
 		// If the data was received as translated, return it as-is.
-		if ( $popular_importers['translated'] )
+		if ( $popular_importers['translated'] ) {
 			return $popular_importers['importers'];
+		}
 
 		foreach ( $popular_importers['importers'] as &$importer ) {
 			$importer['description'] = translate( $importer['description'] );
-			if ( $importer['name'] != 'WordPress' )
+			if ( $importer['name'] != 'WordPress' ) {
 				$importer['name'] = translate( $importer['name'] );
+			}
 		}
 		return $popular_importers['importers'];
 	}
Index: src/wp-admin/includes/list-table.php
===================================================================
--- src/wp-admin/includes/list-table.php	(revision 40901)
+++ src/wp-admin/includes/list-table.php	(working copy)
@@ -40,15 +40,16 @@
 	);
 
 	if ( isset( $core_classes[ $class ] ) ) {
-		foreach ( (array) $core_classes[ $class ] as $required )
+		foreach ( (array) $core_classes[ $class ] as $required ) {
 			require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );
+		}
 
-		if ( isset( $args['screen'] ) )
+		if ( isset( $args['screen'] ) ) {
 			$args['screen'] = convert_to_screen( $args['screen'] );
-		elseif ( isset( $GLOBALS['hook_suffix'] ) )
+		} elseif ( isset( $GLOBALS['hook_suffix'] ) ) {
 			$args['screen'] = get_current_screen();
-		else
-			$args['screen'] = null;
+		} else { $args['screen'] = null;
+		}
 
 		return new $class( $args );
 	}
@@ -65,7 +66,7 @@
  * @param array $columns An array of columns with column IDs as the keys and translated column names as the values
  * @see get_column_headers(), print_column_headers(), get_hidden_columns()
  */
-function register_column_headers($screen, $columns) {
+function register_column_headers( $screen, $columns ) {
 	new _WP_List_Table_Compat( $screen, $columns );
 }
 
@@ -78,7 +79,7 @@
  * @param bool             $with_id Whether to set the id attribute or not.
  */
 function print_column_headers( $screen, $with_id = true ) {
-	$wp_list_table = new _WP_List_Table_Compat($screen);
+	$wp_list_table = new _WP_List_Table_Compat( $screen );
 
 	$wp_list_table->print_column_headers( $with_id );
 }
Index: src/wp-admin/includes/media.php
===================================================================
--- src/wp-admin/includes/media.php	(revision 40901)
+++ src/wp-admin/includes/media.php	(working copy)
@@ -15,10 +15,10 @@
  */
 function media_upload_tabs() {
 	$_default_tabs = array(
-		'type' => __('From Computer'), // handler action suffix => tab text
-		'type_url' => __('From URL'),
-		'gallery' => __('Gallery'),
-		'library' => __('Media Library')
+		'type' => __( 'From Computer' ), // handler action suffix => tab text
+		'type_url' => __( 'From URL' ),
+		'gallery' => __( 'Gallery' ),
+		'library' => __( 'Media Library' ),
 	);
 
 	/**
@@ -41,25 +41,26 @@
  * @param array $tabs
  * @return array $tabs with gallery if post has image attachment
  */
-function update_gallery_tab($tabs) {
+function update_gallery_tab( $tabs ) {
 	global $wpdb;
 
-	if ( !isset($_REQUEST['post_id']) ) {
-		unset($tabs['gallery']);
+	if ( ! isset( $_REQUEST['post_id'] ) ) {
+		unset( $tabs['gallery'] );
 		return $tabs;
 	}
 
-	$post_id = intval($_REQUEST['post_id']);
+	$post_id = intval( $_REQUEST['post_id'] );
 
-	if ( $post_id )
+	if ( $post_id ) {
 		$attachments = intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) ) );
+	}
 
-	if ( empty($attachments) ) {
-		unset($tabs['gallery']);
+	if ( empty( $attachments ) ) {
+		unset( $tabs['gallery'] );
 		return $tabs;
 	}
 
-	$tabs['gallery'] = sprintf(__('Gallery (%s)'), "<span id='attachments-count'>$attachments</span>");
+	$tabs['gallery'] = sprintf( __( 'Gallery (%s)' ), "<span id='attachments-count'>$attachments</span>" );
 
 	return $tabs;
 }
@@ -76,11 +77,11 @@
 	$tabs = media_upload_tabs();
 	$default = 'type';
 
-	if ( !empty($tabs) ) {
+	if ( ! empty( $tabs ) ) {
 		echo "<ul id='sidemenu'>\n";
-		if ( isset($redir_tab) && array_key_exists($redir_tab, $tabs) ) {
+		if ( isset( $redir_tab ) && array_key_exists( $redir_tab, $tabs ) ) {
 			$current = $redir_tab;
-		} elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) {
+		} elseif ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
 			$current = $_GET['tab'];
 		} else {
 			/** This filter is documented in wp-admin/media-upload.php */
@@ -90,12 +91,19 @@
 		foreach ( $tabs as $callback => $text ) {
 			$class = '';
 
-			if ( $current == $callback )
+			if ( $current == $callback ) {
 				$class = " class='current'";
+			}
 
-			$href = add_query_arg(array('tab' => $callback, 's' => false, 'paged' => false, 'post_mime_type' => false, 'm' => false));
-			$link = "<a href='" . esc_url($href) . "'$class>$text</a>";
-			echo "\t<li id='" . esc_attr("tab-$callback") . "'>$link</li>\n";
+			$href = add_query_arg( array(
+				'tab' => $callback,
+				's' => false,
+				'paged' => false,
+				'post_mime_type' => false,
+				'm' => false,
+			) );
+			$link = "<a href='" . esc_url( $href ) . "'$class>$text</a>";
+			echo "\t<li id='" . esc_attr( "tab-$callback" ) . "'>$link</li>\n";
 		}
 		echo "</ul>\n";
 	}
@@ -131,8 +139,9 @@
 		$rel = '';
 	}
 
-	if ( $url )
+	if ( $url ) {
 		$html = '<a href="' . esc_attr( $url ) . '"' . $rel . '>' . $html . '</a>';
+	}
 
 	/**
 	 * Filters the image HTML markup to send to the editor when inserting an image.
@@ -197,25 +206,28 @@
 	 * @param bool $bool Whether to disable appending captions. Returning true to the filter
 	 *                   will disable captions. Default empty string.
 	 */
-	if ( empty($caption) || apply_filters( 'disable_captions', '' ) )
+	if ( empty( $caption ) || apply_filters( 'disable_captions', '' ) ) {
 		return $html;
+	}
 
 	$id = ( 0 < (int) $id ) ? 'attachment_' . $id : '';
 
-	if ( ! preg_match( '/width=["\']([0-9]+)/', $html, $matches ) )
+	if ( ! preg_match( '/width=["\']([0-9]+)/', $html, $matches ) ) {
 		return $html;
+	}
 
 	$width = $matches[1];
 
-	$caption = str_replace( array("\r\n", "\r"), "\n", $caption);
+	$caption = str_replace( array( "\r\n", "\r" ), "\n", $caption );
 	$caption = preg_replace_callback( '/<[a-zA-Z0-9]+(?: [^<>]+>)*/', '_cleanup_image_add_caption', $caption );
 
 	// Convert any remaining line breaks to <br>.
 	$caption = preg_replace( '/[ \n\t]*\n[ \t]*/', '<br />', $caption );
 
 	$html = preg_replace( '/(class=["\'][^\'"]*)align(none|left|right|center)\s?/', '$1', $html );
-	if ( empty($align) )
+	if ( empty( $align ) ) {
 		$align = 'none';
+	}
 
 	$shcode = '[caption id="' . $id . '" align="align' . $align	. '" width="' . $width . '"]' . $html . ' ' . $caption . '[/caption]';
 
@@ -248,7 +260,7 @@
  *
  * @param string $html
  */
-function media_send_to_editor($html) {
+function media_send_to_editor( $html ) {
 ?>
 <script type="text/javascript">
 var win = window.dialogArguments || opener || parent || top;
@@ -270,20 +282,24 @@
  * @param array  $overrides Override the wp_handle_upload() behavior. Optional.
  * @return int|WP_Error ID of the attachment or a WP_Error object on failure.
  */
-function media_handle_upload($file_id, $post_id, $post_data = array(), $overrides = array( 'test_form' => false )) {
+function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrides = array(
+	'test_form' => false,
+) ) {
 
-	$time = current_time('mysql');
-	if ( $post = get_post($post_id) ) {
-		if ( substr( $post->post_date, 0, 4 ) > 0 )
+	$time = current_time( 'mysql' );
+	if ( $post = get_post( $post_id ) ) {
+		if ( substr( $post->post_date, 0, 4 ) > 0 ) {
 			$time = $post->post_date;
+		}
 	}
 
-	$file = wp_handle_upload($_FILES[$file_id], $overrides, $time);
+	$file = wp_handle_upload( $_FILES[ $file_id ], $overrides, $time );
 
-	if ( isset($file['error']) )
+	if ( isset( $file['error'] ) ) {
 		return new WP_Error( 'upload_error', $file['error'] );
+	}
 
-	$name = $_FILES[$file_id]['name'];
+	$name = $_FILES[ $file_id ]['name'];
 	$ext  = pathinfo( $name, PATHINFO_EXTENSION );
 	$name = wp_basename( $name, ".$ext" );
 
@@ -316,7 +332,6 @@
 				/* translators: 1: audio track title */
 				$content .= sprintf( __( '"%s".' ), $title );
 			}
-
 		} elseif ( ! empty( $meta['album'] ) ) {
 
 			if ( ! empty( $meta['artist'] ) ) {
@@ -325,7 +340,6 @@
 			} else {
 				$content .= $meta['album'] . '.';
 			}
-
 		} elseif ( ! empty( $meta['artist'] ) ) {
 
 			$content .= $meta['artist'] . '.';
@@ -352,8 +366,6 @@
 			/* translators: Audio file genre information. 1: Audio genre name */
 			$content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
 		}
-
-	// Use image exif/iptc data for title and caption defaults if possible.
 	} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {
 		if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
 			$title = $image_meta['title'];
@@ -362,7 +374,7 @@
 		if ( trim( $image_meta['caption'] ) ) {
 			$excerpt = $image_meta['caption'];
 		}
-	}
+	}// End if().
 
 	// Construct the attachment array
 	$attachment = array_merge( array(
@@ -378,8 +390,8 @@
 	unset( $attachment['ID'] );
 
 	// Save the data
-	$id = wp_insert_attachment($attachment, $file, $post_id);
-	if ( !is_wp_error($id) ) {
+	$id = wp_insert_attachment( $attachment, $file, $post_id );
+	if ( ! is_wp_error( $id ) ) {
 		wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
 	}
 
@@ -399,34 +411,41 @@
  * @return int|object The ID of the attachment or a WP_Error on failure.
  */
 function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data = array() ) {
-	$overrides = array('test_form'=>false);
+	$overrides = array(
+		'test_form' => false,
+	);
 
 	$time = current_time( 'mysql' );
 	if ( $post = get_post( $post_id ) ) {
-		if ( substr( $post->post_date, 0, 4 ) > 0 )
+		if ( substr( $post->post_date, 0, 4 ) > 0 ) {
 			$time = $post->post_date;
+		}
 	}
 
 	$file = wp_handle_sideload( $file_array, $overrides, $time );
-	if ( isset($file['error']) )
+	if ( isset( $file['error'] ) ) {
 		return new WP_Error( 'upload_error', $file['error'] );
+	}
 
 	$url = $file['url'];
 	$type = $file['type'];
 	$file = $file['file'];
-	$title = preg_replace('/\.[^.]+$/', '', basename($file));
+	$title = preg_replace( '/\.[^.]+$/', '', basename( $file ) );
 	$content = '';
 
 	// Use image exif/iptc data for title and caption defaults if possible.
-	if ( $image_meta = @wp_read_image_metadata($file) ) {
-		if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) )
+	if ( $image_meta = @wp_read_image_metadata( $file ) ) {
+		if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
 			$title = $image_meta['title'];
-		if ( trim( $image_meta['caption'] ) )
+		}
+		if ( trim( $image_meta['caption'] ) ) {
 			$content = $image_meta['caption'];
+		}
 	}
 
-	if ( isset( $desc ) )
+	if ( isset( $desc ) ) {
 		$title = $desc;
+	}
 
 	// Construct the attachment array.
 	$attachment = array_merge( array(
@@ -441,9 +460,10 @@
 	unset( $attachment['ID'] );
 
 	// Save the attachment metadata
-	$id = wp_insert_attachment($attachment, $file, $post_id);
-	if ( !is_wp_error($id) )
+	$id = wp_insert_attachment( $attachment, $file, $post_id );
+	if ( ! is_wp_error( $id ) ) {
 		wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
+	}
 
 	return $id;
 }
@@ -457,17 +477,18 @@
  *
  * @param string|callable $content_func
  */
-function wp_iframe($content_func /* ... */) {
+function wp_iframe( $content_func /* ... */ ) {
 	_wp_admin_html_begin();
 ?>
-<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; <?php _e('WordPress'); ?></title>
+<title><?php bloginfo( 'name' ) ?> &rsaquo; <?php _e( 'Uploads' ); ?> &#8212; <?php _e( 'WordPress' ); ?></title>
 <?php
 
 wp_enqueue_style( 'colors' );
 // Check callback name for 'media'
 if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) )
-	|| ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) ) )
+	|| ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) ) ) {
 	wp_enqueue_style( 'deprecated-media' );
+}
 wp_enqueue_style( 'ie' );
 ?>
 <script type="text/javascript">
@@ -526,14 +547,14 @@
 }
 ?>
 </head>
-<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-core-ui no-js">
+<body<?php if ( isset( $GLOBALS['body_id'] ) ) { echo ' id="' . $GLOBALS['body_id'] . '"';} ?> class="wp-core-ui no-js">
 <script type="text/javascript">
 document.body.className = document.body.className.replace('no-js', 'js');
 </script>
 <?php
 	$args = func_get_args();
-	$args = array_slice($args, 1);
-	call_user_func_array($content_func, $args);
+	$args = array_slice( $args, 1 );
+	call_user_func_array( $content_func, $args );
 
 	/** This action is documented in wp-admin/admin-footer.php */
 	do_action( 'admin_print_footer_scripts' );
@@ -555,16 +576,17 @@
  *
  * @param string $editor_id
  */
-function media_buttons($editor_id = 'content') {
+function media_buttons( $editor_id = 'content' ) {
 	static $instance = 0;
 	$instance++;
 
 	$post = get_post();
-	if ( ! $post && ! empty( $GLOBALS['post_ID'] ) )
+	if ( ! $post && ! empty( $GLOBALS['post_ID'] ) ) {
 		$post = $GLOBALS['post_ID'];
+	}
 
 	wp_enqueue_media( array(
-		'post' => $post
+		'post' => $post,
 	) );
 
 	$img = '<span class="wp-media-buttons-icon"></span> ';
@@ -589,8 +611,9 @@
 
 	if ( $legacy_filter ) {
 		// #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag.
-		if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) )
+		if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) ) {
 			$legacy_filter .= '</a>';
+		}
 		echo $legacy_filter;
 	}
 }
@@ -606,16 +629,19 @@
 function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
 	global $post_ID;
 
-	if ( empty( $post_id ) )
+	if ( empty( $post_id ) ) {
 		$post_id = $post_ID;
+	}
 
-	$upload_iframe_src = add_query_arg( 'post_id', (int) $post_id, admin_url('media-upload.php') );
+	$upload_iframe_src = add_query_arg( 'post_id', (int) $post_id, admin_url( 'media-upload.php' ) );
 
-	if ( $type && 'media' != $type )
-		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
+	if ( $type && 'media' != $type ) {
+		$upload_iframe_src = add_query_arg( 'type', $type, $upload_iframe_src );
+	}
 
-	if ( ! empty( $tab ) )
-		$upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src);
+	if ( ! empty( $tab ) ) {
+		$upload_iframe_src = add_query_arg( 'tab', $tab, $upload_iframe_src );
+	}
 
 	/**
 	 * Filters the upload iframe source URL for a specific media type.
@@ -629,7 +655,7 @@
 	 */
 	$upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
 
-	return add_query_arg('TB_iframe', true, $upload_iframe_src);
+	return add_query_arg( 'TB_iframe', true, $upload_iframe_src );
 }
 
 /**
@@ -640,36 +666,42 @@
  * @return mixed void|object WP_Error on failure
  */
 function media_upload_form_handler() {
-	check_admin_referer('media-form');
+	check_admin_referer( 'media-form' );
 
 	$errors = null;
 
-	if ( isset($_POST['send']) ) {
+	if ( isset( $_POST['send'] ) ) {
 		$keys = array_keys( $_POST['send'] );
 		$send_id = (int) reset( $keys );
 	}
 
-	if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) {
-		$post = $_post = get_post($attachment_id, ARRAY_A);
+	if ( ! empty( $_POST['attachments'] ) ) { foreach ( $_POST['attachments'] as $attachment_id => $attachment ) {
+			$post = $_post = get_post( $attachment_id, ARRAY_A );
 
-		if ( !current_user_can( 'edit_post', $attachment_id ) )
-			continue;
+			if ( ! current_user_can( 'edit_post', $attachment_id ) ) {
+				continue;
+			}
 
-		if ( isset($attachment['post_content']) )
-			$post['post_content'] = $attachment['post_content'];
-		if ( isset($attachment['post_title']) )
-			$post['post_title'] = $attachment['post_title'];
-		if ( isset($attachment['post_excerpt']) )
-			$post['post_excerpt'] = $attachment['post_excerpt'];
-		if ( isset($attachment['menu_order']) )
-			$post['menu_order'] = $attachment['menu_order'];
-
-		if ( isset($send_id) && $attachment_id == $send_id ) {
-			if ( isset($attachment['post_parent']) )
-				$post['post_parent'] = $attachment['post_parent'];
-		}
+			if ( isset( $attachment['post_content'] ) ) {
+				$post['post_content'] = $attachment['post_content'];
+			}
+			if ( isset( $attachment['post_title'] ) ) {
+				$post['post_title'] = $attachment['post_title'];
+			}
+			if ( isset( $attachment['post_excerpt'] ) ) {
+				$post['post_excerpt'] = $attachment['post_excerpt'];
+			}
+			if ( isset( $attachment['menu_order'] ) ) {
+				$post['menu_order'] = $attachment['menu_order'];
+			}
 
-		/**
+			if ( isset( $send_id ) && $attachment_id == $send_id ) {
+				if ( isset( $attachment['post_parent'] ) ) {
+					$post['post_parent'] = $attachment['post_parent'];
+				}
+			}
+
+			/**
 		 * Filters the attachment fields to be saved.
 		 *
 		 * @since 2.5.0
@@ -679,33 +711,36 @@
 		 * @param array $post       An array of post data.
 		 * @param array $attachment An array of attachment metadata.
 		 */
-		$post = apply_filters( 'attachment_fields_to_save', $post, $attachment );
+			$post = apply_filters( 'attachment_fields_to_save', $post, $attachment );
 
-		if ( isset($attachment['image_alt']) ) {
-			$image_alt = wp_unslash( $attachment['image_alt'] );
-			if ( $image_alt != get_post_meta($attachment_id, '_wp_attachment_image_alt', true) ) {
-				$image_alt = wp_strip_all_tags( $image_alt, true );
+			if ( isset( $attachment['image_alt'] ) ) {
+				$image_alt = wp_unslash( $attachment['image_alt'] );
+				if ( $image_alt != get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) {
+					$image_alt = wp_strip_all_tags( $image_alt, true );
 
-				// Update_meta expects slashed.
-				update_post_meta( $attachment_id, '_wp_attachment_image_alt', wp_slash( $image_alt ) );
+					// Update_meta expects slashed.
+					update_post_meta( $attachment_id, '_wp_attachment_image_alt', wp_slash( $image_alt ) );
+				}
 			}
-		}
 
-		if ( isset($post['errors']) ) {
-			$errors[$attachment_id] = $post['errors'];
-			unset($post['errors']);
-		}
+			if ( isset( $post['errors'] ) ) {
+				$errors[ $attachment_id ] = $post['errors'];
+				unset( $post['errors'] );
+			}
 
-		if ( $post != $_post )
-			wp_update_post($post);
+			if ( $post != $_post ) {
+				wp_update_post( $post );
+			}
 
-		foreach ( get_attachment_taxonomies($post) as $t ) {
-			if ( isset($attachment[$t]) )
-				wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false);
-		}
-	}
+			foreach ( get_attachment_taxonomies( $post ) as $t ) {
+				if ( isset( $attachment[ $t ] ) ) {
+					wp_set_object_terms( $attachment_id, array_map( 'trim', preg_split( '/,+/', $attachment[ $t ] ) ), $t, false );
+				}
+			}
+	}// End foreach().
+	}// End if().
 
-	if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?>
+	if ( isset( $_POST['insert-gallery'] ) || isset( $_POST['update-gallery'] ) ) { ?>
 		<script type="text/javascript">
 		var win = window.dialogArguments || opener || parent || top;
 		win.tb_remove();
@@ -714,14 +749,15 @@
 		exit;
 	}
 
-	if ( isset($send_id) ) {
-		$attachment = wp_unslash( $_POST['attachments'][$send_id] );
+	if ( isset( $send_id ) ) {
+		$attachment = wp_unslash( $_POST['attachments'][ $send_id ] );
 
 		$html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : '';
-		if ( !empty($attachment['url']) ) {
+		if ( ! empty( $attachment['url'] ) ) {
 			$rel = '';
-			if ( strpos($attachment['url'], 'attachment_id') || get_attachment_link($send_id) == $attachment['url'] )
-				$rel = " rel='attachment wp-att-" . esc_attr($send_id) . "'";
+			if ( strpos( $attachment['url'], 'attachment_id' ) || get_attachment_link( $send_id ) == $attachment['url'] ) {
+				$rel = " rel='attachment wp-att-" . esc_attr( $send_id ) . "'";
+			}
 			$html = "<a href='{$attachment['url']}'$rel>$html</a>";
 		}
 
@@ -737,7 +773,7 @@
 		 * @param array  $attachment Array of attachment metadata.
 		 */
 		$html = apply_filters( 'media_send_to_editor', $html, $send_id, $attachment );
-		return media_send_to_editor($html);
+		return media_send_to_editor( $html );
 	}
 
 	return $errors;
@@ -754,34 +790,38 @@
 	$errors = array();
 	$id = 0;
 
-	if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
-		check_admin_referer('media-form');
+	if ( isset( $_POST['html-upload'] ) && ! empty( $_FILES ) ) {
+		check_admin_referer( 'media-form' );
 		// Upload File button was clicked
-		$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
-		unset($_FILES);
-		if ( is_wp_error($id) ) {
+		$id = media_handle_upload( 'async-upload', $_REQUEST['post_id'] );
+		unset( $_FILES );
+		if ( is_wp_error( $id ) ) {
 			$errors['upload_error'] = $id;
 			$id = false;
 		}
 	}
 
-	if ( !empty($_POST['insertonlybutton']) ) {
+	if ( ! empty( $_POST['insertonlybutton'] ) ) {
 		$src = $_POST['src'];
-		if ( !empty($src) && !strpos($src, '://') )
+		if ( ! empty( $src ) && ! strpos( $src, '://' ) ) {
 			$src = "http://$src";
+		}
 
 		if ( isset( $_POST['media_type'] ) && 'image' != $_POST['media_type'] ) {
 			$title = esc_html( wp_unslash( $_POST['title'] ) );
-			if ( empty( $title ) )
+			if ( empty( $title ) ) {
 				$title = esc_html( basename( $src ) );
+			}
 
-			if ( $title && $src )
-				$html = "<a href='" . esc_url($src) . "'>$title</a>";
+			if ( $title && $src ) {
+				$html = "<a href='" . esc_url( $src ) . "'>$title</a>";
+			}
 
 			$type = 'file';
 			if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) )
-				&& ( 'audio' == $ext_type || 'video' == $ext_type ) )
+				&& ( 'audio' == $ext_type || 'video' == $ext_type ) ) {
 					$type = $ext_type;
+			}
 
 			/**
 			 * Filters the URL sent to the editor for a specific media type.
@@ -799,12 +839,13 @@
 		} else {
 			$align = '';
 			$alt = esc_attr( wp_unslash( $_POST['alt'] ) );
-			if ( isset($_POST['align']) ) {
+			if ( isset( $_POST['align'] ) ) {
 				$align = esc_attr( wp_unslash( $_POST['align'] ) );
 				$class = " class='align$align'";
 			}
-			if ( !empty($src) )
-				$html = "<img src='" . esc_url($src) . "' alt='$alt'$class />";
+			if ( ! empty( $src ) ) {
+				$html = "<img src='" . esc_url( $src ) . "' alt='$alt'$class />";
+			}
 
 			/**
 			 * Filters the image URL sent to the editor.
@@ -818,29 +859,32 @@
 			 *                      'alignleft', 'aligncenter', 'alignright', 'alignnone'.
 			 */
 			$html = apply_filters( 'image_send_to_editor_url', $html, esc_url_raw( $src ), $alt, $align );
-		}
+		}// End if().
 
-		return media_send_to_editor($html);
-	}
+		return media_send_to_editor( $html );
+	}// End if().
 
 	if ( isset( $_POST['save'] ) ) {
-		$errors['upload_notice'] = __('Saved.');
+		$errors['upload_notice'] = __( 'Saved.' );
 		wp_enqueue_script( 'admin-gallery' );
- 		return wp_iframe( 'media_upload_gallery_form', $errors );
+		 return wp_iframe( 'media_upload_gallery_form', $errors );
 
 	} elseif ( ! empty( $_POST ) ) {
 		$return = media_upload_form_handler();
 
-		if ( is_string($return) )
+		if ( is_string( $return ) ) {
 			return $return;
-		if ( is_array($return) )
+		}
+		if ( is_array( $return ) ) {
 			$errors = $return;
+		}
 	}
 
-	if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) {
+	if ( isset( $_GET['tab'] ) && $_GET['tab'] == 'type_url' ) {
 		$type = 'image';
-		if ( isset( $_GET['type'] ) && in_array( $_GET['type'], array( 'video', 'audio', 'file' ) ) )
+		if ( isset( $_GET['type'] ) && in_array( $_GET['type'], array( 'video', 'audio', 'file' ) ) ) {
 			$type = $_GET['type'];
+		}
 		return wp_iframe( 'media_upload_type_url_form', $type, $errors, $id );
 	}
 
@@ -887,7 +931,7 @@
 		if ( is_wp_error( $id ) ) {
 			@unlink( $file_array['tmp_name'] );
 			return $id;
-		// If attachment id was requested, return it early.
+			// If attachment id was requested, return it early.
 		} elseif ( $return === 'id' ) {
 			return $id;
 		}
@@ -919,16 +963,18 @@
 function media_upload_gallery() {
 	$errors = array();
 
-	if ( !empty($_POST) ) {
+	if ( ! empty( $_POST ) ) {
 		$return = media_upload_form_handler();
 
-		if ( is_string($return) )
+		if ( is_string( $return ) ) {
 			return $return;
-		if ( is_array($return) )
+		}
+		if ( is_array( $return ) ) {
 			$errors = $return;
+		}
 	}
 
-	wp_enqueue_script('admin-gallery');
+	wp_enqueue_script( 'admin-gallery' );
 	return wp_iframe( 'media_upload_gallery_form', $errors );
 }
 
@@ -941,13 +987,15 @@
  */
 function media_upload_library() {
 	$errors = array();
-	if ( !empty($_POST) ) {
+	if ( ! empty( $_POST ) ) {
 		$return = media_upload_form_handler();
 
-		if ( is_string($return) )
+		if ( is_string( $return ) ) {
 			return $return;
-		if ( is_array($return) )
+		}
+		if ( is_array( $return ) ) {
 			$errors = $return;
+		}
 	}
 
 	return wp_iframe( 'media_upload_library_form', $errors );
@@ -964,21 +1012,28 @@
  */
 function image_align_input_fields( $post, $checked = '' ) {
 
-	if ( empty($checked) )
-		$checked = get_user_setting('align', 'none');
+	if ( empty( $checked ) ) {
+		$checked = get_user_setting( 'align', 'none' );
+	}
 
-	$alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right'));
-	if ( !array_key_exists( (string) $checked, $alignments ) )
+	$alignments = array(
+		'none' => __( 'None' ),
+		'left' => __( 'Left' ),
+		'center' => __( 'Center' ),
+		'right' => __( 'Right' ),
+	);
+	if ( ! array_key_exists( (string) $checked, $alignments ) ) {
 		$checked = 'none';
+	}
 
 	$out = array();
 	foreach ( $alignments as $name => $label ) {
-		$name = esc_attr($name);
-		$out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'".
-			( $checked == $name ? " checked='checked'" : "" ) .
+		$name = esc_attr( $name );
+		$out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'" .
+			( $checked == $name ? " checked='checked'" : '' ) .
 			" /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>$label</label>";
 	}
-	return join("\n", $out);
+	return join( "\n", $out );
 }
 
 /**
@@ -1003,11 +1058,11 @@
 		'thumbnail' => __( 'Thumbnail' ),
 		'medium'    => __( 'Medium' ),
 		'large'     => __( 'Large' ),
-		'full'      => __( 'Full Size' )
+		'full'      => __( 'Full Size' ),
 	) );
 
 	if ( empty( $check ) ) {
-		$check = get_user_setting('imgsize', 'medium');
+		$check = get_user_setting( 'imgsize', 'medium' );
 	}
 	$out = array();
 
@@ -1041,12 +1096,12 @@
 
 		// Only show the dimensions if that choice is available.
 		if ( $enabled ) {
-			$html .= " <label for='{$css_id}' class='help'>" . sprintf( "(%d&nbsp;&times;&nbsp;%d)", $downsize[1], $downsize[2] ). "</label>";
+			$html .= " <label for='{$css_id}' class='help'>" . sprintf( '(%d&nbsp;&times;&nbsp;%d)', $downsize[1], $downsize[2] ) . '</label>';
 		}
 		$html .= '</div>';
 
 		$out[] = $html;
-	}
+	}// End foreach().
 
 	return array(
 		'label' => __( 'Size' ),
@@ -1064,26 +1119,28 @@
  * @param string $url_type
  * @return string
  */
-function image_link_input_fields($post, $url_type = '') {
+function image_link_input_fields( $post, $url_type = '' ) {
 
-	$file = wp_get_attachment_url($post->ID);
-	$link = get_attachment_link($post->ID);
+	$file = wp_get_attachment_url( $post->ID );
+	$link = get_attachment_link( $post->ID );
 
-	if ( empty($url_type) )
-		$url_type = get_user_setting('urlbutton', 'post');
+	if ( empty( $url_type ) ) {
+		$url_type = get_user_setting( 'urlbutton', 'post' );
+	}
 
 	$url = '';
-	if ( $url_type == 'file' )
+	if ( $url_type == 'file' ) {
 		$url = $file;
-	elseif ( $url_type == 'post' )
+	} elseif ( $url_type == 'post' ) {
 		$url = $link;
+	}
 
 	return "
-	<input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' /><br />
-	<button type='button' class='button urlnone' data-link-url=''>" . __('None') . "</button>
-	<button type='button' class='button urlfile' data-link-url='" . esc_attr($file) . "'>" . __('File URL') . "</button>
-	<button type='button' class='button urlpost' data-link-url='" . esc_attr($link) . "'>" . __('Attachment Post URL') . "</button>
-";
+	<input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr( $url ) . "' /><br />
+	<button type='button' class='button urlnone' data-link-url=''>" . __( 'None' ) . "</button>
+	<button type='button' class='button urlfile' data-link-url='" . esc_attr( $file ) . "'>" . __( 'File URL' ) . "</button>
+	<button type='button' class='button urlpost' data-link-url='" . esc_attr( $link ) . "'>" . __( 'Attachment Post URL' ) . '</button>
+';
 }
 
 /**
@@ -1094,7 +1151,7 @@
  * @param WP_Post $edit_post Attachment WP_Post object.
  * @return string HTML markup for the textarea element.
  */
-function wp_caption_input_textarea($edit_post) {
+function wp_caption_input_textarea( $edit_post ) {
 	// Post data is already escaped.
 	$name = "attachments[{$edit_post->ID}][post_excerpt]";
 
@@ -1110,7 +1167,7 @@
  * @param object $post
  * @return array
  */
-function image_attachment_fields_to_edit($form_fields, $post) {
+function image_attachment_fields_to_edit( $form_fields, $post ) {
 	return $form_fields;
 }
 
@@ -1124,7 +1181,7 @@
  * @return array Filtered attachment form fields.
  */
 function media_single_attachment_fields_to_edit( $form_fields, $post ) {
-	unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']);
+	unset( $form_fields['url'], $form_fields['align'], $form_fields['image-size'] );
 	return $form_fields;
 }
 
@@ -1138,7 +1195,7 @@
  * @return array Filtered attachment form fields.
  */
 function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
-	unset($form_fields['image_url']);
+	unset( $form_fields['image_url'] );
 	return $form_fields;
 }
 
@@ -1177,16 +1234,16 @@
  * @param array $attachment
  * @return string
  */
-function image_media_send_to_editor($html, $attachment_id, $attachment) {
-	$post = get_post($attachment_id);
-	if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
+function image_media_send_to_editor( $html, $attachment_id, $attachment ) {
+	$post = get_post( $attachment_id );
+	if ( substr( $post->post_mime_type, 0, 5 ) == 'image' ) {
 		$url = $attachment['url'];
-		$align = !empty($attachment['align']) ? $attachment['align'] : 'none';
-		$size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium';
-		$alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : '';
-		$rel = ( strpos( $url, 'attachment_id') || $url === get_attachment_link( $attachment_id ) );
+		$align = ! empty( $attachment['align'] ) ? $attachment['align'] : 'none';
+		$size = ! empty( $attachment['image-size'] ) ? $attachment['image-size'] : 'medium';
+		$alt = ! empty( $attachment['image_alt'] ) ? $attachment['image_alt'] : '';
+		$rel = ( strpos( $url, 'attachment_id' ) || $url === get_attachment_link( $attachment_id ) );
 
-		return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt);
+		return get_image_send_to_editor( $attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt );
 	}
 
 	return $html;
@@ -1201,98 +1258,106 @@
  * @param array $errors
  * @return array
  */
-function get_attachment_fields_to_edit($post, $errors = null) {
-	if ( is_int($post) )
-		$post = get_post($post);
-	if ( is_array($post) )
+function get_attachment_fields_to_edit( $post, $errors = null ) {
+	if ( is_int( $post ) ) {
+		$post = get_post( $post );
+	}
+	if ( is_array( $post ) ) {
 		$post = new WP_Post( (object) $post );
+	}
 
-	$image_url = wp_get_attachment_url($post->ID);
+	$image_url = wp_get_attachment_url( $post->ID );
 
-	$edit_post = sanitize_post($post, 'edit');
+	$edit_post = sanitize_post( $post, 'edit' );
 
 	$form_fields = array(
 		'post_title'   => array(
-			'label'      => __('Title'),
-			'value'      => $edit_post->post_title
+			'label'      => __( 'Title' ),
+			'value'      => $edit_post->post_title,
 		),
 		'image_alt'   => array(),
 		'post_excerpt' => array(
-			'label'      => __('Caption'),
+			'label'      => __( 'Caption' ),
 			'input'      => 'html',
-			'html'       => wp_caption_input_textarea($edit_post)
+			'html'       => wp_caption_input_textarea( $edit_post ),
 		),
 		'post_content' => array(
-			'label'      => __('Description'),
+			'label'      => __( 'Description' ),
 			'value'      => $edit_post->post_content,
-			'input'      => 'textarea'
+			'input'      => 'textarea',
 		),
 		'url'          => array(
-			'label'      => __('Link URL'),
+			'label'      => __( 'Link URL' ),
 			'input'      => 'html',
-			'html'       => image_link_input_fields($post, get_option('image_default_link_type')),
-			'helps'      => __('Enter a link URL or click above for presets.')
+			'html'       => image_link_input_fields( $post, get_option( 'image_default_link_type' ) ),
+			'helps'      => __( 'Enter a link URL or click above for presets.' ),
 		),
 		'menu_order'   => array(
-			'label'      => __('Order'),
-			'value'      => $edit_post->menu_order
+			'label'      => __( 'Order' ),
+			'value'      => $edit_post->menu_order,
 		),
 		'image_url'	=> array(
-			'label'      => __('File URL'),
+			'label'      => __( 'File URL' ),
 			'input'      => 'html',
-			'html'       => "<input type='text' class='text urlfield' readonly='readonly' name='attachments[$post->ID][url]' value='" . esc_attr($image_url) . "' /><br />",
-			'value'      => wp_get_attachment_url($post->ID),
-			'helps'      => __('Location of the uploaded file.')
-		)
+			'html'       => "<input type='text' class='text urlfield' readonly='readonly' name='attachments[$post->ID][url]' value='" . esc_attr( $image_url ) . "' /><br />",
+			'value'      => wp_get_attachment_url( $post->ID ),
+			'helps'      => __( 'Location of the uploaded file.' ),
+		),
 	);
 
-	foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
-		$t = (array) get_taxonomy($taxonomy);
-		if ( ! $t['public'] || ! $t['show_ui'] )
+	foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
+		$t = (array) get_taxonomy( $taxonomy );
+		if ( ! $t['public'] || ! $t['show_ui'] ) {
 			continue;
-		if ( empty($t['label']) )
+		}
+		if ( empty( $t['label'] ) ) {
 			$t['label'] = $taxonomy;
-		if ( empty($t['args']) )
+		}
+		if ( empty( $t['args'] ) ) {
 			$t['args'] = array();
+		}
 
-		$terms = get_object_term_cache($post->ID, $taxonomy);
-		if ( false === $terms )
-			$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
+		$terms = get_object_term_cache( $post->ID, $taxonomy );
+		if ( false === $terms ) {
+			$terms = wp_get_object_terms( $post->ID, $taxonomy, $t['args'] );
+		}
 
 		$values = array();
 
-		foreach ( $terms as $term )
+		foreach ( $terms as $term ) {
 			$values[] = $term->slug;
-		$t['value'] = join(', ', $values);
+		}
+		$t['value'] = join( ', ', $values );
 
-		$form_fields[$taxonomy] = $t;
+		$form_fields[ $taxonomy ] = $t;
 	}
 
 	// Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default
 	// The recursive merge is easily traversed with array casting: foreach ( (array) $things as $thing )
-	$form_fields = array_merge_recursive($form_fields, (array) $errors);
+	$form_fields = array_merge_recursive( $form_fields, (array) $errors );
 
 	// This was formerly in image_attachment_fields_to_edit().
-	if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
-		$alt = get_post_meta($post->ID, '_wp_attachment_image_alt', true);
-		if ( empty($alt) )
+	if ( substr( $post->post_mime_type, 0, 5 ) == 'image' ) {
+		$alt = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
+		if ( empty( $alt ) ) {
 			$alt = '';
+		}
 
 		$form_fields['post_title']['required'] = true;
 
 		$form_fields['image_alt'] = array(
 			'value' => $alt,
-			'label' => __('Alternative Text'),
-			'helps' => __('Alt text for the image, e.g. &#8220;The Mona Lisa&#8221;')
+			'label' => __( 'Alternative Text' ),
+			'helps' => __( 'Alt text for the image, e.g. &#8220;The Mona Lisa&#8221;' ),
 		);
 
 		$form_fields['align'] = array(
-			'label' => __('Alignment'),
+			'label' => __( 'Alignment' ),
 			'input' => 'html',
-			'html'  => image_align_input_fields($post, get_option('image_default_align')),
+			'html'  => image_align_input_fields( $post, get_option( 'image_default_align' ) ),
 		);
 
-		$form_fields['image-size'] = image_size_input_fields( $post, get_option('image_default_size', 'medium') );
+		$form_fields['image-size'] = image_size_input_fields( $post, get_option( 'image_default_size', 'medium' ) );
 
 	} else {
 		unset( $form_fields['image_alt'] );
@@ -1329,23 +1394,36 @@
 function get_media_items( $post_id, $errors ) {
 	$attachments = array();
 	if ( $post_id ) {
-		$post = get_post($post_id);
-		if ( $post && $post->post_type == 'attachment' )
-			$attachments = array($post->ID => $post);
-		else
-			$attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') );
+		$post = get_post( $post_id );
+		if ( $post && $post->post_type == 'attachment' ) {
+			$attachments = array(
+				$post->ID => $post,
+			);
+		} else { $attachments = get_children( array(
+			'post_parent' => $post_id,
+			'post_type' => 'attachment',
+			'orderby' => 'menu_order ASC, ID',
+			'order' => 'DESC',
+		) );
+		}
 	} else {
-		if ( is_array($GLOBALS['wp_the_query']->posts) )
-			foreach ( $GLOBALS['wp_the_query']->posts as $attachment )
-				$attachments[$attachment->ID] = $attachment;
+		if ( is_array( $GLOBALS['wp_the_query']->posts ) ) {
+			foreach ( $GLOBALS['wp_the_query']->posts as $attachment ) {
+				$attachments[ $attachment->ID ] = $attachment;
+			}
+		}
 	}
 
 	$output = '';
 	foreach ( (array) $attachments as $id => $attachment ) {
-		if ( $attachment->post_status == 'trash' )
+		if ( $attachment->post_status == 'trash' ) {
 			continue;
-		if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) )
+		}
+		if ( $item = get_media_item( $id, array(
+			'errors' => isset( $errors[ $id ] ) ? $errors[ $id ] : null,
+		) ) ) {
 			$output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div class='progress hidden'><div class='bar'></div></div><div id='media-upload-error-$id' class='hidden'></div><div class='filename hidden'></div>$item\n</div>";
+		}
 	}
 
 	return $output;
@@ -1365,20 +1443,20 @@
 function get_media_item( $attachment_id, $args = null ) {
 	global $redir_tab;
 
-	if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
+	if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) {
 		$thumb_url = $thumb_url[0];
-	else
-		$thumb_url = false;
+	} else { $thumb_url = false;
+	}
 
 	$post = get_post( $attachment_id );
-	$current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0;
+	$current_post_id = ! empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0;
 
 	$default_args = array(
 		'errors' => null,
 		'send' => $current_post_id ? post_type_supports( get_post_type( $current_post_id ), 'editor' ) : true,
 		'delete' => true,
 		'toggle' => true,
-		'show_title' => true
+		'show_title' => true,
 	);
 	$args = wp_parse_args( $args, $default_args );
 
@@ -1417,18 +1495,18 @@
 		$toggle_links = '';
 	}
 
-	$display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
-	$display_title = $r['show_title'] ? "<div class='filename new'><span class='title'>" . wp_html_excerpt( $display_title, 60, '&hellip;' ) . "</span></div>" : '';
+	$display_title = ( ! empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
+	$display_title = $r['show_title'] ? "<div class='filename new'><span class='title'>" . wp_html_excerpt( $display_title, 60, '&hellip;' ) . '</span></div>' : '';
 
 	$gallery = ( ( isset( $_REQUEST['tab'] ) && 'gallery' == $_REQUEST['tab'] ) || ( isset( $redir_tab ) && 'gallery' == $redir_tab ) );
 	$order = '';
 
 	foreach ( $form_fields as $key => $val ) {
 		if ( 'menu_order' == $key ) {
-			if ( $gallery )
-				$order = "<div class='menu_order'> <input class='menu_order_input' type='text' id='attachments[$attachment_id][menu_order]' name='attachments[$attachment_id][menu_order]' value='" . esc_attr( $val['value'] ). "' /></div>";
-			else
-				$order = "<input type='hidden' name='attachments[$attachment_id][menu_order]' value='" . esc_attr( $val['value'] ) . "' />";
+			if ( $gallery ) {
+				$order = "<div class='menu_order'> <input class='menu_order_input' type='text' id='attachments[$attachment_id][menu_order]' name='attachments[$attachment_id][menu_order]' value='" . esc_attr( $val['value'] ) . "' /></div>";
+			} else { $order = "<input type='hidden' name='attachments[$attachment_id][menu_order]' value='" . esc_attr( $val['value'] ) . "' />";
+			}
 
 			unset( $form_fields['menu_order'] );
 			break;
@@ -1437,8 +1515,9 @@
 
 	$media_dims = '';
 	$meta = wp_get_attachment_metadata( $post->ID );
-	if ( isset( $meta['width'], $meta['height'] ) )
+	if ( isset( $meta['width'], $meta['height'] ) ) {
 		$media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
+	}
 
 	/**
 	 * Filters the media metadata.
@@ -1451,7 +1530,9 @@
 	$media_dims = apply_filters( 'media_meta', $media_dims, $post );
 
 	$image_edit_button = '';
-	if ( wp_attachment_is_image( $post->ID ) && wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) {
+	if ( wp_attachment_is_image( $post->ID ) && wp_image_editor_supports( array(
+		'mime_type' => $post->post_mime_type,
+	) ) ) {
 		$nonce = wp_create_nonce( "image_editor-$post->ID" );
 		$image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>";
 	}
@@ -1471,11 +1552,12 @@
 			<p>$image_edit_button</p>
 			</td>
 			<td>
-			<p><strong>" . __('File name:') . "</strong> $filename</p>
-			<p><strong>" . __('File type:') . "</strong> $post->post_mime_type</p>
-			<p><strong>" . __('Upload date:') . "</strong> " . mysql2date( __( 'F j, Y' ), $post->post_date ). '</p>';
-			if ( !empty( $media_dims ) )
-				$item .= "<p><strong>" . __('Dimensions:') . "</strong> $media_dims</p>\n";
+			<p><strong>" . __( 'File name:' ) . "</strong> $filename</p>
+			<p><strong>" . __( 'File type:' ) . "</strong> $post->post_mime_type</p>
+			<p><strong>" . __( 'Upload date:' ) . '</strong> ' . mysql2date( __( 'F j, Y' ), $post->post_date ) . '</p>';
+	if ( ! empty( $media_dims ) ) {
+		$item .= '<p><strong>' . __( 'Dimensions:' ) . "</strong> $media_dims</p>\n";
+	}
 
 			$item .= "</td></tr>\n";
 
@@ -1499,19 +1581,19 @@
 
 	$delete = empty( $r['delete'] ) ? '' : $r['delete'];
 	if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) {
-		if ( !EMPTY_TRASH_DAYS ) {
+		if ( ! EMPTY_TRASH_DAYS ) {
 			$delete = "<a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete-permanently'>" . __( 'Delete Permanently' ) . '</a>';
-		} elseif ( !MEDIA_TRASH ) {
+		} elseif ( ! MEDIA_TRASH ) {
 			$delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a>
 			 <div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'>" .
 			 /* translators: %s: file name */
 			'<p>' . sprintf( __( 'You are about to delete %s.' ), '<strong>' . $filename . '</strong>' ) . "</p>
 			 <a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>
-			 <a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . "</a>
-			 </div>";
+			 <a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . '</a>
+             </div>';
 		} else {
 			$delete = "<a href='" . wp_nonce_url( "post.php?action=trash&amp;post=$attachment_id", 'trash-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a>
-			<a href='" . wp_nonce_url( "post.php?action=untrash&amp;post=$attachment_id", 'untrash-post_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>";
+			<a href='" . wp_nonce_url( "post.php?action=untrash&amp;post=$attachment_id", 'untrash-post_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . '</a>';
 		}
 	} else {
 		$delete = '';
@@ -1531,19 +1613,22 @@
 		$calling_post_type_object = get_post_type_object( $calling_post->post_type );
 
 		$ajax_nonce = wp_create_nonce( "set_post_thumbnail-$calling_post_id" );
-		$thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\", \"$ajax_nonce\");return false;'>" . esc_html( $calling_post_type_object->labels->use_featured_image ) . "</a>";
+		$thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\", \"$ajax_nonce\");return false;'>" . esc_html( $calling_post_type_object->labels->use_featured_image ) . '</a>';
 	}
 
-	if ( ( $r['send'] || $thumbnail || $delete ) && !isset( $form_fields['buttons'] ) ) {
-		$form_fields['buttons'] = array( 'tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>" . $r['send'] . " $thumbnail $delete</td></tr>\n" );
+	if ( ( $r['send'] || $thumbnail || $delete ) && ! isset( $form_fields['buttons'] ) ) {
+		$form_fields['buttons'] = array(
+			'tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>" . $r['send'] . " $thumbnail $delete</td></tr>\n",
+		);
 	}
 	$hidden_fields = array();
 
 	foreach ( $form_fields as $id => $field ) {
-		if ( $id[0] == '_' )
+		if ( $id[0] == '_' ) {
 			continue;
+		}
 
-		if ( !empty( $field['tr'] ) ) {
+		if ( ! empty( $field['tr'] ) ) {
 			$item .= $field['tr'];
 			continue;
 		}
@@ -1552,7 +1637,7 @@
 		$name = "attachments[$attachment_id][$id]";
 
 		if ( $field['input'] == 'hidden' ) {
-			$hidden_fields[$name] = $field['value'];
+			$hidden_fields[ $name ] = $field['value'];
 			continue;
 		}
 
@@ -1563,9 +1648,9 @@
 		$class .= $field['required'] ? ' form-required' : '';
 
 		$item .= "\t\t<tr class='$class'>\n\t\t\t<th scope='row' class='label'><label for='$name'><span class='alignleft'>{$field['label']}{$required}</span><br class='clear' /></label></th>\n\t\t\t<td class='field'>";
-		if ( !empty( $field[ $field['input'] ] ) )
+		if ( ! empty( $field[ $field['input'] ] ) ) {
 			$item .= $field[ $field['input'] ];
-		elseif ( $field['input'] == 'textarea' ) {
+		} elseif ( $field['input'] == 'textarea' ) {
 			if ( 'post_content' == $id && user_can_richedit() ) {
 				// Sanitize_post() skips the post_content when user_can_richedit.
 				$field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES );
@@ -1575,33 +1660,43 @@
 		} else {
 			$item .= "<input type='text' class='text' id='$name' name='$name' value='" . esc_attr( $field['value'] ) . "'{$required_attr}{$aria_required} />";
 		}
-		if ( !empty( $field['helps'] ) )
+		if ( ! empty( $field['helps'] ) ) {
 			$item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
+		}
 		$item .= "</td>\n\t\t</tr>\n";
 
 		$extra_rows = array();
 
-		if ( !empty( $field['errors'] ) )
-			foreach ( array_unique( (array) $field['errors'] ) as $error )
+		if ( ! empty( $field['errors'] ) ) {
+			foreach ( array_unique( (array) $field['errors'] ) as $error ) {
 				$extra_rows['error'][] = $error;
+			}
+		}
 
-		if ( !empty( $field['extra_rows'] ) )
-			foreach ( $field['extra_rows'] as $class => $rows )
-				foreach ( (array) $rows as $html )
-					$extra_rows[$class][] = $html;
+		if ( ! empty( $field['extra_rows'] ) ) {
+			foreach ( $field['extra_rows'] as $class => $rows ) {
+				foreach ( (array) $rows as $html ) {
+					$extra_rows[ $class ][] = $html;
+				}
+			}
+		}
 
-		foreach ( $extra_rows as $class => $rows )
-			foreach ( $rows as $html )
+		foreach ( $extra_rows as $class => $rows ) {
+			foreach ( $rows as $html ) {
 				$item .= "\t\t<tr><td></td><td class='$class'>$html</td></tr>\n";
-	}
+			}
+		}
+	}// End foreach().
 
-	if ( !empty( $form_fields['_final'] ) )
+	if ( ! empty( $form_fields['_final'] ) ) {
 		$item .= "\t\t<tr class='final'><td colspan='2'>{$form_fields['_final']}</td></tr>\n";
+	}
 	$item .= "\t</tbody>\n";
 	$item .= "\t</table>\n";
 
-	foreach ( $hidden_fields as $name => $value )
+	foreach ( $hidden_fields as $name => $value ) {
 		$item .= "\t<input type='hidden' name='$name' id='$name' value='" . esc_attr( $value ) . "' />\n";
+	}
 
 	if ( $post->post_parent < 1 && isset( $_REQUEST['post_id'] ) ) {
 		$parent = (int) $_REQUEST['post_id'];
@@ -1637,40 +1732,45 @@
 	$form_fields = array();
 
 	if ( $args['in_modal'] ) {
-		foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
-			$t = (array) get_taxonomy($taxonomy);
-			if ( ! $t['public'] || ! $t['show_ui'] )
+		foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
+			$t = (array) get_taxonomy( $taxonomy );
+			if ( ! $t['public'] || ! $t['show_ui'] ) {
 				continue;
-			if ( empty($t['label']) )
+			}
+			if ( empty( $t['label'] ) ) {
 				$t['label'] = $taxonomy;
-			if ( empty($t['args']) )
+			}
+			if ( empty( $t['args'] ) ) {
 				$t['args'] = array();
+			}
 
-			$terms = get_object_term_cache($post->ID, $taxonomy);
-			if ( false === $terms )
-				$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
+			$terms = get_object_term_cache( $post->ID, $taxonomy );
+			if ( false === $terms ) {
+				$terms = wp_get_object_terms( $post->ID, $taxonomy, $t['args'] );
+			}
 
 			$values = array();
 
-			foreach ( $terms as $term )
+			foreach ( $terms as $term ) {
 				$values[] = $term->slug;
-			$t['value'] = join(', ', $values);
+			}
+			$t['value'] = join( ', ', $values );
 			$t['taxonomy'] = true;
 
-			$form_fields[$taxonomy] = $t;
+			$form_fields[ $taxonomy ] = $t;
 		}
 	}
 
 	// Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default
 	// The recursive merge is easily traversed with array casting: foreach ( (array) $things as $thing )
-	$form_fields = array_merge_recursive($form_fields, (array) $args['errors'] );
+	$form_fields = array_merge_recursive( $form_fields, (array) $args['errors'] );
 
 	/** This filter is documented in wp-admin/includes/media.php */
 	$form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post );
 
 	unset( $form_fields['image-size'], $form_fields['align'], $form_fields['image_alt'],
 		$form_fields['post_title'], $form_fields['post_excerpt'], $form_fields['post_content'],
-		$form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] );
+	$form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] );
 
 	/** This filter is documented in wp-admin/includes/media.php */
 	$media_meta = apply_filters( 'media_meta', '', $post );
@@ -1688,24 +1788,26 @@
 
 	$item = '';
 	foreach ( $form_fields as $id => $field ) {
-		if ( $id[0] == '_' )
+		if ( $id[0] == '_' ) {
 			continue;
+		}
 
 		$name = "attachments[$attachment_id][$id]";
 		$id_attr = "attachments-$attachment_id-$id";
 
-		if ( !empty( $field['tr'] ) ) {
+		if ( ! empty( $field['tr'] ) ) {
 			$item .= $field['tr'];
 			continue;
 		}
 
 		$field = array_merge( $defaults, $field );
 
-		if ( ( ! $field['show_in_edit'] && ! $args['in_modal'] ) || ( ! $field['show_in_modal'] && $args['in_modal'] ) )
+		if ( ( ! $field['show_in_edit'] && ! $args['in_modal'] ) || ( ! $field['show_in_modal'] && $args['in_modal'] ) ) {
 			continue;
+		}
 
 		if ( $field['input'] == 'hidden' ) {
-			$hidden_fields[$name] = $field['value'];
+			$hidden_fields[ $name ] = $field['value'];
 			continue;
 		}
 
@@ -1720,9 +1822,9 @@
 		$item .= "\t\t\t<th scope='row' class='label'><label for='$id_attr'><span class='alignleft'>{$field['label']}</span>$required<br class='clear' /></label>";
 		$item .= "</th>\n\t\t\t<td class='field'>";
 
-		if ( !empty( $field[ $field['input'] ] ) )
+		if ( ! empty( $field[ $field['input'] ] ) ) {
 			$item .= $field[ $field['input'] ];
-		elseif ( $field['input'] == 'textarea' ) {
+		} elseif ( $field['input'] == 'textarea' ) {
 			if ( 'post_content' == $id && user_can_richedit() ) {
 				// sanitize_post() skips the post_content when user_can_richedit.
 				$field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES );
@@ -1731,28 +1833,37 @@
 		} else {
 			$item .= "<input type='text' class='text' id='$id_attr' name='$name' value='" . esc_attr( $field['value'] ) . "' $readonly{$required_attr}{$aria_required} />";
 		}
-		if ( !empty( $field['helps'] ) )
+		if ( ! empty( $field['helps'] ) ) {
 			$item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique( (array) $field['helps'] ) ) . '</p>';
+		}
 		$item .= "</td>\n\t\t</tr>\n";
 
 		$extra_rows = array();
 
-		if ( !empty( $field['errors'] ) )
-			foreach ( array_unique( (array) $field['errors'] ) as $error )
+		if ( ! empty( $field['errors'] ) ) {
+			foreach ( array_unique( (array) $field['errors'] ) as $error ) {
 				$extra_rows['error'][] = $error;
+			}
+		}
 
-		if ( !empty( $field['extra_rows'] ) )
-			foreach ( $field['extra_rows'] as $class => $rows )
-				foreach ( (array) $rows as $html )
-					$extra_rows[$class][] = $html;
+		if ( ! empty( $field['extra_rows'] ) ) {
+			foreach ( $field['extra_rows'] as $class => $rows ) {
+				foreach ( (array) $rows as $html ) {
+					$extra_rows[ $class ][] = $html;
+				}
+			}
+		}
 
-		foreach ( $extra_rows as $class => $rows )
-			foreach ( $rows as $html )
+		foreach ( $extra_rows as $class => $rows ) {
+			foreach ( $rows as $html ) {
 				$item .= "\t\t<tr><td></td><td class='$class'>$html</td></tr>\n";
-	}
+			}
+		}
+	}// End foreach().
 
-	if ( !empty( $form_fields['_final'] ) )
+	if ( ! empty( $form_fields['_final'] ) ) {
 		$item .= "\t\t<tr class='final'><td colspan='2'>{$form_fields['_final']}</td></tr>\n";
+	}
 
 	if ( $item ) {
 		$item = '<p class="media-types media-types-required-info">' .
@@ -1764,8 +1875,9 @@
 		$item .= '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n";
 	}
 
-	if ( $item )
+	if ( $item ) {
 		$item = '<input type="hidden" name="attachments[' . $attachment_id . '][menu_order]" value="' . esc_attr( $post->menu_order ) . '" />' . $item;
+	}
 
 	return array(
 		'item'   => $item,
@@ -1805,14 +1917,14 @@
 	global $type, $tab, $is_IE, $is_opera;
 
 	if ( ! _device_can_upload() ) {
-		echo '<p>' . sprintf( __('The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.'), 'https://apps.wordpress.org/' ) . '</p>';
+		echo '<p>' . sprintf( __( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.' ), 'https://apps.wordpress.org/' ) . '</p>';
 		return;
 	}
 
-	$upload_action_url = admin_url('async-upload.php');
-	$post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;
-	$_type = isset($type) ? $type : '';
-	$_tab = isset($tab) ? $tab : '';
+	$upload_action_url = admin_url( 'async-upload.php' );
+	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$_type = isset( $type ) ? $type : '';
+	$_tab = isset( $tab ) ? $tab : '';
 
 	$max_upload_size = wp_max_upload_size();
 	if ( ! $max_upload_size ) {
@@ -1822,18 +1934,20 @@
 
 <div id="media-upload-notice"><?php
 
-	if (isset($errors['upload_notice']) )
-		echo $errors['upload_notice'];
+if ( isset( $errors['upload_notice'] ) ) {
+	echo $errors['upload_notice'];
+}
 
 ?></div>
 <div id="media-upload-error"><?php
 
-	if (isset($errors['upload_error']) && is_wp_error($errors['upload_error']))
-		echo $errors['upload_error']->get_error_message();
+if ( isset( $errors['upload_error'] ) && is_wp_error( $errors['upload_error'] ) ) {
+	echo $errors['upload_error']->get_error_message();
+}
 
 ?></div>
 <?php
-if ( is_multisite() && !is_upload_space_available() ) {
+if ( is_multisite() && ! is_upload_space_available() ) {
 	/**
 	 * Fires when an upload will exceed the defined upload space quota for a network site.
 	 *
@@ -1851,11 +1965,11 @@
 do_action( 'pre-upload-ui' );
 
 $post_params = array(
-	"post_id" => $post_id,
-	"_wpnonce" => wp_create_nonce('media-form'),
-	"type" => $_type,
-	"tab" => $_tab,
-	"short" => "1",
+	'post_id' => $post_id,
+	'_wpnonce' => wp_create_nonce( 'media-form' ),
+	'type' => $_type,
+	'tab' => $_tab,
+	'short' => '1',
 );
 
 /**
@@ -1905,12 +2019,14 @@
 <script type="text/javascript">
 <?php
 // Verify size is an int. If not return default value.
-$large_size_h = absint( get_option('large_size_h') );
-if( !$large_size_h )
+$large_size_h = absint( get_option( 'large_size_h' ) );
+if ( ! $large_size_h ) {
 	$large_size_h = 1024;
-$large_size_w = absint( get_option('large_size_w') );
-if( !$large_size_w )
+}
+$large_size_w = absint( get_option( 'large_size_w' ) );
+if ( ! $large_size_w ) {
 	$large_size_w = 1024;
+}
 ?>
 var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
 wpUploaderInit = <?php echo wp_json_encode( $plupload_init ); ?>;
@@ -1927,9 +2043,9 @@
 do_action( 'pre-plupload-upload-ui' ); ?>
 <div id="drag-drop-area">
 	<div class="drag-drop-inside">
-	<p class="drag-drop-info"><?php _e('Drop files here'); ?></p>
-	<p><?php _ex('or', 'Uploader: Drop files here - or - Select Files'); ?></p>
-	<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button" /></p>
+	<p class="drag-drop-info"><?php _e( 'Drop files here' ); ?></p>
+	<p><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
+	<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e( 'Select Files' ); ?>" class="button" /></p>
 	</div>
 </div>
 <?php
@@ -1952,10 +2068,10 @@
 	do_action( 'pre-html-upload-ui' );
 	?>
 	<p id="async-upload-wrap">
-		<label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label>
+		<label class="screen-reader-text" for="async-upload"><?php _e( 'Upload' ); ?></label>
 		<input type="file" name="async-upload" id="async-upload" />
 		<?php submit_button( __( 'Upload' ), 'primary', 'html-upload', false ); ?>
-		<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
+		<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
 	</p>
 	<div class="clear"></div>
 <?php
@@ -1990,13 +2106,13 @@
  * @param object $errors
  * @param integer $id
  */
-function media_upload_type_form($type = 'file', $errors = null, $id = null) {
+function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
 
 	media_upload_header();
 
 	$post_id = isset( $_REQUEST['post_id'] )? intval( $_REQUEST['post_id'] ) : 0;
 
-	$form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
+	$form_action_url = admin_url( "media-upload.php?type=$type&tab=type&post_id=$post_id" );
 
 	/**
 	 * Filters the media upload form action URL.
@@ -2009,16 +2125,17 @@
 	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
 	$form_class = 'media-upload-form type-form validate';
 
-	if ( get_user_setting('uploader') )
+	if ( get_user_setting( 'uploader' ) ) {
 		$form_class .= ' html-uploader';
+	}
 ?>
 
 <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
 <?php submit_button( '', 'hidden', 'save', false ); ?>
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
-<?php wp_nonce_field('media-form'); ?>
+<?php wp_nonce_field( 'media-form' ); ?>
 
-<h3 class="media-title"><?php _e('Add media files from your computer'); ?></h3>
+<h3 class="media-title"><?php _e( 'Add media files from your computer' ); ?></h3>
 
 <?php media_upload_form( $errors ); ?>
 
@@ -2034,11 +2151,11 @@
 <div id="media-items"><?php
 
 if ( $id ) {
-	if ( !is_wp_error($id) ) {
-		add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
+	if ( ! is_wp_error( $id ) ) {
+		add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 );
 		echo get_media_items( $id, $errors );
 	} else {
-		echo '<div id="media-upload-error">'.esc_html($id->get_error_message()).'</div></div>';
+		echo '<div id="media-upload-error">' . esc_html( $id->get_error_message() ) . '</div></div>';
 		exit;
 	}
 }
@@ -2060,28 +2177,30 @@
  * @param object $errors
  * @param integer $id
  */
-function media_upload_type_url_form($type = null, $errors = null, $id = null) {
-	if ( null === $type )
+function media_upload_type_url_form( $type = null, $errors = null, $id = null ) {
+	if ( null === $type ) {
 		$type = 'image';
+	}
 
 	media_upload_header();
 
 	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
 
-	$form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
+	$form_action_url = admin_url( "media-upload.php?type=$type&tab=type&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
 	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
 	$form_class = 'media-upload-form type-form validate';
 
-	if ( get_user_setting('uploader') )
+	if ( get_user_setting( 'uploader' ) ) {
 		$form_class .= ' html-uploader';
+	}
 ?>
 
 <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
-<?php wp_nonce_field('media-form'); ?>
+<?php wp_nonce_field( 'media-form' ); ?>
 
-<h3 class="media-title"><?php _e('Insert media from another website'); ?></h3>
+<h3 class="media-title"><?php _e( 'Insert media from another website' ); ?></h3>
 
 <script type="text/javascript">
 var addExtImage = {
@@ -2101,16 +2220,16 @@
 
 <?php
 	/** This filter is documented in wp-admin/includes/media.php */
-	if ( ! apply_filters( 'disable_captions', '' ) ) {
-		?>
-		if ( f.caption.value ) {
-			caption = f.caption.value.replace(/\r\n|\r/g, '\n');
-			caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
-				return a.replace(/[\r\n\t]+/, ' ');
-			});
+if ( ! apply_filters( 'disable_captions', '' ) ) {
+	?>
+	if ( f.caption.value ) {
+	caption = f.caption.value.replace(/\r\n|\r/g, '\n');
+	caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
+		return a.replace(/[\r\n\t]+/, ' ');
+	});
 
-			caption = caption.replace(/\s*\n\s*/g, '<br />');
-		}
+	caption = caption.replace(/\s*\n\s*/g, '<br />');
+	}
 <?php } ?>
 
 		cls = caption ? '' : ' class="'+t.align+'"';
@@ -2204,20 +2323,21 @@
  *
  * @param array $errors
  */
-function media_upload_gallery_form($errors) {
+function media_upload_gallery_form( $errors ) {
 	global $redir_tab, $type;
 
 	$redir_tab = 'gallery';
 	media_upload_header();
 
-	$post_id = intval($_REQUEST['post_id']);
-	$form_action_url = admin_url("media-upload.php?type=$type&tab=gallery&post_id=$post_id");
+	$post_id = intval( $_REQUEST['post_id'] );
+	$form_action_url = admin_url( "media-upload.php?type=$type&tab=gallery&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
 	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
 	$form_class = 'media-upload-form validate';
 
-	if ( get_user_setting('uploader') )
+	if ( get_user_setting( 'uploader' ) ) {
 		$form_class .= ' html-uploader';
+	}
 ?>
 
 <script type="text/javascript">
@@ -2231,67 +2351,70 @@
 </script>
 <div id="sort-buttons" class="hide-if-no-js">
 <span>
-<?php _e('All Tabs:'); ?>
-<a href="#" id="showall"><?php _e('Show'); ?></a>
-<a href="#" id="hideall" style="display:none;"><?php _e('Hide'); ?></a>
+<?php _e( 'All Tabs:' ); ?>
+<a href="#" id="showall"><?php _e( 'Show' ); ?></a>
+<a href="#" id="hideall" style="display:none;"><?php _e( 'Hide' ); ?></a>
 </span>
-<?php _e('Sort Order:'); ?>
-<a href="#" id="asc"><?php _e('Ascending'); ?></a> |
-<a href="#" id="desc"><?php _e('Descending'); ?></a> |
-<a href="#" id="clear"><?php _ex('Clear', 'verb'); ?></a>
+<?php _e( 'Sort Order:' ); ?>
+<a href="#" id="asc"><?php _e( 'Ascending' ); ?></a> |
+<a href="#" id="desc"><?php _e( 'Descending' ); ?></a> |
+<a href="#" id="clear"><?php _ex( 'Clear', 'verb' ); ?></a>
 </div>
 <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="gallery-form">
-<?php wp_nonce_field('media-form'); ?>
+<?php wp_nonce_field( 'media-form' ); ?>
 <?php //media_upload_form( $errors ); ?>
 <table class="widefat">
 <thead><tr>
-<th><?php _e('Media'); ?></th>
-<th class="order-head"><?php _e('Order'); ?></th>
-<th class="actions-head"><?php _e('Actions'); ?></th>
+<th><?php _e( 'Media' ); ?></th>
+<th class="order-head"><?php _e( 'Order' ); ?></th>
+<th class="actions-head"><?php _e( 'Actions' ); ?></th>
 </tr></thead>
 </table>
 <div id="media-items">
-<?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); ?>
-<?php echo get_media_items($post_id, $errors); ?>
+<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
+<?php echo get_media_items( $post_id, $errors ); ?>
 </div>
 
 <p class="ml-submit">
-<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
+<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false, array(
+	'id' => 'save-all',
+	'style' => 'display: none;',
+) ); ?>
 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
 <input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
 <input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" />
 </p>
 
 <div id="gallery-settings" style="display:none;">
-<div class="title"><?php _e('Gallery Settings'); ?></div>
+<div class="title"><?php _e( 'Gallery Settings' ); ?></div>
 <table id="basic" class="describe"><tbody>
 	<tr>
 	<th scope="row" class="label">
 		<label>
-		<span class="alignleft"><?php _e('Link thumbnails to:'); ?></span>
+		<span class="alignleft"><?php _e( 'Link thumbnails to:' ); ?></span>
 		</label>
 	</th>
 	<td class="field">
 		<input type="radio" name="linkto" id="linkto-file" value="file" />
-		<label for="linkto-file" class="radio"><?php _e('Image File'); ?></label>
+		<label for="linkto-file" class="radio"><?php _e( 'Image File' ); ?></label>
 
 		<input type="radio" checked="checked" name="linkto" id="linkto-post" value="post" />
-		<label for="linkto-post" class="radio"><?php _e('Attachment Page'); ?></label>
+		<label for="linkto-post" class="radio"><?php _e( 'Attachment Page' ); ?></label>
 	</td>
 	</tr>
 
 	<tr>
 	<th scope="row" class="label">
 		<label>
-		<span class="alignleft"><?php _e('Order images by:'); ?></span>
+		<span class="alignleft"><?php _e( 'Order images by:' ); ?></span>
 		</label>
 	</th>
 	<td class="field">
 		<select id="orderby" name="orderby">
-			<option value="menu_order" selected="selected"><?php _e('Menu order'); ?></option>
-			<option value="title"><?php _e('Title'); ?></option>
-			<option value="post_date"><?php _e('Date/Time'); ?></option>
-			<option value="rand"><?php _e('Random'); ?></option>
+			<option value="menu_order" selected="selected"><?php _e( 'Menu order' ); ?></option>
+			<option value="title"><?php _e( 'Title' ); ?></option>
+			<option value="post_date"><?php _e( 'Date/Time' ); ?></option>
+			<option value="rand"><?php _e( 'Random' ); ?></option>
 		</select>
 	</td>
 	</tr>
@@ -2299,22 +2422,22 @@
 	<tr>
 	<th scope="row" class="label">
 		<label>
-		<span class="alignleft"><?php _e('Order:'); ?></span>
+		<span class="alignleft"><?php _e( 'Order:' ); ?></span>
 		</label>
 	</th>
 	<td class="field">
 		<input type="radio" checked="checked" name="order" id="order-asc" value="asc" />
-		<label for="order-asc" class="radio"><?php _e('Ascending'); ?></label>
+		<label for="order-asc" class="radio"><?php _e( 'Ascending' ); ?></label>
 
 		<input type="radio" name="order" id="order-desc" value="desc" />
-		<label for="order-desc" class="radio"><?php _e('Descending'); ?></label>
+		<label for="order-desc" class="radio"><?php _e( 'Descending' ); ?></label>
 	</td>
 	</tr>
 
 	<tr>
 	<th scope="row" class="label">
 		<label>
-		<span class="alignleft"><?php _e('Gallery columns:'); ?></span>
+		<span class="alignleft"><?php _e( 'Gallery columns:' ); ?></span>
 		</label>
 	</th>
 	<td class="field">
@@ -2356,20 +2479,21 @@
  *
  * @param array $errors
  */
-function media_upload_library_form($errors) {
+function media_upload_library_form( $errors ) {
 	global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
 
 	media_upload_header();
 
 	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
 
-	$form_action_url = admin_url("media-upload.php?type=$type&tab=library&post_id=$post_id");
+	$form_action_url = admin_url( "media-upload.php?type=$type&tab=library&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
 	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
 	$form_class = 'media-upload-form validate';
 
-	if ( get_user_setting('uploader') )
+	if ( get_user_setting( 'uploader' ) ) {
 		$form_class .= ' html-uploader';
+	}
 
 	$q = $_GET;
 	$q['posts_per_page'] = 10;
@@ -2394,7 +2518,7 @@
 <input type="hidden" name="context" value="<?php echo isset( $_GET['context'] ) ? esc_attr( $_GET['context'] ) : ''; ?>" />
 
 <p id="media-search" class="search-box">
-	<label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label>
+	<label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' );?>:</label>
 	<input type="search" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
 	<?php submit_button( __( 'Search Media' ), '', '', false ); ?>
 </p>
@@ -2403,33 +2527,44 @@
 <?php
 $type_links = array();
 $_num_posts = (array) wp_count_attachments();
-$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
-foreach ( $matches as $_type => $reals )
-	foreach ( $reals as $real )
-		if ( isset($num_posts[$_type]) )
-			$num_posts[$_type] += $_num_posts[$real];
-		else
-			$num_posts[$_type] = $_num_posts[$real];
+$matches = wp_match_mime_types( array_keys( $post_mime_types ), array_keys( $_num_posts ) );
+foreach ( $matches as $_type => $reals ) {
+	foreach ( $reals as $real ) {
+		if ( isset( $num_posts[ $_type ] ) ) {
+			$num_posts[ $_type ] += $_num_posts[ $real ];
+		} else { $num_posts[ $_type ] = $_num_posts[ $real ];
+		}
+	}
+}
 // If available type specified by media button clicked, filter by that type
-if ( empty($_GET['post_mime_type']) && !empty($num_posts[$type]) ) {
+if ( empty( $_GET['post_mime_type'] ) && ! empty( $num_posts[ $type ] ) ) {
 	$_GET['post_mime_type'] = $type;
 	list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
 }
-if ( empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all' )
+if ( empty( $_GET['post_mime_type'] ) || $_GET['post_mime_type'] == 'all' ) {
 	$class = ' class="current"';
-else
-	$class = '';
-$type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false))) . '"' . $class . '>' . __('All Types') . '</a>';
+} else { $class = '';
+}
+$type_links[] = '<li><a href="' . esc_url( add_query_arg( array(
+	'post_mime_type' => 'all',
+	'paged' => false,
+	'm' => false,
+) ) ) . '"' . $class . '>' . __( 'All Types' ) . '</a>';
 foreach ( $post_mime_types as $mime_type => $label ) {
 	$class = '';
 
-	if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
+	if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) {
 		continue;
+	}
 
-	if ( isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
+	if ( isset( $_GET['post_mime_type'] ) && wp_match_mime_types( $mime_type, $_GET['post_mime_type'] ) ) {
 		$class = ' class="current"';
+	}
 
-	$type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
+	$type_links[] = '<li><a href="' . esc_url( add_query_arg( array(
+		'post_mime_type' => $mime_type,
+		'paged' => false,
+	) ) ) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[ $mime_type ] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[ $mime_type ] ) . '</span>' ) . '</a>';
 }
 /**
  * Filters the media upload mime type list items.
@@ -2440,8 +2575,8 @@
  *
  * @param array $type_links An array of list items containing mime type link HTML.
  */
-echo implode(' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
-unset($type_links);
+echo implode( ' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
+unset( $type_links );
 ?>
 </ul>
 
@@ -2451,14 +2586,15 @@
 $page_links = paginate_links( array(
 	'base' => add_query_arg( 'paged', '%#%' ),
 	'format' => '',
-	'prev_text' => __('&laquo;'),
-	'next_text' => __('&raquo;'),
-	'total' => ceil($wp_query->found_posts / 10),
+	'prev_text' => __( '&laquo;' ),
+	'next_text' => __( '&raquo;' ),
+	'total' => ceil( $wp_query->found_posts / 10 ),
 	'current' => $q['paged'],
 ));
 
-if ( $page_links )
+if ( $page_links ) {
 	echo "<div class='tablenav-pages'>$page_links</div>";
+}
 ?>
 
 <div class="alignleft actions">
@@ -2468,25 +2604,26 @@
 
 $arc_result = $wpdb->get_results( $arc_query );
 
-$month_count = count($arc_result);
+$month_count = count( $arc_result );
 $selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0;
 
-if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
+if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
 <select name='m'>
 <option<?php selected( $selected_month, 0 ); ?> value='0'><?php _e( 'All dates' ); ?></option>
 <?php
-foreach ($arc_result as $arc_row) {
-	if ( $arc_row->yyear == 0 )
+foreach ( $arc_result as $arc_row ) {
+	if ( $arc_row->yyear == 0 ) {
 		continue;
+	}
 	$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
 
-	if ( $arc_row->yyear . $arc_row->mmonth == $selected_month )
+	if ( $arc_row->yyear . $arc_row->mmonth == $selected_month ) {
 		$default = ' selected="selected"';
-	else
-		$default = '';
+	} else { $default = '';
+	}
 
 	echo "<option$default value='" . esc_attr( $arc_row->yyear . $arc_row->mmonth ) . "'>";
-	echo esc_html( $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear" );
+	echo esc_html( $wp_locale->get_month( $arc_row->mmonth ) . " $arc_row->yyear" );
 	echo "</option>\n";
 }
 ?>
@@ -2503,7 +2640,7 @@
 
 <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="library-form">
 
-<?php wp_nonce_field('media-form'); ?>
+<?php wp_nonce_field( 'media-form' ); ?>
 <?php //media_upload_form( $errors ); ?>
 
 <script type="text/javascript">
@@ -2519,8 +2656,8 @@
 </script>
 
 <div id="media-items">
-<?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); ?>
-<?php echo get_media_items(null, $errors); ?>
+<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
+<?php echo get_media_items( null, $errors ); ?>
 </div>
 <p class="ml-submit">
 <?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false ); ?>
@@ -2544,7 +2681,7 @@
 		$caption = '
 		<tr class="image-only">
 			<th scope="row" class="label">
-				<label for="caption"><span class="alignleft">' . __('Image Caption') . '</span></label>
+				<label for="caption"><span class="alignleft">' . __( 'Image Caption' ) . '</span></label>
 			</th>
 			<td class="field"><textarea id="caption" name="caption"></textarea></td>
 		</tr>
@@ -2553,9 +2690,10 @@
 		$caption = '';
 	}
 
-	$default_align = get_option('image_default_align');
-	if ( empty($default_align) )
+	$default_align = get_option( 'image_default_align' );
+	if ( empty( $default_align ) ) {
 		$default_align = 'none';
+	}
 
 	if ( 'image' == $default_view ) {
 		$view = 'image-only';
@@ -2583,44 +2721,44 @@
 			<td class="field"><input id="title" name="title" value="" type="text" required aria-required="true" /></td>
 		</tr>
 
-		<tr class="not-image"><td></td><td><p class="help">' . __('Link text, e.g. &#8220;Ransom Demands (PDF)&#8221;') . '</p></td></tr>
+		<tr class="not-image"><td></td><td><p class="help">' . __( 'Link text, e.g. &#8220;Ransom Demands (PDF)&#8221;' ) . '</p></td></tr>
 
 		<tr class="image-only">
 			<th scope="row" class="label">
-				<label for="alt"><span class="alignleft">' . __('Alternative Text') . '</span></label>
+				<label for="alt"><span class="alignleft">' . __( 'Alternative Text' ) . '</span></label>
 			</th>
 			<td class="field"><input id="alt" name="alt" value="" type="text" aria-required="true" />
-			<p class="help">' . __('Alt text for the image, e.g. &#8220;The Mona Lisa&#8221;') . '</p></td>
+			<p class="help">' . __( 'Alt text for the image, e.g. &#8220;The Mona Lisa&#8221;' ) . '</p></td>
 		</tr>
 		' . $caption . '
 		<tr class="align image-only">
-			<th scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th>
+			<th scope="row" class="label"><p><label for="align">' . __( 'Alignment' ) . '</label></p></th>
 			<td class="field">
-				<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
-				<label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
-				<input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
-				<label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
-				<input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
-				<label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
-				<input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
-				<label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
+				<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '') . ' />
+				<label for="align-none" class="align image-align-none-label">' . __( 'None' ) . '</label>
+				<input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '') . ' />
+				<label for="align-left" class="align image-align-left-label">' . __( 'Left' ) . '</label>
+				<input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '') . ' />
+				<label for="align-center" class="align image-align-center-label">' . __( 'Center' ) . '</label>
+				<input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '') . ' />
+				<label for="align-right" class="align image-align-right-label">' . __( 'Right' ) . '</label>
 			</td>
 		</tr>
 
 		<tr class="image-only">
 			<th scope="row" class="label">
-				<label for="url"><span class="alignleft">' . __('Link Image To:') . '</span></label>
+				<label for="url"><span class="alignleft">' . __( 'Link Image To:' ) . '</span></label>
 			</th>
 			<td class="field"><input id="url" name="url" value="" type="text" /><br />
 
-			<button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __('None') . '</button>
-			<button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>
-			<p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td>
+			<button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __( 'None' ) . '</button>
+			<button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __( 'Link to image' ) . '</button>
+			<p class="help">' . __( 'Enter a link URL or click above for presets.' ) . '</p></td>
 		</tr>
 		<tr class="image-only">
 			<td></td>
 			<td>
-				<input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
+				<input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__( 'Insert into Post' ) . '" />
 			</td>
 		</tr>
 		<tr class="not-image">
@@ -2644,10 +2782,11 @@
 function media_upload_flash_bypass() {
 	$browser_uploader = admin_url( 'media-new.php?browser-uploader' );
 
-	if ( $post = get_post() )
+	if ( $post = get_post() ) {
 		$browser_uploader .= '&amp;post_id=' . intval( $post->ID );
-	elseif ( ! empty( $GLOBALS['post_ID'] ) )
+	} elseif ( ! empty( $GLOBALS['post_ID'] ) ) {
 		$browser_uploader .= '&amp;post_id=' . intval( $GLOBALS['post_ID'] );
+	}
 
 	?>
 	<p class="upload-flash-bypass">
@@ -2664,7 +2803,7 @@
 function media_upload_html_bypass() {
 	?>
 	<p class="upload-html-bypass hide-if-no-js">
-	   <?php _e('You are using the browser&#8217;s built-in file uploader. The WordPress uploader includes multiple file selection and drag and drop capability. <a href="#">Switch to the multi-file uploader</a>.'); ?>
+		<?php _e( 'You are using the browser&#8217;s built-in file uploader. The WordPress uploader includes multiple file selection and drag and drop capability. <a href="#">Switch to the multi-file uploader</a>.' ); ?>
 	</p>
 	<?php
 }
@@ -2682,7 +2821,7 @@
  * @since 3.3.0
  */
 function media_upload_max_image_resize() {
-	$checked = get_user_setting('upload_resize') ? ' checked="true"' : '';
+	$checked = get_user_setting( 'upload_resize' ) ? ' checked="true"' : '';
 	$a = $end = '';
 
 	if ( current_user_can( 'manage_options' ) ) {
@@ -2718,12 +2857,14 @@
  */
 function edit_form_image_editor( $post ) {
 	$open = isset( $_GET['image-editor'] );
-	if ( $open )
+	if ( $open ) {
 		require_once ABSPATH . 'wp-admin/includes/image-edit.php';
+	}
 
 	$thumb_url = false;
-	if ( $attachment_id = intval( $post->ID ) )
+	if ( $attachment_id = intval( $post->ID ) ) {
 		$thumb_url = wp_get_attachment_image_src( $attachment_id, array( 900, 450 ), true );
+	}
 
 	$alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
 
@@ -2732,7 +2873,9 @@
 	<?php
 	if ( wp_attachment_is_image( $post->ID ) ) :
 		$image_edit_button = '';
-		if ( wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) {
+		if ( wp_image_editor_supports( array(
+			'mime_type' => $post->post_mime_type,
+		) ) ) {
 			$nonce = wp_create_nonce( "image_editor-$post->ID" );
 			$image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>";
 		}
@@ -2740,21 +2883,23 @@
 
 		<div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div>
 
-		<div<?php if ( $open ) echo ' style="display:none"'; ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
+		<div<?php if ( $open ) { echo ' style="display:none"';} ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
 			<p id="thumbnail-head-<?php echo $attachment_id; ?>"><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" /></p>
 			<p><?php echo $image_edit_button; ?></p>
 		</div>
-		<div<?php if ( ! $open ) echo ' style="display:none"'; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>">
-			<?php if ( $open ) wp_image_editor( $attachment_id ); ?>
+		<div<?php if ( ! $open ) { echo ' style="display:none"';} ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>">
+			<?php if ( $open ) { wp_image_editor( $attachment_id );} ?>
 		</div>
 	<?php
-	elseif ( $attachment_id && wp_attachment_is( 'audio', $post ) ):
+	elseif ( $attachment_id && wp_attachment_is( 'audio', $post ) ) :
 
 		wp_maybe_generate_attachment_metadata( $post );
 
-		echo wp_audio_shortcode( array( 'src' => $att_url ) );
+		echo wp_audio_shortcode( array(
+			'src' => $att_url,
+		) );
 
-	elseif ( $attachment_id && wp_attachment_is( 'video', $post ) ):
+	elseif ( $attachment_id && wp_attachment_is( 'video', $post ) ) :
 
 		wp_maybe_generate_attachment_metadata( $post );
 
@@ -2765,7 +2910,9 @@
 			$h = round( ( $meta['height'] * $w ) / $meta['width'] );
 		}
 
-		$attr = array( 'src' => $att_url );
+		$attr = array(
+			'src' => $att_url,
+		);
 		if ( ! empty( $w ) && ! empty( $h ) ) {
 			$attr['width'] = $w;
 			$attr['height'] = $h;
@@ -2778,7 +2925,7 @@
 
 		echo wp_video_shortcode( $attr );
 
-	elseif ( isset( $thumb_url[0] ) ):
+	elseif ( isset( $thumb_url[0] ) ) :
 
 		?>
 		<div class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
@@ -2788,7 +2935,7 @@
 		</div>
 		<?php
 
-	else:
+	else :
 
 		/**
 		 * Fires when an attachment type can't be rendered in the edit form.
@@ -2816,7 +2963,9 @@
 	<?php endif; ?>
 
 	<?php
-		$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
+		$quicktags_settings = array(
+			'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close',
+		);
 		$editor_args = array(
 			'textarea_name' => 'content',
 			'textarea_rows' => 5,
@@ -2852,8 +3001,9 @@
 
 	$media_dims = '';
 	$meta = wp_get_attachment_metadata( $post->ID );
-	if ( isset( $meta['width'], $meta['height'] ) )
+	if ( isset( $meta['width'], $meta['height'] ) ) {
 		$media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
+	}
 	/** This filter is documented in wp-admin/includes/media.php */
 	$media_dims = apply_filters( 'media_meta', $media_dims, $post );
 
@@ -2868,29 +3018,30 @@
 	</div>
 	<div class="misc-pub-section misc-pub-filetype">
 		<?php _e( 'File type:' ); ?> <strong><?php
-			if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) ) {
-				echo esc_html( strtoupper( $matches[1] ) );
-				list( $mime_type ) = explode( '/', $post->post_mime_type );
-				if ( $mime_type !== 'image' && ! empty( $meta['mime_type'] ) ) {
-					if ( $meta['mime_type'] !== "$mime_type/" . strtolower( $matches[1] ) ) {
-						echo ' (' . $meta['mime_type'] . ')';
-					}
+		if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) ) {
+			echo esc_html( strtoupper( $matches[1] ) );
+			list( $mime_type ) = explode( '/', $post->post_mime_type );
+			if ( $mime_type !== 'image' && ! empty( $meta['mime_type'] ) ) {
+				if ( $meta['mime_type'] !== "$mime_type/" . strtolower( $matches[1] ) ) {
+					echo ' (' . $meta['mime_type'] . ')';
 				}
-			} else {
-				echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );
 			}
+		} else {
+			echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );
+		}
 		?></strong>
 	</div>
 
 	<?php
 		$file_size = false;
 
-		if ( isset( $meta['filesize'] ) )
-			$file_size = $meta['filesize'];
-		elseif ( file_exists( $file ) )
-			$file_size = filesize( $file );
+	if ( isset( $meta['filesize'] ) ) {
+		$file_size = $meta['filesize'];
+	} elseif ( file_exists( $file ) ) {
+		$file_size = filesize( $file );
+	}
 
-		if ( ! empty( $file_size ) ) : ?>
+	if ( ! empty( $file_size ) ) : ?>
 			<div class="misc-pub-section misc-pub-filesize">
 				<?php _e( 'File size:' ); ?> <strong><?php echo size_format( $file_size ); ?></strong>
 			</div>
@@ -2921,17 +3072,17 @@
 	?>
 		<div class="misc-pub-section misc-pub-mime-meta misc-pub-<?php echo sanitize_html_class( $key ); ?>">
 			<?php echo $label ?> <strong><?php
-				switch ( $key ) {
-					case 'bitrate' :
-						echo round( $meta['bitrate'] / 1000 ) . 'kb/s';
-						if ( ! empty( $meta['bitrate_mode'] ) ) {
-							echo ' ' . strtoupper( esc_html( $meta['bitrate_mode'] ) );
-						}
-						break;
-					default:
-						echo esc_html( $meta[ $key ] );
-						break;
-				}
+			switch ( $key ) {
+				case 'bitrate' :
+					echo round( $meta['bitrate'] / 1000 ) . 'kb/s';
+					if ( ! empty( $meta['bitrate_mode'] ) ) {
+						echo ' ' . strtoupper( esc_html( $meta['bitrate_mode'] ) );
+					}
+					break;
+				default:
+					echo esc_html( $meta[ $key ] );
+					break;
+			}
 			?></strong>
 		</div>
 	<?php
@@ -2949,7 +3100,7 @@
 		 */
 		$audio_fields = apply_filters( 'audio_submitbox_misc_sections', array(
 			'dataformat' => __( 'Audio Format:' ),
-			'codec'      => __( 'Audio Codec:' )
+			'codec'      => __( 'Audio Codec:' ),
 		) );
 
 		foreach ( $audio_fields as $key => $label ) {
@@ -2958,12 +3109,11 @@
 			}
 	?>
 		<div class="misc-pub-section misc-pub-audio misc-pub-<?php echo sanitize_html_class( $key ); ?>">
-			<?php echo $label; ?> <strong><?php echo esc_html( $meta['audio'][$key] ); ?></strong>
+			<?php echo $label; ?> <strong><?php echo esc_html( $meta['audio'][ $key ] ); ?></strong>
 		</div>
 	<?php
 		}
-
-	}
+	}// End if().
 
 	if ( $media_dims ) : ?>
 	<div class="misc-pub-section misc-pub-dimensions">
@@ -2983,13 +3133,14 @@
  */
 function wp_add_id3_tag_data( &$metadata, $data ) {
 	foreach ( array( 'id3v2', 'id3v1' ) as $version ) {
-		if ( ! empty( $data[$version]['comments'] ) ) {
-			foreach ( $data[$version]['comments'] as $key => $list ) {
+		if ( ! empty( $data[ $version ]['comments'] ) ) {
+			foreach ( $data[ $version ]['comments'] as $key => $list ) {
 				if ( 'length' !== $key && ! empty( $list ) ) {
-					$metadata[$key] = wp_kses_post( reset( $list ) );
+					$metadata[ $key ] = wp_kses_post( reset( $list ) );
 					// Fix bug in byte stream analysis.
-					if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
-						$metadata[$key] = 'Cop' . $metadata[$key];
+					if ( 'terms_of_use' === $key && 0 === strpos( $metadata[ $key ], 'yright notice.' ) ) {
+						$metadata[ $key ] = 'Cop' . $metadata[ $key ];
+					}
 				}
 			}
 			break;
@@ -2997,13 +3148,13 @@
 	}
 
 	if ( ! empty( $data['id3v2']['APIC'] ) ) {
-		$image = reset( $data['id3v2']['APIC']);
+		$image = reset( $data['id3v2']['APIC'] );
 		if ( ! empty( $image['data'] ) ) {
 			$metadata['image'] = array(
 				'data' => $image['data'],
 				'mime' => $image['image_mime'],
 				'width' => $image['image_width'],
-				'height' => $image['image_height']
+				'height' => $image['image_height'],
 			);
 		}
 	} elseif ( ! empty( $data['comments']['picture'] ) ) {
@@ -3011,7 +3162,7 @@
 		if ( ! empty( $image['data'] ) ) {
 			$metadata['image'] = array(
 				'data' => $image['data'],
-				'mime' => $image['image_mime']
+				'mime' => $image['image_mime'],
 			);
 		}
 	}
@@ -3042,32 +3193,45 @@
 	$id3 = new getID3();
 	$data = $id3->analyze( $file );
 
-	if ( isset( $data['video']['lossless'] ) )
+	if ( isset( $data['video']['lossless'] ) ) {
 		$metadata['lossless'] = $data['video']['lossless'];
-	if ( ! empty( $data['video']['bitrate'] ) )
+	}
+	if ( ! empty( $data['video']['bitrate'] ) ) {
 		$metadata['bitrate'] = (int) $data['video']['bitrate'];
-	if ( ! empty( $data['video']['bitrate_mode'] ) )
+	}
+	if ( ! empty( $data['video']['bitrate_mode'] ) ) {
 		$metadata['bitrate_mode'] = $data['video']['bitrate_mode'];
-	if ( ! empty( $data['filesize'] ) )
+	}
+	if ( ! empty( $data['filesize'] ) ) {
 		$metadata['filesize'] = (int) $data['filesize'];
-	if ( ! empty( $data['mime_type'] ) )
+	}
+	if ( ! empty( $data['mime_type'] ) ) {
 		$metadata['mime_type'] = $data['mime_type'];
-	if ( ! empty( $data['playtime_seconds'] ) )
+	}
+	if ( ! empty( $data['playtime_seconds'] ) ) {
 		$metadata['length'] = (int) round( $data['playtime_seconds'] );
-	if ( ! empty( $data['playtime_string'] ) )
+	}
+	if ( ! empty( $data['playtime_string'] ) ) {
 		$metadata['length_formatted'] = $data['playtime_string'];
-	if ( ! empty( $data['video']['resolution_x'] ) )
+	}
+	if ( ! empty( $data['video']['resolution_x'] ) ) {
 		$metadata['width'] = (int) $data['video']['resolution_x'];
-	if ( ! empty( $data['video']['resolution_y'] ) )
+	}
+	if ( ! empty( $data['video']['resolution_y'] ) ) {
 		$metadata['height'] = (int) $data['video']['resolution_y'];
-	if ( ! empty( $data['fileformat'] ) )
+	}
+	if ( ! empty( $data['fileformat'] ) ) {
 		$metadata['fileformat'] = $data['fileformat'];
-	if ( ! empty( $data['video']['dataformat'] ) )
+	}
+	if ( ! empty( $data['video']['dataformat'] ) ) {
 		$metadata['dataformat'] = $data['video']['dataformat'];
-	if ( ! empty( $data['video']['encoder'] ) )
+	}
+	if ( ! empty( $data['video']['encoder'] ) ) {
 		$metadata['encoder'] = $data['video']['encoder'];
-	if ( ! empty( $data['video']['codec'] ) )
+	}
+	if ( ! empty( $data['video']['codec'] ) ) {
 		$metadata['codec'] = $data['video']['codec'];
+	}
 
 	if ( ! empty( $data['audio'] ) ) {
 		unset( $data['audio']['streams'] );
@@ -3108,16 +3272,21 @@
 		$metadata = $data['audio'];
 	}
 
-	if ( ! empty( $data['fileformat'] ) )
+	if ( ! empty( $data['fileformat'] ) ) {
 		$metadata['fileformat'] = $data['fileformat'];
-	if ( ! empty( $data['filesize'] ) )
+	}
+	if ( ! empty( $data['filesize'] ) ) {
 		$metadata['filesize'] = (int) $data['filesize'];
-	if ( ! empty( $data['mime_type'] ) )
+	}
+	if ( ! empty( $data['mime_type'] ) ) {
 		$metadata['mime_type'] = $data['mime_type'];
-	if ( ! empty( $data['playtime_seconds'] ) )
+	}
+	if ( ! empty( $data['playtime_seconds'] ) ) {
 		$metadata['length'] = (int) round( $data['playtime_seconds'] );
-	if ( ! empty( $data['playtime_string'] ) )
+	}
+	if ( ! empty( $data['playtime_string'] ) ) {
 		$metadata['length_formatted'] = $data['playtime_string'];
+	}
 
 	wp_add_id3_tag_data( $metadata, $data );
 
@@ -3178,7 +3347,9 @@
 		}
 
 		$key = 'attach' === $action ? 'attached' : 'detach';
-		$location = add_query_arg( array( $key => $result ), $location );
+		$location = add_query_arg( array(
+			$key => $result,
+		), $location );
 		wp_redirect( $location );
 		exit;
 	}
Index: src/wp-admin/includes/menu.php
===================================================================
--- src/wp-admin/includes/menu.php	(revision 40901)
+++ src/wp-admin/includes/menu.php	(working copy)
@@ -42,48 +42,50 @@
 }
 
 // Create list of page plugin hook names.
-foreach ($menu as $menu_page) {
-	if ( false !== $pos = strpos($menu_page[2], '?') ) {
+foreach ( $menu as $menu_page ) {
+	if ( false !== $pos = strpos( $menu_page[2], '?' ) ) {
 		// Handle post_type=post|page|foo pages.
-		$hook_name = substr($menu_page[2], 0, $pos);
-		$hook_args = substr($menu_page[2], $pos + 1);
-		wp_parse_str($hook_args, $hook_args);
+		$hook_name = substr( $menu_page[2], 0, $pos );
+		$hook_args = substr( $menu_page[2], $pos + 1 );
+		wp_parse_str( $hook_args, $hook_args );
 		// Set the hook name to be the post type.
-		if ( isset($hook_args['post_type']) )
+		if ( isset( $hook_args['post_type'] ) ) {
 			$hook_name = $hook_args['post_type'];
-		else
-			$hook_name = basename($hook_name, '.php');
-		unset($hook_args);
+		} else { $hook_name = basename( $hook_name, '.php' );
+		}
+		unset( $hook_args );
 	} else {
-		$hook_name = basename($menu_page[2], '.php');
+		$hook_name = basename( $menu_page[2], '.php' );
 	}
-	$hook_name = sanitize_title($hook_name);
+	$hook_name = sanitize_title( $hook_name );
 
-	if ( isset($compat[$hook_name]) )
-		$hook_name = $compat[$hook_name];
-	elseif ( !$hook_name )
+	if ( isset( $compat[ $hook_name ] ) ) {
+		$hook_name = $compat[ $hook_name ];
+	} elseif ( ! $hook_name ) {
 		continue;
+	}
 
-	$admin_page_hooks[$menu_page[2]] = $hook_name;
+	$admin_page_hooks[ $menu_page[2] ] = $hook_name;
 }
-unset($menu_page, $compat);
+unset( $menu_page, $compat );
 
 $_wp_submenu_nopriv = array();
 $_wp_menu_nopriv = array();
 // Loop over submenus and remove pages for which the user does not have privs.
-foreach ($submenu as $parent => $sub) {
-	foreach ($sub as $index => $data) {
-		if ( ! current_user_can($data[1]) ) {
-			unset($submenu[$parent][$index]);
-			$_wp_submenu_nopriv[$parent][$data[2]] = true;
+foreach ( $submenu as $parent => $sub ) {
+	foreach ( $sub as $index => $data ) {
+		if ( ! current_user_can( $data[1] ) ) {
+			unset( $submenu[ $parent ][ $index ] );
+			$_wp_submenu_nopriv[ $parent ][ $data[2] ] = true;
 		}
 	}
-	unset($index, $data);
+	unset( $index, $data );
 
-	if ( empty($submenu[$parent]) )
-		unset($submenu[$parent]);
+	if ( empty( $submenu[ $parent ] ) ) {
+		unset( $submenu[ $parent ] );
+	}
 }
-unset($sub, $parent);
+unset( $sub, $parent );
 
 /*
  * Loop over the top-level menu.
@@ -91,9 +93,10 @@
  * will have the next submenu in line be assigned as the new menu parent.
  */
 foreach ( $menu as $id => $data ) {
-	if ( empty($submenu[$data[2]]) )
+	if ( empty( $submenu[ $data[2] ] ) ) {
 		continue;
-	$subs = $submenu[$data[2]];
+	}
+	$subs = $submenu[ $data[2] ];
 	$first_sub = reset( $subs );
 	$old_parent = $data[2];
 	$new_parent = $first_sub[2];
@@ -102,20 +105,21 @@
 	 * make the first submenu the new parent.
 	 */
 	if ( $new_parent != $old_parent ) {
-		$_wp_real_parent_file[$old_parent] = $new_parent;
-		$menu[$id][2] = $new_parent;
+		$_wp_real_parent_file[ $old_parent ] = $new_parent;
+		$menu[ $id ][2] = $new_parent;
 
-		foreach ($submenu[$old_parent] as $index => $data) {
-			$submenu[$new_parent][$index] = $submenu[$old_parent][$index];
-			unset($submenu[$old_parent][$index]);
+		foreach ( $submenu[ $old_parent ] as $index => $data ) {
+			$submenu[ $new_parent ][ $index ] = $submenu[ $old_parent ][ $index ];
+			unset( $submenu[ $old_parent ][ $index ] );
 		}
-		unset($submenu[$old_parent], $index);
+		unset( $submenu[ $old_parent ], $index );
 
-		if ( isset($_wp_submenu_nopriv[$old_parent]) )
-			$_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent];
+		if ( isset( $_wp_submenu_nopriv[ $old_parent ] ) ) {
+			$_wp_submenu_nopriv[ $new_parent ] = $_wp_submenu_nopriv[ $old_parent ];
+		}
 	}
 }
-unset($id, $data, $subs, $first_sub, $old_parent, $new_parent);
+unset( $id, $data, $subs, $first_sub, $old_parent, $new_parent );
 
 if ( is_network_admin() ) {
 
@@ -154,29 +158,31 @@
  * that the user does not have. Run re-parent loop again.
  */
 foreach ( $menu as $id => $data ) {
-	if ( ! current_user_can($data[1]) )
-		$_wp_menu_nopriv[$data[2]] = true;
+	if ( ! current_user_can( $data[1] ) ) {
+		$_wp_menu_nopriv[ $data[2] ] = true;
+	}
 
 	/*
 	 * If there is only one submenu and it is has same destination as the parent,
 	 * remove the submenu.
 	 */
-	if ( ! empty( $submenu[$data[2]] ) && 1 == count ( $submenu[$data[2]] ) ) {
-		$subs = $submenu[$data[2]];
+	if ( ! empty( $submenu[ $data[2] ] ) && 1 == count( $submenu[ $data[2] ] ) ) {
+		$subs = $submenu[ $data[2] ];
 		$first_sub = reset( $subs );
-		if ( $data[2] == $first_sub[2] )
-			unset( $submenu[$data[2]] );
+		if ( $data[2] == $first_sub[2] ) {
+			unset( $submenu[ $data[2] ] );
+		}
 	}
 
 	// If submenu is empty...
-	if ( empty($submenu[$data[2]]) ) {
+	if ( empty( $submenu[ $data[2] ] ) ) {
 		// And user doesn't have privs, remove menu.
-		if ( isset( $_wp_menu_nopriv[$data[2]] ) ) {
-			unset($menu[$id]);
+		if ( isset( $_wp_menu_nopriv[ $data[2] ] ) ) {
+			unset( $menu[ $id ] );
 		}
 	}
 }
-unset($id, $data, $subs, $first_sub);
+unset( $id, $data, $subs, $first_sub );
 
 /**
  *
@@ -184,8 +190,8 @@
  * @param string $class
  * @return string
  */
-function add_cssclass($add, $class) {
-	$class = empty($class) ? $add : $class .= ' ' . $add;
+function add_cssclass( $add, $class ) {
+	$class = empty( $class ) ? $add : $class .= ' ' . $add;
 	return $class;
 }
 
@@ -194,35 +200,35 @@
  * @param array $menu
  * @return array
  */
-function add_menu_classes($menu) {
+function add_menu_classes( $menu ) {
 	$first = $lastorder = false;
 	$i = 0;
-	$mc = count($menu);
+	$mc = count( $menu );
 	foreach ( $menu as $order => $top ) {
 		$i++;
 
 		if ( 0 == $order ) { // dashboard is always shown/single
-			$menu[0][4] = add_cssclass('menu-top-first', $top[4]);
+			$menu[0][4] = add_cssclass( 'menu-top-first', $top[4] );
 			$lastorder = 0;
 			continue;
 		}
 
-		if ( 0 === strpos($top[2], 'separator') && false !== $lastorder ) { // if separator
+		if ( 0 === strpos( $top[2], 'separator' ) && false !== $lastorder ) { // if separator
 			$first = true;
-			$c = $menu[$lastorder][4];
-			$menu[$lastorder][4] = add_cssclass('menu-top-last', $c);
+			$c = $menu[ $lastorder ][4];
+			$menu[ $lastorder ][4] = add_cssclass( 'menu-top-last', $c );
 			continue;
 		}
 
 		if ( $first ) {
-			$c = $menu[$order][4];
-			$menu[$order][4] = add_cssclass('menu-top-first', $c);
+			$c = $menu[ $order ][4];
+			$menu[ $order ][4] = add_cssclass( 'menu-top-first', $c );
 			$first = false;
 		}
 
 		if ( $mc == $i ) { // last item
-			$c = $menu[$order][4];
-			$menu[$order][4] = add_cssclass('menu-top-last', $c);
+			$c = $menu[ $order ][4];
+			$menu[ $order ][4] = add_cssclass( 'menu-top-last', $c );
 		}
 
 		$lastorder = $order;
@@ -238,7 +244,7 @@
 	return apply_filters( 'add_menu_classes', $menu );
 }
 
-uksort($menu, "strnatcasecmp"); // make it all pretty
+uksort( $menu, 'strnatcasecmp' ); // make it all pretty
 
 /**
  * Filters whether to enable custom ordering of the administration menu.
@@ -254,7 +260,7 @@
 	foreach ( $menu as $menu_item ) {
 		$menu_order[] = $menu_item[2];
 	}
-	unset($menu_item);
+	unset( $menu_item );
 	$default_menu_order = $menu_order;
 
 	/**
@@ -270,8 +276,8 @@
 	 * @param array $menu_order An ordered array of menu items.
 	 */
 	$menu_order = apply_filters( 'menu_order', $menu_order );
-	$menu_order = array_flip($menu_order);
-	$default_menu_order = array_flip($default_menu_order);
+	$menu_order = array_flip( $menu_order );
+	$default_menu_order = array_flip( $default_menu_order );
 
 	/**
 	 *
@@ -282,26 +288,27 @@
 	 * @param array $b
 	 * @return int
 	 */
-	function sort_menu($a, $b) {
+	function sort_menu( $a, $b ) {
 		global $menu_order, $default_menu_order;
 		$a = $a[2];
 		$b = $b[2];
-		if ( isset($menu_order[$a]) && !isset($menu_order[$b]) ) {
+		if ( isset( $menu_order[ $a ] ) && ! isset( $menu_order[ $b ] ) ) {
 			return -1;
-		} elseif ( !isset($menu_order[$a]) && isset($menu_order[$b]) ) {
+		} elseif ( ! isset( $menu_order[ $a ] ) && isset( $menu_order[ $b ] ) ) {
 			return 1;
-		} elseif ( isset($menu_order[$a]) && isset($menu_order[$b]) ) {
-			if ( $menu_order[$a] == $menu_order[$b] )
+		} elseif ( isset( $menu_order[ $a ] ) && isset( $menu_order[ $b ] ) ) {
+			if ( $menu_order[ $a ] == $menu_order[ $b ] ) {
 				return 0;
-			return ($menu_order[$a] < $menu_order[$b]) ? -1 : 1;
+			}
+			return ($menu_order[ $a ] < $menu_order[ $b ]) ? -1 : 1;
 		} else {
-			return ($default_menu_order[$a] <= $default_menu_order[$b]) ? -1 : 1;
+			return ($default_menu_order[ $a ] <= $default_menu_order[ $b ]) ? -1 : 1;
 		}
 	}
 
-	usort($menu, 'sort_menu');
-	unset($menu_order, $default_menu_order);
-}
+	usort( $menu, 'sort_menu' );
+	unset( $menu_order, $default_menu_order );
+}// End if().
 
 // Prevent adjacent separators
 $prev_menu_was_separator = false;
@@ -326,11 +333,12 @@
 // Remove the last menu item if it is a separator.
 $last_menu_key = array_keys( $menu );
 $last_menu_key = array_pop( $last_menu_key );
-if ( !empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][ 4 ] )
+if ( ! empty( $menu ) && 'wp-menu-separator' == $menu[ $last_menu_key ][4] ) {
 	unset( $menu[ $last_menu_key ] );
+}
 unset( $last_menu_key );
 
-if ( !user_can_access_admin_page() ) {
+if ( ! user_can_access_admin_page() ) {
 
 	/**
 	 * Fires when access to an admin page is denied.
@@ -342,4 +350,4 @@
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 }
 
-$menu = add_menu_classes($menu);
+$menu = add_menu_classes( $menu );
Index: src/wp-admin/includes/meta-boxes.php
===================================================================
--- src/wp-admin/includes/meta-boxes.php	(revision 40901)
+++ src/wp-admin/includes/meta-boxes.php	(working copy)
@@ -23,8 +23,8 @@
 	global $action;
 
 	$post_type = $post->post_type;
-	$post_type_object = get_post_type_object($post_type);
-	$can_publish = current_user_can($post_type_object->cap->publish_posts);
+	$post_type_object = get_post_type_object( $post_type );
+	$can_publish = current_user_can( $post_type_object->cap->publish_posts );
 ?>
 <div class="submitbox" id="submitpost">
 
@@ -38,10 +38,10 @@
 <div id="minor-publishing-actions">
 <div id="save-action">
 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?>
-<input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" />
+<input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" />
 <span class="spinner"></span>
 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
-<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" class="button" />
+<input type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save as Pending' ); ?>" class="button" />
 <span class="spinner"></span>
 <?php } ?>
 </div>
@@ -85,20 +85,20 @@
 
 switch ( $post->post_status ) {
 	case 'private':
-		_e('Privately Published');
+		_e( 'Privately Published' );
 		break;
 	case 'publish':
-		_e('Published');
+		_e( 'Published' );
 		break;
 	case 'future':
-		_e('Scheduled');
+		_e( 'Scheduled' );
 		break;
 	case 'pending':
-		_e('Pending Review');
+		_e( 'Pending Review' );
 		break;
 	case 'draft':
 	case 'auto-draft':
-		_e('Draft');
+		_e( 'Draft' );
 		break;
 }
 ?>
@@ -107,46 +107,46 @@
 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
 
 <div id="post-status-select" class="hide-if-js">
-<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" />
+<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
 <label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ) ?></label>
 <select name="post_status" id="post_status">
 <?php if ( 'publish' == $post->post_status ) : ?>
-<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option>
+<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e( 'Published' ) ?></option>
 <?php elseif ( 'private' == $post->post_status ) : ?>
-<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option>
+<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e( 'Privately Published' ) ?></option>
 <?php elseif ( 'future' == $post->post_status ) : ?>
-<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
+<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e( 'Scheduled' ) ?></option>
 <?php endif; ?>
-<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
+<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e( 'Pending Review' ) ?></option>
 <?php if ( 'auto-draft' == $post->post_status ) : ?>
-<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option>
+<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e( 'Draft' ) ?></option>
 <?php else : ?>
-<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option>
+<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e( 'Draft' ) ?></option>
 <?php endif; ?>
 </select>
- <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a>
- <a href="#post_status" class="cancel-post-status hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
+ <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e( 'OK' ); ?></a>
+ <a href="#post_status" class="cancel-post-status hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
 </div>
 
 <?php } ?>
 </div><!-- .misc-pub-section -->
 
 <div class="misc-pub-section misc-pub-visibility" id="visibility">
-<?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php
+<?php _e( 'Visibility:' ); ?> <span id="post-visibility-display"><?php
 
 if ( 'private' == $post->post_status ) {
 	$post->post_password = '';
 	$visibility = 'private';
-	$visibility_trans = __('Private');
-} elseif ( !empty( $post->post_password ) ) {
+	$visibility_trans = __( 'Private' );
+} elseif ( ! empty( $post->post_password ) ) {
 	$visibility = 'password';
-	$visibility_trans = __('Password protected');
+	$visibility_trans = __( 'Password protected' );
 } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
 	$visibility = 'public';
-	$visibility_trans = __('Public, Sticky');
+	$visibility_trans = __( 'Public, Sticky' );
 } else {
 	$visibility = 'public';
-	$visibility_trans = __('Public');
+	$visibility_trans = __( 'Public' );
 }
 
 echo esc_html( $visibility_trans ); ?></span>
@@ -154,22 +154,22 @@
 <a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
 
 <div id="post-visibility-select" class="hide-if-js">
-<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
-<?php if ($post_type == 'post'): ?>
-<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> />
+<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr( $post->post_password ); ?>" />
+<?php if ( $post_type == 'post' ) : ?>
+<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> />
 <?php endif; ?>
 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
-<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
+<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e( 'Public' ); ?></label><br />
 <?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
 <?php endif; ?>
-<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
-<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="255" /><br /></span>
-<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
+<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e( 'Password protected' ); ?></label><br />
+<span id="password-span"><label for="post_password"><?php _e( 'Password:' ); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr( $post->post_password ); ?>"  maxlength="255" /><br /></span>
+<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e( 'Private' ); ?></label><br />
 
 <p>
- <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>
- <a href="#visibility" class="cancel-post-visibility hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
+ <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e( 'OK' ); ?></a>
+ <a href="#visibility" class="cancel-post-visibility hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
 </p>
 </div>
 <?php } ?>
@@ -182,23 +182,23 @@
 if ( 0 != $post->ID ) {
 	if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
 		/* translators: Post date information. 1: Date on which the post is currently scheduled to be published */
-		$stamp = __('Scheduled for: <b>%1$s</b>');
+		$stamp = __( 'Scheduled for: <b>%1$s</b>' );
 	} elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
 		/* translators: Post date information. 1: Date on which the post was published */
-		$stamp = __('Published on: <b>%1$s</b>');
+		$stamp = __( 'Published on: <b>%1$s</b>' );
 	} elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
-		$stamp = __('Publish <b>immediately</b>');
+		$stamp = __( 'Publish <b>immediately</b>' );
 	} elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
 		/* translators: Post date information. 1: Date on which the post is to be published */
-		$stamp = __('Schedule for: <b>%1$s</b>');
+		$stamp = __( 'Schedule for: <b>%1$s</b>' );
 	} else { // draft, 1 or more saves, date specified
 		/* translators: Post date information. 1: Date on which the post is to be published */
-		$stamp = __('Publish on: <b>%1$s</b>');
+		$stamp = __( 'Publish on: <b>%1$s</b>' );
 	}
 	$date = date_i18n( $datef, strtotime( $post->post_date ) );
 } else { // draft (no saves, and thus no date specified)
-	$stamp = __('Publish <b>immediately</b>');
-	$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
+	$stamp = __( 'Publish <b>immediately</b>' );
+	$date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) );
 }
 
 if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
@@ -214,7 +214,7 @@
 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
 <div class="misc-pub-section curtime misc-pub-curtime">
 	<span id="timestamp">
-	<?php printf($stamp, $date); ?></span>
+	<?php printf( $stamp, $date ); ?></span>
 	<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
 	<fieldset id="timestampdiv" class="hide-if-js">
 	<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
@@ -249,35 +249,35 @@
 ?>
 <div id="delete-action">
 <?php
-if ( current_user_can( "delete_post", $post->ID ) ) {
-	if ( !EMPTY_TRASH_DAYS )
-		$delete_text = __('Delete Permanently');
-	else
-		$delete_text = __('Move to Trash');
+if ( current_user_can( 'delete_post', $post->ID ) ) {
+	if ( ! EMPTY_TRASH_DAYS ) {
+		$delete_text = __( 'Delete Permanently' );
+	} else { $delete_text = __( 'Move to Trash' );
+	}
 	?>
-<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php
+<a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php echo $delete_text; ?></a><?php
 } ?>
 </div>
 
 <div id="publishing-action">
 <span class="spinner"></span>
 <?php
-if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
+if ( ! in_array( $post->post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) {
 	if ( $can_publish ) :
-		if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
-		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
+		if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
+		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Schedule' ) ?>" />
 		<?php submit_button( __( 'Schedule' ), 'primary large', 'publish', false ); ?>
 <?php	else : ?>
-		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
+		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ) ?>" />
 		<?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
 <?php	endif;
 	else : ?>
-		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
+		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review' ) ?>" />
 		<?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
 <?php
 	endif;
 } else { ?>
-		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
+		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ) ?>" />
 		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
 <?php
 } ?>
@@ -313,11 +313,11 @@
 	/* translators: Publish box date format, see https://secure.php.net/date */
 	$datef = __( 'M j, Y @ H:i' );
 	/* translators: Attachment information. 1: Date the attachment was uploaded */
-	$stamp = __('Uploaded on: <b>%1$s</b>');
+	$stamp = __( 'Uploaded on: <b>%1$s</b>' );
 	$date = date_i18n( $datef, strtotime( $post->post_date ) );
 	?>
 	<div class="misc-pub-section curtime misc-pub-curtime">
-		<span id="timestamp"><?php printf($stamp, $date); ?></span>
+		<span id="timestamp"><?php printf( $stamp, $date ); ?></span>
 	</div><!-- .misc-pub-section -->
 
 	<?php
@@ -336,19 +336,20 @@
 <div id="major-publishing-actions">
 	<div id="delete-action">
 	<?php
-	if ( current_user_can( 'delete_post', $post->ID ) )
+	if ( current_user_can( 'delete_post', $post->ID ) ) {
 		if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
-			echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . "</a>";
+			echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
 		} else {
 			$delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
-			echo  "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
+			echo  "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . '</a>';
 		}
+	}
 	?>
 	</div>
 
 	<div id="publishing-action">
 		<span class="spinner"></span>
-		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
+		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ) ?>" />
 		<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
 	</div>
 	<div class="clear"></div>
@@ -376,26 +377,29 @@
  */
 function post_format_meta_box( $post, $box ) {
 	if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) :
-	$post_formats = get_theme_support( 'post-formats' );
+		$post_formats = get_theme_support( 'post-formats' );
 
-	if ( is_array( $post_formats[0] ) ) :
-		$post_format = get_post_format( $post->ID );
-		if ( !$post_format )
-			$post_format = '0';
-		// Add in the current one if it isn't there yet, in case the current theme doesn't support it
-		if ( $post_format && !in_array( $post_format, $post_formats[0] ) )
-			$post_formats[0][] = $post_format;
-	?>
-	<div id="post-formats-select">
-		<fieldset>
+		if ( is_array( $post_formats[0] ) ) :
+			$post_format = get_post_format( $post->ID );
+			if ( ! $post_format ) {
+				$post_format = '0';
+			}
+			// Add in the current one if it isn't there yet, in case the current theme doesn't support it
+			if ( $post_format && ! in_array( $post_format, $post_formats[0] ) ) {
+				$post_formats[0][] = $post_format;
+			}
+			?>
+			<div id="post-formats-select">
+			<fieldset>
 			<legend class="screen-reader-text"><?php _e( 'Post Formats' ); ?></legend>
 			<input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0" class="post-format-icon post-format-standard"><?php echo get_post_format_string( 'standard' ); ?></label>
 			<?php foreach ( $post_formats[0] as $format ) : ?>
 			<br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
 			<?php endforeach; ?>
 		</fieldset>
-	</div>
-	<?php endif; endif;
+		</div>
+		<?php endif;
+endif;
 }
 
 /**
@@ -420,7 +424,9 @@
  * }
  */
 function post_tags_meta_box( $post, $box ) {
-	$defaults = array( 'taxonomy' => 'post_tag' );
+	$defaults = array(
+		'taxonomy' => 'post_tag',
+	);
 	if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) {
 		$args = array();
 	} else {
@@ -442,14 +448,14 @@
 		<label for="tax-input-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_or_remove_items; ?></label>
 		<p><textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?> aria-describedby="new-tag-<?php echo $tax_name; ?>-desc"><?php echo str_replace( ',', $comma . ' ', $terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></p>
 	</div>
- 	<?php if ( $user_can_assign_terms ) : ?>
+		<?php if ( $user_can_assign_terms ) : ?>
 	<div class="ajaxtag hide-if-no-js">
 		<label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label>
 		<p><input data-wp-taxonomy="<?php echo $tax_name; ?>" type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
-		<input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p>
+		<input type="button" class="button tagadd" value="<?php esc_attr_e( 'Add' ); ?>" /></p>
 	</div>
 	<p class="howto" id="new-tag-<?php echo $tax_name; ?>-desc"><?php echo $taxonomy->labels->separate_items_with_commas; ?></p>
-	<?php elseif ( empty( $terms_to_edit ) ): ?>
+	<?php elseif ( empty( $terms_to_edit ) ) : ?>
 		<p><?php echo $taxonomy->labels->no_terms; ?></p>
 	<?php endif; ?>
 	</div>
@@ -483,7 +489,9 @@
  * }
  */
 function post_categories_meta_box( $post, $box ) {
-	$defaults = array( 'taxonomy' => 'category' );
+	$defaults = array(
+		'taxonomy' => 'category',
+	);
 	if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) {
 		$args = array();
 	} else {
@@ -511,7 +519,10 @@
 			echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
 			?>
 			<ul id="<?php echo $tax_name; ?>checklist" data-wp-lists="list:<?php echo $tax_name; ?>" class="categorychecklist form-no-clear">
-				<?php wp_terms_checklist( $post->ID, array( 'taxonomy' => $tax_name, 'popular_cats' => $popular_ids ) ); ?>
+				<?php wp_terms_checklist( $post->ID, array(
+					'taxonomy' => $tax_name,
+					'popular_cats' => $popular_ids,
+				) ); ?>
 			</ul>
 		</div>
 	<?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?>
@@ -583,9 +594,9 @@
  *
  * @param object $post
  */
-function post_excerpt_meta_box($post) {
+function post_excerpt_meta_box( $post ) {
 ?>
-<label class="screen-reader-text" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea>
+<label class="screen-reader-text" for="excerpt"><?php _e( 'Excerpt' ) ?></label><textarea rows="1" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea>
 <p><?php
 	printf(
 		/* translators: %s: Codex URL */
@@ -603,14 +614,14 @@
  *
  * @param object $post
  */
-function post_trackback_meta_box($post) {
+function post_trackback_meta_box( $post ) {
 	$form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="' .
 		esc_attr( str_replace( "\n", ' ', $post->to_ping ) ) . '" aria-describedby="trackback-url-desc" />';
-	if ('' != $post->pinged) {
-		$pings = '<p>'. __('Already pinged:') . '</p><ul>';
-		$already_pinged = explode("\n", trim($post->pinged));
-		foreach ($already_pinged as $pinged_url) {
-			$pings .= "\n\t<li>" . esc_html($pinged_url) . "</li>";
+	if ( '' != $post->pinged ) {
+		$pings = '<p>' . __( 'Already pinged:' ) . '</p><ul>';
+		$already_pinged = explode( "\n", trim( $post->pinged ) );
+		foreach ( $already_pinged as $pinged_url ) {
+			$pings .= "\n\t<li>" . esc_html( $pinged_url ) . '</li>';
 		}
 		$pings .= '</ul>';
 	}
@@ -629,9 +640,10 @@
 	);
 ?></p>
 <?php
-if ( ! empty($pings) )
+if ( ! empty( $pings ) ) {
 	echo $pings;
 }
+}
 
 /**
  * Display custom fields form fields.
@@ -640,15 +652,16 @@
  *
  * @param object $post
  */
-function post_custom_meta_box($post) {
+function post_custom_meta_box( $post ) {
 ?>
 <div id="postcustomstuff">
 <div id="ajax-response"></div>
 <?php
-$metadata = has_meta($post->ID);
+$metadata = has_meta( $post->ID );
 foreach ( $metadata as $key => $value ) {
-	if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][ 'meta_key' ] ) )
+	if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) {
 		unset( $metadata[ $key ] );
+	}
 }
 list_meta( $metadata );
 meta_form( $post ); ?>
@@ -670,16 +683,16 @@
  *
  * @param object $post
  */
-function post_comment_status_meta_box($post) {
+function post_comment_status_meta_box( $post ) {
 ?>
 <input name="advanced_view" type="hidden" value="1" />
 <p class="meta-options">
-	<label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e( 'Allow comments' ) ?></label><br />
-	<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php
+	<label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ) ?></label><br />
+	<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> <?php
 		printf(
 			/* translators: %s: Codex URL */
 			__( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
-			__( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) );
+		__( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) );
 		?></label>
 	<?php
 	/**
@@ -703,8 +716,8 @@
  * @param array $result table header rows
  * @return array
  */
-function post_comment_meta_box_thead($result) {
-	unset($result['cb'], $result['response']);
+function post_comment_meta_box_thead( $result ) {
+	unset( $result['cb'], $result['response'] );
 	return $result;
 }
 
@@ -718,25 +731,29 @@
 function post_comment_meta_box( $post ) {
 	wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
 	?>
-	<p class="hide-if-no-js" id="add-new-comment"><a class="button" href="#commentstatusdiv" onclick="window.commentReply && commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e('Add comment'); ?></a></p>
+	<p class="hide-if-no-js" id="add-new-comment"><a class="button" href="#commentstatusdiv" onclick="window.commentReply && commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e( 'Add comment' ); ?></a></p>
 	<?php
 
-	$total = get_comments( array( 'post_id' => $post->ID, 'number' => 1, 'count' => true ) );
-	$wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
+	$total = get_comments( array(
+		'post_id' => $post->ID,
+		'number' => 1,
+		'count' => true,
+	) );
+	$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' );
 	$wp_list_table->display( true );
 
 	if ( 1 > $total ) {
-		echo '<p id="no-comments">' . __('No comments yet.') . '</p>';
+		echo '<p id="no-comments">' . __( 'No comments yet.' ) . '</p>';
 	} else {
 		$hidden = get_hidden_meta_boxes( get_current_screen() );
-		if ( ! in_array('commentsdiv', $hidden) ) {
+		if ( ! in_array( 'commentsdiv', $hidden ) ) {
 			?>
 			<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
 			<?php
 		}
 
 		?>
-		<p class="hide-if-no-js" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.load(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <span class="spinner"></span></p>
+		<p class="hide-if-no-js" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.load(<?php echo $total; ?>);return false;"><?php _e( 'Show comments' ); ?></a> <span class="spinner"></span></p>
 		<?php
 	}
 
@@ -750,11 +767,11 @@
  *
  * @param object $post
  */
-function post_slug_meta_box($post) {
-/** This filter is documented in wp-admin/edit-tag-form.php */
-$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
+function post_slug_meta_box( $post ) {
+	/** This filter is documented in wp-admin/edit-tag-form.php */
+	$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
 ?>
-<label class="screen-reader-text" for="post_name"><?php _e('Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $editable_slug ); ?>" />
+<label class="screen-reader-text" for="post_name"><?php _e( 'Slug' ) ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $editable_slug ); ?>" />
 <?php
 }
 
@@ -767,15 +784,15 @@
  *
  * @param object $post
  */
-function post_author_meta_box($post) {
+function post_author_meta_box( $post ) {
 	global $user_ID;
 ?>
-<label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label>
+<label class="screen-reader-text" for="post_author_override"><?php _e( 'Author' ); ?></label>
 <?php
 	wp_dropdown_users( array(
 		'who' => 'authors',
 		'name' => 'post_author_override',
-		'selected' => empty($post->ID) ? $user_ID : $post->post_author,
+		'selected' => empty( $post->ID ) ? $user_ID : $post->post_author,
 		'include_selected' => true,
 		'show' => 'display_name_with_login',
 	) );
@@ -801,14 +818,14 @@
  *
  * @param object $post
  */
-function page_attributes_meta_box($post) {
+function page_attributes_meta_box( $post ) {
 	if ( is_post_type_hierarchical( $post->post_type ) ) :
 		$dropdown_args = array(
 			'post_type'        => $post->post_type,
 			'exclude_tree'     => $post->ID,
 			'selected'         => $post->post_parent,
 			'name'             => 'parent_id',
-			'show_option_none' => __('(no parent)'),
+			'show_option_none' => __( '(no parent)' ),
 			'sort_column'      => 'menu_order, post_title',
 			'echo'             => 0,
 		);
@@ -825,7 +842,7 @@
 		 */
 		$dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
 		$pages = wp_dropdown_pages( $dropdown_args );
-		if ( ! empty($pages) ) :
+		if ( ! empty( $pages ) ) :
 ?>
 <p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php _e( 'Parent' ); ?></label></p>
 <?php echo $pages; ?>
@@ -883,7 +900,7 @@
  *
  * @param object $link
  */
-function link_submit_meta_box($link) {
+function link_submit_meta_box( $link ) {
 ?>
 <div class="submitbox" id="submitlink">
 
@@ -896,8 +913,8 @@
 
 <div id="minor-publishing-actions">
 <div id="preview-action">
-<?php if ( !empty($link->link_id) ) { ?>
-	<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
+<?php if ( ! empty( $link->link_id ) ) { ?>
+	<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e( 'Visit Link' ); ?></a>
 <?php } ?>
 </div>
 <div class="clear"></div>
@@ -905,7 +922,7 @@
 
 <div id="misc-publishing-actions">
 <div class="misc-pub-section misc-pub-private">
-	<label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label>
+	<label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked( $link->link_visible, 'N' ); ?> /> <?php _e( 'Keep this link private' ) ?></label>
 </div>
 </div>
 
@@ -918,13 +935,13 @@
 ?>
 <div id="delete-action">
 <?php
-if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
-	<a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>
+if ( ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) { ?>
+	<a class="submitdelete deletion" href="<?php echo wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ); ?>" onclick="if ( confirm('<?php echo esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ); ?>') ) {return true;}return false;"><?php _e( 'Delete' ); ?></a>
 <?php } ?>
 </div>
 
 <div id="publishing-action">
-<?php if ( !empty($link->link_id) ) { ?>
+<?php if ( ! empty( $link->link_id ) ) { ?>
 	<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" />
 <?php } else { ?>
 	<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" />
@@ -952,7 +969,7 @@
  *
  * @param object $link
  */
-function link_categories_meta_box($link) {
+function link_categories_meta_box( $link ) {
 ?>
 <div id="taxonomy-linkcategory" class="categorydiv">
 	<ul id="category-tabs" class="category-tabs">
@@ -963,17 +980,17 @@
 	<div id="categories-all" class="tabs-panel">
 		<ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear">
 			<?php
-			if ( isset($link->link_id) )
-				wp_link_category_checklist($link->link_id);
-			else
-				wp_link_category_checklist();
+			if ( isset( $link->link_id ) ) {
+				wp_link_category_checklist( $link->link_id );
+			} else { wp_link_category_checklist();
+			}
 			?>
 		</ul>
 	</div>
 
 	<div id="categories-pop" class="tabs-panel" style="display: none;">
 		<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
-			<?php wp_popular_terms_checklist('link_category'); ?>
+			<?php wp_popular_terms_checklist( 'link_category' ); ?>
 		</ul>
 	</div>
 
@@ -998,19 +1015,20 @@
  *
  * @param object $link
  */
-function link_target_meta_box($link) { ?>
-<fieldset><legend class="screen-reader-text"><span><?php _e('Target') ?></span></legend>
+function link_target_meta_box( $link ) {
+	?>
+<fieldset><legend class="screen-reader-text"><span><?php _e( 'Target' ) ?></span></legend>
 <p><label for="link_target_blank" class="selectit">
 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
-<?php _e('<code>_blank</code> &mdash; new window or tab.'); ?></label></p>
+<?php _e( '<code>_blank</code> &mdash; new window or tab.' ); ?></label></p>
 <p><label for="link_target_top" class="selectit">
 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />
-<?php _e('<code>_top</code> &mdash; current window or tab, with no frames.'); ?></label></p>
+<?php _e( '<code>_top</code> &mdash; current window or tab, with no frames.' ); ?></label></p>
 <p><label for="link_target_none" class="selectit">
 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ($link->link_target == '') ? 'checked="checked"' : ''); ?> />
-<?php _e('<code>_none</code> &mdash; same window or tab.'); ?></label></p>
+<?php _e( '<code>_none</code> &mdash; same window or tab.' ); ?></label></p>
 </fieldset>
-<p><?php _e('Choose the target frame for your link.'); ?></p>
+<p><?php _e( 'Choose the target frame for your link.' ); ?></p>
 <?php
 }
 
@@ -1033,17 +1051,21 @@
 	}
 
 	$link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
-	$rels = preg_split('/\s+/', $link_rel);
+	$rels = preg_split( '/\s+/', $link_rel );
 
-	if ('' != $value && in_array($value, $rels) ) {
+	if ( '' != $value && in_array( $value, $rels ) ) {
 		echo ' checked="checked"';
 	}
 
-	if ('' == $value) {
-		if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"';
-		if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"';
-		if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"';
-		if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
+	if ( '' == $value ) {
+		if ( 'family' == $class && strpos( $link_rel, 'child' ) === false && strpos( $link_rel, 'parent' ) === false && strpos( $link_rel, 'sibling' ) === false && strpos( $link_rel, 'spouse' ) === false && strpos( $link_rel, 'kin' ) === false ) { echo ' checked="checked"';
+		}
+		if ( 'friendship' == $class && strpos( $link_rel, 'friend' ) === false && strpos( $link_rel, 'acquaintance' ) === false && strpos( $link_rel, 'contact' ) === false ) { echo ' checked="checked"';
+		}
+		if ( 'geographical' == $class && strpos( $link_rel, 'co-resident' ) === false && strpos( $link_rel, 'neighbor' ) === false ) { echo ' checked="checked"';
+		}
+		if ( 'identity' == $class && in_array( 'me', $rels ) ) { echo ' checked="checked"';
+		}
 	}
 }
 
@@ -1054,114 +1076,114 @@
  *
  * @param object $link
  */
-function link_xfn_meta_box($link) {
+function link_xfn_meta_box( $link ) {
 ?>
 <table class="links-table">
 	<tr>
-		<th scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th>
-		<td><input type="text" name="link_rel" id="link_rel" value="<?php echo ( isset( $link->link_rel ) ? esc_attr($link->link_rel) : ''); ?>" /></td>
+		<th scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'rel:' ) ?></label></th>
+		<td><input type="text" name="link_rel" id="link_rel" value="<?php echo ( isset( $link->link_rel ) ? esc_attr( $link->link_rel ) : ''); ?>" /></td>
 	</tr>
 	<tr>
-		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?></th>
-		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?></span></legend>
+		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'identity' ) ?></th>
+		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'identity' ) ?></span></legend>
 			<label for="me">
-			<input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
-			<?php _e('another web address of mine') ?></label>
+			<input type="checkbox" name="identity" value="me" id="me" <?php xfn_check( 'identity', 'me' ); ?> />
+			<?php _e( 'another web address of mine' ) ?></label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?></th>
-		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?></span></legend>
+		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'friendship' ) ?></th>
+		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'friendship' ) ?></span></legend>
 			<label for="contact">
-			<input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?>
+			<input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check( 'friendship', 'contact' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'contact' ) ?>
 			</label>
 			<label for="acquaintance">
-			<input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?>
+			<input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check( 'friendship', 'acquaintance' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'acquaintance' ) ?>
 			</label>
 			<label for="friend">
-			<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?>
+			<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check( 'friendship', 'friend' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'friend' ) ?>
 			</label>
 			<label for="friendship">
-			<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
+			<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check( 'friendship' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'none' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th>
-		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?></span></legend>
+		<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'physical' ) ?> </th>
+		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'physical' ) ?></span></legend>
 			<label for="met">
-			<input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?>
+			<input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check( 'physical', 'met' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'met' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th>
-		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?></span></legend>
+		<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'professional' ) ?> </th>
+		<td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'professional' ) ?></span></legend>
 			<label for="co-worker">
-			<input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?>
+			<input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check( 'professional', 'co-worker' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'co-worker' ) ?>
 			</label>
 			<label for="colleague">
-			<input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?>
+			<input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check( 'professional', 'colleague' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'colleague' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?></th>
-		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend>
+		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'geographical' ) ?></th>
+		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'geographical' ) ?> </span></legend>
 			<label for="co-resident">
-			<input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?>
+			<input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check( 'geographical', 'co-resident' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'co-resident' ) ?>
 			</label>
 			<label for="neighbor">
-			<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?>
+			<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check( 'geographical', 'neighbor' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'neighbor' ) ?>
 			</label>
 			<label for="geographical">
-			<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
+			<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check( 'geographical' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'none' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?></th>
-		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend>
+		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'family' ) ?></th>
+		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'family' ) ?> </span></legend>
 			<label for="child">
-			<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?>
+			<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check( 'family', 'child' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'child' ) ?>
 			</label>
 			<label for="kin">
-			<input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?>
+			<input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check( 'family', 'kin' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'kin' ) ?>
 			</label>
 			<label for="parent">
-			<input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?>
+			<input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check( 'family', 'parent' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'parent' ) ?>
 			</label>
 			<label for="sibling">
-			<input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?>
+			<input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check( 'family', 'sibling' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'sibling' ) ?>
 			</label>
 			<label for="spouse">
-			<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?>
+			<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check( 'family', 'spouse' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'spouse' ) ?>
 			</label>
 			<label for="family">
-			<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
+			<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check( 'family' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'none' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 	<tr>
-		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?></th>
-		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend>
+		<th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'romantic' ) ?></th>
+		<td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'romantic' ) ?> </span></legend>
 			<label for="muse">
-			<input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?>
+			<input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check( 'romantic', 'muse' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'muse' ) ?>
 			</label>
 			<label for="crush">
-			<input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?>
+			<input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check( 'romantic', 'crush' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'crush' ) ?>
 			</label>
 			<label for="date">
-			<input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?>
+			<input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check( 'romantic', 'date' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'date' ) ?>
 			</label>
 			<label for="romantic">
-			<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?>
+			<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check( 'romantic', 'sweetheart' ); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'sweetheart' ) ?>
 			</label>
 		</fieldset></td>
 	</tr>
 
 </table>
-<p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>
+<p><?php _e( 'If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.' ); ?></p>
 <?php
 }
 
@@ -1172,32 +1194,33 @@
  *
  * @param object $link
  */
-function link_advanced_meta_box($link) {
+function link_advanced_meta_box( $link ) {
 ?>
 <table class="links-table" cellpadding="0">
 	<tr>
-		<th scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
-		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php echo ( isset( $link->link_image ) ? esc_attr($link->link_image) : ''); ?>" /></td>
+		<th scope="row"><label for="link_image"><?php _e( 'Image Address' ) ?></label></th>
+		<td><input type="text" name="link_image" class="code" id="link_image" maxlength="255" value="<?php echo ( isset( $link->link_image ) ? esc_attr( $link->link_image ) : ''); ?>" /></td>
 	</tr>
 	<tr>
-		<th scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
-		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php echo ( isset( $link->link_rss ) ? esc_attr($link->link_rss) : ''); ?>" /></td>
+		<th scope="row"><label for="rss_uri"><?php _e( 'RSS Address' ) ?></label></th>
+		<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php echo ( isset( $link->link_rss ) ? esc_attr( $link->link_rss ) : ''); ?>" /></td>
 	</tr>
 	<tr>
-		<th scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
+		<th scope="row"><label for="link_notes"><?php _e( 'Notes' ) ?></label></th>
 		<td><textarea name="link_notes" id="link_notes" rows="10"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : ''); // textarea_escaped ?></textarea></td>
 	</tr>
 	<tr>
-		<th scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
+		<th scope="row"><label for="link_rating"><?php _e( 'Rating' ) ?></label></th>
 		<td><select name="link_rating" id="link_rating" size="1">
 		<?php
-			for ( $r = 0; $r <= 10; $r++ ) {
-				echo '<option value="' . $r . '"';
-				if ( isset($link->link_rating) && $link->link_rating == $r )
-					echo ' selected="selected"';
-				echo('>' . $r . '</option>');
+		for ( $r = 0; $r <= 10; $r++ ) {
+			echo '<option value="' . $r . '"';
+			if ( isset( $link->link_rating ) && $link->link_rating == $r ) {
+				echo ' selected="selected"';
 			}
-		?></select>&nbsp;<?php _e('(Leave at 0 for no rating.)') ?>
+			echo('>' . $r . '</option>');
+		}
+		?></select>&nbsp;<?php _e( '(Leave at 0 for no rating.)' ) ?>
 		</td>
 	</tr>
 </table>
@@ -1233,9 +1256,9 @@
 	<p>
 		<label for="title"><?php echo $label ?></label><br />
 		<input type="text" name="id3_<?php echo esc_attr( $key ) ?>" id="id3_<?php echo esc_attr( $key ) ?>" class="large-text" value="<?php
-			if ( ! empty( $meta[ $key ] ) ) {
-				echo esc_attr( $meta[ $key ] );
-			}
+		if ( ! empty( $meta[ $key ] ) ) {
+			echo esc_attr( $meta[ $key ] );
+		}
 		?>" />
 	</p>
 	<?php
Index: src/wp-admin/includes/misc.php
===================================================================
--- src/wp-admin/includes/misc.php	(revision 40901)
+++ src/wp-admin/includes/misc.php	(working copy)
@@ -14,7 +14,7 @@
  * @return bool
  */
 function got_mod_rewrite() {
-	$got_rewrite = apache_mod_loaded('mod_rewrite', true);
+	$got_rewrite = apache_mod_loaded( 'mod_rewrite', true );
 
 	/**
 	 * Filters whether Apache and mod_rewrite are present.
@@ -65,24 +65,27 @@
  * @return array An array of strings from a file (.htaccess ) from between BEGIN and END markers.
  */
 function extract_from_markers( $filename, $marker ) {
-	$result = array ();
+	$result = array();
 
-	if (!file_exists( $filename ) ) {
+	if ( ! file_exists( $filename ) ) {
 		return $result;
 	}
 
-	if ( $markerdata = explode( "\n", implode( '', file( $filename ) ) ));
+	if ( $markerdata = explode( "\n", implode( '', file( $filename ) ) ) ) {}
 	{
 		$state = false;
-		foreach ( $markerdata as $markerline ) {
-			if (strpos($markerline, '# END ' . $marker) !== false)
-				$state = false;
-			if ( $state )
-				$result[] = $markerline;
-			if (strpos($markerline, '# BEGIN ' . $marker) !== false)
-				$state = true;
+	foreach ( $markerdata as $markerline ) {
+		if ( strpos( $markerline, '# END ' . $marker ) !== false ) {
+			$state = false;
+		}
+		if ( $state ) {
+			$result[] = $markerline;
+		}
+		if ( strpos( $markerline, '# BEGIN ' . $marker ) !== false ) {
+			$state = true;
 		}
 	}
+	}
 
 	return $result;
 }
@@ -194,19 +197,20 @@
  * @global WP_Rewrite $wp_rewrite
  */
 function save_mod_rewrite_rules() {
-	if ( is_multisite() )
+	if ( is_multisite() ) {
 		return;
+	}
 
 	global $wp_rewrite;
 
 	$home_path = get_home_path();
-	$htaccess_file = $home_path.'.htaccess';
+	$htaccess_file = $home_path . '.htaccess';
 
 	/*
 	 * If the file doesn't already exist check for write access to the directory
 	 * and whether we have some rules. Else check for write access to the file.
 	 */
-	if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) {
+	if ( ( ! file_exists( $htaccess_file ) && is_writable( $home_path ) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable( $htaccess_file ) ) {
 		if ( got_mod_rewrite() ) {
 			$rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() );
 			return insert_with_markers( $htaccess_file, 'WordPress', $rules );
@@ -226,9 +230,10 @@
  *
  * @return bool True if web.config was updated successfully
  */
-function iis7_save_url_rewrite_rules(){
-	if ( is_multisite() )
+function iis7_save_url_rewrite_rules() {
+	if ( is_multisite() ) {
 		return;
+	}
 
 	global $wp_rewrite;
 
@@ -236,12 +241,12 @@
 	$web_config_file = $home_path . 'web.config';
 
 	// Using win_is_writable() instead of is_writable() because of a bug in Windows PHP
-	if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) {
-		$rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', '');
-		if ( ! empty($rule) ) {
-			return iis7_add_rewrite_rule($web_config_file, $rule);
+	if ( iis7_supports_permalinks() && ( ( ! file_exists( $web_config_file ) && win_is_writable( $home_path ) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable( $web_config_file ) ) ) {
+		$rule = $wp_rewrite->iis7_url_rewrite_rules( false, '', '' );
+		if ( ! empty( $rule ) ) {
+			return iis7_add_rewrite_rule( $web_config_file, $rule );
 		} else {
-			return iis7_delete_rewrite_rule($web_config_file);
+			return iis7_delete_rewrite_rule( $web_config_file );
 		}
 	}
 	return false;
@@ -255,14 +260,15 @@
  * @param string $file
  */
 function update_recently_edited( $file ) {
-	$oldfiles = (array ) get_option( 'recently_edited' );
+	$oldfiles = (array) get_option( 'recently_edited' );
 	if ( $oldfiles ) {
 		$oldfiles = array_reverse( $oldfiles );
 		$oldfiles[] = $file;
 		$oldfiles = array_reverse( $oldfiles );
 		$oldfiles = array_unique( $oldfiles );
-		if ( 5 < count( $oldfiles ))
+		if ( 5 < count( $oldfiles ) ) {
 			array_pop( $oldfiles );
+		}
 	} else {
 		$oldfiles[] = $file;
 	}
@@ -278,8 +284,9 @@
  * @param string $value
  */
 function update_home_siteurl( $old_value, $value ) {
-	if ( wp_installing() )
+	if ( wp_installing() ) {
 		return;
+	}
 
 	if ( is_multisite() && ms_is_switched() ) {
 		delete_option( 'rewrite_rules' );
@@ -321,12 +328,12 @@
  *
  * @param string|WP_Error $message
  */
-function show_message($message) {
-	if ( is_wp_error($message) ){
-		if ( $message->get_error_data() && is_string( $message->get_error_data() ) )
+function show_message( $message ) {
+	if ( is_wp_error( $message ) ) {
+		if ( $message->get_error_data() && is_string( $message->get_error_data() ) ) {
 			$message = $message->get_error_message() . ': ' . $message->get_error_data();
-		else
-			$message = $message->get_error_message();
+		} else { $message = $message->get_error_message();
+		}
 	}
 	echo "<p>$message</p>\n";
 	wp_ob_end_flush_all();
@@ -340,11 +347,13 @@
  * @return array
  */
 function wp_doc_link_parse( $content ) {
-	if ( !is_string( $content ) || empty( $content ) )
+	if ( ! is_string( $content ) || empty( $content ) ) {
 		return array();
+	}
 
-	if ( !function_exists('token_get_all') )
+	if ( ! function_exists( 'token_get_all' ) ) {
 		return array();
+	}
 
 	$tokens = token_get_all( $content );
 	$count = count( $tokens );
@@ -358,10 +367,10 @@
 		if ( T_STRING == $tokens[ $t ][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
 			// If it's a function or class defined locally, there's not going to be any docs available
 			if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) {
-				$ignore_functions[] = $tokens[$t][1];
+				$ignore_functions[] = $tokens[ $t ][1];
 			}
 			// Add this to our stack of unique references
-			$functions[] = $tokens[$t][1];
+			$functions[] = $tokens[ $t ][1];
 		}
 	}
 
@@ -381,8 +390,9 @@
 
 	$out = array();
 	foreach ( $functions as $function ) {
-		if ( in_array( $function, $ignore_functions ) )
+		if ( in_array( $function, $ignore_functions ) ) {
 			continue;
+		}
 		$out[] = $function;
 	}
 
@@ -396,26 +406,28 @@
  */
 function set_screen_options() {
 
-	if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) {
+	if ( isset( $_POST['wp_screen_options'] ) && is_array( $_POST['wp_screen_options'] ) ) {
 		check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' );
 
-		if ( !$user = wp_get_current_user() )
+		if ( ! $user = wp_get_current_user() ) {
 			return;
+		}
 		$option = $_POST['wp_screen_options']['option'];
 		$value = $_POST['wp_screen_options']['value'];
 
-		if ( $option != sanitize_key( $option ) )
+		if ( $option != sanitize_key( $option ) ) {
 			return;
+		}
 
 		$map_option = $option;
-		$type = str_replace('edit_', '', $map_option);
-		$type = str_replace('_per_page', '', $type);
-		if ( in_array( $type, get_taxonomies() ) )
+		$type = str_replace( 'edit_', '', $map_option );
+		$type = str_replace( '_per_page', '', $type );
+		if ( in_array( $type, get_taxonomies() ) ) {
 			$map_option = 'edit_tags_per_page';
-		elseif ( in_array( $type, get_post_types() ) )
+		} elseif ( in_array( $type, get_post_types() ) ) {
 			$map_option = 'edit_per_page';
-		else
-			$option = str_replace('-', '_', $option);
+		} else { $option = str_replace( '-', '_', $option );
+		}
 
 		switch ( $map_option ) {
 			case 'edit_per_page':
@@ -424,7 +436,7 @@
 			case 'upload_per_page':
 			case 'edit_tags_per_page':
 			case 'plugins_per_page':
-			// Network admin
+				// Network admin
 			case 'sites_network_per_page':
 			case 'users_network_per_page':
 			case 'site_users_network_per_page':
@@ -432,8 +444,9 @@
 			case 'themes_network_per_page':
 			case 'site_themes_network_per_page':
 				$value = (int) $value;
-				if ( $value < 1 || $value > 999 )
+				if ( $value < 1 || $value > 999 ) {
 					return;
+				}
 				break;
 			default:
 
@@ -455,21 +468,24 @@
 				 */
 				$value = apply_filters( 'set-screen-option', false, $option, $value );
 
-				if ( false === $value )
+				if ( false === $value ) {
 					return;
+				}
 				break;
-		}
+		}// End switch().
 
-		update_user_meta($user->ID, $option, $value);
+		update_user_meta( $user->ID, $option, $value );
 
 		$url = remove_query_arg( array( 'pagenum', 'apage', 'paged' ), wp_get_referer() );
 		if ( isset( $_POST['mode'] ) ) {
-			$url = add_query_arg( array( 'mode' => $_POST['mode'] ), $url );
+			$url = add_query_arg( array(
+				'mode' => $_POST['mode'],
+			), $url );
 		}
 
 		wp_safe_redirect( $url );
 		exit;
-	}
+	}// End if().
 }
 
 /**
@@ -480,22 +496,24 @@
  * @return bool
  * @param string $filename The file path to the configuration file
  */
-function iis7_rewrite_rule_exists($filename) {
-	if ( ! file_exists($filename) )
+function iis7_rewrite_rule_exists( $filename ) {
+	if ( ! file_exists( $filename ) ) {
 		return false;
+	}
 	if ( ! class_exists( 'DOMDocument', false ) ) {
 		return false;
 	}
 
 	$doc = new DOMDocument();
-	if ( $doc->load($filename) === false )
+	if ( $doc->load( $filename ) === false ) {
 		return false;
-	$xpath = new DOMXPath($doc);
-	$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
-	if ( $rules->length == 0 )
+	}
+	$xpath = new DOMXPath( $doc );
+	$rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' );
+	if ( $rules->length == 0 ) {
 		return false;
-	else
-		return true;
+	} else { return true;
+	}
 }
 
 /**
@@ -506,10 +524,11 @@
  * @param string $filename Name of the configuration file
  * @return bool
  */
-function iis7_delete_rewrite_rule($filename) {
+function iis7_delete_rewrite_rule( $filename ) {
 	// If configuration file does not exist then rules also do not exist so there is nothing to delete
-	if ( ! file_exists($filename) )
+	if ( ! file_exists( $filename ) ) {
 		return true;
+	}
 
 	if ( ! class_exists( 'DOMDocument', false ) ) {
 		return false;
@@ -518,16 +537,17 @@
 	$doc = new DOMDocument();
 	$doc->preserveWhiteSpace = false;
 
-	if ( $doc -> load($filename) === false )
+	if ( $doc -> load( $filename ) === false ) {
 		return false;
-	$xpath = new DOMXPath($doc);
-	$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
+	}
+	$xpath = new DOMXPath( $doc );
+	$rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' );
 	if ( $rules->length > 0 ) {
-		$child = $rules->item(0);
+		$child = $rules->item( 0 );
 		$parent = $child->parentNode;
-		$parent->removeChild($child);
+		$parent->removeChild( $child );
 		$doc->formatOutput = true;
-		saveDomDocument($doc, $filename);
+		saveDomDocument( $doc, $filename );
 	}
 	return true;
 }
@@ -541,74 +561,76 @@
  * @param string $rewrite_rule The XML fragment with URL Rewrite rule
  * @return bool
  */
-function iis7_add_rewrite_rule($filename, $rewrite_rule) {
+function iis7_add_rewrite_rule( $filename, $rewrite_rule ) {
 	if ( ! class_exists( 'DOMDocument', false ) ) {
 		return false;
 	}
 
 	// If configuration file does not exist then we create one.
-	if ( ! file_exists($filename) ) {
-		$fp = fopen( $filename, 'w');
-		fwrite($fp, '<configuration/>');
-		fclose($fp);
+	if ( ! file_exists( $filename ) ) {
+		$fp = fopen( $filename, 'w' );
+		fwrite( $fp, '<configuration/>' );
+		fclose( $fp );
 	}
 
 	$doc = new DOMDocument();
 	$doc->preserveWhiteSpace = false;
 
-	if ( $doc->load($filename) === false )
+	if ( $doc->load( $filename ) === false ) {
 		return false;
+	}
 
-	$xpath = new DOMXPath($doc);
+	$xpath = new DOMXPath( $doc );
 
 	// First check if the rule already exists as in that case there is no need to re-add it
-	$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
-	if ( $wordpress_rules->length > 0 )
+	$wordpress_rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' );
+	if ( $wordpress_rules->length > 0 ) {
 		return true;
+	}
 
 	// Check the XPath to the rewrite rule and create XML nodes if they do not exist
-	$xmlnodes = $xpath->query('/configuration/system.webServer/rewrite/rules');
+	$xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite/rules' );
 	if ( $xmlnodes->length > 0 ) {
-		$rules_node = $xmlnodes->item(0);
+		$rules_node = $xmlnodes->item( 0 );
 	} else {
-		$rules_node = $doc->createElement('rules');
+		$rules_node = $doc->createElement( 'rules' );
 
-		$xmlnodes = $xpath->query('/configuration/system.webServer/rewrite');
+		$xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite' );
 		if ( $xmlnodes->length > 0 ) {
-			$rewrite_node = $xmlnodes->item(0);
-			$rewrite_node->appendChild($rules_node);
+			$rewrite_node = $xmlnodes->item( 0 );
+			$rewrite_node->appendChild( $rules_node );
 		} else {
-			$rewrite_node = $doc->createElement('rewrite');
-			$rewrite_node->appendChild($rules_node);
+			$rewrite_node = $doc->createElement( 'rewrite' );
+			$rewrite_node->appendChild( $rules_node );
 
-			$xmlnodes = $xpath->query('/configuration/system.webServer');
+			$xmlnodes = $xpath->query( '/configuration/system.webServer' );
 			if ( $xmlnodes->length > 0 ) {
-				$system_webServer_node = $xmlnodes->item(0);
-				$system_webServer_node->appendChild($rewrite_node);
+				$system_webServer_node = $xmlnodes->item( 0 );
+				$system_webServer_node->appendChild( $rewrite_node );
 			} else {
-				$system_webServer_node = $doc->createElement('system.webServer');
-				$system_webServer_node->appendChild($rewrite_node);
+				$system_webServer_node = $doc->createElement( 'system.webServer' );
+				$system_webServer_node->appendChild( $rewrite_node );
 
-				$xmlnodes = $xpath->query('/configuration');
+				$xmlnodes = $xpath->query( '/configuration' );
 				if ( $xmlnodes->length > 0 ) {
-					$config_node = $xmlnodes->item(0);
-					$config_node->appendChild($system_webServer_node);
+					$config_node = $xmlnodes->item( 0 );
+					$config_node->appendChild( $system_webServer_node );
 				} else {
-					$config_node = $doc->createElement('configuration');
-					$doc->appendChild($config_node);
-					$config_node->appendChild($system_webServer_node);
+					$config_node = $doc->createElement( 'configuration' );
+					$doc->appendChild( $config_node );
+					$config_node->appendChild( $system_webServer_node );
 				}
 			}
 		}
 	}
 
 	$rule_fragment = $doc->createDocumentFragment();
-	$rule_fragment->appendXML($rewrite_rule);
-	$rules_node->appendChild($rule_fragment);
+	$rule_fragment->appendXML( $rewrite_rule );
+	$rules_node->appendChild( $rule_fragment );
 
-	$doc->encoding = "UTF-8";
+	$doc->encoding = 'UTF-8';
 	$doc->formatOutput = true;
-	saveDomDocument($doc, $filename);
+	saveDomDocument( $doc, $filename );
 
 	return true;
 }
@@ -621,12 +643,12 @@
  * @param DOMDocument $doc
  * @param string $filename
  */
-function saveDomDocument($doc, $filename) {
+function saveDomDocument( $doc, $filename ) {
 	$config = $doc->saveXML();
-	$config = preg_replace("/([^\r])\n/", "$1\r\n", $config);
-	$fp = fopen($filename, 'w');
-	fwrite($fp, $config);
-	fclose($fp);
+	$config = preg_replace( "/([^\r])\n/", "$1\r\n", $config );
+	$fp = fopen( $filename, 'w' );
+	fwrite( $fp, $config );
+	fclose( $fp );
 }
 
 /**
@@ -645,7 +667,10 @@
 
 	if ( isset( $_wp_admin_css_colors['fresh'] ) ) {
 		// Set Default ('fresh') and Light should go first.
-		$_wp_admin_css_colors = array_filter( array_merge( array( 'fresh' => '', 'light' => '' ), $_wp_admin_css_colors ) );
+		$_wp_admin_css_colors = array_filter( array_merge( array(
+			'fresh' => '',
+			'light' => '',
+		), $_wp_admin_css_colors ) );
 	}
 
 	$current_color = get_user_option( 'admin_color', $user_id );
@@ -665,7 +690,9 @@
 			<div class="color-option <?php echo ( $color == $current_color ) ? 'selected' : ''; ?>">
 				<input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" class="tog" <?php checked( $color, $current_color ); ?> />
 				<input type="hidden" class="css_url" value="<?php echo esc_url( $color_info->url ); ?>" />
-				<input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />
+				<input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array(
+					'icons' => $color_info->icon_colors,
+				) ) ); ?>" />
 				<label for="admin_color_<?php echo esc_attr( $color ); ?>"><?php echo esc_html( $color_info->name ); ?></label>
 				<table class="color-palette">
 					<tr>
@@ -710,10 +737,16 @@
 		$icon_colors = $_wp_admin_css_colors['fresh']->icon_colors;
 	} else {
 		// Fall back to the default set of icon colors if the default scheme is missing.
-		$icon_colors = array( 'base' => '#82878c', 'focus' => '#00a0d2', 'current' => '#fff' );
+		$icon_colors = array(
+			'base' => '#82878c',
+			'focus' => '#00a0d2',
+			'current' => '#fff',
+		);
 	}
 
-	echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ) ) . ";</script>\n";
+	echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array(
+		'icons' => $icon_colors,
+	) ) . ";</script>\n";
 }
 
 /**
@@ -742,22 +775,27 @@
 
 	if ( array_key_exists( 'wp-check-locked-posts', $data ) && is_array( $data['wp-check-locked-posts'] ) ) {
 		foreach ( $data['wp-check-locked-posts'] as $key ) {
-			if ( ! $post_id = absint( substr( $key, 5 ) ) )
+			if ( ! $post_id = absint( substr( $key, 5 ) ) ) {
 				continue;
+			}
 
 			if ( ( $user_id = wp_check_post_lock( $post_id ) ) && ( $user = get_userdata( $user_id ) ) && current_user_can( 'edit_post', $post_id ) ) {
-				$send = array( 'text' => sprintf( __( '%s is currently editing' ), $user->display_name ) );
+				$send = array(
+					'text' => sprintf( __( '%s is currently editing' ), $user->display_name ),
+				);
 
-				if ( ( $avatar = get_avatar( $user->ID, 18 ) ) && preg_match( "|src='([^']+)'|", $avatar, $matches ) )
+				if ( ( $avatar = get_avatar( $user->ID, 18 ) ) && preg_match( "|src='([^']+)'|", $avatar, $matches ) ) {
 					$send['avatar_src'] = $matches[1];
+				}
 
-				$checked[$key] = $send;
+				$checked[ $key ] = $send;
 			}
 		}
 	}
 
-	if ( ! empty( $checked ) )
+	if ( ! empty( $checked ) ) {
 		$response['wp-check-locked-posts'] = $checked;
+	}
 
 	return $response;
 }
@@ -777,26 +815,30 @@
 		$received = $data['wp-refresh-post-lock'];
 		$send = array();
 
-		if ( ! $post_id = absint( $received['post_id'] ) )
+		if ( ! $post_id = absint( $received['post_id'] ) ) {
 			return $response;
+		}
 
-		if ( ! current_user_can('edit_post', $post_id) )
+		if ( ! current_user_can( 'edit_post', $post_id ) ) {
 			return $response;
+		}
 
 		if ( ( $user_id = wp_check_post_lock( $post_id ) ) && ( $user = get_userdata( $user_id ) ) ) {
 			$error = array(
-				'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name )
+				'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ),
 			);
 
 			if ( $avatar = get_avatar( $user->ID, 64 ) ) {
-				if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) )
+				if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) ) {
 					$error['avatar_src'] = $matches[1];
+				}
 			}
 
 			$send['lock_error'] = $error;
 		} else {
-			if ( $new_lock = wp_set_post_lock( $post_id ) )
+			if ( $new_lock = wp_set_post_lock( $post_id ) ) {
 				$send['new_lock'] = implode( ':', $new_lock );
+			}
 		}
 
 		$response['wp-refresh-post-lock'] = $send;
@@ -818,7 +860,9 @@
 function wp_refresh_post_nonces( $response, $data, $screen_id ) {
 	if ( array_key_exists( 'wp-refresh-post-nonces', $data ) ) {
 		$received = $data['wp-refresh-post-nonces'];
-		$response['wp-refresh-post-nonces'] = array( 'check' => 1 );
+		$response['wp-refresh-post-nonces'] = array(
+			'check' => 1,
+		);
 
 		if ( ! $post_id = absint( $received['post_id'] ) ) {
 			return $response;
@@ -830,9 +874,9 @@
 
 		$response['wp-refresh-post-nonces'] = array(
 			'replace' => array(
-				'getpermalinknonce' => wp_create_nonce('getpermalink'),
-				'samplepermalinknonce' => wp_create_nonce('samplepermalink'),
-				'closedpostboxesnonce' => wp_create_nonce('closedpostboxes'),
+				'getpermalinknonce' => wp_create_nonce( 'getpermalink' ),
+				'samplepermalinknonce' => wp_create_nonce( 'samplepermalink' ),
+				'closedpostboxesnonce' => wp_create_nonce( 'closedpostboxes' ),
 				'_ajax_linking_nonce' => wp_create_nonce( 'internal-linking' ),
 				'_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ),
 			),
@@ -877,14 +921,23 @@
 		$saved = wp_autosave( $data['wp_autosave'] );
 
 		if ( is_wp_error( $saved ) ) {
-			$response['wp_autosave'] = array( 'success' => false, 'message' => $saved->get_error_message() );
+			$response['wp_autosave'] = array(
+				'success' => false,
+				'message' => $saved->get_error_message(),
+			);
 		} elseif ( empty( $saved ) ) {
-			$response['wp_autosave'] = array( 'success' => false, 'message' => __( 'Error while saving.' ) );
+			$response['wp_autosave'] = array(
+				'success' => false,
+				'message' => __( 'Error while saving.' ),
+			);
 		} else {
 			/* translators: draft saved date format, see https://secure.php.net/date */
 			$draft_saved_date_format = __( 'g:i:s a' );
 			/* translators: %s: date and time */
-			$response['wp_autosave'] = array( 'success' => true, 'message' => sprintf( __( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format ) ) );
+			$response['wp_autosave'] = array(
+				'success' => true,
+				'message' => sprintf( __( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format ) ),
+			);
 		}
 	}
 
Index: src/wp-admin/includes/ms-admin-filters.php
===================================================================
--- src/wp-admin/includes/ms-admin-filters.php	(revision 40901)
+++ src/wp-admin/includes/ms-admin-filters.php	(working copy)
@@ -39,5 +39,5 @@
 add_action( 'network_admin_notices', 'site_admin_notice' );
 
 // Update Hooks
-add_action( 'network_admin_notices', 'update_nag',      3  );
+add_action( 'network_admin_notices', 'update_nag',      3 );
 add_action( 'network_admin_notices', 'maintenance_nag', 10 );
Index: src/wp-admin/includes/ms-deprecated.php
===================================================================
--- src/wp-admin/includes/ms-deprecated.php	(revision 40901)
+++ src/wp-admin/includes/ms-deprecated.php	(working copy)
@@ -16,7 +16,7 @@
  * @deprecated 3.0.0
  */
 function wpmu_menu() {
-	_deprecated_function(__FUNCTION__, '3.0.0' );
+	_deprecated_function( __FUNCTION__, '3.0.0' );
 	// Deprecated. See #11763.
 }
 
@@ -27,10 +27,11 @@
  * @see is_upload_space_available()
  */
 function wpmu_checkAvailableSpace() {
-	_deprecated_function(__FUNCTION__, '3.0.0', 'is_upload_space_available()' );
+	_deprecated_function( __FUNCTION__, '3.0.0', 'is_upload_space_available()' );
 
-	if ( !is_upload_space_available() )
-		wp_die( __('Sorry, you must delete files before you can upload any more.') );
+	if ( ! is_upload_space_available() ) {
+		wp_die( __( 'Sorry, you must delete files before you can upload any more.' ) );
+	}
 }
 
 /**
@@ -39,7 +40,7 @@
  * @deprecated 3.0.0
  */
 function mu_options( $options ) {
-	_deprecated_function(__FUNCTION__, '3.0.0' );
+	_deprecated_function( __FUNCTION__, '3.0.0' );
 	return $options;
 }
 
@@ -50,7 +51,7 @@
  * @see activate_plugin()
  */
 function activate_sitewide_plugin() {
-	_deprecated_function(__FUNCTION__, '3.0.0', 'activate_plugin()' );
+	_deprecated_function( __FUNCTION__, '3.0.0', 'activate_plugin()' );
 	return false;
 }
 
@@ -61,7 +62,7 @@
  * @see deactivate_sitewide_plugin()
  */
 function deactivate_sitewide_plugin( $plugin = false ) {
-	_deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' );
+	_deprecated_function( __FUNCTION__, '3.0.0', 'deactivate_plugin()' );
 }
 
 /**
@@ -71,7 +72,7 @@
  * @see is_network_only_plugin()
  */
 function is_wpmu_sitewide_plugin( $file ) {
-	_deprecated_function(__FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
+	_deprecated_function( __FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
 	return is_network_only_plugin( $file );
 }
 
Index: src/wp-admin/includes/ms.php
===================================================================
--- src/wp-admin/includes/ms.php	(revision 40901)
+++ src/wp-admin/includes/ms.php	(working copy)
@@ -16,14 +16,17 @@
  * @return array $_FILES array with 'error' key set if file exceeds quota. 'error' is empty otherwise.
  */
 function check_upload_size( $file ) {
-	if ( get_site_option( 'upload_space_check_disabled' ) )
+	if ( get_site_option( 'upload_space_check_disabled' ) ) {
 		return $file;
+	}
 
-	if ( $file['error'] != '0' ) // there's already an error
+	if ( $file['error'] != '0' ) { // there's already an error
 		return $file;
+	}
 
-	if ( defined( 'WP_IMPORTING' ) )
+	if ( defined( 'WP_IMPORTING' ) ) {
 		return $file;
+	}
 
 	$space_left = get_upload_space_available();
 
@@ -79,7 +82,10 @@
 	 */
 	do_action( 'delete_blog', $blog_id, $drop );
 
-	$users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ids' ) );
+	$users = get_users( array(
+		'blog_id' => $blog_id,
+		'fields' => 'ids',
+	) );
 
 	// Remove users from this blog.
 	if ( ! empty( $users ) ) {
@@ -127,7 +133,9 @@
 			$wpdb->query( "DROP TABLE IF EXISTS `$table`" );
 		}
 
-		$wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
+		$wpdb->delete( $wpdb->blogs, array(
+			'blog_id' => $blog_id,
+		) );
 
 		/**
 		 * Filters the upload base directory to delete when the site is deleted.
@@ -140,18 +148,19 @@
 		$dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id );
 		$dir = rtrim( $dir, DIRECTORY_SEPARATOR );
 		$top_dir = $dir;
-		$stack = array($dir);
+		$stack = array( $dir );
 		$index = 0;
 
 		while ( $index < count( $stack ) ) {
 			// Get indexed directory from stack
-			$dir = $stack[$index];
+			$dir = $stack[ $index ];
 
 			$dh = @opendir( $dir );
 			if ( $dh ) {
 				while ( ( $file = @readdir( $dh ) ) !== false ) {
-					if ( $file == '.' || $file == '..' )
+					if ( $file == '.' || $file == '..' ) {
 						continue;
+					}
 
 					if ( @is_dir( $dir . DIRECTORY_SEPARATOR . $file ) ) {
 						$stack[] = $dir . DIRECTORY_SEPARATOR . $file;
@@ -166,12 +175,13 @@
 
 		$stack = array_reverse( $stack ); // Last added dirs are deepest
 		foreach ( (array) $stack as $dir ) {
-			if ( $dir != $top_dir)
-			@rmdir( $dir );
+			if ( $dir != $top_dir ) {
+				@rmdir( $dir );
+			}
 		}
 
 		clean_blog_cache( $blog );
-	}
+	}// End if().
 
 	/**
 	 * Fires after the site is deleted from the network.
@@ -183,8 +193,9 @@
 	 */
 	do_action( 'deleted_blog', $blog_id, $drop );
 
-	if ( $switch )
+	if ( $switch ) {
 		restore_current_blog();
+	}
 }
 
 /**
@@ -209,8 +220,9 @@
 	$id = (int) $id;
 	$user = new WP_User( $id );
 
-	if ( !$user->exists() )
+	if ( ! $user->exists() ) {
 		return false;
+	}
 
 	// Global super-administrators are protected, and cannot be deleted.
 	$_super_admins = get_super_admins();
@@ -243,8 +255,9 @@
 			$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) );
 
 			if ( $link_ids ) {
-				foreach ( $link_ids as $link_id )
+				foreach ( $link_ids as $link_id ) {
 					wp_delete_link( $link_id );
+				}
 			}
 
 			restore_current_blog();
@@ -252,10 +265,13 @@
 	}
 
 	$meta = $wpdb->get_col( $wpdb->prepare( "SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d", $id ) );
-	foreach ( $meta as $mid )
+	foreach ( $meta as $mid ) {
 		delete_metadata_by_mid( 'user', $mid );
+	}
 
-	$wpdb->delete( $wpdb->users, array( 'ID' => $id ) );
+	$wpdb->delete( $wpdb->users, array(
+		'ID' => $id,
+	) );
 
 	clean_user_cache( $user );
 
@@ -274,13 +290,14 @@
  * @param string $value     The new email address.
  */
 function update_option_new_admin_email( $old_value, $value ) {
-	if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
+	if ( $value == get_option( 'admin_email' ) || ! is_email( $value ) ) {
 		return;
+	}
 
-	$hash = md5( $value. time() .mt_rand() );
+	$hash = md5( $value . time() . mt_rand() );
 	$new_admin_email = array(
 		'hash' => $hash,
-		'newemail' => $value
+		'newemail' => $value,
 	);
 	update_option( 'adminhash', $new_admin_email );
 
@@ -323,7 +340,7 @@
 
 	$current_user = wp_get_current_user();
 	$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
-	$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'options.php?adminhash='.$hash ) ), $content );
+	$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'options.php?adminhash=' . $hash ) ), $content );
 	$content = str_replace( '###EMAIL###', $value, $content );
 	$content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ), $content );
 	$content = str_replace( '###SITEURL###', network_home_url(), $content );
@@ -346,20 +363,26 @@
 function send_confirmation_on_profile_email() {
 	global $errors, $wpdb;
 	$current_user = wp_get_current_user();
-	if ( ! is_object($errors) )
+	if ( ! is_object( $errors ) ) {
 		$errors = new WP_Error();
+	}
 
-	if ( $current_user->ID != $_POST['user_id'] )
+	if ( $current_user->ID != $_POST['user_id'] ) {
 		return false;
+	}
 
 	if ( $current_user->user_email != $_POST['email'] ) {
-		if ( !is_email( $_POST['email'] ) ) {
-			$errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address isn&#8217;t correct." ), array( 'form-field' => 'email' ) );
+		if ( ! is_email( $_POST['email'] ) ) {
+			$errors->add( 'user_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ), array(
+				'form-field' => 'email',
+			) );
 			return;
 		}
 
 		if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) {
-			$errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address is already used." ), array( 'form-field' => 'email' ) );
+			$errors->add( 'user_email', __( '<strong>ERROR</strong>: The email address is already used.' ), array(
+				'form-field' => 'email',
+			) );
 			delete_user_meta( $current_user->ID, '_new_email' );
 			return;
 		}
@@ -367,7 +390,7 @@
 		$hash = md5( $_POST['email'] . time() . mt_rand() );
 		$new_user_email = array(
 			'hash' => $hash,
-			'newemail' => $_POST['email']
+			'newemail' => $_POST['email'],
 		);
 		update_user_meta( $current_user->ID, '_new_email', $new_user_email );
 
@@ -409,7 +432,7 @@
 
 		$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
 		$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
-		$content = str_replace( '###EMAIL###', $_POST['email'], $content);
+		$content = str_replace( '###EMAIL###', $_POST['email'], $content );
 		$content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), ENT_QUOTES ), $content );
 		$content = str_replace( '###SITEURL###', network_home_url(), $content );
 
@@ -419,7 +442,7 @@
 		if ( $switched_locale ) {
 			restore_previous_locale();
 		}
-	}
+	}// End if().
 }
 
 /**
@@ -447,8 +470,9 @@
  * @return bool True if user is over upload space quota, otherwise false.
  */
 function upload_is_user_over_quota( $echo = true ) {
-	if ( get_site_option( 'upload_space_check_disabled' ) )
+	if ( get_site_option( 'upload_space_check_disabled' ) ) {
 		return false;
+	}
 
 	$space_allowed = get_space_allowed();
 	if ( ! is_numeric( $space_allowed ) ) {
@@ -457,8 +481,9 @@
 	$space_used = get_space_used();
 
 	if ( ( $space_allowed - $space_used ) < 0 ) {
-		if ( $echo )
+		if ( $echo ) {
 			_e( 'Sorry, you have used your space allocation. Please delete some files to upload more files.' );
+		}
 		return true;
 	} else {
 		return false;
@@ -521,8 +546,9 @@
 	$quota = get_option( 'blog_upload_space' );
 	restore_current_blog();
 
-	if ( !$quota )
+	if ( ! $quota ) {
 		$quota = '';
+	}
 
 	?>
 	<tr>
@@ -554,10 +580,15 @@
 function update_user_status( $id, $pref, $value, $deprecated = null ) {
 	global $wpdb;
 
-	if ( null !== $deprecated )
+	if ( null !== $deprecated ) {
 		_deprecated_argument( __FUNCTION__, '3.0.2' );
+	}
 
-	$wpdb->update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) );
+	$wpdb->update( $wpdb->users, array(
+		sanitize_key( $pref ) => $value,
+		), array(
+		'ID' => $id,
+	) );
 
 	$user = new WP_User( $id );
 	clean_user_cache( $user );
@@ -598,8 +629,9 @@
 function refresh_user_details( $id ) {
 	$id = (int) $id;
 
-	if ( !$user = get_userdata( $id ) )
+	if ( ! $user = get_userdata( $id ) ) {
 		return false;
+	}
 
 	clean_user_cache( $user );
 
@@ -618,17 +650,192 @@
 function format_code_lang( $code = '' ) {
 	$code = strtolower( substr( $code, 0, 2 ) );
 	$lang_codes = array(
-		'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
-		'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree',
-		'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'fy' => 'Western Frisian', 'ff' => 'Fulah', 'ka' => 'Georgian', 'de' => 'German', 'gd' => 'Gaelic; Scottish Gaelic',
-		'ga' => 'Irish', 'gl' => 'Galician', 'gv' => 'Manx', 'el' => 'Greek, Modern', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian; Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'ig' => 'Igbo', 'is' => 'Icelandic', 'io' => 'Ido', 'ii' => 'Sichuan Yi', 'iu' => 'Inuktitut', 'ie' => 'Interlingue',
-		'ia' => 'Interlingua (International Auxiliary Language Association)', 'id' => 'Indonesian', 'ik' => 'Inupiaq', 'it' => 'Italian', 'jv' => 'Javanese', 'ja' => 'Japanese', 'kl' => 'Kalaallisut; Greenlandic', 'kn' => 'Kannada', 'ks' => 'Kashmiri', 'kr' => 'Kanuri', 'kk' => 'Kazakh', 'km' => 'Central Khmer', 'ki' => 'Kikuyu; Gikuyu', 'rw' => 'Kinyarwanda', 'ky' => 'Kirghiz; Kyrgyz',
-		'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kuanyama; Kwanyama', 'ku' => 'Kurdish', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'li' => 'Limburgan; Limburger; Limburgish', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lb' => 'Luxembourgish; Letzeburgesch', 'lu' => 'Luba-Katanga', 'lg' => 'Ganda', 'mk' => 'Macedonian', 'mh' => 'Marshallese', 'ml' => 'Malayalam',
-		'mi' => 'Maori', 'mr' => 'Marathi', 'ms' => 'Malay', 'mg' => 'Malagasy', 'mt' => 'Maltese', 'mo' => 'Moldavian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo; Navaho', 'nr' => 'Ndebele, South; South Ndebele', 'nd' => 'Ndebele, North; North Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', 'nb' => 'Bokmål, Norwegian, Norwegian Bokmål',
-		'no' => 'Norwegian', 'ny' => 'Chichewa; Chewa; Nyanja', 'oc' => 'Occitan, Provençal', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian; Ossetic', 'pa' => 'Panjabi; Punjabi', 'fa' => 'Persian', 'pi' => 'Pali', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ps' => 'Pushto', 'qu' => 'Quechua', 'rm' => 'Romansh', 'ro' => 'Romanian', 'rn' => 'Rundi', 'ru' => 'Russian',
-		'sg' => 'Sango', 'sa' => 'Sanskrit', 'sr' => 'Serbian', 'hr' => 'Croatian', 'si' => 'Sinhala; Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'se' => 'Northern Sami', 'sm' => 'Samoan', 'sn' => 'Shona', 'sd' => 'Sindhi', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'es' => 'Spanish; Castilian', 'sc' => 'Sardinian', 'ss' => 'Swati', 'su' => 'Sundanese', 'sw' => 'Swahili',
-		'sv' => 'Swedish', 'ty' => 'Tahitian', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'tg' => 'Tajik', 'tl' => 'Tagalog', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'tn' => 'Tswana', 'ts' => 'Tsonga', 'tk' => 'Turkmen', 'tr' => 'Turkish', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek',
-		've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' );
+		'aa' => 'Afar',
+	'ab' => 'Abkhazian',
+	'af' => 'Afrikaans',
+	'ak' => 'Akan',
+	'sq' => 'Albanian',
+	'am' => 'Amharic',
+	'ar' => 'Arabic',
+	'an' => 'Aragonese',
+	'hy' => 'Armenian',
+	'as' => 'Assamese',
+	'av' => 'Avaric',
+	'ae' => 'Avestan',
+	'ay' => 'Aymara',
+	'az' => 'Azerbaijani',
+	'ba' => 'Bashkir',
+	'bm' => 'Bambara',
+	'eu' => 'Basque',
+	'be' => 'Belarusian',
+	'bn' => 'Bengali',
+		'bh' => 'Bihari',
+	'bi' => 'Bislama',
+	'bs' => 'Bosnian',
+	'br' => 'Breton',
+	'bg' => 'Bulgarian',
+	'my' => 'Burmese',
+	'ca' => 'Catalan; Valencian',
+	'ch' => 'Chamorro',
+	'ce' => 'Chechen',
+	'zh' => 'Chinese',
+	'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic',
+	'cv' => 'Chuvash',
+	'kw' => 'Cornish',
+	'co' => 'Corsican',
+	'cr' => 'Cree',
+		'cs' => 'Czech',
+	'da' => 'Danish',
+	'dv' => 'Divehi; Dhivehi; Maldivian',
+	'nl' => 'Dutch; Flemish',
+	'dz' => 'Dzongkha',
+	'en' => 'English',
+	'eo' => 'Esperanto',
+	'et' => 'Estonian',
+	'ee' => 'Ewe',
+	'fo' => 'Faroese',
+	'fj' => 'Fijjian',
+	'fi' => 'Finnish',
+	'fr' => 'French',
+	'fy' => 'Western Frisian',
+	'ff' => 'Fulah',
+	'ka' => 'Georgian',
+	'de' => 'German',
+	'gd' => 'Gaelic; Scottish Gaelic',
+		'ga' => 'Irish',
+	'gl' => 'Galician',
+	'gv' => 'Manx',
+	'el' => 'Greek, Modern',
+	'gn' => 'Guarani',
+	'gu' => 'Gujarati',
+	'ht' => 'Haitian; Haitian Creole',
+	'ha' => 'Hausa',
+	'he' => 'Hebrew',
+	'hz' => 'Herero',
+	'hi' => 'Hindi',
+	'ho' => 'Hiri Motu',
+	'hu' => 'Hungarian',
+	'ig' => 'Igbo',
+	'is' => 'Icelandic',
+	'io' => 'Ido',
+	'ii' => 'Sichuan Yi',
+	'iu' => 'Inuktitut',
+	'ie' => 'Interlingue',
+		'ia' => 'Interlingua (International Auxiliary Language Association)',
+	'id' => 'Indonesian',
+	'ik' => 'Inupiaq',
+	'it' => 'Italian',
+	'jv' => 'Javanese',
+	'ja' => 'Japanese',
+	'kl' => 'Kalaallisut; Greenlandic',
+	'kn' => 'Kannada',
+	'ks' => 'Kashmiri',
+	'kr' => 'Kanuri',
+	'kk' => 'Kazakh',
+	'km' => 'Central Khmer',
+	'ki' => 'Kikuyu; Gikuyu',
+	'rw' => 'Kinyarwanda',
+	'ky' => 'Kirghiz; Kyrgyz',
+		'kv' => 'Komi',
+	'kg' => 'Kongo',
+	'ko' => 'Korean',
+	'kj' => 'Kuanyama; Kwanyama',
+	'ku' => 'Kurdish',
+	'lo' => 'Lao',
+	'la' => 'Latin',
+	'lv' => 'Latvian',
+	'li' => 'Limburgan; Limburger; Limburgish',
+	'ln' => 'Lingala',
+	'lt' => 'Lithuanian',
+	'lb' => 'Luxembourgish; Letzeburgesch',
+	'lu' => 'Luba-Katanga',
+	'lg' => 'Ganda',
+	'mk' => 'Macedonian',
+	'mh' => 'Marshallese',
+	'ml' => 'Malayalam',
+		'mi' => 'Maori',
+	'mr' => 'Marathi',
+	'ms' => 'Malay',
+	'mg' => 'Malagasy',
+	'mt' => 'Maltese',
+	'mo' => 'Moldavian',
+	'mn' => 'Mongolian',
+	'na' => 'Nauru',
+	'nv' => 'Navajo; Navaho',
+	'nr' => 'Ndebele, South; South Ndebele',
+	'nd' => 'Ndebele, North; North Ndebele',
+	'ng' => 'Ndonga',
+	'ne' => 'Nepali',
+	'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian',
+	'nb' => 'Bokmål, Norwegian, Norwegian Bokmål',
+		'no' => 'Norwegian',
+	'ny' => 'Chichewa; Chewa; Nyanja',
+	'oc' => 'Occitan, Provençal',
+	'oj' => 'Ojibwa',
+	'or' => 'Oriya',
+	'om' => 'Oromo',
+	'os' => 'Ossetian; Ossetic',
+	'pa' => 'Panjabi; Punjabi',
+	'fa' => 'Persian',
+	'pi' => 'Pali',
+	'pl' => 'Polish',
+	'pt' => 'Portuguese',
+	'ps' => 'Pushto',
+	'qu' => 'Quechua',
+	'rm' => 'Romansh',
+	'ro' => 'Romanian',
+	'rn' => 'Rundi',
+	'ru' => 'Russian',
+		'sg' => 'Sango',
+	'sa' => 'Sanskrit',
+	'sr' => 'Serbian',
+	'hr' => 'Croatian',
+	'si' => 'Sinhala; Sinhalese',
+	'sk' => 'Slovak',
+	'sl' => 'Slovenian',
+	'se' => 'Northern Sami',
+	'sm' => 'Samoan',
+	'sn' => 'Shona',
+	'sd' => 'Sindhi',
+	'so' => 'Somali',
+	'st' => 'Sotho, Southern',
+	'es' => 'Spanish; Castilian',
+	'sc' => 'Sardinian',
+	'ss' => 'Swati',
+	'su' => 'Sundanese',
+	'sw' => 'Swahili',
+		'sv' => 'Swedish',
+	'ty' => 'Tahitian',
+	'ta' => 'Tamil',
+	'tt' => 'Tatar',
+	'te' => 'Telugu',
+	'tg' => 'Tajik',
+	'tl' => 'Tagalog',
+	'th' => 'Thai',
+	'bo' => 'Tibetan',
+	'ti' => 'Tigrinya',
+	'to' => 'Tonga (Tonga Islands)',
+	'tn' => 'Tswana',
+	'ts' => 'Tsonga',
+	'tk' => 'Turkmen',
+	'tr' => 'Turkish',
+	'tw' => 'Twi',
+	'ug' => 'Uighur; Uyghur',
+	'uk' => 'Ukrainian',
+	'ur' => 'Urdu',
+	'uz' => 'Uzbek',
+		've' => 'Venda',
+	'vi' => 'Vietnamese',
+	'vo' => 'Volapük',
+	'cy' => 'Welsh',
+	'wa' => 'Walloon',
+	'wo' => 'Wolof',
+	'xh' => 'Xhosa',
+	'yi' => 'Yiddish',
+	'yo' => 'Yoruba',
+	'za' => 'Zhuang; Chuang',
+	'zu' => 'Zulu',
+	);
 
 	/**
 	 * Filters the language codes.
@@ -673,30 +880,35 @@
  * @access private
  */
 function _access_denied_splash() {
-	if ( ! is_user_logged_in() || is_network_admin() )
+	if ( ! is_user_logged_in() || is_network_admin() ) {
 		return;
+	}
 
 	$blogs = get_blogs_of_user( get_current_user_id() );
 
-	if ( wp_list_filter( $blogs, array( 'userblog_id' => get_current_blog_id() ) ) )
+	if ( wp_list_filter( $blogs, array(
+		'userblog_id' => get_current_blog_id(),
+	) ) ) {
 		return;
+	}
 
 	$blog_name = get_bloginfo( 'name' );
 
-	if ( empty( $blogs ) )
+	if ( empty( $blogs ) ) {
 		wp_die( sprintf( __( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ), $blog_name ), 403 );
+	}
 
 	$output = '<p>' . sprintf( __( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ), $blog_name ) . '</p>';
 	$output .= '<p>' . __( 'If you reached this screen by accident and meant to visit one of your own sites, here are some shortcuts to help you find your way.' ) . '</p>';
 
-	$output .= '<h3>' . __('Your Sites') . '</h3>';
+	$output .= '<h3>' . __( 'Your Sites' ) . '</h3>';
 	$output .= '<table>';
 
 	foreach ( $blogs as $blog ) {
 		$output .= '<tr>';
 		$output .= "<td>{$blog->blogname}</td>";
 		$output .= '<td><a href="' . esc_url( get_admin_url( $blog->userblog_id ) ) . '">' . __( 'Visit Dashboard' ) . '</a> | ' .
-			'<a href="' . esc_url( get_home_url( $blog->userblog_id ) ). '">' . __( 'View Site' ) . '</a></td>';
+			'<a href="' . esc_url( get_home_url( $blog->userblog_id ) ) . '">' . __( 'View Site' ) . '</a></td>';
 		$output .= '</tr>';
 	}
 
@@ -740,20 +952,20 @@
 		if ( $code_lang == 'en_US' ) { // American English
 			$flag = true;
 			$ae = __( 'American English' );
-			$output[$ae] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $ae . '</option>';
+			$output[ $ae ] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $ae . '</option>';
 		} elseif ( $code_lang == 'en_GB' ) { // British English
 			$flag = true;
 			$be = __( 'British English' );
-			$output[$be] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $be . '</option>';
+			$output[ $be ] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $be . '</option>';
 		} else {
 			$translated = format_code_lang( $code_lang );
-			$output[$translated] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . esc_html ( $translated ) . '</option>';
+			$output[ $translated ] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . esc_html( $translated ) . '</option>';
 		}
-
 	}
 
-	if ( $flag === false ) // WordPress english
-		$output[] = '<option value=""' . selected( $current, '', false ) . '>' . __( 'English' ) . "</option>";
+	if ( $flag === false ) { // WordPress english
+		$output[] = '<option value=""' . selected( $current, '', false ) . '>' . __( 'English' ) . '</option>';
+	}
 
 	// Order by name
 	uksort( $output, 'strnatcasecmp' );
@@ -794,7 +1006,7 @@
 	}
 
 	if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) {
-		echo "<div class='update-nag'>" . sprintf( __( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "</div>";
+		echo "<div class='update-nag'>" . sprintf( __( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . '</div>';
 	}
 }
 
@@ -811,18 +1023,22 @@
  * @return array The new array of post data after checking for collisions.
  */
 function avoid_blog_page_permalink_collision( $data, $postarr ) {
-	if ( is_subdomain_install() )
+	if ( is_subdomain_install() ) {
 		return $data;
-	if ( $data['post_type'] != 'page' )
+	}
+	if ( $data['post_type'] != 'page' ) {
 		return $data;
-	if ( !isset( $data['post_name'] ) || $data['post_name'] == '' )
+	}
+	if ( ! isset( $data['post_name'] ) || $data['post_name'] == '' ) {
 		return $data;
-	if ( !is_main_site() )
+	}
+	if ( ! is_main_site() ) {
 		return $data;
+	}
 
 	$post_name = $data['post_name'];
 	$c = 0;
-	while( $c < 10 && get_id_from_blogname( $post_name ) ) {
+	while ( $c < 10 && get_id_from_blogname( $post_name ) ) {
 		$post_name .= mt_rand( 1, 10 );
 		$c ++;
 	}
@@ -855,23 +1071,25 @@
 			?>
 			<select name="primary_blog" id="primary_blog">
 				<?php foreach ( (array) $all_blogs as $blog ) {
-					if ( $primary_blog == $blog->userblog_id )
+					if ( $primary_blog == $blog->userblog_id ) {
 						$found = true;
+					}
 					?><option value="<?php echo $blog->userblog_id ?>"<?php selected( $primary_blog, $blog->userblog_id ); ?>><?php echo esc_url( get_home_url( $blog->userblog_id ) ) ?></option><?php
-				} ?>
+} ?>
 			</select>
 			<?php
-			if ( !$found ) {
+			if ( ! $found ) {
 				$blog = reset( $all_blogs );
 				update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
 			}
 		} elseif ( count( $all_blogs ) == 1 ) {
 			$blog = reset( $all_blogs );
 			echo esc_url( get_home_url( $blog->userblog_id ) );
-			if ( $primary_blog != $blog->userblog_id ) // Set the primary blog again if it's out of sync with blog list.
+			if ( $primary_blog != $blog->userblog_id ) { // Set the primary blog again if it's out of sync with blog list.
 				update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
+			}
 		} else {
-			echo "N/A";
+			echo 'N/A';
 		}
 		?>
 		</td>
@@ -896,10 +1114,10 @@
 function can_edit_network( $site_id ) {
 	global $wpdb;
 
-	if ( $site_id == $wpdb->siteid )
+	if ( $site_id == $wpdb->siteid ) {
 		$result = true;
-	else
-		$result = false;
+	} else { $result = false;
+	}
 
 	/**
 	 * Filters whether this network can be edited from this page.
@@ -976,11 +1194,14 @@
 					/* translators: user login */
 					__( 'What should be done with content owned by %s?' ),
 					'<em>' . $delete_user->user_login . '</em>'
-				); ?></legend></p>
+										 ); ?></legend></p>
 				<?php
 				foreach ( (array) $blogs as $key => $details ) {
-					$blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) );
-					if ( is_array( $blog_users ) && !empty( $blog_users ) ) {
+					$blog_users = get_users( array(
+						'blog_id' => $details->userblog_id,
+						'fields' => array( 'ID', 'user_login' ),
+					) );
+					if ( is_array( $blog_users ) && ! empty( $blog_users ) ) {
 						$user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
 						$user_dropdown = '<label for="reassign_user" class="screen-reader-text">' . __( 'Select a user' ) . '</label>';
 						$user_dropdown .= "<select name='blog[$user_id][$key]' id='reassign_user'>";
@@ -1007,15 +1228,16 @@
 						<?php
 					}
 				}
-				echo "</fieldset></td></tr>";
+				echo '</fieldset></td></tr>';
 			} else {
 				?>
 				<td><fieldset><p><legend><?php _e( 'User has no sites or content and will be deleted.' ); ?></legend></p>
-			<?php } ?>
+			<?php }// End if().
+	?>
 			</tr>
 		<?php
-		}
-	}
+		}// End if().
+}// End foreach().
 
 	?>
 	</table>
@@ -1029,7 +1251,7 @@
 		<p><?php _e( 'Once you hit &#8220;Confirm Deletion&#8221;, these users will be permanently removed.' ); ?></p>
 	<?php endif;
 
-	submit_button( __('Confirm Deletion'), 'primary' );
+	submit_button( __( 'Confirm Deletion' ), 'primary' );
 	?>
 	</form>
 	<?php
@@ -1093,10 +1315,26 @@
 	 * }
 	 */
 	$links = apply_filters( 'network_edit_site_nav_links', array(
-		'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php',     'cap' => 'manage_sites' ),
-		'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php',    'cap' => 'manage_sites' ),
-		'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php',   'cap' => 'manage_sites' ),
-		'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php', 'cap' => 'manage_sites' )
+		'site-info'     => array(
+			'label' => __( 'Info' ),
+			'url' => 'site-info.php',
+			'cap' => 'manage_sites',
+		),
+		'site-users'    => array(
+			'label' => __( 'Users' ),
+			'url' => 'site-users.php',
+			'cap' => 'manage_sites',
+		),
+		'site-themes'   => array(
+			'label' => __( 'Themes' ),
+			'url' => 'site-themes.php',
+			'cap' => 'manage_sites',
+		),
+		'site-settings' => array(
+			'label' => __( 'Settings' ),
+			'url' => 'site-settings.php',
+			'cap' => 'manage_sites',
+		),
 	) );
 
 	// Parse arguments
@@ -1129,7 +1367,9 @@
 		$esc_classes = implode( ' ', $classes );
 
 		// Get the URL for this link
-		$url = add_query_arg( array( 'id' => $r['blog_id'] ), network_admin_url( $link['url'] ) );
+		$url = add_query_arg( array(
+			'id' => $r['blog_id'],
+		), network_admin_url( $link['url'] ) );
 
 		// Add link to nav links
 		$screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '">' . esc_html( $link['label'] ) . '</a>';
Index: src/wp-admin/includes/nav-menu.php
===================================================================
--- src/wp-admin/includes/nav-menu.php	(revision 40901)
+++ src/wp-admin/includes/nav-menu.php	(working copy)
@@ -36,7 +36,7 @@
 			if ( isset( $request['ID'] ) ) {
 				$object_id = (int) $request['ID'];
 				if ( 'markup' == $response_format ) {
-					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args );
+					echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args );
 				} elseif ( 'json' == $response_format ) {
 					echo wp_json_encode(
 						array(
@@ -52,7 +52,7 @@
 			if ( isset( $request['ID'] ) ) {
 				$object_id = (int) $request['ID'];
 				if ( 'markup' == $response_format ) {
-					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_term( $object_id, $object_type ) ) ), 0, (object) $args );
+					echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_term( $object_id, $object_type ) ) ), 0, (object) $args );
 				} elseif ( 'json' == $response_format ) {
 					$post_obj = get_term( $object_id, $object_type );
 					echo wp_json_encode(
@@ -65,10 +65,8 @@
 					echo "\n";
 				}
 			}
-
 		}
-
-	} elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) {
+	} elseif ( preg_match( '/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches ) ) {
 		if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) {
 			$post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) );
 			$args = array_merge(
@@ -93,7 +91,7 @@
 				$post = $search_results_query->next_post();
 				if ( 'markup' == $response_format ) {
 					$var_by_ref = $post->ID;
-					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $var_by_ref ) ) ), 0, (object) $args );
+					echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( get_post( $var_by_ref ) ) ), 0, (object) $args );
 				} elseif ( 'json' == $response_format ) {
 					echo wp_json_encode(
 						array(
@@ -110,11 +108,12 @@
 				'name__like' => $query,
 				'number' => 10,
 			));
-			if ( empty( $terms ) || is_wp_error( $terms ) )
+			if ( empty( $terms ) || is_wp_error( $terms ) ) {
 				return;
+			}
 			foreach ( (array) $terms as $term ) {
 				if ( 'markup' == $response_format ) {
-					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
+					echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
 				} elseif ( 'json' == $response_format ) {
 					echo wp_json_encode(
 						array(
@@ -126,8 +125,8 @@
 					echo "\n";
 				}
 			}
-		}
-	}
+		}// End if().
+	}// End if().
 }
 
 /**
@@ -148,8 +147,14 @@
 	if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
 		$user = wp_get_current_user();
 		update_user_option($user->ID, 'managenav-menuscolumnshidden',
-			array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', 4 => 'title-attribute', ),
-			true);
+			array(
+				0 => 'link-target',
+				1 => 'css-classes',
+				2 => 'xfn',
+				3 => 'description',
+				4 => 'title-attribute',
+			),
+		true);
 	}
 }
 
@@ -163,15 +168,16 @@
 function wp_initial_nav_menu_meta_boxes() {
 	global $wp_meta_boxes;
 
-	if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array($wp_meta_boxes) )
+	if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array( $wp_meta_boxes ) ) {
 		return;
+	}
 
 	$initial_meta_boxes = array( 'add-post-type-page', 'add-post-type-post', 'add-custom-links', 'add-category' );
 	$hidden_meta_boxes = array();
 
-	foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) {
-		foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) {
-			foreach ( $wp_meta_boxes['nav-menus'][$context][$priority] as $box ) {
+	foreach ( array_keys( $wp_meta_boxes['nav-menus'] ) as $context ) {
+		foreach ( array_keys( $wp_meta_boxes['nav-menus'][ $context ] ) as $priority ) {
+			foreach ( $wp_meta_boxes['nav-menus'][ $context ][ $priority ] as $box ) {
 				if ( in_array( $box['id'], $initial_meta_boxes ) ) {
 					unset( $box['id'] );
 				} else {
@@ -191,10 +197,13 @@
  * @since 3.0.0
  */
 function wp_nav_menu_post_type_meta_boxes() {
-	$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );
+	$post_types = get_post_types( array(
+		'show_in_nav_menus' => true,
+	), 'object' );
 
-	if ( ! $post_types )
+	if ( ! $post_types ) {
 		return;
+	}
 
 	foreach ( $post_types as $post_type ) {
 		/**
@@ -225,10 +234,13 @@
  * @since 3.0.0
  */
 function wp_nav_menu_taxonomy_meta_boxes() {
-	$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' );
+	$taxonomies = get_taxonomies( array(
+		'show_in_nav_menus' => true,
+	), 'object' );
 
-	if ( !$taxonomies )
+	if ( ! $taxonomies ) {
 		return;
+	}
 
 	foreach ( $taxonomies as $tax ) {
 		/** This filter is documented in wp-admin/includes/nav-menu.php */
@@ -253,8 +265,9 @@
 function wp_nav_menu_disabled_check( $nav_menu_selected_id ) {
 	global $one_theme_location_no_menus;
 
-	if ( $one_theme_location_no_menus )
+	if ( $one_theme_location_no_menus ) {
 		return false;
+	}
 
 	return disabled( $nav_menu_selected_id, 0 );
 }
@@ -287,7 +300,7 @@
 
 		<p class="button-controls wp-clearfix">
 			<span class="add-to-menu">
-				<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
+				<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
 				<span class="spinner"></span>
 			</span>
 		</p>
@@ -321,7 +334,7 @@
 
 	// Paginate browsing for large numbers of post objects.
 	$per_page = 50;
-	$pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
+	$pagenum = isset( $_REQUEST[ $post_type_name . '-tab' ] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
 	$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
 
 	$args = array(
@@ -332,11 +345,12 @@
 		'post_type' => $post_type_name,
 		'suppress_filters' => true,
 		'update_post_term_cache' => false,
-		'update_post_meta_cache' => false
+		'update_post_meta_cache' => false,
 	);
 
-	if ( isset( $box['args']->_default_query ) )
-		$args = array_merge($args, (array) $box['args']->_default_query );
+	if ( isset( $box['args']->_default_query ) ) {
+		$args = array_merge( $args, (array) $box['args']->_default_query );
+	}
 
 	// @todo transient caching of these results with proper invalidation on updating of a post of this type
 	$get_posts = new WP_Query;
@@ -362,22 +376,25 @@
 		'next_text'          => '<span aria-label="' . esc_attr__( 'Next page' ) . '">' . __( '&raquo;' ) . '</span>',
 		'before_page_number' => '<span class="screen-reader-text">' . __( 'Page' ) . '</span> ',
 		'total'   => $num_pages,
-		'current' => $pagenum
+		'current' => $pagenum,
 	));
 
 	$db_fields = false;
 	if ( is_post_type_hierarchical( $post_type_name ) ) {
-		$db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' );
+		$db_fields = array(
+			'parent' => 'post_parent',
+			'id' => 'ID',
+		);
 	}
 
 	$walker = new Walker_Nav_Menu_Checklist( $db_fields );
 
 	$current_tab = 'most-recent';
-	if ( isset( $_REQUEST[$post_type_name . '-tab'] ) && in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) {
-		$current_tab = $_REQUEST[$post_type_name . '-tab'];
+	if ( isset( $_REQUEST[ $post_type_name . '-tab' ] ) && in_array( $_REQUEST[ $post_type_name . '-tab' ], array( 'all', 'search' ) ) ) {
+		$current_tab = $_REQUEST[ $post_type_name . '-tab' ];
 	}
 
-	if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
+	if ( ! empty( $_REQUEST[ 'quick-search-posttype-' . $post_type_name ] ) ) {
 		$current_tab = 'search';
 	}
 
@@ -394,18 +411,18 @@
 	<div id="posttype-<?php echo $post_type_name; ?>" class="posttypediv">
 		<ul id="posttype-<?php echo $post_type_name; ?>-tabs" class="posttype-tabs add-menu-item-tabs">
 			<li <?php echo ( 'most-recent' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-most-recent" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'most-recent', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent">
+				<a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-most-recent" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $post_type_name . '-tab', 'most-recent', remove_query_arg( $removed_args ) ) );} ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent">
 					<?php _e( 'Most Recent' ); ?>
 				</a>
 			</li>
 			<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="<?php echo esc_attr( $post_type_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#<?php echo $post_type_name; ?>-all">
+				<a class="nav-tab-link" data-type="<?php echo esc_attr( $post_type_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $post_type_name . '-tab', 'all', remove_query_arg( $removed_args ) ) );} ?>#<?php echo $post_type_name; ?>-all">
 					<?php _e( 'View All' ); ?>
 				</a>
 			</li>
 			<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-search" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
-					<?php _e( 'Search'); ?>
+				<a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-search" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $post_type_name . '-tab', 'search', remove_query_arg( $removed_args ) ) );} ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
+					<?php _e( 'Search' ); ?>
 				</a>
 			</li>
 		</ul><!-- .posttype-tabs -->
@@ -415,7 +432,11 @@
 		?>">
 			<ul id="<?php echo $post_type_name; ?>checklist-most-recent" class="categorychecklist form-no-clear">
 				<?php
-				$recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => 15 ) );
+				$recent_args = array_merge( $args, array(
+					'orderby' => 'post_date',
+					'order' => 'DESC',
+					'posts_per_page' => 15,
+				) );
 				$most_recent = $get_posts->query( $recent_args );
 				$args['walker'] = $walker;
 
@@ -433,7 +454,7 @@
 				 */
 				$most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box );
 
-				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
+				echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $most_recent ), 0, (object) $args );
 				?>
 			</ul>
 		</div><!-- /.tabs-panel -->
@@ -442,9 +463,14 @@
 			echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
 		?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
 			<?php
-			if ( isset( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
-				$searched = esc_attr( $_REQUEST['quick-search-posttype-' . $post_type_name] );
-				$search_results = get_posts( array( 's' => $searched, 'post_type' => $post_type_name, 'fields' => 'all', 'order' => 'DESC', ) );
+			if ( isset( $_REQUEST[ 'quick-search-posttype-' . $post_type_name ] ) ) {
+				$searched = esc_attr( $_REQUEST[ 'quick-search-posttype-' . $post_type_name ] );
+				$search_results = get_posts( array(
+					's' => $searched,
+					'post_type' => $post_type_name,
+					'fields' => 'all',
+					'order' => 'DESC',
+				) );
 			} else {
 				$searched = '';
 				$search_results = array();
@@ -454,19 +480,21 @@
 				<label for="quick-search-posttype-<?php echo $post_type_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
 				<input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" id="quick-search-posttype-<?php echo $post_type_name; ?>" />
 				<span class="spinner"></span>
-				<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
+				<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array(
+					'id' => 'submit-quick-search-posttype-' . $post_type_name,
+				) ); ?>
 			</p>
 
 			<ul id="<?php echo $post_type_name; ?>-search-checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear">
 			<?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
 				<?php
 				$args['walker'] = $walker;
-				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
+				echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $search_results ), 0, (object) $args );
 				?>
 			<?php elseif ( is_wp_error( $search_results ) ) : ?>
 				<li><?php echo $search_results->get_error_message(); ?></li>
 			<?php elseif ( ! empty( $searched ) ) : ?>
-				<li><?php _e('No results found.'); ?></li>
+				<li><?php _e( 'No results found.' ); ?></li>
 			<?php endif; ?>
 			</ul>
 		</div><!-- /.tabs-panel -->
@@ -488,13 +516,13 @@
 				 * page at the top of the list.
 				 */
 				if ( 'page' == $post_type_name ) {
-					$front_page = 'page' == get_option('show_on_front') ? (int) get_option( 'page_on_front' ) : 0;
+					$front_page = 'page' == get_option( 'show_on_front' ) ? (int) get_option( 'page_on_front' ) : 0;
 					if ( ! empty( $front_page ) ) {
 						$front_page_obj = get_post( $front_page );
 						$front_page_obj->front_or_home = true;
 						array_unshift( $posts, $front_page_obj );
 					} else {
-						$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
+						$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
 						array_unshift( $posts, (object) array(
 							'front_or_home' => true,
 							'ID' => 0,
@@ -502,10 +530,10 @@
 							'post_content' => '',
 							'post_excerpt' => '',
 							'post_parent' => '',
-							'post_title' => _x('Home', 'nav menu home label'),
+							'post_title' => _x( 'Home', 'nav menu home label' ),
 							'post_type' => 'nav_menu_item',
 							'type' => 'custom',
-							'url' => home_url('/'),
+							'url' => home_url( '/' ),
 						) );
 					}
 				}
@@ -513,7 +541,7 @@
 				$post_type = get_post_type_object( $post_type_name );
 
 				if ( $post_type->has_archive ) {
-					$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
+					$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
 					array_unshift( $posts, (object) array(
 						'ID' => 0,
 						'object_id' => $_nav_menu_placeholder,
@@ -545,10 +573,10 @@
 				 */
 				$posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );
 
-				$checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args );
+				$checkbox_items = walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $posts ), 0, (object) $args );
 
 				if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) {
-					$checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items);
+					$checkbox_items = preg_replace( '/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items );
 
 				}
 
@@ -608,7 +636,7 @@
 
 	// Paginate browsing for large numbers of objects.
 	$per_page = 50;
-	$pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
+	$pagenum = isset( $_REQUEST[ $taxonomy_name . '-tab' ] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
 	$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
 
 	$args = array(
@@ -626,12 +654,15 @@
 
 	$terms = get_terms( $taxonomy_name, $args );
 
-	if ( ! $terms || is_wp_error($terms) ) {
+	if ( ! $terms || is_wp_error( $terms ) ) {
 		echo '<p>' . __( 'No items.' ) . '</p>';
 		return;
 	}
 
-	$num_pages = ceil( wp_count_terms( $taxonomy_name , array_merge( $args, array('number' => '', 'offset' => '') ) ) / $per_page );
+	$num_pages = ceil( wp_count_terms( $taxonomy_name , array_merge( $args, array(
+		'number' => '',
+		'offset' => '',
+	) ) ) / $per_page );
 
 	$page_links = paginate_links( array(
 		'base' => add_query_arg(
@@ -647,22 +678,25 @@
 		'next_text'          => '<span aria-label="' . esc_attr__( 'Next page' ) . '">' . __( '&raquo;' ) . '</span>',
 		'before_page_number' => '<span class="screen-reader-text">' . __( 'Page' ) . '</span> ',
 		'total'   => $num_pages,
-		'current' => $pagenum
+		'current' => $pagenum,
 	));
 
 	$db_fields = false;
 	if ( is_taxonomy_hierarchical( $taxonomy_name ) ) {
-		$db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
+		$db_fields = array(
+			'parent' => 'parent',
+			'id' => 'term_id',
+		);
 	}
 
 	$walker = new Walker_Nav_Menu_Checklist( $db_fields );
 
 	$current_tab = 'most-used';
-	if ( isset( $_REQUEST[$taxonomy_name . '-tab'] ) && in_array( $_REQUEST[$taxonomy_name . '-tab'], array('all', 'most-used', 'search') ) ) {
-		$current_tab = $_REQUEST[$taxonomy_name . '-tab'];
+	if ( isset( $_REQUEST[ $taxonomy_name . '-tab' ] ) && in_array( $_REQUEST[ $taxonomy_name . '-tab' ], array( 'all', 'most-used', 'search' ) ) ) {
+		$current_tab = $_REQUEST[ $taxonomy_name . '-tab' ];
 	}
 
-	if ( ! empty( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
+	if ( ! empty( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) {
 		$current_tab = 'search';
 	}
 
@@ -679,17 +713,17 @@
 	<div id="taxonomy-<?php echo $taxonomy_name; ?>" class="taxonomydiv">
 		<ul id="taxonomy-<?php echo $taxonomy_name; ?>-tabs" class="taxonomy-tabs add-menu-item-tabs">
 			<li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-pop" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop">
+				<a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-pop" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $taxonomy_name . '-tab', 'most-used', remove_query_arg( $removed_args ) ) );} ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop">
 					<?php _e( 'Most Used' ); ?>
 				</a>
 			</li>
 			<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all">
+				<a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $taxonomy_name . '-tab', 'all', remove_query_arg( $removed_args ) ) );} ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all">
 					<?php _e( 'View All' ); ?>
 				</a>
 			</li>
 			<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>>
-				<a class="nav-tab-link" data-type="tabs-panel-search-taxonomy-<?php echo esc_attr( $taxonomy_name ); ?>" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
+				<a class="nav-tab-link" data-type="tabs-panel-search-taxonomy-<?php echo esc_attr( $taxonomy_name ); ?>" href="<?php if ( $nav_menu_selected_id ) { echo esc_url( add_query_arg( $taxonomy_name . '-tab', 'search', remove_query_arg( $removed_args ) ) );} ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
 					<?php _e( 'Search' ); ?>
 				</a>
 			</li>
@@ -700,9 +734,14 @@
 		?>">
 			<ul id="<?php echo $taxonomy_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
 				<?php
-				$popular_terms = get_terms( $taxonomy_name, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );
+				$popular_terms = get_terms( $taxonomy_name, array(
+					'orderby' => 'count',
+					'order' => 'DESC',
+					'number' => 10,
+					'hierarchical' => false,
+				) );
 				$args['walker'] = $walker;
-				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $popular_terms), 0, (object) $args );
+				echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $popular_terms ), 0, (object) $args );
 				?>
 			</ul>
 		</div><!-- /.tabs-panel -->
@@ -718,7 +757,7 @@
 			<ul id="<?php echo $taxonomy_name; ?>checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear">
 				<?php
 				$args['walker'] = $walker;
-				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $terms), 0, (object) $args );
+				echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $terms ), 0, (object) $args );
 				?>
 			</ul>
 			<?php if ( ! empty( $page_links ) ) : ?>
@@ -732,9 +771,15 @@
 			echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
 		?>" id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
 			<?php
-			if ( isset( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
-				$searched = esc_attr( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] );
-				$search_results = get_terms( $taxonomy_name, array( 'name__like' => $searched, 'fields' => 'all', 'orderby' => 'count', 'order' => 'DESC', 'hierarchical' => false ) );
+			if ( isset( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) {
+				$searched = esc_attr( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] );
+				$search_results = get_terms( $taxonomy_name, array(
+					'name__like' => $searched,
+					'fields' => 'all',
+					'orderby' => 'count',
+					'order' => 'DESC',
+					'hierarchical' => false,
+				) );
 			} else {
 				$searched = '';
 				$search_results = array();
@@ -744,19 +789,21 @@
 				<label for="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
 				<input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" id="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
 				<span class="spinner"></span>
-				<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
+				<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array(
+					'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name,
+				) ); ?>
 			</p>
 
 			<ul id="<?php echo $taxonomy_name; ?>-search-checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear">
 			<?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
 				<?php
 				$args['walker'] = $walker;
-				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
+				echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $search_results ), 0, (object) $args );
 				?>
 			<?php elseif ( is_wp_error( $search_results ) ) : ?>
 				<li><?php echo $search_results->get_error_message(); ?></li>
 			<?php elseif ( ! empty( $searched ) ) : ?>
-				<li><?php _e('No results found.'); ?></li>
+				<li><?php _e( 'No results found.' ); ?></li>
 			<?php endif; ?>
 			</ul>
 		</div><!-- /.tabs-panel -->
@@ -769,7 +816,7 @@
 							$taxonomy_name . '-tab' => 'all',
 							'selectall' => 1,
 						),
-						remove_query_arg($removed_args)
+						remove_query_arg( $removed_args )
 					));
 				?>#taxonomy-<?php echo $taxonomy_name; ?>" class="select-all aria-button-if-js"><?php _e( 'Select All' ); ?></a>
 			</span>
@@ -847,8 +894,8 @@
 
 			$items_saved[] = wp_update_nav_menu_item( $menu_id, $_actual_db_id, $args );
 
-		}
-	}
+		}// End foreach().
+	}// End if().
 	return $items_saved;
 }
 
@@ -871,20 +918,20 @@
 				'post_status' => 'publish',
 			);
 
-		// Posts should show only published items.
+			// Posts should show only published items.
 		} elseif ( 'post' == $object->name ) {
 			$object->_default_query = array(
 				'post_status' => 'publish',
 			);
 
-		// Categories should be in reverse chronological order.
+			// Categories should be in reverse chronological order.
 		} elseif ( 'category' == $object->name ) {
 			$object->_default_query = array(
 				'orderby' => 'id',
 				'order' => 'DESC',
 			);
 
-		// Custom post types should show only published items.
+			// Custom post types should show only published items.
 		} else {
 			$object->_default_query = array(
 				'post_status' => 'publish',
@@ -908,14 +955,17 @@
 
 	// If the menu exists, get its items.
 	if ( is_nav_menu( $menu ) ) {
-		$menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'any') );
+		$menu_items = wp_get_nav_menu_items( $menu->term_id, array(
+			'post_status' => 'any',
+		) );
 		$result = '<div id="menu-instructions" class="post-body-plain';
-		$result .= ( ! empty($menu_items) ) ? ' menu-instructions-inactive">' : '">';
+		$result .= ( ! empty( $menu_items ) ) ? ' menu-instructions-inactive">' : '">';
 		$result .= '<p>' . __( 'Add menu items from the column on the left.' ) . '</p>';
 		$result .= '</div>';
 
-		if ( empty($menu_items) )
+		if ( empty( $menu_items ) ) {
 			return $result . ' <ul class="menu" id="menu-to-edit"> </ul>';
+		}
 
 		/**
 		 * Filters the Walker class used when adding nav menu items.
@@ -940,10 +990,12 @@
 
 		$some_pending_menu_items = $some_invalid_menu_items = false;
 		foreach ( (array) $menu_items as $menu_item ) {
-			if ( isset( $menu_item->post_status ) && 'draft' == $menu_item->post_status )
+			if ( isset( $menu_item->post_status ) && 'draft' == $menu_item->post_status ) {
 				$some_pending_menu_items = true;
-			if ( ! empty( $menu_item->_invalid ) )
+			}
+			if ( ! empty( $menu_item->_invalid ) ) {
 				$some_invalid_menu_items = true;
+			}
 		}
 
 		if ( $some_pending_menu_items ) {
@@ -955,12 +1007,14 @@
 		}
 
 		$result .= '<ul class="menu" id="menu-to-edit"> ';
-		$result .= walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' => $walker ) );
+		$result .= walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $menu_items ), 0, (object) array(
+			'walker' => $walker,
+		) );
 		$result .= ' </ul> ';
 		return $result;
 	} elseif ( is_wp_error( $menu ) ) {
 		return $menu;
-	}
+	}// End if().
 
 }
 
@@ -996,10 +1050,11 @@
 	$delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
 
 	// Delete orphaned draft menu items.
-	$menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) );
+	$menu_items_to_delete = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) );
 
-	foreach ( (array) $menu_items_to_delete as $menu_item_id )
+	foreach ( (array) $menu_items_to_delete as $menu_item_id ) {
 		wp_delete_post( $menu_item_id, true );
+	}
 }
 
 /**
@@ -1011,19 +1066,34 @@
  * @param string $nav_menu_selected_title Title of the currently-selected menu
  * @return array $messages The menu updated message
  */
-function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_selected_title ) {
-	$unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array( 'orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID', 'post_status' => 'draft,publish' ) );
+function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
+	$unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array(
+		'orderby' => 'ID',
+		'output' => ARRAY_A,
+		'output_key' => 'ID',
+		'post_status' => 'draft,publish',
+	) );
 	$messages = array();
 	$menu_items = array();
 	// Index menu items by db ID
-	foreach ( $unsorted_menu_items as $_item )
-		$menu_items[$_item->db_id] = $_item;
+	foreach ( $unsorted_menu_items as $_item ) {
+		$menu_items[ $_item->db_id ] = $_item;
+	}
 
 	$post_fields = array(
-		'menu-item-db-id', 'menu-item-object-id', 'menu-item-object',
-		'menu-item-parent-id', 'menu-item-position', 'menu-item-type',
-		'menu-item-title', 'menu-item-url', 'menu-item-description',
-		'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn'
+		'menu-item-db-id',
+	'menu-item-object-id',
+	'menu-item-object',
+		'menu-item-parent-id',
+	'menu-item-position',
+	'menu-item-type',
+		'menu-item-title',
+	'menu-item-url',
+	'menu-item-description',
+		'menu-item-attr-title',
+	'menu-item-target',
+	'menu-item-classes',
+	'menu-item-xfn',
 	);
 
 	wp_defer_term_counting( true );
@@ -1032,14 +1102,16 @@
 		foreach ( (array) $_POST['menu-item-db-id'] as $_key => $k ) {
 
 			// Menu item title can't be blank
-			if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] )
+			if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] ) {
 				continue;
+			}
 
 			$args = array();
-			foreach ( $post_fields as $field )
-				$args[$field] = isset( $_POST[$field][$_key] ) ? $_POST[$field][$_key] : '';
+			foreach ( $post_fields as $field ) {
+				$args[ $field ] = isset( $_POST[ $field ][ $_key ] ) ? $_POST[ $field ][ $_key ] : '';
+			}
 
-			$menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][$_key] != $_key ? 0 : $_key ), $args );
+			$menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][ $_key ] != $_key ? 0 : $_key ), $args );
 
 			if ( is_wp_error( $menu_item_db_id ) ) {
 				$messages[] = '<div id="message" class="error"><p>' . $menu_item_db_id->get_error_message() . '</p></div>';
@@ -1061,17 +1133,22 @@
 	// Store 'auto-add' pages.
 	$auto_add = ! empty( $_POST['auto-add-pages'] );
 	$nav_menu_option = (array) get_option( 'nav_menu_options' );
-	if ( ! isset( $nav_menu_option['auto_add'] ) )
+	if ( ! isset( $nav_menu_option['auto_add'] ) ) {
 		$nav_menu_option['auto_add'] = array();
+	}
 	if ( $auto_add ) {
-		if ( ! in_array( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) )
+		if ( ! in_array( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) ) {
 			$nav_menu_option['auto_add'][] = $nav_menu_selected_id;
+		}
 	} else {
-		if ( false !== ( $key = array_search( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) ) )
-			unset( $nav_menu_option['auto_add'][$key] );
+		if ( false !== ( $key = array_search( $nav_menu_selected_id, $nav_menu_option['auto_add'] ) ) ) {
+			unset( $nav_menu_option['auto_add'][ $key ] );
+		}
 	}
 	// Remove nonexistent/deleted menus
-	$nav_menu_option['auto_add'] = array_intersect( $nav_menu_option['auto_add'], wp_get_nav_menus( array( 'fields' => 'ids' ) ) );
+	$nav_menu_option['auto_add'] = array_intersect( $nav_menu_option['auto_add'], wp_get_nav_menus( array(
+		'fields' => 'ids',
+	) ) );
 	update_option( 'nav_menu_options', $nav_menu_option );
 
 	wp_defer_term_counting( false );
@@ -1124,7 +1201,9 @@
 				if ( $i == count( $array_bits ) - 1 ) {
 					$new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
 				} else {
-					$new_post_data = array( $array_bits[ $i ] => $new_post_data );
+					$new_post_data = array(
+						$array_bits[ $i ] => $new_post_data,
+					);
 				}
 			}
 
Index: src/wp-admin/includes/noop.php
===================================================================
--- src/wp-admin/includes/noop.php	(revision 40901)
+++ src/wp-admin/includes/noop.php	(working copy)
@@ -65,7 +65,8 @@
 /**
  * @ignore
  */
-function is_admin() {return true;}
+function is_admin() {
+	return true;}
 
 /**
  * @ignore
@@ -93,15 +94,15 @@
 function wp_guess_url() {}
 
 if ( ! function_exists( 'json_encode' ) ) :
-/**
+	/**
  * @ignore
  */
-function json_encode() {}
+	function json_encode() {}
 endif;
 
 function get_file( $path ) {
 
-	if ( function_exists('realpath') ) {
+	if ( function_exists( 'realpath' ) ) {
 		$path = realpath( $path );
 	}
 
@@ -110,4 +111,4 @@
 	}
 
 	return @file_get_contents( $path );
-}
\ No newline at end of file
+}
Index: src/wp-admin/includes/options.php
===================================================================
--- src/wp-admin/includes/options.php	(revision 40901)
+++ src/wp-admin/includes/options.php	(working copy)
@@ -124,7 +124,7 @@
 				selects.prop( 'disabled', ! staticPage.prop('checked') );
 			};
 		check_disabled();
- 		section.find('input:radio').change(check_disabled);
+		 section.find('input:radio').change(check_disabled);
 	});
 </script>
 <?php
Index: src/wp-admin/includes/plugin-install.php
===================================================================
--- src/wp-admin/includes/plugin-install.php	(revision 40901)
+++ src/wp-admin/includes/plugin-install.php	(working copy)
@@ -142,15 +142,16 @@
 
 	if ( false === $res ) {
 		$url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
-		if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
+		if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
 			$url = set_url_scheme( $url, 'https' );
+		}
 
 		$http_args = array(
 			'timeout' => 15,
 			'body' => array(
 				'action' => $action,
-				'request' => serialize( $args )
-			)
+				'request' => serialize( $args ),
+			),
 		);
 		$request = wp_remote_post( $url, $http_args );
 
@@ -166,7 +167,7 @@
 			$request = wp_remote_post( $http_url, $http_args );
 		}
 
-		if ( is_wp_error($request) ) {
+		if ( is_wp_error( $request ) ) {
 			$res = new WP_Error( 'plugins_api_failed',
 				sprintf(
 					/* translators: %s: support forums URL */
@@ -188,9 +189,9 @@
 				);
 			}
 		}
-	} elseif ( !is_wp_error($res) ) {
+	} elseif ( ! is_wp_error( $res ) ) {
 		$res->external = true;
-	}
+	}// End if().
 
 	/**
 	 * Filters the Plugin Install API response results.
@@ -213,14 +214,16 @@
  * @return array
  */
 function install_popular_tags( $args = array() ) {
-	$key = md5(serialize($args));
-	if ( false !== ($tags = get_site_transient('poptags_' . $key) ) )
+	$key = md5( serialize( $args ) );
+	if ( false !== ($tags = get_site_transient( 'poptags_' . $key ) ) ) {
 		return $tags;
+	}
 
-	$tags = plugins_api('hot_tags', $args);
+	$tags = plugins_api( 'hot_tags', $args );
 
-	if ( is_wp_error($tags) )
+	if ( is_wp_error( $tags ) ) {
 		return $tags;
+	}
 
 	set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS );
 
@@ -244,7 +247,7 @@
 	$api_tags = install_popular_tags();
 
 	echo '<p class="popular-tags">';
-	if ( is_wp_error($api_tags) ) {
+	if ( is_wp_error( $api_tags ) ) {
 		echo $api_tags->get_error_message();
 	} else {
 		//Set up the tags in a way which can be interpreted by wp_generate_tag_cloud()
@@ -256,11 +259,14 @@
 				'name' => $tag['name'],
 				'slug' => $tag['slug'],
 				'id' => sanitize_title_with_dashes( $tag['name'] ),
-				'count' => $tag['count']
+				'count' => $tag['count'],
 			);
 			$tags[ $tag['name'] ] = (object) $data;
 		}
-		echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) );
+		echo wp_generate_tag_cloud( $tags, array(
+			'single_text' => __( '%s plugin' ),
+			'multiple_text' => __( '%s plugins' ),
+		) );
 	}
 	echo '</p><br class="clear" /></div>';
 }
@@ -287,7 +293,9 @@
 		<label><span class="screen-reader-text"><?php _e( 'Search Plugins' ); ?></span>
 			<input type="search" name="s" value="<?php echo esc_attr( $term ) ?>" class="wp-filter-search" placeholder="<?php esc_attr_e( 'Search plugins...' ); ?>" />
 		</label>
-		<?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
+		<?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array(
+			'id' => 'search-submit',
+		) ); ?>
 	</form><?php
 }
 
@@ -298,8 +306,8 @@
 function install_plugins_upload() {
 ?>
 <div class="upload-plugin">
-	<p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p>
-	<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>">
+	<p class="install-help"><?php _e( 'If you have a plugin in a .zip format, you may install it by uploading it here.' ); ?></p>
+	<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-plugin' ); ?>">
 		<?php wp_nonce_field( 'plugin-upload' ); ?>
 		<label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label>
 		<input type="file" id="pluginzip" name="pluginzip" />
@@ -381,10 +389,11 @@
  *     @type string $file    Plugin filename relative to the plugins directory.
  * }
  */
-function install_plugin_install_status($api, $loop = false) {
+function install_plugin_install_status( $api, $loop = false ) {
 	// This function is called recursively, $loop prevents further loops.
-	if ( is_array($api) )
+	if ( is_array( $api ) ) {
 		$api = (object) $api;
+	}
 
 	// Default to a "new" plugin
 	$status = 'install';
@@ -395,15 +404,16 @@
 	 * Check to see if this plugin is known to be installed,
 	 * and has an update awaiting it.
 	 */
-	$update_plugins = get_site_transient('update_plugins');
+	$update_plugins = get_site_transient( 'update_plugins' );
 	if ( isset( $update_plugins->response ) ) {
-		foreach ( (array)$update_plugins->response as $file => $plugin ) {
+		foreach ( (array) $update_plugins->response as $file => $plugin ) {
 			if ( $plugin->slug === $api->slug ) {
 				$status = 'update_available';
 				$update_file = $file;
 				$version = $plugin->new_version;
-				if ( current_user_can('update_plugins') )
-					$url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file);
+				if ( current_user_can( 'update_plugins' ) ) {
+					$url = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $update_file ), 'upgrade-plugin_' . $update_file );
+				}
 				break;
 			}
 		}
@@ -411,36 +421,39 @@
 
 	if ( 'install' == $status ) {
 		if ( is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) {
-			$installed_plugin = get_plugins('/' . $api->slug);
-			if ( empty($installed_plugin) ) {
-				if ( current_user_can('install_plugins') )
-					$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
+			$installed_plugin = get_plugins( '/' . $api->slug );
+			if ( empty( $installed_plugin ) ) {
+				if ( current_user_can( 'install_plugins' ) ) {
+					$url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $api->slug ), 'install-plugin_' . $api->slug );
+				}
 			} else {
 				$key = array_keys( $installed_plugin );
 				$key = reset( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers
 				$update_file = $api->slug . '/' . $key;
-				if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){
+				if ( version_compare( $api->version, $installed_plugin[ $key ]['Version'], '=' ) ) {
 					$status = 'latest_installed';
-				} elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) {
+				} elseif ( version_compare( $api->version, $installed_plugin[ $key ]['Version'], '<' ) ) {
 					$status = 'newer_installed';
 					$version = $installed_plugin[ $key ]['Version'];
 				} else {
 					//If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh
 					if ( ! $loop ) {
-						delete_site_transient('update_plugins');
+						delete_site_transient( 'update_plugins' );
 						wp_update_plugins();
-						return install_plugin_install_status($api, true);
+						return install_plugin_install_status( $api, true );
 					}
 				}
 			}
 		} else {
 			// "install" & no directory with that slug
-			if ( current_user_can('install_plugins') )
-				$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
+			if ( current_user_can( 'install_plugins' ) ) {
+				$url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $api->slug ), 'install-plugin_' . $api->slug );
+			}
 		}
 	}
-	if ( isset($_GET['from']) )
+	if ( isset( $_GET['from'] ) ) {
 		$url .= '&amp;from=' . urlencode( wp_unslash( $_GET['from'] ) );
+	}
 
 	$file = $update_file;
 	return compact( 'status', 'url', 'version', 'file' );
@@ -467,8 +480,8 @@
 			'banners' => true,
 			'reviews' => true,
 			'downloaded' => false,
-			'active_installs' => true
-		)
+			'active_installs' => true,
+		),
 	) );
 
 	if ( is_wp_error( $api ) ) {
@@ -476,14 +489,46 @@
 	}
 
 	$plugins_allowedtags = array(
-		'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ),
-		'abbr' => array( 'title' => array() ), 'acronym' => array( 'title' => array() ),
-		'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
-		'div' => array( 'class' => array() ), 'span' => array( 'class' => array() ),
-		'p' => array(), 'br' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),
-		'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),
-		'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() ),
-		'blockquote' => array( 'cite' => true ),
+		'a' => array(
+			'href' => array(),
+			'title' => array(),
+			'target' => array(),
+		),
+		'abbr' => array(
+			'title' => array(),
+		),
+	'acronym' => array(
+		'title' => array(),
+	),
+		'code' => array(),
+	'pre' => array(),
+	'em' => array(),
+	'strong' => array(),
+		'div' => array(
+			'class' => array(),
+		),
+	'span' => array(
+		'class' => array(),
+	),
+		'p' => array(),
+	'br' => array(),
+	'ul' => array(),
+	'ol' => array(),
+	'li' => array(),
+		'h1' => array(),
+	'h2' => array(),
+	'h3' => array(),
+	'h4' => array(),
+	'h5' => array(),
+	'h6' => array(),
+		'img' => array(
+			'src' => array(),
+			'class' => array(),
+			'alt' => array(),
+		),
+		'blockquote' => array(
+			'cite' => true,
+		),
 	);
 
 	$plugins_section_titles = array(
@@ -493,12 +538,12 @@
 		'screenshots'  => _x( 'Screenshots',  'Plugin installer section title' ),
 		'changelog'    => _x( 'Changelog',    'Plugin installer section title' ),
 		'reviews'      => _x( 'Reviews',      'Plugin installer section title' ),
-		'other_notes'  => _x( 'Other Notes',  'Plugin installer section title' )
+		'other_notes'  => _x( 'Other Notes',  'Plugin installer section title' ),
 	);
 
 	// Sanitize HTML
 	foreach ( (array) $api->sections as $section_name => $content ) {
-		$api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags );
+		$api->sections[ $section_name ] = wp_kses( $content, $plugins_allowedtags );
 	}
 
 	foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
@@ -553,7 +598,10 @@
 		}
 
 		$class = ( $section_name === $section ) ? ' class="current"' : '';
-		$href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );
+		$href = add_query_arg( array(
+			'tab' => $tab,
+			'section' => $section_name,
+		) );
 		$href = esc_url( $href );
 		$san_section = esc_attr( $section_name );
 		echo "\t<a name='$san_section' href='$href' $class>$title</a>\n";
@@ -588,13 +636,13 @@
 				<li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
 			<?php } if ( isset( $api->active_installs ) ) { ?>
 				<li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
-					if ( $api->active_installs >= 1000000 ) {
-						_ex( '1+ Million', 'Active plugin installs' );
-					} elseif ( 0 == $api->active_installs ) {
-						_ex( 'Less Than 10', 'Active plugin installs' );
-					} else {
-						echo number_format_i18n( $api->active_installs ) . '+';
-					}
+				if ( $api->active_installs >= 1000000 ) {
+					_ex( '1+ Million', 'Active plugin installs' );
+				} elseif ( 0 == $api->active_installs ) {
+					_ex( 'Less Than 10', 'Active plugin installs' );
+				} else {
+					echo number_format_i18n( $api->active_installs ) . '+';
+				}
 					?></li>
 			<?php } if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?>
 				<li><a target="_blank" href="<?php echo __( 'https://wordpress.org/plugins/' ) . $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page &#187;' ); ?></a></li>
@@ -606,11 +654,15 @@
 		</ul>
 		<?php if ( ! empty( $api->rating ) ) { ?>
 			<h3><?php _e( 'Average Rating' ); ?></h3>
-			<?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
+			<?php wp_star_rating( array(
+				'rating' => $api->rating,
+				'type' => 'percent',
+				'number' => $api->num_ratings,
+			) ); ?>
 			<p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
 		<?php }
 
-		if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?>
+if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?>
 			<h3><?php _e( 'Reviews' ); ?></h3>
 			<p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p>
 			<?php
@@ -625,7 +677,7 @@
 				?>
 				<div class="counter-container">
 						<span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
-						                               target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
+													   target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
 						<span class="counter-back">
 							<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
 						</span>
@@ -633,8 +685,8 @@
 				</div>
 				<?php
 			}
-		}
-		if ( ! empty( $api->contributors ) ) { ?>
+}
+if ( ! empty( $api->contributors ) ) { ?>
 			<h3><?php _e( 'Contributors' ); ?></h3>
 			<ul class="contributors">
 				<?php
@@ -695,12 +747,12 @@
 				break;
 			case 'update_available':
 				if ( $status['url'] ) {
-					echo '<a data-slug="' . esc_attr( $api->slug ) . '" data-plugin="' . esc_attr( $status['file'] ) . '" id="plugin_update_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) .'</a>';
+					echo '<a data-slug="' . esc_attr( $api->slug ) . '" data-plugin="' . esc_attr( $status['file'] ) . '" id="plugin_update_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) . '</a>';
 				}
 				break;
 			case 'newer_installed':
 				/* translators: %s: Plugin version */
-				echo '<a class="button button-primary right disabled">' . sprintf( __( 'Newer Version (%s) Installed'), $status['version'] ) . '</a>';
+				echo '<a class="button button-primary right disabled">' . sprintf( __( 'Newer Version (%s) Installed' ), $status['version'] ) . '</a>';
 				break;
 			case 'latest_installed':
 				echo '<a class="button button-primary right disabled">' . __( 'Latest Version Installed' ) . '</a>';
Index: src/wp-admin/includes/plugin.php
===================================================================
--- src/wp-admin/includes/plugin.php	(revision 40901)
+++ src/wp-admin/includes/plugin.php	(working copy)
@@ -136,20 +136,28 @@
 			$textdomain = 'default';
 		}
 		if ( $textdomain ) {
-			foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field )
+			foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field ) {
 				$plugin_data[ $field ] = translate( $plugin_data[ $field ], $textdomain );
+			}
 		}
 	}
 
 	// Sanitize fields
 	$allowed_tags = $allowed_tags_in_links = array(
-		'abbr'    => array( 'title' => true ),
-		'acronym' => array( 'title' => true ),
+		'abbr'    => array(
+			'title' => true,
+		),
+		'acronym' => array(
+			'title' => true,
+		),
 		'code'    => true,
 		'em'      => true,
 		'strong'  => true,
 	);
-	$allowed_tags['a'] = array( 'href' => true, 'title' => true );
+	$allowed_tags['a'] = array(
+		'href' => true,
+		'title' => true,
+	);
 
 	// Name is marked up inside <a> tags. Don't allow these.
 	// Author is too, but some plugins have used <a> here (omitting Author URI).
@@ -167,16 +175,19 @@
 
 	// Apply markup
 	if ( $markup ) {
-		if ( $plugin_data['PluginURI'] && $plugin_data['Name'] )
+		if ( $plugin_data['PluginURI'] && $plugin_data['Name'] ) {
 			$plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '">' . $plugin_data['Name'] . '</a>';
+		}
 
-		if ( $plugin_data['AuthorURI'] && $plugin_data['Author'] )
+		if ( $plugin_data['AuthorURI'] && $plugin_data['Author'] ) {
 			$plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '">' . $plugin_data['Author'] . '</a>';
+		}
 
 		$plugin_data['Description'] = wptexturize( $plugin_data['Description'] );
 
-		if ( $plugin_data['Author'] )
-			$plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s.'), $plugin_data['Author'] ) . '</cite>';
+		if ( $plugin_data['Author'] ) {
+			$plugin_data['Description'] .= ' <cite>' . sprintf( __( 'By %s.' ), $plugin_data['Author'] ) . '</cite>';
+		}
 	}
 
 	return $plugin_data;
@@ -190,29 +201,32 @@
  * @param string $plugin Path to the main plugin file from plugins directory.
  * @return array List of files relative to the plugin root.
  */
-function get_plugin_files($plugin) {
+function get_plugin_files( $plugin ) {
 	$plugin_file = WP_PLUGIN_DIR . '/' . $plugin;
-	$dir = dirname($plugin_file);
-	$plugin_files = array($plugin);
-	if ( is_dir($dir) && $dir != WP_PLUGIN_DIR ) {
+	$dir = dirname( $plugin_file );
+	$plugin_files = array( $plugin );
+	if ( is_dir( $dir ) && $dir != WP_PLUGIN_DIR ) {
 		$plugins_dir = @ opendir( $dir );
 		if ( $plugins_dir ) {
-			while (($file = readdir( $plugins_dir ) ) !== false ) {
-				if ( substr($file, 0, 1) == '.' )
+			while ( ($file = readdir( $plugins_dir ) ) !== false ) {
+				if ( substr( $file, 0, 1 ) == '.' ) {
 					continue;
+				}
 				if ( is_dir( $dir . '/' . $file ) ) {
 					$plugins_subdir = @ opendir( $dir . '/' . $file );
 					if ( $plugins_subdir ) {
-						while (($subfile = readdir( $plugins_subdir ) ) !== false ) {
-							if ( substr($subfile, 0, 1) == '.' )
+						while ( ($subfile = readdir( $plugins_subdir ) ) !== false ) {
+							if ( substr( $subfile, 0, 1 ) == '.' ) {
 								continue;
-							$plugin_files[] = plugin_basename("$dir/$file/$subfile");
+							}
+							$plugin_files[] = plugin_basename( "$dir/$file/$subfile" );
 						}
 						@closedir( $plugins_subdir );
 					}
 				} else {
-					if ( plugin_basename("$dir/$file") != $plugin )
-						$plugin_files[] = plugin_basename("$dir/$file");
+					if ( plugin_basename( "$dir/$file" ) != $plugin ) {
+						$plugin_files[] = plugin_basename( "$dir/$file" );
+					}
 				}
 			}
 			@closedir( $plugins_dir );
@@ -242,64 +256,74 @@
  * @param string $plugin_folder Optional. Relative path to single plugin folder.
  * @return array Key is the plugin file path and the value is an array of the plugin data.
  */
-function get_plugins($plugin_folder = '') {
+function get_plugins( $plugin_folder = '' ) {
 
-	if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') )
+	if ( ! $cache_plugins = wp_cache_get( 'plugins', 'plugins' ) ) {
 		$cache_plugins = array();
+	}
 
-	if ( isset($cache_plugins[ $plugin_folder ]) )
+	if ( isset( $cache_plugins[ $plugin_folder ] ) ) {
 		return $cache_plugins[ $plugin_folder ];
+	}
 
-	$wp_plugins = array ();
+	$wp_plugins = array();
 	$plugin_root = WP_PLUGIN_DIR;
-	if ( !empty($plugin_folder) )
+	if ( ! empty( $plugin_folder ) ) {
 		$plugin_root .= $plugin_folder;
+	}
 
 	// Files in wp-content/plugins directory
-	$plugins_dir = @ opendir( $plugin_root);
+	$plugins_dir = @ opendir( $plugin_root );
 	$plugin_files = array();
 	if ( $plugins_dir ) {
-		while (($file = readdir( $plugins_dir ) ) !== false ) {
-			if ( substr($file, 0, 1) == '.' )
+		while ( ($file = readdir( $plugins_dir ) ) !== false ) {
+			if ( substr( $file, 0, 1 ) == '.' ) {
 				continue;
-			if ( is_dir( $plugin_root.'/'.$file ) ) {
-				$plugins_subdir = @ opendir( $plugin_root.'/'.$file );
+			}
+			if ( is_dir( $plugin_root . '/' . $file ) ) {
+				$plugins_subdir = @ opendir( $plugin_root . '/' . $file );
 				if ( $plugins_subdir ) {
-					while (($subfile = readdir( $plugins_subdir ) ) !== false ) {
-						if ( substr($subfile, 0, 1) == '.' )
+					while ( ($subfile = readdir( $plugins_subdir ) ) !== false ) {
+						if ( substr( $subfile, 0, 1 ) == '.' ) {
 							continue;
-						if ( substr($subfile, -4) == '.php' )
+						}
+						if ( substr( $subfile, -4 ) == '.php' ) {
 							$plugin_files[] = "$file/$subfile";
+						}
 					}
 					closedir( $plugins_subdir );
 				}
 			} else {
-				if ( substr($file, -4) == '.php' )
+				if ( substr( $file, -4 ) == '.php' ) {
 					$plugin_files[] = $file;
+				}
 			}
 		}
 		closedir( $plugins_dir );
 	}
 
-	if ( empty($plugin_files) )
+	if ( empty( $plugin_files ) ) {
 		return $wp_plugins;
+	}
 
 	foreach ( $plugin_files as $plugin_file ) {
-		if ( !is_readable( "$plugin_root/$plugin_file" ) )
+		if ( ! is_readable( "$plugin_root/$plugin_file" ) ) {
 			continue;
+		}
 
 		$plugin_data = get_plugin_data( "$plugin_root/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached.
 
-		if ( empty ( $plugin_data['Name'] ) )
+		if ( empty( $plugin_data['Name'] ) ) {
 			continue;
+		}
 
-		$wp_plugins[plugin_basename( $plugin_file )] = $plugin_data;
+		$wp_plugins[ plugin_basename( $plugin_file ) ] = $plugin_data;
 	}
 
 	uasort( $wp_plugins, '_sort_uname_callback' );
 
 	$cache_plugins[ $plugin_folder ] = $wp_plugins;
-	wp_cache_set('plugins', $cache_plugins, 'plugins');
+	wp_cache_set( 'plugins', $cache_plugins, 'plugins' );
 
 	return $wp_plugins;
 }
@@ -317,12 +341,14 @@
 	// Files in wp-content/mu-plugins directory
 	$plugin_files = array();
 
-	if ( ! is_dir( WPMU_PLUGIN_DIR ) )
+	if ( ! is_dir( WPMU_PLUGIN_DIR ) ) {
 		return $wp_plugins;
+	}
 	if ( $plugins_dir = @ opendir( WPMU_PLUGIN_DIR ) ) {
 		while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
-			if ( substr( $file, -4 ) == '.php' )
+			if ( substr( $file, -4 ) == '.php' ) {
 				$plugin_files[] = $file;
+			}
 		}
 	} else {
 		return $wp_plugins;
@@ -330,23 +356,27 @@
 
 	@closedir( $plugins_dir );
 
-	if ( empty($plugin_files) )
+	if ( empty( $plugin_files ) ) {
 		return $wp_plugins;
+	}
 
 	foreach ( $plugin_files as $plugin_file ) {
-		if ( !is_readable( WPMU_PLUGIN_DIR . "/$plugin_file" ) )
+		if ( ! is_readable( WPMU_PLUGIN_DIR . "/$plugin_file" ) ) {
 			continue;
+		}
 
 		$plugin_data = get_plugin_data( WPMU_PLUGIN_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached.
 
-		if ( empty ( $plugin_data['Name'] ) )
+		if ( empty( $plugin_data['Name'] ) ) {
 			$plugin_data['Name'] = $plugin_file;
+		}
 
 		$wp_plugins[ $plugin_file ] = $plugin_data;
 	}
 
-	if ( isset( $wp_plugins['index.php'] ) && filesize( WPMU_PLUGIN_DIR . '/index.php') <= 30 ) // silence is golden
+	if ( isset( $wp_plugins['index.php'] ) && filesize( WPMU_PLUGIN_DIR . '/index.php' ) <= 30 ) { // silence is golden
 		unset( $wp_plugins['index.php'] );
+	}
 
 	uasort( $wp_plugins, '_sort_uname_callback' );
 
@@ -378,8 +408,9 @@
 	// These exist in the wp-content directory
 	if ( $plugins_dir = @ opendir( WP_CONTENT_DIR ) ) {
 		while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
-			if ( isset( $_dropins[ $file ] ) )
+			if ( isset( $_dropins[ $file ] ) ) {
 				$plugin_files[] = $file;
+			}
 		}
 	} else {
 		return $dropins;
@@ -387,15 +418,18 @@
 
 	@closedir( $plugins_dir );
 
-	if ( empty($plugin_files) )
+	if ( empty( $plugin_files ) ) {
 		return $dropins;
+	}
 
 	foreach ( $plugin_files as $plugin_file ) {
-		if ( !is_readable( WP_CONTENT_DIR . "/$plugin_file" ) )
+		if ( ! is_readable( WP_CONTENT_DIR . "/$plugin_file" ) ) {
 			continue;
+		}
 		$plugin_data = get_plugin_data( WP_CONTENT_DIR . "/$plugin_file", false, false ); //Do not apply markup/translate as it'll be cached.
-		if ( empty( $plugin_data['Name'] ) )
+		if ( empty( $plugin_data['Name'] ) ) {
 			$plugin_data['Name'] = $plugin_file;
+		}
 		$dropins[ $plugin_file ] = $plugin_data;
 	}
 
@@ -416,18 +450,18 @@
  */
 function _get_dropins() {
 	$dropins = array(
-		'advanced-cache.php' => array( __( 'Advanced caching plugin.'       ), 'WP_CACHE' ), // WP_CACHE
-		'db.php'             => array( __( 'Custom database class.'         ), true ), // auto on load
+		'advanced-cache.php' => array( __( 'Advanced caching plugin.' ), 'WP_CACHE' ), // WP_CACHE
+		'db.php'             => array( __( 'Custom database class.' ), true ), // auto on load
 		'db-error.php'       => array( __( 'Custom database error message.' ), true ), // auto on error
-		'install.php'        => array( __( 'Custom install script.'         ), true ), // auto on install
-		'maintenance.php'    => array( __( 'Custom maintenance message.'    ), true ), // auto on maintenance
-		'object-cache.php'   => array( __( 'External object cache.'         ), true ), // auto on load
+		'install.php'        => array( __( 'Custom install script.' ), true ), // auto on install
+		'maintenance.php'    => array( __( 'Custom maintenance message.' ), true ), // auto on maintenance
+		'object-cache.php'   => array( __( 'External object cache.' ), true ), // auto on load
 	);
 
 	if ( is_multisite() ) {
-		$dropins['sunrise.php'       ] = array( __( 'Executed before Multisite is loaded.' ), 'SUNRISE' ); // SUNRISE
-		$dropins['blog-deleted.php'  ] = array( __( 'Custom site deleted message.'   ), true ); // auto on deleted blog
-		$dropins['blog-inactive.php' ] = array( __( 'Custom site inactive message.'  ), true ); // auto on inactive blog
+		$dropins['sunrise.php'] = array( __( 'Executed before Multisite is loaded.' ), 'SUNRISE' ); // SUNRISE
+		$dropins['blog-deleted.php'] = array( __( 'Custom site deleted message.' ), true ); // auto on deleted blog
+		$dropins['blog-inactive.php'] = array( __( 'Custom site inactive message.' ), true ); // auto on inactive blog
 		$dropins['blog-suspended.php'] = array( __( 'Custom site suspended message.' ), true ); // auto on archived or spammed blog
 	}
 
@@ -480,12 +514,14 @@
  * @return bool True, if active for the network, otherwise false.
  */
 function is_plugin_active_for_network( $plugin ) {
-	if ( !is_multisite() )
+	if ( ! is_multisite() ) {
 		return false;
+	}
 
-	$plugins = get_site_option( 'active_sitewide_plugins');
-	if ( isset($plugins[$plugin]) )
+	$plugins = get_site_option( 'active_sitewide_plugins' );
+	if ( isset( $plugins[ $plugin ] ) ) {
 		return true;
+	}
 
 	return false;
 }
@@ -504,8 +540,9 @@
  */
 function is_network_only_plugin( $plugin ) {
 	$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
-	if ( $plugin_data )
+	if ( $plugin_data ) {
 		return $plugin_data['Network'];
+	}
 	return false;
 }
 
@@ -539,7 +576,7 @@
 function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
 	$plugin = plugin_basename( trim( $plugin ) );
 
-	if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
+	if ( is_multisite() && ( $network_wide || is_network_only_plugin( $plugin ) ) ) {
 		$network_wide = true;
 		$current = get_site_option( 'active_sitewide_plugins', array() );
 		$_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
@@ -547,13 +584,15 @@
 		$current = get_option( 'active_plugins', array() );
 	}
 
-	$valid = validate_plugin($plugin);
-	if ( is_wp_error($valid) )
+	$valid = validate_plugin( $plugin );
+	if ( is_wp_error( $valid ) ) {
 		return $valid;
+	}
 
 	if ( ( $network_wide && ! isset( $current[ $plugin ] ) ) || ( ! $network_wide && ! in_array( $plugin, $current ) ) ) {
-		if ( !empty($redirect) )
-			wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
+		if ( ! empty( $redirect ) ) {
+			wp_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) ); // we'll override this later if the plugin can be included without fatal error
+		}
 		ob_start();
 		wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
 		$_wp_plugin_file = $plugin;
@@ -593,13 +632,13 @@
 
 		if ( $network_wide ) {
 			$current = get_site_option( 'active_sitewide_plugins', array() );
-			$current[$plugin] = time();
+			$current[ $plugin ] = time();
 			update_site_option( 'active_sitewide_plugins', $current );
 		} else {
 			$current = get_option( 'active_plugins', array() );
 			$current[] = $plugin;
-			sort($current);
-			update_option('active_plugins', $current);
+			sort( $current );
+			update_option( 'active_plugins', $current );
 		}
 
 		if ( ! $silent ) {
@@ -620,10 +659,10 @@
 
 		if ( ob_get_length() > 0 ) {
 			$output = ob_get_clean();
-			return new WP_Error('unexpected_output', __('The plugin generated unexpected output.'), $output);
+			return new WP_Error( 'unexpected_output', __( 'The plugin generated unexpected output.' ), $output );
 		}
 		ob_end_clean();
-	}
+	}// End if().
 
 	return null;
 }
@@ -642,15 +681,17 @@
  * 	A value of null (the default) will deactivate plugins for both the site and the network.
  */
 function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
-	if ( is_multisite() )
+	if ( is_multisite() ) {
 		$network_current = get_site_option( 'active_sitewide_plugins', array() );
+	}
 	$current = get_option( 'active_plugins', array() );
 	$do_blog = $do_network = false;
 
 	foreach ( (array) $plugins as $plugin ) {
 		$plugin = plugin_basename( trim( $plugin ) );
-		if ( ! is_plugin_active($plugin) )
+		if ( ! is_plugin_active( $plugin ) ) {
 			continue;
+		}
 
 		$network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin );
 
@@ -717,12 +758,14 @@
 			 */
 			do_action( 'deactivated_plugin', $plugin, $network_deactivating );
 		}
-	}
+	}// End foreach().
 
-	if ( $do_blog )
-		update_option('active_plugins', $current);
-	if ( $do_network )
+	if ( $do_blog ) {
+		update_option( 'active_plugins', $current );
+	}
+	if ( $do_network ) {
 		update_site_option( 'active_sitewide_plugins', $network_current );
+	}
 }
 
 /**
@@ -742,20 +785,24 @@
  * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
  */
 function activate_plugins( $plugins, $redirect = '', $network_wide = false, $silent = false ) {
-	if ( !is_array($plugins) )
-		$plugins = array($plugins);
+	if ( ! is_array( $plugins ) ) {
+		$plugins = array( $plugins );
+	}
 
 	$errors = array();
 	foreach ( $plugins as $plugin ) {
-		if ( !empty($redirect) )
-			$redirect = add_query_arg('plugin', $plugin, $redirect);
-		$result = activate_plugin($plugin, $redirect, $network_wide, $silent);
-		if ( is_wp_error($result) )
-			$errors[$plugin] = $result;
+		if ( ! empty( $redirect ) ) {
+			$redirect = add_query_arg( 'plugin', $plugin, $redirect );
+		}
+		$result = activate_plugin( $plugin, $redirect, $network_wide, $silent );
+		if ( is_wp_error( $result ) ) {
+			$errors[ $plugin ] = $result;
+		}
 	}
 
-	if ( !empty($errors) )
-		return new WP_Error('plugins_invalid', __('One of the plugins is invalid.'), $errors);
+	if ( ! empty( $errors ) ) {
+		return new WP_Error( 'plugins_invalid', __( 'One of the plugins is invalid.' ), $errors );
+	}
 
 	return true;
 }
@@ -775,24 +822,26 @@
 function delete_plugins( $plugins, $deprecated = '' ) {
 	global $wp_filesystem;
 
-	if ( empty($plugins) )
+	if ( empty( $plugins ) ) {
 		return false;
+	}
 
 	$checked = array();
-	foreach ( $plugins as $plugin )
+	foreach ( $plugins as $plugin ) {
 		$checked[] = 'checked[]=' . $plugin;
+	}
 
-	$url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-plugins');
+	$url = wp_nonce_url( 'plugins.php?action=delete-selected&verify-delete=1&' . implode( '&', $checked ), 'bulk-plugins' );
 
 	ob_start();
 	$credentials = request_filesystem_credentials( $url );
 	$data = ob_get_clean();
 
 	if ( false === $credentials ) {
-		if ( ! empty($data) ){
-			include_once( ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! empty( $data ) ) {
+			include_once( ABSPATH . 'wp-admin/admin-header.php' );
 			echo $data;
-			include( ABSPATH . 'wp-admin/admin-footer.php');
+			include( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 		}
 		return;
@@ -803,20 +852,22 @@
 		request_filesystem_credentials( $url, '', true ); // Failed to connect, Error and request again.
 		$data = ob_get_clean();
 
-		if ( ! empty($data) ){
-			include_once( ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! empty( $data ) ) {
+			include_once( ABSPATH . 'wp-admin/admin-header.php' );
 			echo $data;
-			include( ABSPATH . 'wp-admin/admin-footer.php');
+			include( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 		}
 		return;
 	}
 
-	if ( ! is_object($wp_filesystem) )
-		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
+	if ( ! is_object( $wp_filesystem ) ) {
+		return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
+	}
 
-	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
-		return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors);
+	if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+		return new WP_Error( 'fs_error', __( 'Filesystem error.' ), $wp_filesystem->errors );
+	}
 
 	// Get the base plugin folder.
 	$plugins_dir = $wp_filesystem->wp_plugins_dir();
@@ -833,7 +884,7 @@
 	foreach ( $plugins as $plugin_file ) {
 		// Run Uninstall hook.
 		if ( is_uninstallable_plugin( $plugin_file ) ) {
-			uninstall_plugin($plugin_file);
+			uninstall_plugin( $plugin_file );
 		}
 
 		/**
@@ -879,10 +930,10 @@
 				$wp_filesystem->delete( WP_LANG_DIR . '/plugins/' . $plugin_slug . '-' . $translation . '.mo' );
 			}
 		}
-	}
+	}// End foreach().
 
 	// Remove deleted plugins from the plugin updates list.
-	if ( $current = get_site_transient('update_plugins') ) {
+	if ( $current = get_site_transient( 'update_plugins' ) ) {
 		// Don't remove the plugins that weren't deleted.
 		$deleted = array_diff( $plugins, $errors );
 
@@ -893,8 +944,9 @@
 		set_site_transient( 'update_plugins', $current );
 	}
 
-	if ( ! empty($errors) )
-		return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s.'), implode(', ', $errors)) );
+	if ( ! empty( $errors ) ) {
+		return new WP_Error( 'could_not_remove_plugin', sprintf( __( 'Could not fully remove the plugin(s) %s.' ), implode( ', ', $errors ) ) );
+	}
 
 	return true;
 }
@@ -921,8 +973,9 @@
 		$plugins = array_merge( $plugins, array_keys( $network_plugins ) );
 	}
 
-	if ( empty( $plugins ) )
+	if ( empty( $plugins ) ) {
 		return array();
+	}
 
 	$invalid = array();
 
@@ -930,7 +983,7 @@
 	foreach ( $plugins as $plugin ) {
 		$result = validate_plugin( $plugin );
 		if ( is_wp_error( $result ) ) {
-			$invalid[$plugin] = $result;
+			$invalid[ $plugin ] = $result;
 			deactivate_plugins( $plugin, true );
 		}
 	}
@@ -947,15 +1000,18 @@
  * @param string $plugin Path to the main plugin file from plugins directory.
  * @return WP_Error|int 0 on success, WP_Error on failure.
  */
-function validate_plugin($plugin) {
-	if ( validate_file($plugin) )
-		return new WP_Error('plugin_invalid', __('Invalid plugin path.'));
-	if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
-		return new WP_Error('plugin_not_found', __('Plugin file does not exist.'));
+function validate_plugin( $plugin ) {
+	if ( validate_file( $plugin ) ) {
+		return new WP_Error( 'plugin_invalid', __( 'Invalid plugin path.' ) );
+	}
+	if ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin ) ) {
+		return new WP_Error( 'plugin_not_found', __( 'Plugin file does not exist.' ) );
+	}
 
 	$installed_plugins = get_plugins();
-	if ( ! isset($installed_plugins[$plugin]) )
-		return new WP_Error('no_plugin_header', __('The plugin does not have a valid header.'));
+	if ( ! isset( $installed_plugins[ $plugin ] ) ) {
+		return new WP_Error( 'no_plugin_header', __( 'The plugin does not have a valid header.' ) );
+	}
 	return 0;
 }
 
@@ -967,12 +1023,13 @@
  * @param string $plugin Path to the main plugin file from plugins directory.
  * @return bool Whether plugin can be uninstalled.
  */
-function is_uninstallable_plugin($plugin) {
-	$file = plugin_basename($plugin);
+function is_uninstallable_plugin( $plugin ) {
+	$file = plugin_basename( $plugin );
 
-	$uninstallable_plugins = (array) get_option('uninstall_plugins');
-	if ( isset( $uninstallable_plugins[$file] ) || file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) )
+	$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
+	if ( isset( $uninstallable_plugins[ $file ] ) || file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
 		return true;
+	}
 
 	return false;
 }
@@ -987,10 +1044,10 @@
  * @param string $plugin Path to the main plugin file from plugins directory.
  * @return true True if a plugin's uninstall.php file has been found and included.
  */
-function uninstall_plugin($plugin) {
-	$file = plugin_basename($plugin);
+function uninstall_plugin( $plugin ) {
+	$file = plugin_basename( $plugin );
 
-	$uninstallable_plugins = (array) get_option('uninstall_plugins');
+	$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
 
 	/**
 	 * Fires in uninstall_plugin() immediately before the plugin is uninstalled.
@@ -1002,25 +1059,25 @@
 	 */
 	do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );
 
-	if ( file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) {
-		if ( isset( $uninstallable_plugins[$file] ) ) {
-			unset($uninstallable_plugins[$file]);
-			update_option('uninstall_plugins', $uninstallable_plugins);
+	if ( file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
+		if ( isset( $uninstallable_plugins[ $file ] ) ) {
+			unset( $uninstallable_plugins[ $file ] );
+			update_option( 'uninstall_plugins', $uninstallable_plugins );
 		}
-		unset($uninstallable_plugins);
+		unset( $uninstallable_plugins );
 
-		define('WP_UNINSTALL_PLUGIN', $file);
+		define( 'WP_UNINSTALL_PLUGIN', $file );
 		wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
-		include( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' );
+		include( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' );
 
 		return true;
 	}
 
-	if ( isset( $uninstallable_plugins[$file] ) ) {
-		$callable = $uninstallable_plugins[$file];
-		unset($uninstallable_plugins[$file]);
-		update_option('uninstall_plugins', $uninstallable_plugins);
-		unset($uninstallable_plugins);
+	if ( isset( $uninstallable_plugins[ $file ] ) ) {
+		$callable = $uninstallable_plugins[ $file ];
+		unset( $uninstallable_plugins[ $file ] );
+		update_option( 'uninstall_plugins', $uninstallable_plugins );
+		unset( $uninstallable_plugins );
 
 		wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
 		include( WP_PLUGIN_DIR . '/' . $file );
@@ -1076,14 +1133,15 @@
 
 	$menu_slug = plugin_basename( $menu_slug );
 
-	$admin_page_hooks[$menu_slug] = sanitize_title( $menu_title );
+	$admin_page_hooks[ $menu_slug ] = sanitize_title( $menu_title );
 
 	$hookname = get_plugin_page_hookname( $menu_slug, '' );
 
-	if ( !empty( $function ) && !empty( $hookname ) && current_user_can( $capability ) )
+	if ( ! empty( $function ) && ! empty( $hookname ) && current_user_can( $capability ) ) {
 		add_action( $hookname, $function );
+	}
 
-	if ( empty($icon_url) ) {
+	if ( empty( $icon_url ) ) {
 		$icon_url = 'dashicons-admin-generic';
 		$icon_class = 'menu-icon-generic ';
 	} else {
@@ -1096,16 +1154,16 @@
 	if ( null === $position ) {
 		$menu[] = $new_menu;
 	} elseif ( isset( $menu[ "$position" ] ) ) {
-	 	$position = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ) , -5 ) * 0.00001;
+		 $position = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ) , -5 ) * 0.00001;
 		$menu[ "$position" ] = $new_menu;
 	} else {
 		$menu[ $position ] = $new_menu;
 	}
 
-	$_registered_pages[$hookname] = true;
+	$_registered_pages[ $hookname ] = true;
 
 	// No parent as top level
-	$_parent_pages[$menu_slug] = false;
+	$_parent_pages[ $menu_slug ] = false;
 
 	return $hookname;
 }
@@ -1139,13 +1197,14 @@
 		$_registered_pages, $_parent_pages;
 
 	$menu_slug = plugin_basename( $menu_slug );
-	$parent_slug = plugin_basename( $parent_slug);
+	$parent_slug = plugin_basename( $parent_slug );
 
-	if ( isset( $_wp_real_parent_file[$parent_slug] ) )
-		$parent_slug = $_wp_real_parent_file[$parent_slug];
+	if ( isset( $_wp_real_parent_file[ $parent_slug ] ) ) {
+		$parent_slug = $_wp_real_parent_file[ $parent_slug ];
+	}
 
-	if ( !current_user_can( $capability ) ) {
-		$_wp_submenu_nopriv[$parent_slug][$menu_slug] = true;
+	if ( ! current_user_can( $capability ) ) {
+		$_wp_submenu_nopriv[ $parent_slug ][ $menu_slug ] = true;
 		return false;
 	}
 
@@ -1155,30 +1214,33 @@
 	 * parent file someone is trying to link back to the parent manually. In
 	 * this case, don't automatically add a link back to avoid duplication.
 	 */
-	if (!isset( $submenu[$parent_slug] ) && $menu_slug != $parent_slug ) {
-		foreach ( (array)$menu as $parent_menu ) {
-			if ( $parent_menu[2] == $parent_slug && current_user_can( $parent_menu[1] ) )
-				$submenu[$parent_slug][] = array_slice( $parent_menu, 0, 4 );
+	if ( ! isset( $submenu[ $parent_slug ] ) && $menu_slug != $parent_slug ) {
+		foreach ( (array) $menu as $parent_menu ) {
+			if ( $parent_menu[2] == $parent_slug && current_user_can( $parent_menu[1] ) ) {
+				$submenu[ $parent_slug ][] = array_slice( $parent_menu, 0, 4 );
+			}
 		}
 	}
 
-	$submenu[$parent_slug][] = array ( $menu_title, $capability, $menu_slug, $page_title );
+	$submenu[ $parent_slug ][] = array( $menu_title, $capability, $menu_slug, $page_title );
 
-	$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug);
-	if (!empty ( $function ) && !empty ( $hookname ))
+	$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
+	if ( ! empty( $function ) && ! empty( $hookname ) ) {
 		add_action( $hookname, $function );
+	}
 
-	$_registered_pages[$hookname] = true;
+	$_registered_pages[ $hookname ] = true;
 
 	/*
 	 * Backward-compatibility for plugins using add_management page.
 	 * See wp-admin/admin.php for redirect from edit.php to tools.php
 	 */
-	if ( 'tools.php' == $parent_slug )
-		$_registered_pages[get_plugin_page_hookname( $menu_slug, 'edit.php')] = true;
+	if ( 'tools.php' == $parent_slug ) {
+		$_registered_pages[ get_plugin_page_hookname( $menu_slug, 'edit.php' ) ] = true;
+	}
 
 	// No parent as top level.
-	$_parent_pages[$menu_slug] = $parent_slug;
+	$_parent_pages[ $menu_slug ] = $parent_slug;
 
 	return $hookname;
 }
@@ -1280,10 +1342,10 @@
  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
  */
 function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
-	if ( current_user_can('edit_users') )
+	if ( current_user_can( 'edit_users' ) ) {
 		$parent = 'users.php';
-	else
-		$parent = 'profile.php';
+	} else { $parent = 'profile.php';
+	}
 	return add_submenu_page( $parent, $page_title, $menu_title, $capability, $menu_slug, $function );
 }
 /**
@@ -1421,7 +1483,7 @@
 
 	foreach ( $menu as $i => $item ) {
 		if ( $menu_slug == $item[2] ) {
-			unset( $menu[$i] );
+			unset( $menu[ $i ] );
 			return $item;
 		}
 	}
@@ -1443,12 +1505,13 @@
 function remove_submenu_page( $menu_slug, $submenu_slug ) {
 	global $submenu;
 
-	if ( !isset( $submenu[$menu_slug] ) )
+	if ( ! isset( $submenu[ $menu_slug ] ) ) {
 		return false;
+	}
 
-	foreach ( $submenu[$menu_slug] as $i => $item ) {
+	foreach ( $submenu[ $menu_slug ] as $i => $item ) {
 		if ( $submenu_slug == $item[2] ) {
-			unset( $submenu[$menu_slug][$i] );
+			unset( $submenu[ $menu_slug ][ $i ] );
 			return $item;
 		}
 	}
@@ -1469,12 +1532,12 @@
  * @param bool $echo Whether or not to echo the url - default is true
  * @return string the url
  */
-function menu_page_url($menu_slug, $echo = true) {
+function menu_page_url( $menu_slug, $echo = true ) {
 	global $_parent_pages;
 
-	if ( isset( $_parent_pages[$menu_slug] ) ) {
-		$parent_slug = $_parent_pages[$menu_slug];
-		if ( $parent_slug && ! isset( $_parent_pages[$parent_slug] ) ) {
+	if ( isset( $_parent_pages[ $menu_slug ] ) ) {
+		$parent_slug = $_parent_pages[ $menu_slug ];
+		if ( $parent_slug && ! isset( $_parent_pages[ $parent_slug ] ) ) {
 			$url = admin_url( add_query_arg( 'page', $menu_slug, $parent_slug ) );
 		} else {
 			$url = admin_url( 'admin.php?page=' . $menu_slug );
@@ -1483,10 +1546,11 @@
 		$url = '';
 	}
 
-	$url = esc_url($url);
+	$url = esc_url( $url );
 
-	if ( $echo )
+	if ( $echo ) {
 		echo $url;
+	}
 
 	return $url;
 }
@@ -1510,44 +1574,49 @@
 	global $parent_file, $menu, $submenu, $pagenow, $typenow,
 		$plugin_page, $_wp_real_parent_file, $_wp_menu_nopriv, $_wp_submenu_nopriv;
 
-	if ( !empty ( $parent ) && 'admin.php' != $parent ) {
-		if ( isset( $_wp_real_parent_file[$parent] ) )
-			$parent = $_wp_real_parent_file[$parent];
+	if ( ! empty( $parent ) && 'admin.php' != $parent ) {
+		if ( isset( $_wp_real_parent_file[ $parent ] ) ) {
+			$parent = $_wp_real_parent_file[ $parent ];
+		}
 		return $parent;
 	}
 
 	if ( $pagenow == 'admin.php' && isset( $plugin_page ) ) {
-		foreach ( (array)$menu as $parent_menu ) {
+		foreach ( (array) $menu as $parent_menu ) {
 			if ( $parent_menu[2] == $plugin_page ) {
 				$parent_file = $plugin_page;
-				if ( isset( $_wp_real_parent_file[$parent_file] ) )
-					$parent_file = $_wp_real_parent_file[$parent_file];
+				if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) {
+					$parent_file = $_wp_real_parent_file[ $parent_file ];
+				}
 				return $parent_file;
 			}
 		}
-		if ( isset( $_wp_menu_nopriv[$plugin_page] ) ) {
+		if ( isset( $_wp_menu_nopriv[ $plugin_page ] ) ) {
 			$parent_file = $plugin_page;
-			if ( isset( $_wp_real_parent_file[$parent_file] ) )
-					$parent_file = $_wp_real_parent_file[$parent_file];
+			if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) {
+					$parent_file = $_wp_real_parent_file[ $parent_file ];
+			}
 			return $parent_file;
 		}
 	}
 
-	if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) ) {
+	if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[ $pagenow ][ $plugin_page ] ) ) {
 		$parent_file = $pagenow;
-		if ( isset( $_wp_real_parent_file[$parent_file] ) )
-			$parent_file = $_wp_real_parent_file[$parent_file];
+		if ( isset( $_wp_real_parent_file[ $parent_file ] ) ) {
+			$parent_file = $_wp_real_parent_file[ $parent_file ];
+		}
 		return $parent_file;
 	}
 
-	foreach (array_keys( (array)$submenu ) as $parent) {
-		foreach ( $submenu[$parent] as $submenu_array ) {
-			if ( isset( $_wp_real_parent_file[$parent] ) )
-				$parent = $_wp_real_parent_file[$parent];
-			if ( !empty($typenow) && ($submenu_array[2] == "$pagenow?post_type=$typenow") ) {
+	foreach ( array_keys( (array) $submenu ) as $parent ) {
+		foreach ( $submenu[ $parent ] as $submenu_array ) {
+			if ( isset( $_wp_real_parent_file[ $parent ] ) ) {
+				$parent = $_wp_real_parent_file[ $parent ];
+			}
+			if ( ! empty( $typenow ) && ($submenu_array[2] == "$pagenow?post_type=$typenow") ) {
 				$parent_file = $parent;
 				return $parent;
-			} elseif ( $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) {
+			} elseif ( $submenu_array[2] == $pagenow && empty( $typenow ) && ( empty( $parent_file ) || false === strpos( $parent_file, '?' ) ) ) {
 				$parent_file = $parent;
 				return $parent;
 			} elseif ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) {
@@ -1557,8 +1626,9 @@
 		}
 	}
 
-	if ( empty($parent_file) )
+	if ( empty( $parent_file ) ) {
 		$parent_file = '';
+	}
 	return '';
 }
 
@@ -1574,15 +1644,16 @@
 function get_admin_page_title() {
 	global $title, $menu, $submenu, $pagenow, $plugin_page, $typenow;
 
-	if ( ! empty ( $title ) )
+	if ( ! empty( $title ) ) {
 		return $title;
+	}
 
 	$hook = get_plugin_page_hook( $plugin_page, $pagenow );
 
 	$parent = $parent1 = get_admin_page_parent();
 
-	if ( empty ( $parent) ) {
-		foreach ( (array)$menu as $menu_array ) {
+	if ( empty( $parent ) ) {
+		foreach ( (array) $menu as $menu_array ) {
 			if ( isset( $menu_array[3] ) ) {
 				if ( $menu_array[2] == $pagenow ) {
 					$title = $menu_array[3];
@@ -1598,7 +1669,7 @@
 		}
 	} else {
 		foreach ( array_keys( $submenu ) as $parent ) {
-			foreach ( $submenu[$parent] as $submenu_array ) {
+			foreach ( $submenu[ $parent ] as $submenu_array ) {
 				if ( isset( $plugin_page ) &&
 					( $plugin_page == $submenu_array[2] ) &&
 					(
@@ -1606,15 +1677,16 @@
 						( $parent == $plugin_page ) ||
 						( $plugin_page == $hook ) ||
 						( $pagenow == 'admin.php' && $parent1 != $submenu_array[2] ) ||
-						( !empty($typenow) && $parent == $pagenow . '?post_type=' . $typenow)
+						( ! empty( $typenow ) && $parent == $pagenow . '?post_type=' . $typenow)
 					)
 					) {
 						$title = $submenu_array[3];
 						return $submenu_array[3];
-					}
+				}
 
-				if ( $submenu_array[2] != $pagenow || isset( $_GET['page'] ) ) // not the current page
+				if ( $submenu_array[2] != $pagenow || isset( $_GET['page'] ) ) { // not the current page
 					continue;
+				}
 
 				if ( isset( $submenu_array[3] ) ) {
 					$title = $submenu_array[3];
@@ -1625,19 +1697,18 @@
 				}
 			}
 		}
-		if ( empty ( $title ) ) {
+		if ( empty( $title ) ) {
 			foreach ( $menu as $menu_array ) {
 				if ( isset( $plugin_page ) &&
 					( $plugin_page == $menu_array[2] ) &&
 					( $pagenow == 'admin.php' ) &&
-					( $parent1 == $menu_array[2] ) )
-					{
+					( $parent1 == $menu_array[2] ) ) {
 						$title = $menu_array[3];
 						return $menu_array[3];
-					}
+				}
 			}
 		}
-	}
+	}// End if().
 
 	return $title;
 }
@@ -1651,10 +1722,10 @@
  */
 function get_plugin_page_hook( $plugin_page, $parent_page ) {
 	$hook = get_plugin_page_hookname( $plugin_page, $parent_page );
-	if ( has_action($hook) )
+	if ( has_action( $hook ) ) {
 		return $hook;
-	else
-		return null;
+	} else { return null;
+	}
 }
 
 /**
@@ -1669,14 +1740,14 @@
 	$parent = get_admin_page_parent( $parent_page );
 
 	$page_type = 'admin';
-	if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) {
-		if ( isset( $admin_page_hooks[$plugin_page] ) ) {
+	if ( empty( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[ $plugin_page ] ) ) {
+		if ( isset( $admin_page_hooks[ $plugin_page ] ) ) {
 			$page_type = 'toplevel';
-		} elseif ( isset( $admin_page_hooks[$parent] )) {
-			$page_type = $admin_page_hooks[$parent];
+		} elseif ( isset( $admin_page_hooks[ $parent ] ) ) {
+			$page_type = $admin_page_hooks[ $parent ];
 		}
-	} elseif ( isset( $admin_page_hooks[$parent] ) ) {
-		$page_type = $admin_page_hooks[$parent];
+	} elseif ( isset( $admin_page_hooks[ $parent ] ) ) {
+		$page_type = $admin_page_hooks[ $parent ];
 	}
 
 	$plugin_name = preg_replace( '!\.php!', '', $plugin_page );
@@ -1700,62 +1771,72 @@
 
 	$parent = get_admin_page_parent();
 
-	if ( !isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$pagenow] ) )
+	if ( ! isset( $plugin_page ) && isset( $_wp_submenu_nopriv[ $parent ][ $pagenow ] ) ) {
 		return false;
+	}
 
 	if ( isset( $plugin_page ) ) {
-		if ( isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) )
+		if ( isset( $_wp_submenu_nopriv[ $parent ][ $plugin_page ] ) ) {
 			return false;
+		}
 
-		$hookname = get_plugin_page_hookname($plugin_page, $parent);
+		$hookname = get_plugin_page_hookname( $plugin_page, $parent );
 
-		if ( !isset($_registered_pages[$hookname]) )
+		if ( ! isset( $_registered_pages[ $hookname ] ) ) {
 			return false;
+		}
 	}
 
-	if ( empty( $parent) ) {
-		if ( isset( $_wp_menu_nopriv[$pagenow] ) )
+	if ( empty( $parent ) ) {
+		if ( isset( $_wp_menu_nopriv[ $pagenow ] ) ) {
 			return false;
-		if ( isset( $_wp_submenu_nopriv[$pagenow][$pagenow] ) )
+		}
+		if ( isset( $_wp_submenu_nopriv[ $pagenow ][ $pagenow ] ) ) {
 			return false;
-		if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$pagenow][$plugin_page] ) )
+		}
+		if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[ $pagenow ][ $plugin_page ] ) ) {
 			return false;
-		if ( isset( $plugin_page ) && isset( $_wp_menu_nopriv[$plugin_page] ) )
+		}
+		if ( isset( $plugin_page ) && isset( $_wp_menu_nopriv[ $plugin_page ] ) ) {
 			return false;
-		foreach (array_keys( $_wp_submenu_nopriv ) as $key ) {
-			if ( isset( $_wp_submenu_nopriv[$key][$pagenow] ) )
+		}
+		foreach ( array_keys( $_wp_submenu_nopriv ) as $key ) {
+			if ( isset( $_wp_submenu_nopriv[ $key ][ $pagenow ] ) ) {
 				return false;
-			if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$key][$plugin_page] ) )
-			return false;
+			}
+			if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[ $key ][ $plugin_page ] ) ) {
+				return false;
+			}
 		}
 		return true;
 	}
 
-	if ( isset( $plugin_page ) && ( $plugin_page == $parent ) && isset( $_wp_menu_nopriv[$plugin_page] ) )
+	if ( isset( $plugin_page ) && ( $plugin_page == $parent ) && isset( $_wp_menu_nopriv[ $plugin_page ] ) ) {
 		return false;
+	}
 
-	if ( isset( $submenu[$parent] ) ) {
-		foreach ( $submenu[$parent] as $submenu_array ) {
+	if ( isset( $submenu[ $parent ] ) ) {
+		foreach ( $submenu[ $parent ] as $submenu_array ) {
 			if ( isset( $plugin_page ) && ( $submenu_array[2] == $plugin_page ) ) {
-				if ( current_user_can( $submenu_array[1] ))
+				if ( current_user_can( $submenu_array[1] ) ) {
 					return true;
-				else
-					return false;
+				} else { return false;
+				}
 			} elseif ( $submenu_array[2] == $pagenow ) {
-				if ( current_user_can( $submenu_array[1] ))
+				if ( current_user_can( $submenu_array[1] ) ) {
 					return true;
-				else
-					return false;
+				} else { return false;
+				}
 			}
 		}
 	}
 
 	foreach ( $menu as $menu_array ) {
-		if ( $menu_array[2] == $parent) {
-			if ( current_user_can( $menu_array[1] ))
+		if ( $menu_array[2] == $parent ) {
+			if ( current_user_can( $menu_array[1] ) ) {
 				return true;
-			else
-				return false;
+			} else { return false;
+			}
 		}
 	}
 
@@ -1779,8 +1860,9 @@
 function option_update_filter( $options ) {
 	global $new_whitelist_options;
 
-	if ( is_array( $new_whitelist_options ) )
+	if ( is_array( $new_whitelist_options ) ) {
 		$options = add_option_whitelist( $new_whitelist_options, $options );
+	}
 
 	return $options;
 }
@@ -1797,20 +1879,21 @@
  * @return array
  */
 function add_option_whitelist( $new_options, $options = '' ) {
-	if ( $options == '' )
+	if ( $options == '' ) {
 		global $whitelist_options;
-	else
-		$whitelist_options = $options;
+	} else { $whitelist_options = $options;
+	}
 
 	foreach ( $new_options as $page => $keys ) {
 		foreach ( $keys as $key ) {
-			if ( !isset($whitelist_options[ $page ]) || !is_array($whitelist_options[ $page ]) ) {
+			if ( ! isset( $whitelist_options[ $page ] ) || ! is_array( $whitelist_options[ $page ] ) ) {
 				$whitelist_options[ $page ] = array();
 				$whitelist_options[ $page ][] = $key;
 			} else {
 				$pos = array_search( $key, $whitelist_options[ $page ] );
-				if ( $pos === false )
+				if ( $pos === false ) {
 					$whitelist_options[ $page ][] = $key;
+				}
 			}
 		}
 	}
@@ -1830,17 +1913,18 @@
  * @return array
  */
 function remove_option_whitelist( $del_options, $options = '' ) {
-	if ( $options == '' )
+	if ( $options == '' ) {
 		global $whitelist_options;
-	else
-		$whitelist_options = $options;
+	} else { $whitelist_options = $options;
+	}
 
 	foreach ( $del_options as $page => $keys ) {
 		foreach ( $keys as $key ) {
-			if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) {
+			if ( isset( $whitelist_options[ $page ] ) && is_array( $whitelist_options[ $page ] ) ) {
 				$pos = array_search( $key, $whitelist_options[ $page ] );
-				if ( $pos !== false )
+				if ( $pos !== false ) {
 					unset( $whitelist_options[ $page ][ $pos ] );
+				}
 			}
 		}
 	}
@@ -1855,10 +1939,10 @@
  *
  * @param string $option_group A settings group name. This should match the group name used in register_setting().
  */
-function settings_fields($option_group) {
-	echo "<input type='hidden' name='option_page' value='" . esc_attr($option_group) . "' />";
+function settings_fields( $option_group ) {
+	echo "<input type='hidden' name='option_page' value='" . esc_attr( $option_group ) . "' />";
 	echo '<input type="hidden" name="action" value="update" />';
-	wp_nonce_field("$option_group-options");
+	wp_nonce_field( "$option_group-options" );
 }
 
 /**
@@ -1869,8 +1953,9 @@
  * @param bool $clear_update_cache Whether to clear the Plugin updates cache
  */
 function wp_clean_plugins_cache( $clear_update_cache = true ) {
-	if ( $clear_update_cache )
+	if ( $clear_update_cache ) {
 		delete_site_transient( 'update_plugins' );
+	}
 	wp_cache_delete( 'plugins', 'plugins' );
 }
 
Index: src/wp-admin/includes/post.php
===================================================================
--- src/wp-admin/includes/post.php	(revision 40901)
+++ src/wp-admin/includes/post.php	(working copy)
@@ -20,44 +20,50 @@
  */
 function _wp_translate_postdata( $update = false, $post_data = null ) {
 
-	if ( empty($post_data) )
+	if ( empty( $post_data ) ) {
 		$post_data = &$_POST;
+	}
 
-	if ( $update )
+	if ( $update ) {
 		$post_data['ID'] = (int) $post_data['post_ID'];
+	}
 
 	$ptype = get_post_type_object( $post_data['post_type'] );
 
 	if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) {
-		if ( 'page' == $post_data['post_type'] )
+		if ( 'page' == $post_data['post_type'] ) {
 			return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
-		else
-			return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
+		} else { return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
+		}
 	} elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) {
-		if ( 'page' == $post_data['post_type'] )
+		if ( 'page' == $post_data['post_type'] ) {
 			return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
-		else
-			return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
+		} else { return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
+		}
 	}
 
-	if ( isset( $post_data['content'] ) )
+	if ( isset( $post_data['content'] ) ) {
 		$post_data['post_content'] = $post_data['content'];
+	}
 
-	if ( isset( $post_data['excerpt'] ) )
+	if ( isset( $post_data['excerpt'] ) ) {
 		$post_data['post_excerpt'] = $post_data['excerpt'];
+	}
 
-	if ( isset( $post_data['parent_id'] ) )
+	if ( isset( $post_data['parent_id'] ) ) {
 		$post_data['post_parent'] = (int) $post_data['parent_id'];
+	}
 
-	if ( isset($post_data['trackback_url']) )
+	if ( isset( $post_data['trackback_url'] ) ) {
 		$post_data['to_ping'] = $post_data['trackback_url'];
+	}
 
 	$post_data['user_ID'] = get_current_user_id();
 
-	if (!empty ( $post_data['post_author_override'] ) ) {
+	if ( ! empty( $post_data['post_author_override'] ) ) {
 		$post_data['post_author'] = (int) $post_data['post_author_override'];
 	} else {
-		if (!empty ( $post_data['post_author'] ) ) {
+		if ( ! empty( $post_data['post_author'] ) ) {
 			$post_data['post_author'] = (int) $post_data['post_author'];
 		} else {
 			$post_data['post_author'] = (int) $post_data['user_ID'];
@@ -67,15 +73,15 @@
 	if ( isset( $post_data['user_ID'] ) && ( $post_data['post_author'] != $post_data['user_ID'] )
 		 && ! current_user_can( $ptype->cap->edit_others_posts ) ) {
 		if ( $update ) {
-			if ( 'page' == $post_data['post_type'] )
+			if ( 'page' == $post_data['post_type'] ) {
 				return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
-			else
-				return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
+			} else { return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
+			}
 		} else {
-			if ( 'page' == $post_data['post_type'] )
+			if ( 'page' == $post_data['post_type'] ) {
 				return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
-			else
-				return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
+			} else { return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
+			}
 		}
 	}
 
@@ -93,21 +99,26 @@
 	}
 
 	// What to do based on which button they pressed
-	if ( isset($post_data['saveasdraft']) && '' != $post_data['saveasdraft'] )
+	if ( isset( $post_data['saveasdraft'] ) && '' != $post_data['saveasdraft'] ) {
 		$post_data['post_status'] = 'draft';
-	if ( isset($post_data['saveasprivate']) && '' != $post_data['saveasprivate'] )
+	}
+	if ( isset( $post_data['saveasprivate'] ) && '' != $post_data['saveasprivate'] ) {
 		$post_data['post_status'] = 'private';
-	if ( isset($post_data['publish']) && ( '' != $post_data['publish'] ) && ( !isset($post_data['post_status']) || $post_data['post_status'] != 'private' ) )
+	}
+	if ( isset( $post_data['publish'] ) && ( '' != $post_data['publish'] ) && ( ! isset( $post_data['post_status'] ) || $post_data['post_status'] != 'private' ) ) {
 		$post_data['post_status'] = 'publish';
-	if ( isset($post_data['advanced']) && '' != $post_data['advanced'] )
+	}
+	if ( isset( $post_data['advanced'] ) && '' != $post_data['advanced'] ) {
 		$post_data['post_status'] = 'draft';
-	if ( isset($post_data['pending']) && '' != $post_data['pending'] )
+	}
+	if ( isset( $post_data['pending'] ) && '' != $post_data['pending'] ) {
 		$post_data['post_status'] = 'pending';
+	}
 
-	if ( isset( $post_data['ID'] ) )
+	if ( isset( $post_data['ID'] ) ) {
 		$post_id = $post_data['ID'];
-	else
-		$post_id = false;
+	} else { $post_id = false;
+	}
 	$previous_status = $post_id ? get_post_field( 'post_status', $post_id ) : false;
 
 	if ( isset( $post_data['post_status'] ) && 'private' == $post_data['post_status'] && ! current_user_can( $ptype->cap->publish_posts ) ) {
@@ -118,9 +129,11 @@
 
 	// Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
 	// Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts.
-	if ( isset($post_data['post_status']) && (in_array( $post_data['post_status'], $published_statuses ) && !current_user_can( $ptype->cap->publish_posts )) )
-		if ( ! in_array( $previous_status, $published_statuses ) || !current_user_can( 'edit_post', $post_id ) )
+	if ( isset( $post_data['post_status'] ) && (in_array( $post_data['post_status'], $published_statuses ) && ! current_user_can( $ptype->cap->publish_posts )) ) {
+		if ( ! in_array( $previous_status, $published_statuses ) || ! current_user_can( 'edit_post', $post_id ) ) {
 			$post_data['post_status'] = 'pending';
+		}
+	}
 
 	if ( ! isset( $post_data['post_status'] ) ) {
 		$post_data['post_status'] = 'auto-draft' === $previous_status ? 'draft' : $previous_status;
@@ -130,36 +143,38 @@
 		unset( $post_data['post_password'] );
 	}
 
-	if (!isset( $post_data['comment_status'] ))
+	if ( ! isset( $post_data['comment_status'] ) ) {
 		$post_data['comment_status'] = 'closed';
+	}
 
-	if (!isset( $post_data['ping_status'] ))
+	if ( ! isset( $post_data['ping_status'] ) ) {
 		$post_data['ping_status'] = 'closed';
+	}
 
-	foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
-		if ( !empty( $post_data['hidden_' . $timeunit] ) && $post_data['hidden_' . $timeunit] != $post_data[$timeunit] ) {
+	foreach ( array( 'aa', 'mm', 'jj', 'hh', 'mn' ) as $timeunit ) {
+		if ( ! empty( $post_data[ 'hidden_' . $timeunit ] ) && $post_data[ 'hidden_' . $timeunit ] != $post_data[ $timeunit ] ) {
 			$post_data['edit_date'] = '1';
 			break;
 		}
 	}
 
-	if ( !empty( $post_data['edit_date'] ) ) {
+	if ( ! empty( $post_data['edit_date'] ) ) {
 		$aa = $post_data['aa'];
 		$mm = $post_data['mm'];
 		$jj = $post_data['jj'];
 		$hh = $post_data['hh'];
 		$mn = $post_data['mn'];
 		$ss = $post_data['ss'];
-		$aa = ($aa <= 0 ) ? date('Y') : $aa;
-		$mm = ($mm <= 0 ) ? date('n') : $mm;
+		$aa = ($aa <= 0 ) ? date( 'Y' ) : $aa;
+		$mm = ($mm <= 0 ) ? date( 'n' ) : $mm;
 		$jj = ($jj > 31 ) ? 31 : $jj;
-		$jj = ($jj <= 0 ) ? date('j') : $jj;
+		$jj = ($jj <= 0 ) ? date( 'j' ) : $jj;
 		$hh = ($hh > 23 ) ? $hh -24 : $hh;
 		$mn = ($mn > 59 ) ? $mn -60 : $mn;
 		$ss = ($ss > 59 ) ? $ss -60 : $ss;
-		$post_data['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss );
+		$post_data['post_date'] = sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $aa, $mm, $jj, $hh, $mn, $ss );
 		$valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] );
-		if ( !$valid_date ) {
+		if ( ! $valid_date ) {
 			return new WP_Error( 'invalid_date', __( 'Invalid date.' ) );
 		}
 		$post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
@@ -188,8 +203,9 @@
 function edit_post( $post_data = null ) {
 	global $wpdb;
 
-	if ( empty($post_data) )
+	if ( empty( $post_data ) ) {
 		$post_data = &$_POST;
+	}
 
 	// Clear out any data in internal vars.
 	unset( $post_data['filter'] );
@@ -207,24 +223,28 @@
 		}
 	}
 
-	$ptype = get_post_type_object($post_data['post_type']);
-	if ( !current_user_can( 'edit_post', $post_ID ) ) {
-		if ( 'page' == $post_data['post_type'] )
-			wp_die( __('Sorry, you are not allowed to edit this page.' ));
-		else
-			wp_die( __('Sorry, you are not allowed to edit this post.' ));
+	$ptype = get_post_type_object( $post_data['post_type'] );
+	if ( ! current_user_can( 'edit_post', $post_ID ) ) {
+		if ( 'page' == $post_data['post_type'] ) {
+			wp_die( __( 'Sorry, you are not allowed to edit this page.' ) );
+		} else { wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
+		}
 	}
 
 	if ( post_type_supports( $ptype->name, 'revisions' ) ) {
-		$revisions = wp_get_post_revisions( $post_ID, array( 'order' => 'ASC', 'posts_per_page' => 1 ) );
+		$revisions = wp_get_post_revisions( $post_ID, array(
+			'order' => 'ASC',
+			'posts_per_page' => 1,
+		) );
 		$revision = current( $revisions );
 
 		// Check if the revisions have been upgraded
-		if ( $revisions && _wp_get_post_revision_version( $revision ) < 1 )
+		if ( $revisions && _wp_get_post_revision_version( $revision ) < 1 ) {
 			_wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) );
+		}
 	}
 
-	if ( isset($post_data['visibility']) ) {
+	if ( isset( $post_data['visibility'] ) ) {
 		switch ( $post_data['visibility'] ) {
 			case 'public' :
 				$post_data['post_password'] = '';
@@ -241,18 +261,21 @@
 	}
 
 	$post_data = _wp_translate_postdata( true, $post_data );
-	if ( is_wp_error($post_data) )
+	if ( is_wp_error( $post_data ) ) {
 		wp_die( $post_data->get_error_message() );
+	}
 
 	// Post Formats
-	if ( isset( $post_data['post_format'] ) )
+	if ( isset( $post_data['post_format'] ) ) {
 		set_post_format( $post_ID, $post_data['post_format'] );
+	}
 
 	$format_meta_urls = array( 'url', 'link_url', 'quote_source_url' );
 	foreach ( $format_meta_urls as $format_meta_url ) {
 		$keyed = '_format_' . $format_meta_url;
-		if ( isset( $post_data[ $keyed ] ) )
+		if ( isset( $post_data[ $keyed ] ) ) {
 			update_post_meta( $post_ID, $keyed, wp_slash( esc_url_raw( wp_unslash( $post_data[ $keyed ] ) ) ) );
+		}
 	}
 
 	$format_keys = array( 'quote', 'quote_source_name', 'image', 'gallery', 'audio_embed', 'video_embed' );
@@ -260,10 +283,10 @@
 	foreach ( $format_keys as $key ) {
 		$keyed = '_format_' . $key;
 		if ( isset( $post_data[ $keyed ] ) ) {
-			if ( current_user_can( 'unfiltered_html' ) )
+			if ( current_user_can( 'unfiltered_html' ) ) {
 				update_post_meta( $post_ID, $keyed, $post_data[ $keyed ] );
-			else
-				update_post_meta( $post_ID, $keyed, wp_filter_post_kses( $post_data[ $keyed ] ) );
+			} else { update_post_meta( $post_ID, $keyed, wp_filter_post_kses( $post_data[ $keyed ] ) );
+			}
 		}
 	}
 
@@ -282,35 +305,42 @@
 	}
 
 	// Meta Stuff
-	if ( isset($post_data['meta']) && $post_data['meta'] ) {
+	if ( isset( $post_data['meta'] ) && $post_data['meta'] ) {
 		foreach ( $post_data['meta'] as $key => $value ) {
-			if ( !$meta = get_post_meta_by_id( $key ) )
+			if ( ! $meta = get_post_meta_by_id( $key ) ) {
 				continue;
-			if ( $meta->post_id != $post_ID )
+			}
+			if ( $meta->post_id != $post_ID ) {
 				continue;
-			if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $meta->meta_key ) )
+			}
+			if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $meta->meta_key ) ) {
 				continue;
-			if ( is_protected_meta( $value['key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $value['key'] ) )
+			}
+			if ( is_protected_meta( $value['key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $value['key'] ) ) {
 				continue;
+			}
 			update_meta( $key, $value['key'], $value['value'] );
 		}
 	}
 
-	if ( isset($post_data['deletemeta']) && $post_data['deletemeta'] ) {
+	if ( isset( $post_data['deletemeta'] ) && $post_data['deletemeta'] ) {
 		foreach ( $post_data['deletemeta'] as $key => $value ) {
-			if ( !$meta = get_post_meta_by_id( $key ) )
+			if ( ! $meta = get_post_meta_by_id( $key ) ) {
 				continue;
-			if ( $meta->post_id != $post_ID )
+			}
+			if ( $meta->post_id != $post_ID ) {
 				continue;
-			if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $post_ID, $meta->meta_key ) )
+			}
+			if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $post_ID, $meta->meta_key ) ) {
 				continue;
+			}
 			delete_meta( $key );
 		}
 	}
 
 	// Attachment stuff
 	if ( 'attachment' == $post_data['post_type'] ) {
-		if ( isset( $post_data[ '_wp_attachment_image_alt' ] ) ) {
+		if ( isset( $post_data['_wp_attachment_image_alt'] ) ) {
 			$image_alt = wp_unslash( $post_data['_wp_attachment_image_alt'] );
 			if ( $image_alt != get_post_meta( $post_ID, '_wp_attachment_image_alt', true ) ) {
 				$image_alt = wp_strip_all_tags( $image_alt, true );
@@ -368,8 +398,8 @@
 			}
 
 			$post_data['tax_input'][ $taxonomy ] = $clean_terms;
-		}
-	}
+		}// End foreach().
+	}// End if().
 
 	add_meta( $post_ID );
 
@@ -395,10 +425,10 @@
 	wp_set_post_lock( $post_ID );
 
 	if ( current_user_can( $ptype->cap->edit_others_posts ) && current_user_can( $ptype->cap->publish_posts ) ) {
-		if ( ! empty( $post_data['sticky'] ) )
+		if ( ! empty( $post_data['sticky'] ) ) {
 			stick_post( $post_ID );
-		else
-			unstick_post( $post_ID );
+		} else { unstick_post( $post_ID );
+		}
 	}
 
 	return $post_ID;
@@ -420,28 +450,29 @@
 function bulk_edit_posts( $post_data = null ) {
 	global $wpdb;
 
-	if ( empty($post_data) )
+	if ( empty( $post_data ) ) {
 		$post_data = &$_POST;
+	}
 
-	if ( isset($post_data['post_type']) )
-		$ptype = get_post_type_object($post_data['post_type']);
-	else
-		$ptype = get_post_type_object('post');
-
-	if ( !current_user_can( $ptype->cap->edit_posts ) ) {
-		if ( 'page' == $ptype->name )
-			wp_die( __('Sorry, you are not allowed to edit pages.'));
-		else
-			wp_die( __('Sorry, you are not allowed to edit posts.'));
+	if ( isset( $post_data['post_type'] ) ) {
+		$ptype = get_post_type_object( $post_data['post_type'] );
+	} else { $ptype = get_post_type_object( 'post' );
+	}
+
+	if ( ! current_user_can( $ptype->cap->edit_posts ) ) {
+		if ( 'page' == $ptype->name ) {
+			wp_die( __( 'Sorry, you are not allowed to edit pages.' ) );
+		} else { wp_die( __( 'Sorry, you are not allowed to edit posts.' ) );
+		}
 	}
 
 	if ( -1 == $post_data['_status'] ) {
 		$post_data['post_status'] = null;
-		unset($post_data['post_status']);
+		unset( $post_data['post_status'] );
 	} else {
 		$post_data['post_status'] = $post_data['_status'];
 	}
-	unset($post_data['_status']);
+	unset( $post_data['_status'] );
 
 	if ( ! empty( $post_data['post_status'] ) ) {
 		$post_data['post_status'] = sanitize_key( $post_data['post_status'] );
@@ -454,42 +485,53 @@
 	$post_IDs = array_map( 'intval', (array) $post_data['post'] );
 
 	$reset = array(
-		'post_author', 'post_status', 'post_password',
-		'post_parent', 'page_template', 'comment_status',
-		'ping_status', 'keep_private', 'tax_input',
-		'post_category', 'sticky', 'post_format',
+		'post_author',
+	'post_status',
+	'post_password',
+		'post_parent',
+	'page_template',
+	'comment_status',
+		'ping_status',
+	'keep_private',
+	'tax_input',
+		'post_category',
+	'sticky',
+	'post_format',
 	);
 
 	foreach ( $reset as $field ) {
-		if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) )
-			unset($post_data[$field]);
+		if ( isset( $post_data[ $field ] ) && ( '' == $post_data[ $field ] || -1 == $post_data[ $field ] ) ) {
+			unset( $post_data[ $field ] );
+		}
 	}
 
-	if ( isset($post_data['post_category']) ) {
-		if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) )
+	if ( isset( $post_data['post_category'] ) ) {
+		if ( is_array( $post_data['post_category'] ) && ! empty( $post_data['post_category'] ) ) {
 			$new_cats = array_map( 'absint', $post_data['post_category'] );
-		else
-			unset($post_data['post_category']);
+		} else { unset( $post_data['post_category'] );
+		}
 	}
 
 	$tax_input = array();
-	if ( isset($post_data['tax_input'])) {
+	if ( isset( $post_data['tax_input'] ) ) {
 		foreach ( $post_data['tax_input'] as $tax_name => $terms ) {
-			if ( empty($terms) )
+			if ( empty( $terms ) ) {
 				continue;
+			}
 			if ( is_taxonomy_hierarchical( $tax_name ) ) {
 				$tax_input[ $tax_name ] = array_map( 'absint', $terms );
 			} else {
 				$comma = _x( ',', 'tag delimiter' );
-				if ( ',' !== $comma )
+				if ( ',' !== $comma ) {
 					$terms = str_replace( $comma, ',', $terms );
+				}
 				$tax_input[ $tax_name ] = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) );
 			}
 		}
 	}
 
-	if ( isset($post_data['post_parent']) && ($parent = (int) $post_data['post_parent']) ) {
-		$pages = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'");
+	if ( isset( $post_data['post_parent'] ) && ($parent = (int) $post_data['post_parent']) ) {
+		$pages = $wpdb->get_results( "SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'" );
 		$children = array();
 
 		for ( $i = 0; $i < 50 && $parent > 0; $i++ ) {
@@ -513,7 +555,7 @@
 
 		$post_type_object = get_post_type_object( get_post_type( $post_ID ) );
 
-		if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) {
+		if ( ! isset( $post_type_object ) || ( isset( $children ) && in_array( $post_ID, $children ) ) || ! current_user_can( 'edit_post', $post_ID ) ) {
 			$skipped[] = $post_ID;
 			continue;
 		}
@@ -526,23 +568,27 @@
 		$post = get_post( $post_ID );
 		$tax_names = get_object_taxonomies( $post );
 		foreach ( $tax_names as $tax_name ) {
-			$taxonomy_obj = get_taxonomy($tax_name);
-			if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
-				$new_terms = $tax_input[$tax_name];
-			else
-				$new_terms = array();
-
-			if ( $taxonomy_obj->hierarchical )
-				$current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') );
-			else
-				$current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'names') );
-
-			$post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms );
-		}
-
-		if ( isset($new_cats) && in_array( 'category', $tax_names ) ) {
-			$cats = (array) wp_get_post_categories($post_ID);
-			$post_data['post_category'] = array_unique( array_merge($cats, $new_cats) );
+			$taxonomy_obj = get_taxonomy( $tax_name );
+			if ( isset( $tax_input[ $tax_name ] ) && current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
+				$new_terms = $tax_input[ $tax_name ];
+			} else { $new_terms = array();
+			}
+
+			if ( $taxonomy_obj->hierarchical ) {
+				$current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array(
+					'fields' => 'ids',
+				) );
+			} else { $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array(
+				'fields' => 'names',
+			) );
+			}
+
+			$post_data['tax_input'][ $tax_name ] = array_merge( $current_terms, $new_terms );
+		}
+
+		if ( isset( $new_cats ) && in_array( 'category', $tax_names ) ) {
+			$cats = (array) wp_get_post_categories( $post_ID );
+			$post_data['post_category'] = array_unique( array_merge( $cats, $new_cats ) );
 			unset( $post_data['tax_input']['category'] );
 		}
 
@@ -568,17 +614,22 @@
 		$updated[] = wp_update_post( $post_data );
 
 		if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
-			if ( 'sticky' == $post_data['sticky'] )
+			if ( 'sticky' == $post_data['sticky'] ) {
 				stick_post( $post_ID );
-			else
-				unstick_post( $post_ID );
+			} else { unstick_post( $post_ID );
+			}
 		}
 
-		if ( isset( $post_data['post_format'] ) )
+		if ( isset( $post_data['post_format'] ) ) {
 			set_post_format( $post_ID, $post_data['post_format'] );
-	}
+		}
+	}// End foreach().
 
-	return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
+	return array(
+		'updated' => $updated,
+		'skipped' => $skipped,
+		'locked' => $locked,
+	);
 }
 
 /**
@@ -592,22 +643,30 @@
  */
 function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
 	$post_title = '';
-	if ( !empty( $_REQUEST['post_title'] ) )
-		$post_title = esc_html( wp_unslash( $_REQUEST['post_title'] ));
+	if ( ! empty( $_REQUEST['post_title'] ) ) {
+		$post_title = esc_html( wp_unslash( $_REQUEST['post_title'] ) );
+	}
 
 	$post_content = '';
-	if ( !empty( $_REQUEST['content'] ) )
-		$post_content = esc_html( wp_unslash( $_REQUEST['content'] ));
+	if ( ! empty( $_REQUEST['content'] ) ) {
+		$post_content = esc_html( wp_unslash( $_REQUEST['content'] ) );
+	}
 
 	$post_excerpt = '';
-	if ( !empty( $_REQUEST['excerpt'] ) )
-		$post_excerpt = esc_html( wp_unslash( $_REQUEST['excerpt'] ));
+	if ( ! empty( $_REQUEST['excerpt'] ) ) {
+		$post_excerpt = esc_html( wp_unslash( $_REQUEST['excerpt'] ) );
+	}
 
 	if ( $create_in_db ) {
-		$post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) );
+		$post_id = wp_insert_post( array(
+			'post_title' => __( 'Auto Draft' ),
+			'post_type' => $post_type,
+			'post_status' => 'auto-draft',
+		) );
 		$post = get_post( $post_id );
-		if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) )
+		if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) {
 			set_post_format( $post, get_option( 'default_post_format' ) );
+		}
 	} else {
 		$post = new stdClass;
 		$post->ID = 0;
@@ -675,7 +734,7 @@
  * @param string $date Optional post date
  * @return int Post ID if post exists, 0 otherwise.
  */
-function post_exists($title, $content = '', $date = '') {
+function post_exists( $title, $content = '', $date = '' ) {
 	global $wpdb;
 
 	$post_title = wp_unslash( sanitize_post_field( 'post_title', $title, 0, 'db' ) );
@@ -685,23 +744,24 @@
 	$query = "SELECT ID FROM $wpdb->posts WHERE 1=1";
 	$args = array();
 
-	if ( !empty ( $date ) ) {
+	if ( ! empty( $date ) ) {
 		$query .= ' AND post_date = %s';
 		$args[] = $post_date;
 	}
 
-	if ( !empty ( $title ) ) {
+	if ( ! empty( $title ) ) {
 		$query .= ' AND post_title = %s';
 		$args[] = $post_title;
 	}
 
-	if ( !empty ( $content ) ) {
+	if ( ! empty( $content ) ) {
 		$query .= ' AND post_content = %s';
 		$args[] = $post_content;
 	}
 
-	if ( !empty ( $args ) )
-		return (int) $wpdb->get_var( $wpdb->prepare($query, $args) );
+	if ( ! empty( $args ) ) {
+		return (int) $wpdb->get_var( $wpdb->prepare( $query, $args ) );
+	}
 
 	return 0;
 }
@@ -716,16 +776,16 @@
  * @return int|WP_Error
  */
 function wp_write_post() {
-	if ( isset($_POST['post_type']) )
-		$ptype = get_post_type_object($_POST['post_type']);
-	else
-		$ptype = get_post_type_object('post');
+	if ( isset( $_POST['post_type'] ) ) {
+		$ptype = get_post_type_object( $_POST['post_type'] );
+	} else { $ptype = get_post_type_object( 'post' );
+	}
 
-	if ( !current_user_can( $ptype->cap->edit_posts ) ) {
-		if ( 'page' == $ptype->name )
+	if ( ! current_user_can( $ptype->cap->edit_posts ) ) {
+		if ( 'page' == $ptype->name ) {
 			return new WP_Error( 'edit_pages', __( 'Sorry, you are not allowed to create pages on this site.' ) );
-		else
-			return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) );
+		} else { return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) );
+		}
 	}
 
 	$_POST['post_mime_type'] = '';
@@ -734,10 +794,11 @@
 	unset( $_POST['filter'] );
 
 	// Edit don't write if we have a post id.
-	if ( isset( $_POST['post_ID'] ) )
+	if ( isset( $_POST['post_ID'] ) ) {
 		return edit_post();
+	}
 
-	if ( isset($_POST['visibility']) ) {
+	if ( isset( $_POST['visibility'] ) ) {
 		switch ( $_POST['visibility'] ) {
 			case 'public' :
 				$_POST['post_password'] = '';
@@ -754,16 +815,19 @@
 	}
 
 	$translated = _wp_translate_postdata( false );
-	if ( is_wp_error($translated) )
+	if ( is_wp_error( $translated ) ) {
 		return $translated;
+	}
 
 	// Create the post.
 	$post_ID = wp_insert_post( $_POST );
-	if ( is_wp_error( $post_ID ) )
+	if ( is_wp_error( $post_ID ) ) {
 		return $post_ID;
+	}
 
-	if ( empty($post_ID) )
+	if ( empty( $post_ID ) ) {
 		return 0;
+	}
 
 	add_meta( $post_ID );
 
@@ -786,10 +850,10 @@
  */
 function write_post() {
 	$result = wp_write_post();
-	if ( is_wp_error( $result ) )
+	if ( is_wp_error( $result ) ) {
 		wp_die( $result->get_error_message() );
-	else
-		return $result;
+	} else { return $result;
+	}
 }
 
 //
@@ -807,25 +871,29 @@
 function add_meta( $post_ID ) {
 	$post_ID = (int) $post_ID;
 
-	$metakeyselect = isset($_POST['metakeyselect']) ? wp_unslash( trim( $_POST['metakeyselect'] ) ) : '';
-	$metakeyinput = isset($_POST['metakeyinput']) ? wp_unslash( trim( $_POST['metakeyinput'] ) ) : '';
-	$metavalue = isset($_POST['metavalue']) ? $_POST['metavalue'] : '';
-	if ( is_string( $metavalue ) )
+	$metakeyselect = isset( $_POST['metakeyselect'] ) ? wp_unslash( trim( $_POST['metakeyselect'] ) ) : '';
+	$metakeyinput = isset( $_POST['metakeyinput'] ) ? wp_unslash( trim( $_POST['metakeyinput'] ) ) : '';
+	$metavalue = isset( $_POST['metavalue'] ) ? $_POST['metavalue'] : '';
+	if ( is_string( $metavalue ) ) {
 		$metavalue = trim( $metavalue );
+	}
 
-	if ( ('0' === $metavalue || ! empty ( $metavalue ) ) && ( ( ( '#NONE#' != $metakeyselect ) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput ) ) ) {
+	if ( ('0' === $metavalue || ! empty( $metavalue ) ) && ( ( ( '#NONE#' != $metakeyselect ) && ! empty( $metakeyselect ) ) || ! empty( $metakeyinput ) ) ) {
 		/*
 		 * We have a key/value pair. If both the select and the input
 		 * for the key have data, the input takes precedence.
 		 */
- 		if ( '#NONE#' != $metakeyselect )
+		if ( '#NONE#' != $metakeyselect ) {
 			$metakey = $metakeyselect;
+		}
 
-		if ( $metakeyinput )
+		if ( $metakeyinput ) {
 			$metakey = $metakeyinput; // default
+		}
 
-		if ( is_protected_meta( $metakey, 'post' ) || ! current_user_can( 'add_post_meta', $post_ID, $metakey ) )
+		if ( is_protected_meta( $metakey, 'post' ) || ! current_user_can( 'add_post_meta', $post_ID, $metakey ) ) {
 			return false;
+		}
 
 		$metakey = wp_slash( $metakey );
 
@@ -933,31 +1001,35 @@
 	$content = $post['post_content'];
 
 	// Don't run if no pretty permalinks or post is not published, scheduled, or privately published.
-	if ( ! get_option( 'permalink_structure' ) || ! in_array( $post['post_status'], array( 'publish', 'future', 'private' ) ) )
+	if ( ! get_option( 'permalink_structure' ) || ! in_array( $post['post_status'], array( 'publish', 'future', 'private' ) ) ) {
 		return;
+	}
 
 	// Short if there aren't any links or no '?attachment_id=' strings (strpos cannot be zero)
-	if ( !strpos($content, '?attachment_id=') || !preg_match_all( '/<a ([^>]+)>[\s\S]+?<\/a>/', $content, $link_matches ) )
+	if ( ! strpos( $content, '?attachment_id=' ) || ! preg_match_all( '/<a ([^>]+)>[\s\S]+?<\/a>/', $content, $link_matches ) ) {
 		return;
+	}
 
-	$site_url = get_bloginfo('url');
-	$site_url = substr( $site_url, (int) strpos($site_url, '://') ); // remove the http(s)
+	$site_url = get_bloginfo( 'url' );
+	$site_url = substr( $site_url, (int) strpos( $site_url, '://' ) ); // remove the http(s)
 	$replace = '';
 
 	foreach ( $link_matches[1] as $key => $value ) {
-		if ( !strpos($value, '?attachment_id=') || !strpos($value, 'wp-att-')
-			|| !preg_match( '/href=(["\'])[^"\']*\?attachment_id=(\d+)[^"\']*\\1/', $value, $url_match )
-			|| !preg_match( '/rel=["\'][^"\']*wp-att-(\d+)/', $value, $rel_match ) )
+		if ( ! strpos( $value, '?attachment_id=' ) || ! strpos( $value, 'wp-att-' )
+			|| ! preg_match( '/href=(["\'])[^"\']*\?attachment_id=(\d+)[^"\']*\\1/', $value, $url_match )
+			|| ! preg_match( '/rel=["\'][^"\']*wp-att-(\d+)/', $value, $rel_match ) ) {
 				continue;
+		}
 
 		$quote = $url_match[1]; // the quote (single or double)
 		$url_id = (int) $url_match[2];
 		$rel_id = (int) $rel_match[1];
 
-		if ( !$url_id || !$rel_id || $url_id != $rel_id || strpos($url_match[0], $site_url) === false )
+		if ( ! $url_id || ! $rel_id || $url_id != $rel_id || strpos( $url_match[0], $site_url ) === false ) {
 			continue;
+		}
 
-		$link = $link_matches[0][$key];
+		$link = $link_matches[0][ $key ];
 		$replace = str_replace( $url_match[0], 'href=' . $quote . get_attachment_link( $url_id ) . $quote, $link );
 
 		$content = str_replace( $link, $replace, $content );
@@ -966,9 +1038,9 @@
 	if ( $replace ) {
 		$post['post_content'] = $content;
 		// Escape data pulled from DB.
-		$post = add_magic_quotes($post);
+		$post = add_magic_quotes( $post );
 
-		return wp_update_post($post);
+		return wp_update_post( $post );
 	}
 }
 
@@ -980,10 +1052,10 @@
  * @param string $type The post_type you want the statuses for
  * @return array As array of all the statuses for the supplied post type
  */
-function get_available_post_statuses($type = 'post') {
-	$stati = wp_count_posts($type);
+function get_available_post_statuses( $type = 'post' ) {
+	$stati = wp_count_posts( $type );
 
-	return array_keys(get_object_vars($stati));
+	return array_keys( get_object_vars( $stati ) );
 }
 
 /**
@@ -995,20 +1067,21 @@
  * @return array
  */
 function wp_edit_posts_query( $q = false ) {
-	if ( false === $q )
+	if ( false === $q ) {
 		$q = $_GET;
-	$q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
-	$q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
+	}
+	$q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0;
+	$q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
 	$post_stati  = get_post_stati();
 
-	if ( isset($q['post_type']) && in_array( $q['post_type'], get_post_types() ) )
+	if ( isset( $q['post_type'] ) && in_array( $q['post_type'], get_post_types() ) ) {
 		$post_type = $q['post_type'];
-	else
-		$post_type = 'post';
+	} else { $post_type = 'post';
+	}
 
-	$avail_post_stati = get_available_post_statuses($post_type);
+	$avail_post_stati = get_available_post_statuses( $post_type );
 
-	if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) {
+	if ( isset( $q['post_status'] ) && in_array( $q['post_status'], $post_stati ) ) {
 		$post_status = $q['post_status'];
 		$perm = 'readable';
 	}
@@ -1027,8 +1100,9 @@
 
 	$per_page = "edit_{$post_type}_per_page";
 	$posts_per_page = (int) get_user_option( $per_page );
-	if ( empty( $posts_per_page ) || $posts_per_page < 1 )
+	if ( empty( $posts_per_page ) || $posts_per_page < 1 ) {
 		$posts_per_page = 20;
+	}
 
 	/**
 	 * Filters the number of items per page to show for a specific 'per_page' type.
@@ -1055,10 +1129,10 @@
 	 */
 	$posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type );
 
-	$query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page');
+	$query = compact( 'post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page' );
 
 	// Hierarchical types require special args.
-	if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) {
+	if ( is_post_type_hierarchical( $post_type ) && ! isset( $orderby ) ) {
 		$query['orderby'] = 'menu_order title';
 		$query['order'] = 'asc';
 		$query['posts_per_page'] = -1;
@@ -1066,8 +1140,9 @@
 		$query['fields'] = 'id=>parent';
 	}
 
-	if ( ! empty( $q['show_sticky'] ) )
+	if ( ! empty( $q['show_sticky'] ) ) {
 		$query['post__in'] = (array) get_option( 'sticky_posts' );
+	}
 
 	wp( $query );
 
@@ -1084,10 +1159,10 @@
  * @param string $type
  * @return mixed
  */
-function get_available_post_mime_types($type = 'attachment') {
+function get_available_post_mime_types( $type = 'attachment' ) {
 	global $wpdb;
 
-	$types = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type));
+	$types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) );
 	return $types;
 }
 
@@ -1131,8 +1206,8 @@
 	$q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page );
 
 	$post_mime_types = get_post_mime_types();
-	if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) ) {
-		unset($q['post_mime_type']);
+	if ( isset( $q['post_mime_type'] ) && ! array_intersect( (array) $q['post_mime_type'], array_keys( $post_mime_types ) ) ) {
+		unset( $q['post_mime_type'] );
 	}
 
 	foreach ( array_keys( $post_mime_types ) as $type ) {
@@ -1184,8 +1259,8 @@
 function postbox_classes( $id, $page ) {
 	if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) {
 		$classes = array( '' );
-	} elseif ( $closed = get_user_option('closedpostboxes_'.$page ) ) {
-		if ( !is_array( $closed ) ) {
+	} elseif ( $closed = get_user_option( 'closedpostboxes_' . $page ) ) {
+		if ( ! is_array( $closed ) ) {
 			$classes = array( '' );
 		} else {
 			$classes = in_array( $id, $closed ) ? array( 'closed' ) : array( '' );
@@ -1218,12 +1293,13 @@
  * @param string $name  Optional. Name to override the post name. Default null.
  * @return array Array containing the sample permalink with placeholder for the post name, and the post name.
  */
-function get_sample_permalink($id, $title = null, $name = null) {
+function get_sample_permalink( $id, $title = null, $name = null ) {
 	$post = get_post( $id );
-	if ( ! $post )
+	if ( ! $post ) {
 		return array( '', '' );
+	}
 
-	$ptype = get_post_type_object($post->post_type);
+	$ptype = get_post_type_object( $post->post_type );
 
 	$original_status = $post->post_status;
 	$original_date = $post->post_date;
@@ -1232,37 +1308,39 @@
 	// Hack: get_permalink() would return ugly permalink for drafts, so we will fake that our post is published.
 	if ( in_array( $post->post_status, array( 'draft', 'pending', 'future' ) ) ) {
 		$post->post_status = 'publish';
-		$post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID);
+		$post->post_name = sanitize_title( $post->post_name ? $post->post_name : $post->post_title, $post->ID );
 	}
 
 	// If the user wants to set a new name -- override the current one
 	// Note: if empty name is supplied -- use the title instead, see #6072
-	if ( !is_null($name) )
-		$post->post_name = sanitize_title($name ? $name : $title, $post->ID);
+	if ( ! is_null( $name ) ) {
+		$post->post_name = sanitize_title( $name ? $name : $title, $post->ID );
+	}
 
-	$post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent);
+	$post->post_name = wp_unique_post_slug( $post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent );
 
 	$post->filter = 'sample';
 
-	$permalink = get_permalink($post, true);
+	$permalink = get_permalink( $post, true );
 
 	// Replace custom post_type Token with generic pagename token for ease of use.
-	$permalink = str_replace("%$post->post_type%", '%pagename%', $permalink);
+	$permalink = str_replace( "%$post->post_type%", '%pagename%', $permalink );
 
 	// Handle page hierarchy
 	if ( $ptype->hierarchical ) {
-		$uri = get_page_uri($post);
+		$uri = get_page_uri( $post );
 		if ( $uri ) {
-			$uri = untrailingslashit($uri);
+			$uri = untrailingslashit( $uri );
 			$uri = strrev( stristr( strrev( $uri ), '/' ) );
-			$uri = untrailingslashit($uri);
+			$uri = untrailingslashit( $uri );
 		}
 
 		/** This filter is documented in wp-admin/edit-tag-form.php */
 		$uri = apply_filters( 'editable_slug', $uri, $post );
-		if ( !empty($uri) )
+		if ( ! empty( $uri ) ) {
 			$uri .= '/';
-		$permalink = str_replace('%pagename%', "{$uri}%pagename%", $permalink);
+		}
+		$permalink = str_replace( '%pagename%', "{$uri}%pagename%", $permalink );
 	}
 
 	/** This filter is documented in wp-admin/edit-tag-form.php */
@@ -1270,7 +1348,7 @@
 	$post->post_status = $original_status;
 	$post->post_date = $original_date;
 	$post->post_name = $original_name;
-	unset($post->filter);
+	unset( $post->filter );
 
 	/**
 	 * Filters the sample permalink.
@@ -1298,10 +1376,11 @@
  */
 function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
 	$post = get_post( $id );
-	if ( ! $post )
+	if ( ! $post ) {
 		return '';
+	}
 
-	list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
+	list($permalink, $post_name) = get_sample_permalink( $post->ID, $new_title, $new_slug );
 
 	$view_link = false;
 	$preview_target = '';
@@ -1332,8 +1411,8 @@
 		}
 
 		// Encourage a pretty permalink setting
-		if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) {
-			$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
+		if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && ! ( 'page' == get_option( 'show_on_front' ) && $id == get_option( 'page_on_front' ) ) ) {
+			$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __( 'Change Permalinks' ) . "</a></span>\n";
 		}
 	} else {
 		if ( mb_strlen( $post_name ) > 34 ) {
@@ -1512,12 +1591,14 @@
  * @return none
  */
 function _admin_notice_post_locked() {
-	if ( ! $post = get_post() )
+	if ( ! $post = get_post() ) {
 		return;
+	}
 
 	$user = null;
-	if (  $user_id = wp_check_post_lock( $post->ID ) )
+	if ( $user_id = wp_check_post_lock( $post->ID ) ) {
 		$user = get_userdata( $user_id );
+	}
 
 	if ( $user ) {
 
@@ -1532,8 +1613,9 @@
 		 * @param WP_Post      $post    Post object.
 		 * @param WP_User|bool $user    WP_User object on success, false otherwise.
 		 */
-		if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) )
+		if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) {
 			return;
+		}
 
 		$locked = true;
 	} else {
@@ -1543,12 +1625,13 @@
 	if ( $locked && ( $sendback = wp_get_referer() ) &&
 		false === strpos( $sendback, 'post.php' ) && false === strpos( $sendback, 'post-new.php' ) ) {
 
-		$sendback_text = __('Go back');
+		$sendback_text = __( 'Go back' );
 	} else {
 		$sendback = admin_url( 'edit.php' );
 
-		if ( 'post' != $post->post_type )
+		if ( 'post' != $post->post_type ) {
 			$sendback = add_query_arg( 'post_type', $post->post_type, $sendback );
+		}
 
 		$sendback_text = get_post_type_object( $post->post_type )->labels->all_items;
 	}
@@ -1595,8 +1678,9 @@
 		<p class="currently-editing wp-tab-first" tabindex="0">
 		<?php
 			_e( 'This content is currently locked.' );
-			if ( $override )
-				printf( ' ' . __( 'If you take over, %s will be blocked from continuing to edit.' ), esc_html( $user->display_name ) );
+		if ( $override ) {
+			printf( ' ' . __( 'If you take over, %s will be blocked from continuing to edit.' ), esc_html( $user->display_name ) );
+		}
 		?>
 		</p>
 		<?php
@@ -1612,16 +1696,16 @@
 		<p>
 		<a class="button" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a>
 		<?php if ( $preview_link ) { ?>
-		<a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a>
+		<a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
 		<?php
-		}
+}
 
 		// Allow plugins to prevent some users overriding the post lock
-		if ( $override ) {
-			?>
-			<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e('Take over'); ?></a>
-			<?php
-		}
+if ( $override ) {
+	?>
+	<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e( 'Take over' ); ?></a>
+	<?php
+}
 
 		?>
 		</p>
@@ -1634,7 +1718,7 @@
 			<p class="wp-tab-first" tabindex="0">
 			<span class="currently-editing"></span><br />
 			<span class="locked-saving hidden"><img src="<?php echo esc_url( admin_url( 'images/spinner-2x.gif' ) ); ?>" width="16" height="16" alt="" /> <?php _e( 'Saving revision&hellip;' ); ?></span>
-			<span class="locked-saved hidden"><?php _e('Your latest changes were saved as a revision.'); ?></span>
+			<span class="locked-saved hidden"><?php _e( 'Your latest changes were saved as a revision.' ); ?></span>
 			</p>
 			<?php
 			/**
@@ -1649,7 +1733,7 @@
 			<p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a></p>
 		</div>
 		<?php
-	}
+	}// End if().
 
 	?>
 	</div>
@@ -1676,8 +1760,9 @@
 	}
 
 	$post_data = _wp_translate_postdata( true, $post_data );
-	if ( is_wp_error( $post_data ) )
+	if ( is_wp_error( $post_data ) ) {
 		return $post_data;
+	}
 
 	$post_author = get_current_user_id();
 
@@ -1749,14 +1834,16 @@
 	} else {
 		$is_autosave = true;
 
-		if ( isset( $_POST['post_status'] ) && 'auto-draft' == $_POST['post_status'] )
+		if ( isset( $_POST['post_status'] ) && 'auto-draft' == $_POST['post_status'] ) {
 			$_POST['post_status'] = 'draft';
+		}
 
 		$saved_post_id = wp_create_post_autosave( $post->ID );
 	}
 
-	if ( is_wp_error( $saved_post_id ) )
+	if ( is_wp_error( $saved_post_id ) ) {
 		wp_die( $saved_post_id->get_error_message() );
+	}
 
 	$query_args = array();
 
@@ -1789,8 +1876,9 @@
  */
 function wp_autosave( $post_data ) {
 	// Back-compat
-	if ( ! defined( 'DOING_AUTOSAVE' ) )
+	if ( ! defined( 'DOING_AUTOSAVE' ) ) {
 		define( 'DOING_AUTOSAVE', true );
+	}
 
 	$post_id = (int) $post_data['post_id'];
 	$post_data['ID'] = $post_data['post_ID'] = $post_id;
@@ -1805,11 +1893,13 @@
 		return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to edit this item.' ) );
 	}
 
-	if ( 'auto-draft' == $post->post_status )
+	if ( 'auto-draft' == $post->post_status ) {
 		$post_data['post_status'] = 'draft';
+	}
 
-	if ( $post_data['post_type'] != 'page' && ! empty( $post_data['catslist'] ) )
+	if ( $post_data['post_type'] != 'page' && ! empty( $post_data['catslist'] ) ) {
 		$post_data['post_category'] = explode( ',', $post_data['catslist'] );
+	}
 
 	if ( ! wp_check_post_lock( $post->ID ) && get_current_user_id() == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) {
 		// Drafts and auto-drafts are just overwritten by autosave for the same user if the post is not locked
@@ -1825,8 +1915,8 @@
  *
  * @param int $post_id Optional. Post ID.
  */
-function redirect_post($post_id = '') {
-	if ( isset($_POST['save']) || isset($_POST['publish']) ) {
+function redirect_post( $post_id = '' ) {
+	if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ) {
 		$status = get_post_status( $post_id );
 
 		if ( isset( $_POST['publish'] ) ) {
@@ -1845,13 +1935,13 @@
 		}
 
 		$location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) );
-	} elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) {
+	} elseif ( isset( $_POST['addmeta'] ) && $_POST['addmeta'] ) {
 		$location = add_query_arg( 'message', 2, wp_get_referer() );
-		$location = explode('#', $location);
+		$location = explode( '#', $location );
 		$location = $location[0] . '#postcustom';
-	} elseif ( isset($_POST['deletemeta']) && $_POST['deletemeta'] ) {
+	} elseif ( isset( $_POST['deletemeta'] ) && $_POST['deletemeta'] ) {
 		$location = add_query_arg( 'message', 3, wp_get_referer() );
-		$location = explode('#', $location);
+		$location = explode( '#', $location );
 		$location = $location[0] . '#postcustom';
 	} else {
 		$location = add_query_arg( 'message', 4, get_edit_post_link( $post_id, 'url' ) );
Index: src/wp-admin/includes/revision.php
===================================================================
--- src/wp-admin/includes/revision.php	(revision 40901)
+++ src/wp-admin/includes/revision.php	(working copy)
@@ -20,26 +20,31 @@
  *                    Or, false on failure.
  */
 function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
-	if ( ! $post = get_post( $post ) )
+	if ( ! $post = get_post( $post ) ) {
 		return false;
+	}
 
 	if ( $compare_from ) {
-		if ( ! $compare_from = get_post( $compare_from ) )
+		if ( ! $compare_from = get_post( $compare_from ) ) {
 			return false;
+		}
 	} else {
 		// If we're dealing with the first revision...
 		$compare_from = false;
 	}
 
-	if ( ! $compare_to = get_post( $compare_to ) )
+	if ( ! $compare_to = get_post( $compare_to ) ) {
 		return false;
+	}
 
 	// If comparing revisions, make sure we're dealing with the right post parent.
 	// The parent post may be a 'revision' when revisions are disabled and we're looking at autosaves.
-	if ( $compare_from && $compare_from->post_parent !== $post->ID && $compare_from->ID !== $post->ID )
+	if ( $compare_from && $compare_from->post_parent !== $post->ID && $compare_from->ID !== $post->ID ) {
 		return false;
-	if ( $compare_to->post_parent !== $post->ID && $compare_to->ID !== $post->ID )
+	}
+	if ( $compare_to->post_parent !== $post->ID && $compare_to->ID !== $post->ID ) {
 		return false;
+	}
 
 	if ( $compare_from && strtotime( $compare_from->post_date_gmt ) > strtotime( $compare_to->post_date_gmt ) ) {
 		$temp = $compare_from;
@@ -48,10 +53,12 @@
 	}
 
 	// Add default title if title field is empty
-	if ( $compare_from && empty( $compare_from->post_title ) )
+	if ( $compare_from && empty( $compare_from->post_title ) ) {
 		$compare_from->post_title = __( '(no title)' );
-	if ( empty( $compare_to->post_title ) )
+	}
+	if ( empty( $compare_to->post_title ) ) {
 		$compare_to->post_title = __( '(no title)' );
+	}
 
 	$return = array();
 
@@ -76,7 +83,7 @@
 		$content_to = apply_filters( "_wp_post_revision_field_{$field}", $compare_to->$field, $field, $compare_to, 'to' );
 
 		$args = array(
-			'show_split_view' => true
+			'show_split_view' => true,
 		);
 
 		/**
@@ -116,7 +123,7 @@
 				'diff' => $diff,
 			);
 		}
-	}
+	}// End foreach().
 
 	/**
 	 * Filters the fields displayed in the post revision diff UI.
@@ -147,14 +154,20 @@
 	$authors = array();
 	$now_gmt = time();
 
-	$revisions = wp_get_post_revisions( $post->ID, array( 'order' => 'ASC', 'check_enabled' => false ) );
+	$revisions = wp_get_post_revisions( $post->ID, array(
+		'order' => 'ASC',
+		'check_enabled' => false,
+	) );
 	// If revisions are disabled, we only want autosaves and the current post.
 	if ( ! wp_revisions_enabled( $post ) ) {
 		foreach ( $revisions as $revision_id => $revision ) {
-			if ( ! wp_is_post_autosave( $revision ) )
+			if ( ! wp_is_post_autosave( $revision ) ) {
 				unset( $revisions[ $revision_id ] );
+			}
 		}
-		$revisions = array( $post->ID => $post ) + $revisions;
+		$revisions = array(
+			$post->ID => $post,
+		) + $revisions;
 	}
 
 	$show_avatars = get_option( 'show_avatars' );
@@ -170,9 +183,11 @@
 		if ( $can_restore ) {
 			$restore_link = str_replace( '&amp;', '&', wp_nonce_url(
 				add_query_arg(
-					array( 'revision' => $revision->ID,
-						'action' => 'restore' ),
-						admin_url( 'revision.php' )
+					array(
+					'revision' => $revision->ID,
+						'action' => 'restore',
+					),
+					admin_url( 'revision.php' )
 				),
 				"restore-post_{$revision->ID}"
 			) );
@@ -235,7 +250,7 @@
 		 * @param WP_Post $post           The revision's parent WP_Post object.
 		 */
 		$revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post );
-	}
+	}// End foreach().
 
 	/**
 	 * If we only have one revision, the initial revision is missing; This happens
@@ -291,7 +306,8 @@
 	$diffs = array( array(
 		'id' => $from . ':' . $selected_revision_id,
 		'fields' => wp_get_revision_ui_diff( $post->ID, $from, $selected_revision_id ),
-	));
+	),
+	);
 
 	return array(
 		'postId'           => $post->ID,
@@ -358,13 +374,13 @@
 					<div class="author-info">
 					<# if ( data.attributes.autosave ) { #>
 						<span class="byline"><?php printf( __( 'Autosave by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
+						'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
 					<# } else if ( data.attributes.current ) { #>
 						<span class="byline"><?php printf( __( 'Current Revision by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
+						'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
 					<# } else { #>
 						<span class="byline"><?php printf( __( 'Revision by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
+						'<span class="author-name">{{ data.attributes.author.name }}</span>' ); ?></span>
 					<# } #>
 						<span class="time-ago">{{ data.attributes.timeAgo }}</span>
 						<span class="date">({{ data.attributes.dateShort }})</span>
Index: src/wp-admin/includes/schema.php
===================================================================
--- src/wp-admin/includes/schema.php	(revision 40901)
+++ src/wp-admin/includes/schema.php	(working copy)
@@ -38,8 +38,9 @@
 
 	$charset_collate = $wpdb->get_charset_collate();
 
-	if ( $blog_id && $blog_id != $wpdb->blogid )
+	if ( $blog_id && $blog_id != $wpdb->blogid ) {
 		$old_blog_id = $wpdb->set_blog_id( $blog_id );
+	}
 
 	// Engage multisite if in the middle of turning it on from network.php.
 	$is_multisite = is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK );
@@ -235,10 +236,10 @@
 ) $charset_collate;\n";
 
 	// Global tables
-	if ( $is_multisite )
+	if ( $is_multisite ) {
 		$global_tables = $users_multi_table . $usermeta_table;
-	else
-		$global_tables = $users_single_table . $usermeta_table;
+	} else { $global_tables = $users_single_table . $usermeta_table;
+	}
 
 	// Multisite global tables.
 	$ms_global_tables = "CREATE TABLE $wpdb->blogs (
@@ -315,8 +316,9 @@
 			break;
 		case 'global' :
 			$queries = $global_tables;
-			if ( $is_multisite )
+			if ( $is_multisite ) {
 				$queries .= $ms_global_tables;
+			}
 			break;
 		case 'ms_global' :
 			$queries = $ms_global_tables;
@@ -324,13 +326,15 @@
 		case 'all' :
 		default:
 			$queries = $global_tables . $blog_tables;
-			if ( $is_multisite )
+			if ( $is_multisite ) {
 				$queries .= $ms_global_tables;
+			}
 			break;
 	}
 
-	if ( isset( $old_blog_id ) )
+	if ( isset( $old_blog_id ) ) {
 		$wpdb->set_blog_id( $old_blog_id );
+	}
 
 	return $queries;
 }
@@ -358,7 +362,7 @@
 	 */
 	do_action( 'populate_options' );
 
-	if ( ini_get('safe_mode') ) {
+	if ( ini_get( 'safe_mode' ) ) {
 		// Safe mode can break mkdir() so use a flat structure by default.
 		$uploads_use_yearmonth_folders = 0;
 	} else {
@@ -385,17 +389,18 @@
 	   for all timezone strings supported by PHP.
 	*/
 	$offset_or_tz = _x( '0', 'default GMT offset or timezone string' );
-	if ( is_numeric( $offset_or_tz ) )
+	if ( is_numeric( $offset_or_tz ) ) {
 		$gmt_offset = $offset_or_tz;
-	elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list() ) )
+	} elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list() ) ) {
 			$timezone_string = $offset_or_tz;
+	}
 
 	$options = array(
 	'siteurl' => $guessurl,
 	'home' => $guessurl,
-	'blogname' => __('My Site'),
+	'blogname' => __( 'My Site' ),
 	/* translators: site tagline */
-	'blogdescription' => __('Just another WordPress site'),
+	'blogdescription' => __( 'Just another WordPress site' ),
 	'users_can_register' => 0,
 	'admin_email' => 'you@example.com',
 	/* translators: default start of the week. 0 = Sunday, 1 = Monday */
@@ -416,11 +421,11 @@
 	'default_pingback_flag' => 1,
 	'posts_per_page' => 10,
 	/* translators: default date format, see https://secure.php.net/date */
-	'date_format' => __('F j, Y'),
+	'date_format' => __( 'F j, Y' ),
 	/* translators: default time format, see https://secure.php.net/date */
-	'time_format' => __('g:i a'),
+	'time_format' => __( 'g:i a' ),
 	/* translators: links last updated date format, see https://secure.php.net/date */
-	'links_updated_date_format' => __('F j, Y g:i a'),
+	'links_updated_date_format' => __( 'F j, Y g:i a' ),
 	'comment_moderation' => 0,
 	'moderation_notify' => 1,
 	'permalink_structure' => '',
@@ -527,8 +532,8 @@
 	// 3.0 multisite
 	if ( is_multisite() ) {
 		/* translators: site tagline */
-		$options[ 'blogdescription' ] = sprintf(__('Just another %s site'), get_network()->site_name );
-		$options[ 'permalink_structure' ] = '/%year%/%monthnum%/%day%/%postname%/';
+		$options['blogdescription'] = sprintf( __( 'Just another %s site' ), get_network()->site_name );
+		$options['permalink_structure'] = '/%year%/%monthnum%/%day%/%postname%/';
 	}
 
 	// Set autoload to no for these options
@@ -539,50 +544,116 @@
 
 	$insert = '';
 	foreach ( $options as $option => $value ) {
-		if ( in_array($option, $existing_options) )
+		if ( in_array( $option, $existing_options ) ) {
 			continue;
-		if ( in_array($option, $fat_options) )
+		}
+		if ( in_array( $option, $fat_options ) ) {
 			$autoload = 'no';
-		else
-			$autoload = 'yes';
+		} else { $autoload = 'yes';
+		}
 
-		if ( is_array($value) )
-			$value = serialize($value);
-		if ( !empty($insert) )
+		if ( is_array( $value ) ) {
+			$value = serialize( $value );
+		}
+		if ( ! empty( $insert ) ) {
 			$insert .= ', ';
-		$insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload );
+		}
+		$insert .= $wpdb->prepare( '(%s, %s, %s)', $option, $value, $autoload );
 	}
 
-	if ( !empty($insert) )
-		$wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert);
+	if ( ! empty( $insert ) ) {
+		$wpdb->query( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert );
+	}
 
 	// In case it is set, but blank, update "home".
-	if ( !__get_option('home') ) update_option('home', $guessurl);
+	if ( ! __get_option( 'home' ) ) { update_option( 'home', $guessurl );
+	}
 
 	// Delete unused options.
 	$unusedoptions = array(
-		'blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory',
-		'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping',
-		'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers',
-		'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference',
-		'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char',
-		'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1',
-		'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5',
-		'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9',
-		'links_recently_updated_time', 'links_recently_updated_prepend', 'links_recently_updated_append',
-		'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat',
-		'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce',
-		'_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins',
-		'can_compress_scripts', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron',
-		'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page',
-		'wporg_popular_tags', 'what_to_show', 'rss_language', 'language', 'enable_xmlrpc', 'enable_app',
-		'embed_autourls', 'default_post_edit_rows', 'gzipcompression', 'advanced_edit'
+		'blodotgsping_url',
+	'bodyterminator',
+	'emailtestonly',
+	'phoneemail_separator',
+	'smilies_directory',
+		'subjectprefix',
+	'use_bbcode',
+	'use_blodotgsping',
+	'use_phoneemail',
+	'use_quicktags',
+	'use_weblogsping',
+		'weblogs_cache_file',
+	'use_preview',
+	'use_htmltrans',
+	'smilies_directory',
+	'fileupload_allowedusers',
+		'use_phoneemail',
+	'default_post_status',
+	'default_post_category',
+	'archive_mode',
+	'time_difference',
+		'links_minadminlevel',
+	'links_use_adminlevels',
+	'links_rating_type',
+	'links_rating_char',
+		'links_rating_ignore_zero',
+	'links_rating_single_image',
+	'links_rating_image0',
+	'links_rating_image1',
+		'links_rating_image2',
+	'links_rating_image3',
+	'links_rating_image4',
+	'links_rating_image5',
+		'links_rating_image6',
+	'links_rating_image7',
+	'links_rating_image8',
+	'links_rating_image9',
+		'links_recently_updated_time',
+	'links_recently_updated_prepend',
+	'links_recently_updated_append',
+		'weblogs_cacheminutes',
+	'comment_allowed_tags',
+	'search_engine_friendly_urls',
+	'default_geourl_lat',
+		'default_geourl_lon',
+	'use_default_geourl',
+	'weblogs_xml_url',
+	'new_users_can_blog',
+	'_wpnonce',
+		'_wp_http_referer',
+	'Update',
+	'action',
+	'rich_editing',
+	'autosave_interval',
+	'deactivated_plugins',
+		'can_compress_scripts',
+	'page_uris',
+	'update_core',
+	'update_plugins',
+	'update_themes',
+	'doing_cron',
+		'random_seed',
+	'rss_excerpt_length',
+	'secret',
+	'use_linksupdate',
+	'default_comment_status_page',
+		'wporg_popular_tags',
+	'what_to_show',
+	'rss_language',
+	'language',
+	'enable_xmlrpc',
+	'enable_app',
+		'embed_autourls',
+	'default_post_edit_rows',
+	'gzipcompression',
+	'advanced_edit',
 	);
-	foreach ( $unusedoptions as $option )
-		delete_option($option);
+	foreach ( $unusedoptions as $option ) {
+		delete_option( $option );
+	}
 
 	// Delete obsolete magpie stuff.
-	$wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'");
+	$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'" );
 
 	/*
 	 * Deletes all expired transients. The multi-table delete syntax is used
@@ -633,99 +704,99 @@
 
 	// Dummy gettext calls to get strings in the catalog.
 	/* translators: user role */
-	_x('Administrator', 'User role');
+	_x( 'Administrator', 'User role' );
 	/* translators: user role */
-	_x('Editor', 'User role');
+	_x( 'Editor', 'User role' );
 	/* translators: user role */
-	_x('Author', 'User role');
+	_x( 'Author', 'User role' );
 	/* translators: user role */
-	_x('Contributor', 'User role');
+	_x( 'Contributor', 'User role' );
 	/* translators: user role */
-	_x('Subscriber', 'User role');
+	_x( 'Subscriber', 'User role' );
 
-	add_role('administrator', 'Administrator');
-	add_role('editor', 'Editor');
-	add_role('author', 'Author');
-	add_role('contributor', 'Contributor');
-	add_role('subscriber', 'Subscriber');
+	add_role( 'administrator', 'Administrator' );
+	add_role( 'editor', 'Editor' );
+	add_role( 'author', 'Author' );
+	add_role( 'contributor', 'Contributor' );
+	add_role( 'subscriber', 'Subscriber' );
 
 	// Add caps for Administrator role
-	$role = get_role('administrator');
-	$role->add_cap('switch_themes');
-	$role->add_cap('edit_themes');
-	$role->add_cap('activate_plugins');
-	$role->add_cap('edit_plugins');
-	$role->add_cap('edit_users');
-	$role->add_cap('edit_files');
-	$role->add_cap('manage_options');
-	$role->add_cap('moderate_comments');
-	$role->add_cap('manage_categories');
-	$role->add_cap('manage_links');
-	$role->add_cap('upload_files');
-	$role->add_cap('import');
-	$role->add_cap('unfiltered_html');
-	$role->add_cap('edit_posts');
-	$role->add_cap('edit_others_posts');
-	$role->add_cap('edit_published_posts');
-	$role->add_cap('publish_posts');
-	$role->add_cap('edit_pages');
-	$role->add_cap('read');
-	$role->add_cap('level_10');
-	$role->add_cap('level_9');
-	$role->add_cap('level_8');
-	$role->add_cap('level_7');
-	$role->add_cap('level_6');
-	$role->add_cap('level_5');
-	$role->add_cap('level_4');
-	$role->add_cap('level_3');
-	$role->add_cap('level_2');
-	$role->add_cap('level_1');
-	$role->add_cap('level_0');
+	$role = get_role( 'administrator' );
+	$role->add_cap( 'switch_themes' );
+	$role->add_cap( 'edit_themes' );
+	$role->add_cap( 'activate_plugins' );
+	$role->add_cap( 'edit_plugins' );
+	$role->add_cap( 'edit_users' );
+	$role->add_cap( 'edit_files' );
+	$role->add_cap( 'manage_options' );
+	$role->add_cap( 'moderate_comments' );
+	$role->add_cap( 'manage_categories' );
+	$role->add_cap( 'manage_links' );
+	$role->add_cap( 'upload_files' );
+	$role->add_cap( 'import' );
+	$role->add_cap( 'unfiltered_html' );
+	$role->add_cap( 'edit_posts' );
+	$role->add_cap( 'edit_others_posts' );
+	$role->add_cap( 'edit_published_posts' );
+	$role->add_cap( 'publish_posts' );
+	$role->add_cap( 'edit_pages' );
+	$role->add_cap( 'read' );
+	$role->add_cap( 'level_10' );
+	$role->add_cap( 'level_9' );
+	$role->add_cap( 'level_8' );
+	$role->add_cap( 'level_7' );
+	$role->add_cap( 'level_6' );
+	$role->add_cap( 'level_5' );
+	$role->add_cap( 'level_4' );
+	$role->add_cap( 'level_3' );
+	$role->add_cap( 'level_2' );
+	$role->add_cap( 'level_1' );
+	$role->add_cap( 'level_0' );
 
 	// Add caps for Editor role
-	$role = get_role('editor');
-	$role->add_cap('moderate_comments');
-	$role->add_cap('manage_categories');
-	$role->add_cap('manage_links');
-	$role->add_cap('upload_files');
-	$role->add_cap('unfiltered_html');
-	$role->add_cap('edit_posts');
-	$role->add_cap('edit_others_posts');
-	$role->add_cap('edit_published_posts');
-	$role->add_cap('publish_posts');
-	$role->add_cap('edit_pages');
-	$role->add_cap('read');
-	$role->add_cap('level_7');
-	$role->add_cap('level_6');
-	$role->add_cap('level_5');
-	$role->add_cap('level_4');
-	$role->add_cap('level_3');
-	$role->add_cap('level_2');
-	$role->add_cap('level_1');
-	$role->add_cap('level_0');
+	$role = get_role( 'editor' );
+	$role->add_cap( 'moderate_comments' );
+	$role->add_cap( 'manage_categories' );
+	$role->add_cap( 'manage_links' );
+	$role->add_cap( 'upload_files' );
+	$role->add_cap( 'unfiltered_html' );
+	$role->add_cap( 'edit_posts' );
+	$role->add_cap( 'edit_others_posts' );
+	$role->add_cap( 'edit_published_posts' );
+	$role->add_cap( 'publish_posts' );
+	$role->add_cap( 'edit_pages' );
+	$role->add_cap( 'read' );
+	$role->add_cap( 'level_7' );
+	$role->add_cap( 'level_6' );
+	$role->add_cap( 'level_5' );
+	$role->add_cap( 'level_4' );
+	$role->add_cap( 'level_3' );
+	$role->add_cap( 'level_2' );
+	$role->add_cap( 'level_1' );
+	$role->add_cap( 'level_0' );
 
 	// Add caps for Author role
-	$role = get_role('author');
-	$role->add_cap('upload_files');
-	$role->add_cap('edit_posts');
-	$role->add_cap('edit_published_posts');
-	$role->add_cap('publish_posts');
-	$role->add_cap('read');
-	$role->add_cap('level_2');
-	$role->add_cap('level_1');
-	$role->add_cap('level_0');
+	$role = get_role( 'author' );
+	$role->add_cap( 'upload_files' );
+	$role->add_cap( 'edit_posts' );
+	$role->add_cap( 'edit_published_posts' );
+	$role->add_cap( 'publish_posts' );
+	$role->add_cap( 'read' );
+	$role->add_cap( 'level_2' );
+	$role->add_cap( 'level_1' );
+	$role->add_cap( 'level_0' );
 
 	// Add caps for Contributor role
-	$role = get_role('contributor');
-	$role->add_cap('edit_posts');
-	$role->add_cap('read');
-	$role->add_cap('level_1');
-	$role->add_cap('level_0');
+	$role = get_role( 'contributor' );
+	$role->add_cap( 'edit_posts' );
+	$role->add_cap( 'read' );
+	$role->add_cap( 'level_1' );
+	$role->add_cap( 'level_0' );
 
 	// Add caps for Subscriber role
-	$role = get_role('subscriber');
-	$role->add_cap('read');
-	$role->add_cap('level_0');
+	$role = get_role( 'subscriber' );
+	$role->add_cap( 'read' );
+	$role->add_cap( 'level_0' );
 }
 
 /**
@@ -734,44 +805,45 @@
  * @since 2.1.0
  */
 function populate_roles_210() {
-	$roles = array('administrator', 'editor');
-	foreach ($roles as $role) {
-		$role = get_role($role);
-		if ( empty($role) )
+	$roles = array( 'administrator', 'editor' );
+	foreach ( $roles as $role ) {
+		$role = get_role( $role );
+		if ( empty( $role ) ) {
 			continue;
+		}
 
-		$role->add_cap('edit_others_pages');
-		$role->add_cap('edit_published_pages');
-		$role->add_cap('publish_pages');
-		$role->add_cap('delete_pages');
-		$role->add_cap('delete_others_pages');
-		$role->add_cap('delete_published_pages');
-		$role->add_cap('delete_posts');
-		$role->add_cap('delete_others_posts');
-		$role->add_cap('delete_published_posts');
-		$role->add_cap('delete_private_posts');
-		$role->add_cap('edit_private_posts');
-		$role->add_cap('read_private_posts');
-		$role->add_cap('delete_private_pages');
-		$role->add_cap('edit_private_pages');
-		$role->add_cap('read_private_pages');
-	}
-
-	$role = get_role('administrator');
-	if ( ! empty($role) ) {
-		$role->add_cap('delete_users');
-		$role->add_cap('create_users');
-	}
-
-	$role = get_role('author');
-	if ( ! empty($role) ) {
-		$role->add_cap('delete_posts');
-		$role->add_cap('delete_published_posts');
-	}
-
-	$role = get_role('contributor');
-	if ( ! empty($role) ) {
-		$role->add_cap('delete_posts');
+		$role->add_cap( 'edit_others_pages' );
+		$role->add_cap( 'edit_published_pages' );
+		$role->add_cap( 'publish_pages' );
+		$role->add_cap( 'delete_pages' );
+		$role->add_cap( 'delete_others_pages' );
+		$role->add_cap( 'delete_published_pages' );
+		$role->add_cap( 'delete_posts' );
+		$role->add_cap( 'delete_others_posts' );
+		$role->add_cap( 'delete_published_posts' );
+		$role->add_cap( 'delete_private_posts' );
+		$role->add_cap( 'edit_private_posts' );
+		$role->add_cap( 'read_private_posts' );
+		$role->add_cap( 'delete_private_pages' );
+		$role->add_cap( 'edit_private_pages' );
+		$role->add_cap( 'read_private_pages' );
+	}
+
+	$role = get_role( 'administrator' );
+	if ( ! empty( $role ) ) {
+		$role->add_cap( 'delete_users' );
+		$role->add_cap( 'create_users' );
+	}
+
+	$role = get_role( 'author' );
+	if ( ! empty( $role ) ) {
+		$role->add_cap( 'delete_posts' );
+		$role->add_cap( 'delete_published_posts' );
+	}
+
+	$role = get_role( 'contributor' );
+	if ( ! empty( $role ) ) {
+		$role->add_cap( 'delete_posts' );
 	}
 }
 
@@ -783,7 +855,7 @@
 function populate_roles_230() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'unfiltered_upload' );
 	}
 }
@@ -796,7 +868,7 @@
 function populate_roles_250() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'edit_dashboard' );
 	}
 }
@@ -809,7 +881,7 @@
 function populate_roles_260() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'update_plugins' );
 		$role->add_cap( 'delete_plugins' );
 	}
@@ -823,7 +895,7 @@
 function populate_roles_270() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'install_plugins' );
 		$role->add_cap( 'update_themes' );
 	}
@@ -837,7 +909,7 @@
 function populate_roles_280() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'install_themes' );
 	}
 }
@@ -850,7 +922,7 @@
 function populate_roles_300() {
 	$role = get_role( 'administrator' );
 
-	if ( !empty( $role ) ) {
+	if ( ! empty( $role ) ) {
 		$role->add_cap( 'update_core' );
 		$role->add_cap( 'list_users' );
 		$role->add_cap( 'remove_users' );
@@ -861,18 +933,19 @@
 	}
 }
 
-if ( !function_exists( 'install_network' ) ) :
-/**
+if ( ! function_exists( 'install_network' ) ) :
+	/**
  * Install Network.
  *
  * @since 3.0.0
  */
-function install_network() {
-	if ( ! defined( 'WP_INSTALLING_NETWORK' ) )
-		define( 'WP_INSTALLING_NETWORK', true );
+	function install_network() {
+		if ( ! defined( 'WP_INSTALLING_NETWORK' ) ) {
+			define( 'WP_INSTALLING_NETWORK', true );
+		}
 
-	dbDelta( wp_get_db_schema( 'global' ) );
-}
+		dbDelta( wp_get_db_schema( 'global' ) );
+	}
 endif;
 
 /**
@@ -899,20 +972,25 @@
 	global $wpdb, $current_site, $wp_db_version, $wp_rewrite;
 
 	$errors = new WP_Error();
-	if ( '' == $domain )
+	if ( '' == $domain ) {
 		$errors->add( 'empty_domain', __( 'You must provide a domain name.' ) );
-	if ( '' == $site_name )
+	}
+	if ( '' == $site_name ) {
 		$errors->add( 'empty_sitename', __( 'You must provide a name for your network of sites.' ) );
+	}
 
 	// Check for network collision.
-	if ( $network_id == $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) ) )
+	if ( $network_id == $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) ) ) {
 		$errors->add( 'siteid_exists', __( 'The network already exists.' ) );
+	}
 
-	if ( ! is_email( $email ) )
+	if ( ! is_email( $email ) ) {
 		$errors->add( 'invalid_email', __( 'You must provide a valid email address.' ) );
+	}
 
-	if ( $errors->get_error_code() )
+	if ( $errors->get_error_code() ) {
 		return $errors;
+	}
 
 	// If a user with the provided email does not exist, default to the current user as the new network admin.
 	$site_user = get_user_by( 'email', $email );
@@ -923,7 +1001,9 @@
 	// Set up site tables.
 	$template = get_option( 'template' );
 	$stylesheet = get_option( 'stylesheet' );
-	$allowed_themes = array( $stylesheet => true );
+	$allowed_themes = array(
+		$stylesheet => true,
+	);
 
 	if ( $template != $stylesheet ) {
 		$allowed_themes[ $template ] = true;
@@ -941,15 +1021,22 @@
 	}
 
 	if ( 1 == $network_id ) {
-		$wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path ) );
+		$wpdb->insert( $wpdb->site, array(
+			'domain' => $domain,
+			'path' => $path,
+		) );
 		$network_id = $wpdb->insert_id;
 	} else {
-		$wpdb->insert( $wpdb->site, array( 'domain' => $domain, 'path' => $path, 'id' => $network_id ) );
+		$wpdb->insert( $wpdb->site, array(
+			'domain' => $domain,
+			'path' => $path,
+			'id' => $network_id,
+		) );
 	}
 
 	wp_cache_delete( 'networks_have_paths', 'site-options' );
 
-	if ( !is_multisite() ) {
+	if ( ! is_multisite() ) {
 		$site_admins = array( $site_user->user_login );
 		$users = get_users( array(
 			'fields' => array( 'user_login' ),
@@ -984,13 +1071,31 @@
 
 	$misc_exts = array(
 		// Images.
-		'jpg', 'jpeg', 'png', 'gif',
+		'jpg',
+	'jpeg',
+	'png',
+	'gif',
 		// Video.
-		'mov', 'avi', 'mpg', '3gp', '3g2',
+		'mov',
+	'avi',
+	'mpg',
+	'3gp',
+	'3g2',
 		// "audio".
-		'midi', 'mid',
+		'midi',
+	'mid',
 		// Miscellaneous.
-		'pdf', 'doc', 'ppt', 'odt', 'pptx', 'docx', 'pps', 'ppsx', 'xls', 'xlsx', 'key',
+		'pdf',
+	'doc',
+	'ppt',
+	'odt',
+	'pptx',
+	'docx',
+	'pps',
+	'ppsx',
+	'xls',
+	'xlsx',
+	'key',
 	);
 	$audio_exts = wp_get_audio_extensions();
 	$video_exts = wp_get_video_extensions();
@@ -1022,8 +1127,9 @@
 		'active_sitewide_plugins' => array(),
 		'WPLANG' => get_locale(),
 	);
-	if ( ! $subdomain_install )
+	if ( ! $subdomain_install ) {
 		$sitemeta['illegal_names'][] = 'blog';
+	}
 
 	/**
 	 * Filters meta for a network on creation.
@@ -1037,11 +1143,13 @@
 
 	$insert = '';
 	foreach ( $sitemeta as $meta_key => $meta_value ) {
-		if ( is_array( $meta_value ) )
+		if ( is_array( $meta_value ) ) {
 			$meta_value = serialize( $meta_value );
-		if ( !empty( $insert ) )
+		}
+		if ( ! empty( $insert ) ) {
 			$insert .= ', ';
-		$insert .= $wpdb->prepare( "( %d, %s, %s)", $network_id, $meta_key, $meta_value );
+		}
+		$insert .= $wpdb->prepare( '( %d, %s, %s)', $network_id, $meta_key, $meta_value );
 	}
 	$wpdb->query( "INSERT INTO $wpdb->sitemeta ( site_id, meta_key, meta_value ) VALUES " . $insert );
 
@@ -1057,29 +1165,40 @@
 		$current_site->domain = $domain;
 		$current_site->path = $path;
 		$current_site->site_name = ucfirst( $domain );
-		$wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'blog_id' => 1, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) );
+		$wpdb->insert( $wpdb->blogs, array(
+			'site_id' => $network_id,
+			'blog_id' => 1,
+			'domain' => $domain,
+			'path' => $path,
+			'registered' => current_time( 'mysql' ),
+		) );
 		$current_site->blog_id = $blog_id = $wpdb->insert_id;
 		update_user_meta( $site_user->ID, 'source_domain', $domain );
 		update_user_meta( $site_user->ID, 'primary_blog', $blog_id );
 
-		if ( $subdomain_install )
+		if ( $subdomain_install ) {
 			$wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
-		else
-			$wp_rewrite->set_permalink_structure( '/blog/%year%/%monthnum%/%day%/%postname%/' );
+		} else { $wp_rewrite->set_permalink_structure( '/blog/%year%/%monthnum%/%day%/%postname%/' );
+		}
 
 		flush_rewrite_rules();
 
-		if ( ! $subdomain_install )
+		if ( ! $subdomain_install ) {
 			return true;
+		}
 
 		$vhost_ok = false;
 		$errstr = '';
 		$hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
-		$page = wp_remote_get( 'http://' . $hostname, array( 'timeout' => 5, 'httpversion' => '1.1' ) );
-		if ( is_wp_error( $page ) )
+		$page = wp_remote_get( 'http://' . $hostname, array(
+			'timeout' => 5,
+			'httpversion' => '1.1',
+		) );
+		if ( is_wp_error( $page ) ) {
 			$errstr = $page->get_error_message();
-		elseif ( 200 == wp_remote_retrieve_response_code( $page ) )
+		} elseif ( 200 == wp_remote_retrieve_response_code( $page ) ) {
 				$vhost_ok = true;
+		}
 
 		if ( ! $vhost_ok ) {
 			$msg = '<p><strong>' . __( 'Warning! Wildcard DNS may not be configured correctly!' ) . '</strong></p>';
@@ -1089,7 +1208,7 @@
 				__( 'The installer attempted to contact a random hostname (%s) on your domain.' ),
 				'<code>' . $hostname . '</code>'
 			);
-			if ( ! empty ( $errstr ) ) {
+			if ( ! empty( $errstr ) ) {
 				/* translators: %s: error message */
 				$msg .= ' ' . sprintf( __( 'This resulted in an error message: %s' ), '<code>' . $errstr . '</code>' );
 			}
@@ -1105,7 +1224,7 @@
 
 			return new WP_Error( 'no_wildcard_dns', $msg );
 		}
-	}
+	}// End if().
 
 	return true;
 }
Index: src/wp-admin/includes/screen.php
===================================================================
--- src/wp-admin/includes/screen.php	(revision 40901)
+++ src/wp-admin/includes/screen.php	(working copy)
@@ -17,8 +17,9 @@
  * @return array Containing the headers in the format id => UI String
  */
 function get_column_headers( $screen ) {
-	if ( is_string( $screen ) )
+	if ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
 	static $column_headers = array();
 
@@ -98,13 +99,15 @@
 function meta_box_prefs( $screen ) {
 	global $wp_meta_boxes;
 
-	if ( is_string( $screen ) )
+	if ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
-	if ( empty($wp_meta_boxes[$screen->id]) )
+	if ( empty( $wp_meta_boxes[ $screen->id ] ) ) {
 		return;
+	}
 
-	$hidden = get_hidden_meta_boxes($screen);
+	$hidden = get_hidden_meta_boxes( $screen );
 
 	foreach ( array_keys( $wp_meta_boxes[ $screen->id ] ) as $context ) {
 		foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
@@ -112,11 +115,13 @@
 				continue;
 			}
 			foreach ( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] as $box ) {
-				if ( false == $box || ! $box['title'] )
+				if ( false == $box || ! $box['title'] ) {
 					continue;
+				}
 				// Submit box cannot be hidden
-				if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] )
+				if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) {
 					continue;
+				}
 
 				$widget_title = $box['title'];
 
@@ -144,8 +149,9 @@
  * @return array Hidden Meta Boxes
  */
 function get_hidden_meta_boxes( $screen ) {
-	if ( is_string( $screen ) )
+	if ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
 	$hidden = get_user_option( "metaboxhidden_{$screen->id}" );
 
@@ -155,10 +161,10 @@
 	if ( $use_defaults ) {
 		$hidden = array();
 		if ( 'post' == $screen->base ) {
-			if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type )
-				$hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
-			else
-				$hidden = array( 'slugdiv' );
+			if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type ) {
+				$hidden = array( 'slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv' );
+			} else { $hidden = array( 'slugdiv' );
+			}
 		}
 
 		/**
@@ -196,8 +202,9 @@
 function add_screen_option( $option, $args = array() ) {
 	$current_screen = get_current_screen();
 
-	if ( ! $current_screen )
+	if ( ! $current_screen ) {
 		return;
+	}
 
 	$current_screen->add_option( $option, $args );
 }
@@ -214,8 +221,9 @@
 function get_current_screen() {
 	global $current_screen;
 
-	if ( ! isset( $current_screen ) )
+	if ( ! isset( $current_screen ) ) {
 		return null;
+	}
 
 	return $current_screen;
 }
Index: src/wp-admin/includes/taxonomy.php
===================================================================
--- src/wp-admin/includes/taxonomy.php	(revision 40901)
+++ src/wp-admin/includes/taxonomy.php	(working copy)
@@ -22,9 +22,10 @@
  * @return mixed
  */
 function category_exists( $cat_name, $parent = null ) {
-	$id = term_exists($cat_name, 'category', $parent);
-	if ( is_array($id) )
+	$id = term_exists( $cat_name, 'category', $parent );
+	if ( is_array( $id ) ) {
 		$id = $id['term_id'];
+	}
 	return $id;
 }
 
@@ -52,10 +53,14 @@
  * @return int|WP_Error
  */
 function wp_create_category( $cat_name, $parent = 0 ) {
-	if ( $id = category_exists($cat_name, $parent) )
+	if ( $id = category_exists( $cat_name, $parent ) ) {
 		return $id;
+	}
 
-	return wp_insert_category( array('cat_name' => $cat_name, 'category_parent' => $parent) );
+	return wp_insert_category( array(
+		'cat_name' => $cat_name,
+		'category_parent' => $parent,
+	) );
 }
 
 /**
@@ -68,7 +73,7 @@
  * @return array List of categories to create for the given post.
  */
 function wp_create_categories( $categories, $post_id = '' ) {
-	$cat_ids = array ();
+	$cat_ids = array();
 	foreach ( $categories as $category ) {
 		if ( $id = category_exists( $category ) ) {
 			$cat_ids[] = $id;
@@ -77,8 +82,9 @@
 		}
 	}
 
-	if ( $post_id )
-		wp_set_post_categories($post_id, $cat_ids);
+	if ( $post_id ) {
+		wp_set_post_categories( $post_id, $cat_ids );
+	}
 
 	return $cat_ids;
 }
@@ -120,7 +126,7 @@
 	$catarr['cat_ID'] = (int) $catarr['cat_ID'];
 
 	// Are we updating or creating?
-	$update = ! empty ( $catarr['cat_ID'] );
+	$update = ! empty( $catarr['cat_ID'] );
 
 	$name = $catarr['cat_name'];
 	$description = $catarr['category_description'];
@@ -136,7 +142,7 @@
 		$parent = 0;
 	}
 
-	$args = compact('name', 'slug', 'parent', 'description');
+	$args = compact( 'name', 'slug', 'parent', 'description' );
 
 	if ( $update ) {
 		$catarr['cat_ID'] = wp_update_term( $catarr['cat_ID'], $catarr['taxonomy'], $args );
@@ -165,23 +171,24 @@
  * @param array $catarr The 'cat_ID' value is required. All other keys are optional.
  * @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure.
  */
-function wp_update_category($catarr) {
+function wp_update_category( $catarr ) {
 	$cat_ID = (int) $catarr['cat_ID'];
 
-	if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) )
+	if ( isset( $catarr['category_parent'] ) && ($cat_ID == $catarr['category_parent']) ) {
 		return false;
+	}
 
 	// First, get all of the original fields
 	$category = get_term( $cat_ID, 'category', ARRAY_A );
 	_make_cat_compat( $category );
 
 	// Escape data pulled from DB.
-	$category = wp_slash($category);
+	$category = wp_slash( $category );
 
 	// Merge old and new fields with new fields overwriting old ones.
-	$catarr = array_merge($category, $catarr);
+	$catarr = array_merge( $category, $catarr );
 
-	return wp_insert_category($catarr);
+	return wp_insert_category( $catarr );
 }
 
 //
@@ -196,8 +203,8 @@
  * @param int|string $tag_name
  * @return mixed
  */
-function tag_exists($tag_name) {
-	return term_exists($tag_name, 'post_tag');
+function tag_exists( $tag_name ) {
+	return term_exists( $tag_name, 'post_tag' );
 }
 
 /**
@@ -208,8 +215,8 @@
  * @param int|string $tag_name
  * @return array|WP_Error
  */
-function wp_create_tag($tag_name) {
-	return wp_create_term( $tag_name, 'post_tag');
+function wp_create_tag( $tag_name ) {
+	return wp_create_term( $tag_name, 'post_tag' );
 }
 
 /**
@@ -222,7 +229,7 @@
  * @return string|bool|WP_Error
  */
 function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
-	return get_terms_to_edit( $post_id, $taxonomy);
+	return get_terms_to_edit( $post_id, $taxonomy );
 }
 
 /**
@@ -236,8 +243,9 @@
  */
 function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
 	$post_id = (int) $post_id;
-	if ( !$post_id )
+	if ( ! $post_id ) {
 		return false;
+	}
 
 	$terms = get_object_term_cache( $post_id, $taxonomy );
 	if ( false === $terms ) {
@@ -282,9 +290,10 @@
  * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.
  * @return array|WP_Error
  */
-function wp_create_term($tag_name, $taxonomy = 'post_tag') {
-	if ( $id = term_exists($tag_name, $taxonomy) )
+function wp_create_term( $tag_name, $taxonomy = 'post_tag' ) {
+	if ( $id = term_exists( $tag_name, $taxonomy ) ) {
 		return $id;
+	}
 
-	return wp_insert_term($tag_name, $taxonomy);
+	return wp_insert_term( $tag_name, $taxonomy );
 }
Index: src/wp-admin/includes/template.php
===================================================================
--- src/wp-admin/includes/template.php	(revision 40901)
+++ src/wp-admin/includes/template.php	(working copy)
@@ -44,7 +44,7 @@
 		'selected_cats' => $selected_cats,
 		'popular_cats' => $popular_cats,
 		'walker' => $walker,
-		'checked_ontop' => $checked_ontop
+		'checked_ontop' => $checked_ontop,
 	) );
 }
 
@@ -75,7 +75,7 @@
  * }
  */
 function wp_terms_checklist( $post_id = 0, $args = array() ) {
- 	$defaults = array(
+	 $defaults = array(
 		'descendants_and_self' => 0,
 		'selected_cats' => false,
 		'popular_cats' => false,
@@ -108,7 +108,9 @@
 	$taxonomy = $r['taxonomy'];
 	$descendants_and_self = (int) $r['descendants_and_self'];
 
-	$args = array( 'taxonomy' => $taxonomy );
+	$args = array(
+		'taxonomy' => $taxonomy,
+	);
 
 	$tax = get_taxonomy( $taxonomy );
 	$args['disabled'] = ! current_user_can( $tax->cap->assign_terms );
@@ -118,7 +120,9 @@
 	if ( is_array( $r['selected_cats'] ) ) {
 		$args['selected_cats'] = $r['selected_cats'];
 	} elseif ( $post_id ) {
-		$args['selected_cats'] = wp_get_object_terms( $post_id, $taxonomy, array_merge( $args, array( 'fields' => 'ids' ) ) );
+		$args['selected_cats'] = wp_get_object_terms( $post_id, $taxonomy, array_merge( $args, array(
+			'fields' => 'ids',
+		) ) );
 	} else {
 		$args['selected_cats'] = array();
 	}
@@ -130,19 +134,21 @@
 			'orderby' => 'count',
 			'order' => 'DESC',
 			'number' => 10,
-			'hierarchical' => false
+			'hierarchical' => false,
 		) );
 	}
 	if ( $descendants_and_self ) {
 		$categories = (array) get_terms( $taxonomy, array(
 			'child_of' => $descendants_and_self,
 			'hierarchical' => 0,
-			'hide_empty' => 0
+			'hide_empty' => 0,
 		) );
 		$self = get_term( $descendants_and_self, $taxonomy );
 		array_unshift( $categories, $self );
 	} else {
-		$categories = (array) get_terms( $taxonomy, array( 'get' => 'all' ) );
+		$categories = (array) get_terms( $taxonomy, array(
+			'get' => 'all',
+		) );
 	}
 
 	$output = '';
@@ -153,9 +159,9 @@
 		$keys = array_keys( $categories );
 
 		foreach ( $keys as $k ) {
-			if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) {
-				$checked_categories[] = $categories[$k];
-				unset( $categories[$k] );
+			if ( in_array( $categories[ $k ]->term_id, $args['selected_cats'] ) ) {
+				$checked_categories[] = $categories[ $k ];
+				unset( $categories[ $k ] );
 			}
 		}
 
@@ -191,20 +197,28 @@
 function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
 	$post = get_post();
 
-	if ( $post && $post->ID )
-		$checked_terms = wp_get_object_terms($post->ID, $taxonomy, array('fields'=>'ids'));
-	else
-		$checked_terms = array();
+	if ( $post && $post->ID ) {
+		$checked_terms = wp_get_object_terms( $post->ID, $taxonomy, array(
+			'fields' => 'ids',
+		) );
+	} else { $checked_terms = array();
+	}
 
-	$terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
+	$terms = get_terms( $taxonomy, array(
+		'orderby' => 'count',
+		'order' => 'DESC',
+		'number' => $number,
+		'hierarchical' => false,
+	) );
 
-	$tax = get_taxonomy($taxonomy);
+	$tax = get_taxonomy( $taxonomy );
 
 	$popular_ids = array();
 	foreach ( (array) $terms as $term ) {
 		$popular_ids[] = $term->term_id;
-		if ( !$echo ) // Hack for Ajax use.
+		if ( ! $echo ) { // Hack for Ajax use.
 			continue;
+		}
 		$id = "popular-$taxonomy-$term->term_id";
 		$checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : '';
 		?>
@@ -246,10 +260,14 @@
 		$checked_categories[] = $default;
 	}
 
-	$categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );
+	$categories = get_terms( 'link_category', array(
+		'orderby' => 'name',
+		'hide_empty' => 0,
+	) );
 
-	if ( empty( $categories ) )
+	if ( empty( $categories ) ) {
 		return;
+	}
 
 	foreach ( $categories as $category ) {
 		$cat_id = $category->term_id;
@@ -257,7 +275,7 @@
 		/** This filter is documented in wp-includes/category-template.php */
 		$name = esc_html( apply_filters( 'the_category', $category->name ) );
 		$checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
-		echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
+		echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, '</label></li>';
 	}
 }
 
@@ -268,10 +286,11 @@
  *
  * @param WP_Post $post Post object.
  */
-function get_inline_data($post) {
-	$post_type_object = get_post_type_object($post->post_type);
-	if ( ! current_user_can( 'edit_post', $post->ID ) )
+function get_inline_data( $post ) {
+	$post_type_object = get_post_type_object( $post->post_type );
+	if ( ! current_user_can( 'edit_post', $post->ID ) ) {
 		return;
+	}
 
 	$title = esc_textarea( trim( $post->post_title ) );
 
@@ -304,7 +323,7 @@
 	}
 
 	$taxonomy_names = get_object_taxonomies( $post->post_type );
-	foreach ( $taxonomy_names as $taxonomy_name) {
+	foreach ( $taxonomy_names as $taxonomy_name ) {
 		$taxonomy = get_taxonomy( $taxonomy_name );
 
 		if ( $taxonomy->hierarchical && $taxonomy->show_ui ) {
@@ -325,17 +344,19 @@
 				$terms_to_edit = '';
 			}
 
-			echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">'
+			echo '<div class="tags_input" id="' . $taxonomy_name . '_' . $post->ID . '">'
 				. esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>';
 
 		}
 	}
 
-	if ( !$post_type_object->hierarchical )
-		echo '<div class="sticky">' . (is_sticky($post->ID) ? 'sticky' : '') . '</div>';
+	if ( ! $post_type_object->hierarchical ) {
+		echo '<div class="sticky">' . (is_sticky( $post->ID ) ? 'sticky' : '') . '</div>';
+	}
 
-	if ( post_type_supports( $post->post_type, 'post-formats' ) )
+	if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
 		echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
+	}
 
 	echo '</div>';
 }
@@ -369,18 +390,22 @@
 	 * @param string $content The reply-to form content.
 	 * @param array  $args    An array of default args.
 	 */
-	$content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );
+	$content = apply_filters( 'wp_comment_reply', '', array(
+		'position' => $position,
+		'checkbox' => $checkbox,
+		'mode' => $mode,
+	) );
 
-	if ( ! empty($content) ) {
+	if ( ! empty( $content ) ) {
 		echo $content;
 		return;
 	}
 
 	if ( ! $wp_list_table ) {
 		if ( $mode == 'single' ) {
-			$wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
+			$wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' );
 		} else {
-			$wp_list_table = _get_list_table('WP_Comments_List_Table');
+			$wp_list_table = _get_list_table( 'WP_Comments_List_Table' );
 		}
 	}
 
@@ -401,8 +426,14 @@
 	<div id="replycontainer">
 	<label for="replycontent" class="screen-reader-text"><?php _e( 'Comment' ); ?></label>
 	<?php
-	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
-	wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
+	$quicktags_settings = array(
+		'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close',
+	);
+	wp_editor( '', 'replycontent', array(
+		'media_buttons' => false,
+		'tinymce' => false,
+		'quicktags' => $quicktags_settings,
+	) );
 	?>
 	</div>
 
@@ -413,22 +444,22 @@
 		</div>
 
 		<div class="inside">
-		<label for="author-email"><?php _e('Email') ?></label>
+		<label for="author-email"><?php _e( 'Email' ) ?></label>
 		<input type="text" name="newcomment_author_email" size="50" value="" id="author-email" />
 		</div>
 
 		<div class="inside">
-		<label for="author-url"><?php _e('URL') ?></label>
+		<label for="author-url"><?php _e( 'URL' ) ?></label>
 		<input type="text" id="author-url" name="newcomment_author_url" class="code" size="103" value="" />
 		</div>
 	</div>
 
 	<p id="replysubmit" class="submit">
 	<a href="#comments-form" class="save button button-primary alignright">
-	<span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
-	<span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
-	<span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
-	<a href="#comments-form" class="cancel button alignleft"><?php _e('Cancel'); ?></a>
+	<span id="addbtn" style="display:none;"><?php _e( 'Add Comment' ); ?></span>
+	<span id="savebtn" style="display:none;"><?php _e( 'Update Comment' ); ?></span>
+	<span id="replybtn" style="display:none;"><?php _e( 'Submit Reply' ); ?></span></a>
+	<a href="#comments-form" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></a>
 	<span class="waiting spinner"></span>
 	<span class="error" style="display:none;"></span>
 	</p>
@@ -439,11 +470,12 @@
 	<input type="hidden" name="status" id="status" value="" />
 	<input type="hidden" name="position" id="position" value="<?php echo $position; ?>" />
 	<input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" />
-	<input type="hidden" name="mode" id="mode" value="<?php echo esc_attr($mode); ?>" />
+	<input type="hidden" name="mode" id="mode" value="<?php echo esc_attr( $mode ); ?>" />
 	<?php
 		wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false );
-		if ( current_user_can( 'unfiltered_html' ) )
-			wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
+	if ( current_user_can( 'unfiltered_html' ) ) {
+		wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
+	}
 	?>
 	</fieldset>
 <?php if ( $table_row ) : ?>
@@ -463,10 +495,10 @@
 function wp_comment_trashnotice() {
 ?>
 <div class="hidden" id="trash-undo-holder">
-	<div class="trash-undo-inside"><?php printf(__('Comment by %s moved to the trash.'), '<strong></strong>'); ?> <span class="undo untrash"><a href="#"><?php _e('Undo'); ?></a></span></div>
+	<div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
 </div>
 <div class="hidden" id="spam-undo-holder">
-	<div class="spam-undo-inside"><?php printf(__('Comment by %s marked as spam.'), '<strong></strong>'); ?> <span class="undo unspam"><a href="#"><?php _e('Undo'); ?></a></span></div>
+	<div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
 </div>
 <?php
 }
@@ -506,8 +538,9 @@
 	</thead>
 	<tbody id='the-list' data-wp-lists='list:meta'>
 <?php
-	foreach ( $meta as $entry )
-		echo _list_meta_row( $entry, $count );
+foreach ( $meta as $entry ) {
+	echo _list_meta_row( $entry, $count );
+}
 ?>
 	</tbody>
 </table>
@@ -528,11 +561,13 @@
 function _list_meta_row( $entry, &$count ) {
 	static $update_nonce = '';
 
-	if ( is_protected_meta( $entry['meta_key'], 'post' ) )
+	if ( is_protected_meta( $entry['meta_key'], 'post' ) ) {
 		return '';
+	}
 
-	if ( ! $update_nonce )
+	if ( ! $update_nonce ) {
 		$update_nonce = wp_create_nonce( 'add-meta' );
+	}
 
 	$r = '';
 	++ $count;
@@ -548,7 +583,7 @@
 		}
 	}
 
-	$entry['meta_key'] = esc_attr($entry['meta_key']);
+	$entry['meta_key'] = esc_attr( $entry['meta_key'] );
 	$entry['meta_value'] = esc_textarea( $entry['meta_value'] ); // using a <textarea />
 	$entry['meta_id'] = (int) $entry['meta_id'];
 
@@ -558,12 +593,16 @@
 	$r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />";
 
 	$r .= "\n\t\t<div class='submit'>";
-	$r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) );
+	$r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array(
+		'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce",
+	) );
 	$r .= "\n\t\t";
-	$r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) );
-	$r .= "</div>";
+	$r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array(
+		'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce",
+	) );
+	$r .= '</div>';
 	$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
-	$r .= "</td>";
+	$r .= '</td>';
 
 	$r .= "\n\t\t<td><label class='screen-reader-text' for='meta-{$entry['meta_id']}-value'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta-{$entry['meta_id']}-value' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
 	return $r;
@@ -638,17 +677,18 @@
 <option value="#NONE#"><?php _e( '&mdash; Select &mdash;' ); ?></option>
 <?php
 
-	foreach ( $keys as $key ) {
-		if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) )
-			continue;
-		echo "\n<option value='" . esc_attr($key) . "'>" . esc_html($key) . "</option>";
+foreach ( $keys as $key ) {
+	if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) ) {
+		continue;
 	}
+	echo "\n<option value='" . esc_attr( $key ) . "'>" . esc_html( $key ) . '</option>';
+}
 ?>
 </select>
 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
 <a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
-<span id="enternew"><?php _e('Enter new'); ?></span>
-<span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
+<span id="enternew"><?php _e( 'Enter new' ); ?></span>
+<span id="cancelnew" class="hidden"><?php _e( 'Cancel' ); ?></span></a>
 <?php } else { ?>
 <input type="text" id="metakeyinput" name="metakeyinput" value="" />
 <?php } ?>
@@ -658,7 +698,10 @@
 
 <tr><td colspan="2">
 <div class="submit">
-<?php submit_button( __( 'Add Custom Field' ), '', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
+<?php submit_button( __( 'Add Custom Field' ), '', 'addmeta', false, array(
+	'id' => 'newmeta-submit',
+	'data-wp-lists' => 'add:the-list:newmeta',
+) ); ?>
 </div>
 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
 </td></tr>
@@ -686,17 +729,19 @@
 	global $wp_locale;
 	$post = get_post();
 
-	if ( $for_post )
-		$edit = ! ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) );
+	if ( $for_post ) {
+		$edit = ! ( in_array( $post->post_status, array( 'draft', 'pending' ) ) && ( ! $post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) );
+	}
 
 	$tab_index_attribute = '';
-	if ( (int) $tab_index > 0 )
+	if ( (int) $tab_index > 0 ) {
 		$tab_index_attribute = " tabindex=\"$tab_index\"";
+	}
 
 	// todo: Remove this?
 	// echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
 
-	$time_adj = current_time('timestamp');
+	$time_adj = current_time( 'timestamp' );
 	$post_date = ($for_post) ? $post->post_date : get_comment()->comment_date;
 	$jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj );
 	$mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj );
@@ -712,8 +757,8 @@
 	$cur_mn = gmdate( 'i', $time_adj );
 
 	$month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
-	for ( $i = 1; $i < 13; $i = $i +1 ) {
-		$monthnum = zeroise($i, 2);
+	for ( $i = 1; $i < 13; $i = $i + 1 ) {
+		$monthnum = zeroise( $i, 2 );
 		$monthtext = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
 		$month .= "\t\t\t" . '<option value="' . $monthnum . '" data-text="' . $monthtext . '" ' . selected( $monthnum, $mm, false ) . '>';
 		/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
@@ -732,7 +777,8 @@
 
 	echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
 
-	if ( $multi ) return;
+	if ( $multi ) { return;
+	}
 
 	echo "\n\n";
 	$map = array(
@@ -752,8 +798,8 @@
 ?>
 
 <p>
-<a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a>
-<a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
+<a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e( 'OK' ); ?></a>
+<a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
 </p>
 <?php
 }
@@ -794,19 +840,20 @@
 function parent_dropdown( $default = 0, $parent = 0, $level = 0, $post = null ) {
 	global $wpdb;
 	$post = get_post( $post );
-	$items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) );
+	$items = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent ) );
 
 	if ( $items ) {
 		foreach ( $items as $item ) {
 			// A page cannot be its own parent.
-			if ( $post && $post->ID && $item->ID == $post->ID )
+			if ( $post && $post->ID && $item->ID == $post->ID ) {
 				continue;
+			}
 
 			$pad = str_repeat( '&nbsp;', $level * 3 );
 			$selected = selected( $default, $item->ID, false );
 
-			echo "\n\t<option class='level-$level' value='$item->ID' $selected>$pad " . esc_html($item->post_title) . "</option>";
-			parent_dropdown( $default, $item->ID, $level +1 );
+			echo "\n\t<option class='level-$level' value='$item->ID' $selected>$pad " . esc_html( $item->post_title ) . '</option>';
+			parent_dropdown( $default, $item->ID, $level + 1 );
 		}
 	} else {
 		return false;
@@ -826,7 +873,7 @@
 	$editable_roles = array_reverse( get_editable_roles() );
 
 	foreach ( $editable_roles as $role => $details ) {
-		$name = translate_user_role($details['name'] );
+		$name = translate_user_role( $details['name'] );
 		// preselect specified role
 		if ( $selected == $role ) {
 			$r .= "\n\t<option selected='selected' value='" . esc_attr( $role ) . "'>$name</option>";
@@ -860,18 +907,18 @@
 	$size = size_format( $bytes );
 	$upload_dir = wp_upload_dir();
 	if ( ! empty( $upload_dir['error'] ) ) :
-		?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
+		?><div class="error"><p><?php _e( 'Before you can upload your import file, you will need to fix the following error:' ); ?></p>
 		<p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
 	else :
 ?>
 <form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
 <p>
-<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?>)
+<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __( 'Maximum size: %s' ), $size ); ?>)
 <input type="file" id="upload" name="import" size="25" />
 <input type="hidden" name="action" value="save" />
 <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
 </p>
-<?php submit_button( __('Upload file and import'), 'primary' ); ?>
+<?php submit_button( __( 'Upload file and import' ), 'primary' ); ?>
 </form>
 <?php
 	endif;
@@ -924,59 +971,72 @@
 
 	$page = $screen->id;
 
-	if ( !isset($wp_meta_boxes) )
+	if ( ! isset( $wp_meta_boxes ) ) {
 		$wp_meta_boxes = array();
-	if ( !isset($wp_meta_boxes[$page]) )
-		$wp_meta_boxes[$page] = array();
-	if ( !isset($wp_meta_boxes[$page][$context]) )
-		$wp_meta_boxes[$page][$context] = array();
-
-	foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
-		foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
-			if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
+	}
+	if ( ! isset( $wp_meta_boxes[ $page ] ) ) {
+		$wp_meta_boxes[ $page ] = array();
+	}
+	if ( ! isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
+		$wp_meta_boxes[ $page ][ $context ] = array();
+	}
+
+	foreach ( array_keys( $wp_meta_boxes[ $page ] ) as $a_context ) {
+		foreach ( array( 'high', 'core', 'default', 'low' ) as $a_priority ) {
+			if ( ! isset( $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ] ) ) {
 				continue;
+			}
 
 			// If a core box was previously added or removed by a plugin, don't add.
 			if ( 'core' == $priority ) {
 				// If core box previously deleted, don't add
-				if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
+				if ( false === $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ] ) {
 					return;
+				}
 
 				/*
 				 * If box was added with default priority, give it core priority to
 				 * maintain sort order.
 				 */
 				if ( 'default' == $a_priority ) {
-					$wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
-					unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
+					$wp_meta_boxes[ $page ][ $a_context ]['core'][ $id ] = $wp_meta_boxes[ $page ][ $a_context ]['default'][ $id ];
+					unset( $wp_meta_boxes[ $page ][ $a_context ]['default'][ $id ] );
 				}
 				return;
 			}
 			// If no priority given and id already present, use existing priority.
-			if ( empty($priority) ) {
+			if ( empty( $priority ) ) {
 				$priority = $a_priority;
-			/*
-			 * Else, if we're adding to the sorted priority, we don't know the title
-			 * or callback. Grab them from the previously added context/priority.
-			 */
+				/*
+				* Else, if we're adding to the sorted priority, we don't know the title
+				* or callback. Grab them from the previously added context/priority.
+				*/
 			} elseif ( 'sorted' == $priority ) {
-				$title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
-				$callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
-				$callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
+				$title = $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ]['title'];
+				$callback = $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ]['callback'];
+				$callback_args = $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ]['args'];
 			}
 			// An id can be in only one priority and one context.
-			if ( $priority != $a_priority || $context != $a_context )
-				unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
-		}
-	}
+			if ( $priority != $a_priority || $context != $a_context ) {
+				unset( $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ] );
+			}
+		}// End foreach().
+	}// End foreach().
 
-	if ( empty($priority) )
+	if ( empty( $priority ) ) {
 		$priority = 'low';
+	}
 
-	if ( !isset($wp_meta_boxes[$page][$context][$priority]) )
-		$wp_meta_boxes[$page][$context][$priority] = array();
+	if ( ! isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
+		$wp_meta_boxes[ $page ][ $context ][ $priority ] = array();
+	}
 
-	$wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $callback_args);
+	$wp_meta_boxes[ $page ][ $context ][ $priority ][ $id ] = array(
+		'id' => $id,
+		'title' => $title,
+		'callback' => $callback,
+		'args' => $callback_args,
+	);
 }
 
 /**
@@ -996,16 +1056,17 @@
 	global $wp_meta_boxes;
 	static $already_sorted = false;
 
-	if ( empty( $screen ) )
+	if ( empty( $screen ) ) {
 		$screen = get_current_screen();
-	elseif ( is_string( $screen ) )
+	} elseif ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
 	$page = $screen->id;
 
 	$hidden = get_hidden_meta_boxes( $screen );
 
-	printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context));
+	printf( '<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars( $context ) );
 
 	// Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
 	if ( ! $already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
@@ -1024,20 +1085,21 @@
 
 	if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
 		foreach ( array( 'high', 'sorted', 'core', 'default', 'low' ) as $priority ) {
-			if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ]) ) {
+			if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
 				foreach ( (array) $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
-					if ( false == $box || ! $box['title'] )
+					if ( false == $box || ! $box['title'] ) {
 						continue;
+					}
 					$i++;
-					$hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : '';
-					echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n";
+					$hidden_class = in_array( $box['id'], $hidden ) ? ' hide-if-js' : '';
+					echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes( $box['id'], $page ) . $hidden_class . '" ' . '>' . "\n";
 					if ( 'dashboard_browser_nag' != $box['id'] ) {
-						$widget_title = $box[ 'title' ];
+						$widget_title = $box['title'];
 
-						if ( is_array( $box[ 'args' ] ) && isset( $box[ 'args' ][ '__widget_basename' ] ) ) {
-							$widget_title = $box[ 'args' ][ '__widget_basename' ];
+						if ( is_array( $box['args'] ) && isset( $box['args']['__widget_basename'] ) ) {
+							$widget_title = $box['args']['__widget_basename'];
 							// Do not pass this parameter to the user callback function.
-							unset( $box[ 'args' ][ '__widget_basename' ] );
+							unset( $box['args']['__widget_basename'] );
 						}
 
 						echo '<button type="button" class="handlediv" aria-expanded="true">';
@@ -1047,7 +1109,7 @@
 					}
 					echo "<h2 class='hndle'><span>{$box['title']}</span></h2>\n";
 					echo '<div class="inside">' . "\n";
-					call_user_func($box['callback'], $object, $box);
+					call_user_func( $box['callback'], $object, $box );
 					echo "</div>\n";
 					echo "</div>\n";
 				}
@@ -1055,7 +1117,7 @@
 		}
 	}
 
-	echo "</div>";
+	echo '</div>';
 
 	return $i;
 
@@ -1098,15 +1160,19 @@
 
 	$page = $screen->id;
 
-	if ( !isset($wp_meta_boxes) )
+	if ( ! isset( $wp_meta_boxes ) ) {
 		$wp_meta_boxes = array();
-	if ( !isset($wp_meta_boxes[$page]) )
-		$wp_meta_boxes[$page] = array();
-	if ( !isset($wp_meta_boxes[$page][$context]) )
-		$wp_meta_boxes[$page][$context] = array();
+	}
+	if ( ! isset( $wp_meta_boxes[ $page ] ) ) {
+		$wp_meta_boxes[ $page ] = array();
+	}
+	if ( ! isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
+		$wp_meta_boxes[ $page ][ $context ] = array();
+	}
 
-	foreach ( array('high', 'core', 'default', 'low') as $priority )
-		$wp_meta_boxes[$page][$context][$priority][$id] = false;
+	foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
+		$wp_meta_boxes[ $page ][ $context ][ $priority ][ $id ] = false;
+	}
 }
 
 /**
@@ -1130,10 +1196,11 @@
 
 	wp_enqueue_script( 'accordion' );
 
-	if ( empty( $screen ) )
+	if ( empty( $screen ) ) {
 		$screen = get_current_screen();
-	elseif ( is_string( $screen ) )
+	} elseif ( is_string( $screen ) ) {
 		$screen = convert_to_screen( $screen );
+	}
 
 	$page = $screen->id;
 
@@ -1149,8 +1216,9 @@
 		foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
 			if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
 				foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
-					if ( false == $box || ! $box['title'] )
+					if ( false == $box || ! $box['title'] ) {
 						continue;
+					}
 					$i++;
 					$hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
 
@@ -1205,7 +1273,7 @@
  *                           'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using
  *                           add_options_page();
  */
-function add_settings_section($id, $title, $callback, $page) {
+function add_settings_section( $id, $title, $callback, $page ) {
 	global $wp_settings_sections;
 
 	if ( 'misc' == $page ) {
@@ -1228,7 +1296,11 @@
 		$page = 'reading';
 	}
 
-	$wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
+	$wp_settings_sections[ $page ][ $id ] = array(
+		'id' => $id,
+		'title' => $title,
+		'callback' => $callback,
+	);
 }
 
 /**
@@ -1266,7 +1338,7 @@
  *                             field is output.
  * }
  */
-function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
+function add_settings_field( $id, $title, $callback, $page, $section = 'default', $args = array() ) {
 	global $wp_settings_fields;
 
 	if ( 'misc' == $page ) {
@@ -1289,7 +1361,12 @@
 		$page = 'reading';
 	}
 
-	$wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args);
+	$wp_settings_fields[ $page ][ $section ][ $id ] = array(
+		'id' => $id,
+		'title' => $title,
+		'callback' => $callback,
+		'args' => $args,
+	);
 }
 
 /**
@@ -1308,18 +1385,22 @@
 function do_settings_sections( $page ) {
 	global $wp_settings_sections, $wp_settings_fields;
 
-	if ( ! isset( $wp_settings_sections[$page] ) )
+	if ( ! isset( $wp_settings_sections[ $page ] ) ) {
 		return;
+	}
 
-	foreach ( (array) $wp_settings_sections[$page] as $section ) {
-		if ( $section['title'] )
+	foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
+		if ( $section['title'] ) {
 			echo "<h2>{$section['title']}</h2>\n";
+		}
 
-		if ( $section['callback'] )
+		if ( $section['callback'] ) {
 			call_user_func( $section['callback'], $section );
+		}
 
-		if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) )
+		if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ) {
 			continue;
+		}
 		echo '<table class="form-table">';
 		do_settings_fields( $page, $section['id'] );
 		echo '</table>';
@@ -1340,13 +1421,14 @@
  * @param string $page Slug title of the admin page who's settings fields you want to show.
  * @param string $section Slug title of the settings section who's fields you want to show.
  */
-function do_settings_fields($page, $section) {
+function do_settings_fields( $page, $section ) {
 	global $wp_settings_fields;
 
-	if ( ! isset( $wp_settings_fields[$page][$section] ) )
+	if ( ! isset( $wp_settings_fields[ $page ][ $section ] ) ) {
 		return;
+	}
 
-	foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
+	foreach ( (array) $wp_settings_fields[ $page ][ $section ] as $field ) {
 		$class = '';
 
 		if ( ! empty( $field['args']['class'] ) ) {
@@ -1362,7 +1444,7 @@
 		}
 
 		echo '<td>';
-		call_user_func($field['callback'], $field['args']);
+		call_user_func( $field['callback'], $field['args'] );
 		echo '</td>';
 		echo '</tr>';
 	}
@@ -1399,7 +1481,7 @@
 		'setting' => $setting,
 		'code'    => $code,
 		'message' => $message,
-		'type'    => $type
+		'type'    => $type,
 	);
 }
 
@@ -1434,8 +1516,9 @@
 	 * This allows the $sanitize_callback from register_setting() to run, adding
 	 * any settings errors you want to show by default.
 	 */
-	if ( $sanitize )
+	if ( $sanitize ) {
 		sanitize_option( $setting, get_option( $setting ) );
+	}
 
 	// If settings were passed back from options.php then use them.
 	if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) {
@@ -1444,15 +1527,17 @@
 	}
 
 	// Check global in case errors have been added on this pageload.
-	if ( ! count( $wp_settings_errors ) )
+	if ( ! count( $wp_settings_errors ) ) {
 		return array();
+	}
 
 	// Filter the results to those of a specific setting if one was set.
 	if ( $setting ) {
 		$setting_errors = array();
 		foreach ( (array) $wp_settings_errors as $key => $details ) {
-			if ( $setting == $details['setting'] )
-				$setting_errors[] = $wp_settings_errors[$key];
+			if ( $setting == $details['setting'] ) {
+				$setting_errors[] = $wp_settings_errors[ $key ];
+			}
 		}
 		return $setting_errors;
 	}
@@ -1489,13 +1574,15 @@
  */
 function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
 
-	if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) )
+	if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) ) {
 		return;
+	}
 
 	$settings_errors = get_settings_errors( $setting, $sanitize );
 
-	if ( empty( $settings_errors ) )
+	if ( empty( $settings_errors ) ) {
 		return;
+	}
 
 	$output = '';
 	foreach ( $settings_errors as $key => $details ) {
@@ -1515,7 +1602,7 @@
  *
  * @param string $found_action
  */
-function find_posts_div($found_action = '') {
+function find_posts_div( $found_action = '' ) {
 ?>
 	<div id="find-posts" class="find-box" style="display: none;">
 		<div id="find-posts-head" class="find-box-head">
@@ -1525,7 +1612,7 @@
 		<div class="find-box-inside">
 			<div class="find-box-search">
 				<?php if ( $found_action ) { ?>
-					<input type="hidden" name="found_action" value="<?php echo esc_attr($found_action); ?>" />
+					<input type="hidden" name="found_action" value="<?php echo esc_attr( $found_action ); ?>" />
 				<?php } ?>
 				<input type="hidden" name="affected" id="affected" value="" />
 				<?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
@@ -1554,8 +1641,9 @@
  */
 function the_post_password() {
 	$post = get_post();
-	if ( isset( $post->post_password ) )
+	if ( isset( $post->post_password ) ) {
 		echo esc_attr( $post->post_password );
+	}
 }
 
 /**
@@ -1571,8 +1659,9 @@
  */
 function _draft_or_post_title( $post = 0 ) {
 	$title = get_the_title( $post );
-	if ( empty( $title ) )
+	if ( empty( $title ) ) {
 		$title = __( '(no title)' );
+	}
 	return esc_html( $title );
 }
 
@@ -1585,7 +1674,7 @@
  * @since 2.7.0
  */
 function _admin_search_query() {
-	echo isset($_REQUEST['s']) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
+	echo isset( $_REQUEST['s'] ) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : '';
 }
 
 /**
@@ -1603,14 +1692,14 @@
 function iframe_header( $title = '', $deprecated = false ) {
 	show_admin_bar( false );
 	global $hook_suffix, $admin_body_class, $wp_locale;
-	$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
+	$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
 
 	$current_screen = get_current_screen();
 
 	@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 	_wp_admin_html_begin();
 ?>
-<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e('WordPress'); ?></title>
+<title><?php bloginfo( 'name' ) ?> &rsaquo; <?php echo $title ?> &#8212; <?php _e( 'WordPress' ); ?></title>
 <?php
 wp_enqueue_style( 'colors' );
 ?>
@@ -1649,8 +1738,9 @@
 
 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
 
-if ( is_rtl() )
+if ( is_rtl() ) {
 	$admin_body_class .= ' rtl';
+}
 
 ?>
 </head>
@@ -1662,7 +1752,8 @@
 /**
  * @global string $body_id
  */
-if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
+if ( isset( $GLOBALS['body_id'] ) ) { echo ' id="' . $GLOBALS['body_id'] . '"';
+} ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
 <script type="text/javascript">
 (function(){
 var c = document.body.className;
@@ -1712,23 +1803,28 @@
  *
  * @param WP_Post $post
  */
-function _post_states($post) {
+function _post_states( $post ) {
 	$post_states = array();
-	if ( isset( $_REQUEST['post_status'] ) )
+	if ( isset( $_REQUEST['post_status'] ) ) {
 		$post_status = $_REQUEST['post_status'];
-	else
-		$post_status = '';
+	} else { $post_status = '';
+	}
 
-	if ( !empty($post->post_password) )
-		$post_states['protected'] = __('Password protected');
-	if ( 'private' == $post->post_status && 'private' != $post_status )
-		$post_states['private'] = __('Private');
-	if ( 'draft' == $post->post_status && 'draft' != $post_status )
-		$post_states['draft'] = __('Draft');
-	if ( 'pending' == $post->post_status && 'pending' != $post_status )
-		$post_states['pending'] = _x('Pending', 'post status');
-	if ( is_sticky($post->ID) )
-		$post_states['sticky'] = __('Sticky');
+	if ( ! empty( $post->post_password ) ) {
+		$post_states['protected'] = __( 'Password protected' );
+	}
+	if ( 'private' == $post->post_status && 'private' != $post_status ) {
+		$post_states['private'] = __( 'Private' );
+	}
+	if ( 'draft' == $post->post_status && 'draft' != $post_status ) {
+		$post_states['draft'] = __( 'Draft' );
+	}
+	if ( 'pending' == $post->post_status && 'pending' != $post_status ) {
+		$post_states['pending'] = _x( 'Pending', 'post status' );
+	}
+	if ( is_sticky( $post->ID ) ) {
+		$post_states['sticky'] = __( 'Sticky' );
+	}
 
 	if ( 'future' === $post->post_status ) {
 		$post_states['scheduled'] = __( 'Scheduled' );
@@ -1755,8 +1851,8 @@
 	 */
 	$post_states = apply_filters( 'display_post_states', $post_states, $post );
 
-	if ( ! empty($post_states) ) {
-		$state_count = count($post_states);
+	if ( ! empty( $post_states ) ) {
+		$state_count = count( $post_states );
 		$i = 0;
 		echo ' &mdash; ';
 		foreach ( $post_states as $state ) {
@@ -1774,10 +1870,10 @@
  */
 function _media_states( $post ) {
 	$media_states = array();
-	$stylesheet = get_option('stylesheet');
+	$stylesheet = get_option( 'stylesheet' );
 
-	if ( current_theme_supports( 'custom-header') ) {
-		$meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true );
+	if ( current_theme_supports( 'custom-header' ) ) {
+		$meta_header = get_post_meta( $post->ID, '_wp_attachment_is_custom_header', true );
 
 		if ( is_random_header_image() ) {
 			$header_images = wp_list_pluck( get_uploaded_header_images(), 'attachment_id' );
@@ -1800,8 +1896,8 @@
 		}
 	}
 
-	if ( current_theme_supports( 'custom-background') ) {
-		$meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true );
+	if ( current_theme_supports( 'custom-background' ) ) {
+		$meta_background = get_post_meta( $post->ID, '_wp_attachment_is_custom_background', true );
 
 		if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) {
 			$media_states[] = __( 'Background Image' );
@@ -1957,14 +2053,16 @@
  * @return string Submit button HTML.
  */
 function get_submit_button( $text = '', $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = '' ) {
-	if ( ! is_array( $type ) )
+	if ( ! is_array( $type ) ) {
 		$type = explode( ' ', $type );
+	}
 
 	$button_shorthand = array( 'primary', 'small', 'large' );
 	$classes = array( 'button' );
 	foreach ( $type as $t ) {
-		if ( 'secondary' === $t || 'button-secondary' === $t )
+		if ( 'secondary' === $t || 'button-secondary' === $t ) {
 			continue;
+		}
 		$classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
 	}
 	// Remove empty items, remove duplicate items, and finally build a string.
@@ -2011,8 +2109,9 @@
 
 	$admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
 
-	if ( $is_IE )
-		@header('X-UA-Compatible: IE=edge');
+	if ( $is_IE ) {
+		@header( 'X-UA-Compatible: IE=edge' );
+	}
 
 ?>
 <!DOCTYPE html>
@@ -2033,7 +2132,7 @@
 ?> <?php language_attributes(); ?>>
 <!--<![endif]-->
 <head>
-<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
+<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
 <?php
 }
 
@@ -2047,8 +2146,11 @@
  */
 function convert_to_screen( $hook_name ) {
 	if ( ! class_exists( 'WP_Screen' ) ) {
-		_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3.0' );
-		return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
+		_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( 'Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead.' ), '3.3.0' );
+		return (object) array(
+			'id' => '_invalid',
+			'base' => '_are_belong_to_us',
+		);
 	}
 
 	return WP_Screen::get( $hook_name );
@@ -2065,7 +2167,7 @@
 	<div id="local-storage-notice" class="hidden notice is-dismissible">
 	<p class="local-restore">
 		<?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
-		<button type="button" class="button restore-backup"><?php _e('Restore the backup'); ?></button>
+		<button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button>
 	</p>
 	<p class="help">
 		<?php _e( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); ?>
Index: src/wp-admin/includes/theme-install.php
===================================================================
--- src/wp-admin/includes/theme-install.php	(revision 40901)
+++ src/wp-admin/includes/theme-install.php	(working copy)
@@ -6,17 +6,52 @@
  * @subpackage Administration
  */
 
-$themes_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()),
-	'abbr' => array('title' => array()), 'acronym' => array('title' => array()),
-	'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
-	'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),
-	'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),
-	'img' => array('src' => array(), 'class' => array(), 'alt' => array())
+$themes_allowedtags = array(
+'a' => array(
+	'href' => array(),
+	'title' => array(),
+	'target' => array(),
+),
+	'abbr' => array(
+		'title' => array(),
+	),
+'acronym' => array(
+	'title' => array(),
+),
+	'code' => array(),
+'pre' => array(),
+'em' => array(),
+'strong' => array(),
+	'div' => array(),
+'p' => array(),
+'ul' => array(),
+'ol' => array(),
+'li' => array(),
+	'h1' => array(),
+'h2' => array(),
+'h3' => array(),
+'h4' => array(),
+'h5' => array(),
+'h6' => array(),
+	'img' => array(
+		'src' => array(),
+		'class' => array(),
+		'alt' => array(),
+	),
 );
 
-$theme_field_defaults = array( 'description' => true, 'sections' => false, 'tested' => true, 'requires' => true,
-	'rating' => true, 'downloaded' => true, 'downloadlink' => true, 'last_updated' => true, 'homepage' => true,
-	'tags' => true, 'num_ratings' => true
+$theme_field_defaults = array(
+'description' => true,
+'sections' => false,
+'tested' => true,
+'requires' => true,
+	'rating' => true,
+'downloaded' => true,
+'downloadlink' => true,
+'last_updated' => true,
+'homepage' => true,
+	'tags' => true,
+'num_ratings' => true,
 );
 
 /**
@@ -31,15 +66,18 @@
 function install_themes_feature_list() {
 	_deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' );
 
-	if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
+	if ( ! $cache = get_transient( 'wporg_theme_feature_list' ) ) {
 		set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
+	}
 
-	if ( $cache )
+	if ( $cache ) {
 		return $cache;
+	}
 
 	$feature_list = themes_api( 'feature_list', array() );
-	if ( is_wp_error( $feature_list ) )
+	if ( is_wp_error( $feature_list ) ) {
 		return array();
+	}
 
 	set_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
 
@@ -56,17 +94,18 @@
 function install_theme_search_form( $type_selector = true ) {
 	$type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term';
 	$term = isset( $_REQUEST['s'] ) ? wp_unslash( $_REQUEST['s'] ) : '';
-	if ( ! $type_selector )
+	if ( ! $type_selector ) {
 		echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>';
+	}
 	?>
 <form id="search-themes" method="get">
 	<input type="hidden" name="tab" value="search" />
 	<?php if ( $type_selector ) : ?>
-	<label class="screen-reader-text" for="typeselector"><?php _e('Type of search'); ?></label>
+	<label class="screen-reader-text" for="typeselector"><?php _e( 'Type of search' ); ?></label>
 	<select	name="type" id="typeselector">
-	<option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
-	<option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option>
-	<option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
+	<option value="term" <?php selected( 'term', $type ) ?>><?php _e( 'Keyword' ); ?></option>
+	<option value="author" <?php selected( 'author', $type ) ?>><?php _e( 'Author' ); ?></option>
+	<option value="tag" <?php selected( 'tag', $type ) ?>><?php _ex( 'Tag', 'Theme Installer' ); ?></option>
 	</select>
 	<label class="screen-reader-text" for="s"><?php
 	switch ( $type ) {
@@ -82,9 +121,9 @@
 	}
 	?></label>
 	<?php else : ?>
-	<label class="screen-reader-text" for="s"><?php _e('Search by keyword'); ?></label>
+	<label class="screen-reader-text" for="s"><?php _e( 'Search by keyword' ); ?></label>
 	<?php endif; ?>
-	<input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
+	<input type="search" name="s" id="s" size="30" value="<?php echo esc_attr( $term ) ?>" autofocus="autofocus" />
 	<?php submit_button( __( 'Search' ), '', 'search', false ); ?>
 </form>
 <?php
@@ -98,7 +137,7 @@
 function install_themes_dashboard() {
 	install_theme_search_form( false );
 ?>
-<h4><?php _e('Feature Filter') ?></h4>
+<h4><?php _e( 'Feature Filter' ) ?></h4>
 <p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
 
 <form method="get">
@@ -114,7 +153,7 @@
 		echo '<ol class="feature-group">';
 		foreach ( $features as $feature => $feature_name ) {
 			$feature_name = esc_html( $feature_name );
-			$feature = esc_attr($feature);
+			$feature = esc_attr( $feature );
 ?>
 
 <li>
@@ -140,8 +179,8 @@
  */
 function install_themes_upload() {
 ?>
-<p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.'); ?></p>
-<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-theme'); ?>">
+<p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install it by uploading it here.' ); ?></p>
+<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>">
 	<?php wp_nonce_field( 'theme-upload' ); ?>
 	<label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label>
 	<input type="file" id="themezip" name="themezip" />
@@ -163,7 +202,7 @@
 	_deprecated_function( __FUNCTION__, '3.4.0' );
 	global $wp_list_table;
 	if ( ! isset( $wp_list_table ) ) {
-		$wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
+		$wp_list_table = _get_list_table( 'WP_Theme_Install_List_Table' );
 	}
 	$wp_list_table->prepare_items();
 	$wp_list_table->single_row( $theme );
@@ -180,7 +219,7 @@
 	global $wp_list_table;
 
 	if ( ! isset( $wp_list_table ) ) {
-		$wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
+		$wp_list_table = _get_list_table( 'WP_Theme_Install_List_Table' );
 	}
 	$wp_list_table->prepare_items();
 	$wp_list_table->display();
@@ -197,14 +236,17 @@
 function install_theme_information() {
 	global $wp_list_table;
 
-	$theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) );
+	$theme = themes_api( 'theme_information', array(
+		'slug' => wp_unslash( $_REQUEST['theme'] ),
+	) );
 
-	if ( is_wp_error( $theme ) )
+	if ( is_wp_error( $theme ) ) {
 		wp_die( $theme );
+	}
 
-	iframe_header( __('Theme Install') );
+	iframe_header( __( 'Theme Install' ) );
 	if ( ! isset( $wp_list_table ) ) {
-		$wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
+		$wp_list_table = _get_list_table( 'WP_Theme_Install_List_Table' );
 	}
 	$wp_list_table->theme_installer_single( $theme );
 	iframe_footer();
Index: src/wp-admin/includes/theme.php
===================================================================
--- src/wp-admin/includes/theme.php	(revision 40901)
+++ src/wp-admin/includes/theme.php	(working copy)
@@ -17,14 +17,15 @@
  * @param string $redirect Redirect to page when complete.
  * @return void|bool|WP_Error When void, echoes content.
  */
-function delete_theme($stylesheet, $redirect = '') {
+function delete_theme( $stylesheet, $redirect = '' ) {
 	global $wp_filesystem;
 
-	if ( empty($stylesheet) )
+	if ( empty( $stylesheet ) ) {
 		return false;
+	}
 
 	if ( empty( $redirect ) ) {
-		$redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet);
+		$redirect = wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet );
 	}
 
 	ob_start();
@@ -32,10 +33,10 @@
 	$data = ob_get_clean();
 
 	if ( false === $credentials ) {
-		if ( ! empty( $data ) ){
-			include_once( ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! empty( $data ) ) {
+			include_once( ABSPATH . 'wp-admin/admin-header.php' );
 			echo $data;
-			include( ABSPATH . 'wp-admin/admin-footer.php');
+			include( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 		}
 		return;
@@ -46,20 +47,22 @@
 		request_filesystem_credentials( $redirect, '', true ); // Failed to connect, Error and request again.
 		$data = ob_get_clean();
 
-		if ( ! empty($data) ) {
-			include_once( ABSPATH . 'wp-admin/admin-header.php');
+		if ( ! empty( $data ) ) {
+			include_once( ABSPATH . 'wp-admin/admin-header.php' );
 			echo $data;
-			include( ABSPATH . 'wp-admin/admin-footer.php');
+			include( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 		}
 		return;
 	}
 
-	if ( ! is_object($wp_filesystem) )
-		return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
+	if ( ! is_object( $wp_filesystem ) ) {
+		return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
+	}
 
-	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
-		return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors);
+	if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+		return new WP_Error( 'fs_error', __( 'Filesystem error.' ), $wp_filesystem->errors );
+	}
 
 	// Get the base plugin folder.
 	$themes_dir = $wp_filesystem->wp_themes_dir();
@@ -122,8 +125,8 @@
  * @param string $containingfolder Path of the theme parent folder
  * @return string
  */
-function _get_template_edit_filename($fullpath, $containingfolder) {
-	return str_replace(dirname(dirname( $containingfolder )) , '', $fullpath);
+function _get_template_edit_filename( $fullpath, $containingfolder ) {
+	return str_replace( dirname( dirname( $containingfolder ) ) , '', $fullpath );
 }
 
 /**
@@ -155,11 +158,13 @@
 function get_theme_update_available( $theme ) {
 	static $themes_update = null;
 
-	if ( !current_user_can('update_themes' ) )
+	if ( ! current_user_can( 'update_themes' ) ) {
 		return false;
+	}
 
-	if ( !isset($themes_update) )
-		$themes_update = get_site_transient('update_themes');
+	if ( ! isset( $themes_update ) ) {
+		$themes_update = get_site_transient( 'update_themes' );
+	}
 
 	if ( ! ( $theme instanceof WP_Theme ) ) {
 		return false;
@@ -169,14 +174,18 @@
 
 	$html = '';
 
-	if ( isset($themes_update->response[ $stylesheet ]) ) {
+	if ( isset( $themes_update->response[ $stylesheet ] ) ) {
 		$update = $themes_update->response[ $stylesheet ];
-		$theme_name = $theme->display('Name');
-		$details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list.
+		$theme_name = $theme->display( 'Name' );
+		$details_url = add_query_arg( array(
+			'TB_iframe' => 'true',
+			'width' => 1024,
+			'height' => 800,
+		), $update['url'] ); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list.
 		$update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
 
-		if ( !is_multisite() ) {
-			if ( ! current_user_can('update_themes') ) {
+		if ( ! is_multisite() ) {
+			if ( ! current_user_can( 'update_themes' ) ) {
 				/* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number */
 				$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ) . '</strong></p>',
 					$theme_name,
@@ -215,9 +224,9 @@
 						$stylesheet
 					)
 				);
-			}
-		}
-	}
+			}// End if().
+		}// End if().
+	}// End if().
 
 	return $html;
 }
@@ -278,23 +287,27 @@
 			'news'           => __( 'News' ),
 			'photography'    => __( 'Photography' ),
 			'portfolio'      => __( 'Portfolio' ),
-		)
+		),
 	);
 
-	if ( ! $api || ! current_user_can( 'install_themes' ) )
+	if ( ! $api || ! current_user_can( 'install_themes' ) ) {
 		return $features;
+	}
 
-	if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) )
+	if ( ! $feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) {
 		set_site_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
+	}
 
-	if ( !$feature_list ) {
+	if ( ! $feature_list ) {
 		$feature_list = themes_api( 'feature_list', array() );
-		if ( is_wp_error( $feature_list ) )
+		if ( is_wp_error( $feature_list ) ) {
 			return $features;
+		}
 	}
 
-	if ( !$feature_list )
+	if ( ! $feature_list ) {
 		return $features;
+	}
 
 	set_site_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
 
@@ -307,15 +320,16 @@
 	// Loop over the wporg canonical list and apply translations
 	$wporg_features = array();
 	foreach ( (array) $feature_list as $feature_category => $feature_items ) {
-		if ( isset($category_translations[$feature_category]) )
-			$feature_category = $category_translations[$feature_category];
-		$wporg_features[$feature_category] = array();
+		if ( isset( $category_translations[ $feature_category ] ) ) {
+			$feature_category = $category_translations[ $feature_category ];
+		}
+		$wporg_features[ $feature_category ] = array();
 
 		foreach ( $feature_items as $feature ) {
-			if ( isset($features[$feature_category][$feature]) )
-				$wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
-			else
-				$wporg_features[$feature_category][$feature] = $feature;
+			if ( isset( $features[ $feature_category ][ $feature ] ) ) {
+				$wporg_features[ $feature_category ][ $feature ] = $features[ $feature_category ][ $feature ];
+			} else { $wporg_features[ $feature_category ][ $feature ] = $feature;
+			}
 		}
 	}
 
@@ -449,14 +463,15 @@
 
 	if ( ! $res ) {
 		$url = $http_url = 'http://api.wordpress.org/themes/info/1.0/';
-		if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
+		if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
 			$url = set_url_scheme( $url, 'https' );
+		}
 
 		$http_args = array(
 			'body' => array(
 				'action' => $action,
-				'request' => serialize( $args )
-			)
+				'request' => serialize( $args ),
+			),
 		);
 		$request = wp_remote_post( $url, $http_args );
 
@@ -474,7 +489,7 @@
 			$request = wp_remote_post( $http_url, $http_args );
 		}
 
-		if ( is_wp_error($request) ) {
+		if ( is_wp_error( $request ) ) {
 			$res = new WP_Error( 'themes_api_failed',
 				sprintf(
 					/* translators: %s: support forums URL */
@@ -496,7 +511,7 @@
 				);
 			}
 		}
-	}
+	}// End if().
 
 	/**
 	 * Filters the returned WordPress.org Themes API response.
@@ -546,7 +561,9 @@
 	$prepared_themes[ $current_theme ] = array();
 
 	if ( null === $themes ) {
-		$themes = wp_get_themes( array( 'allowed' => true ) );
+		$themes = wp_get_themes( array(
+			'allowed' => true,
+		) );
 		if ( ! isset( $themes[ $current_theme ] ) ) {
 			$themes[ $current_theme ] = wp_get_theme();
 		}
@@ -596,7 +613,7 @@
 			'parent'       => $parent,
 			'active'       => $slug === $current_theme,
 			'hasUpdate'    => isset( $updates[ $slug ] ),
-			'hasPackage'   => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ][ 'package' ] ),
+			'hasPackage'   => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ]['package'] ),
 			'update'       => get_theme_update_available( $theme ),
 			'actions'      => array(
 				'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&amp;stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
@@ -604,7 +621,7 @@
 				'delete'   => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&amp;stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null,
 			),
 		);
-	}
+	}// End foreach().
 
 	// Remove 'delete' action if theme has an active child
 	if ( ! empty( $parents ) && array_key_exists( $current_theme, $parents ) ) {
Index: src/wp-admin/includes/translation-install.php
===================================================================
--- src/wp-admin/includes/translation-install.php	(revision 40901)
+++ src/wp-admin/includes/translation-install.php	(working copy)
@@ -90,7 +90,7 @@
 				);
 			}
 		}
-	}
+	}// End if().
 
 	/**
 	 * Filters the Translation Install API response results.
@@ -167,7 +167,7 @@
 				esc_attr( current( $language['iso'] ) ),
 				esc_attr( $language['strings']['continue'] ),
 				in_array( $language['language'], $installed_languages ) ? ' data-installed="1"' : '',
-				esc_html( $language['native_name'] ) );
+			esc_html( $language['native_name'] ) );
 
 			unset( $languages[ $wp_local_package ] );
 		}
@@ -179,7 +179,7 @@
 			esc_attr( current( $language['iso'] ) ),
 			esc_attr( $language['strings']['continue'] ),
 			in_array( $language['language'], $installed_languages ) ? ' data-installed="1"' : '',
-			esc_html( $language['native_name'] ) );
+		esc_html( $language['native_name'] ) );
 	}
 	echo "</select>\n";
 	echo '<p class="step"><span class="spinner"></span><input id="language-continue" type="submit" class="button button-primary button-large" value="Continue" /></p>';
@@ -227,7 +227,9 @@
 	$skin = new Automatic_Upgrader_Skin;
 	$upgrader = new Language_Pack_Upgrader( $skin );
 	$translation->type = 'core';
-	$result = $upgrader->upgrade( $translation, array( 'clear_update_cache' => false ) );
+	$result = $upgrader->upgrade( $translation, array(
+		'clear_update_cache' => false,
+	) );
 
 	if ( ! $result || is_wp_error( $result ) ) {
 		return false;
Index: src/wp-admin/includes/update-core.php
===================================================================
--- src/wp-admin/includes/update-core.php	(revision 40901)
+++ src/wp-admin/includes/update-core.php	(working copy)
@@ -803,7 +803,7 @@
  * @param string $to   Path to old WordPress installation.
  * @return WP_Error|null WP_Error on failure, null on success.
  */
-function update_core($from, $to) {
+function update_core( $from, $to ) {
 	global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb;
 
 	@set_time_limit( 300 );
@@ -838,13 +838,12 @@
 	}
 	if ( ! $distro ) {
 		$wp_filesystem->delete( $from, true );
-		return new WP_Error( 'insane_distro', __('The update could not be unpacked') );
+		return new WP_Error( 'insane_distro', __( 'The update could not be unpacked' ) );
 	}
 
-
 	/*
 	 * Import $wp_version, $required_php_version, and $required_mysql_version from the new version.
-	 * DO NOT globalise any variables imported from `version-current.php` in this function. 
+     * DO NOT globalise any variables imported from `version-current.php` in this function.
 	 *
 	 * BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8
 	 */
@@ -863,20 +862,22 @@
 	$old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from
 	$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' )  ); // a dash in the version indicates a Development release
 	$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
-	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
+	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
 		$mysql_compat = true;
-	else
-		$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
+	} else { $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
+	}
 
-	if ( !$mysql_compat || !$php_compat )
-		$wp_filesystem->delete($from, true);
+	if ( ! $mysql_compat || ! $php_compat ) {
+		$wp_filesystem->delete( $from, true );
+	}
 
-	if ( !$mysql_compat && !$php_compat )
-		return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
-	elseif ( !$php_compat )
-		return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
-	elseif ( !$mysql_compat )
-		return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) );
+	if ( ! $mysql_compat && ! $php_compat ) {
+		return new WP_Error( 'php_mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
+	} elseif ( ! $php_compat ) {
+		return new WP_Error( 'php_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ) );
+	} elseif ( ! $mysql_compat ) {
+		return new WP_Error( 'mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ) );
+	}
 
 	/** This filter is documented in wp-admin/includes/update-core.php */
 	apply_filters( 'update_feedback', __( 'Preparing to install the latest version&#8230;' ) );
@@ -892,22 +893,27 @@
 		$working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro;
 
 		$checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
-		if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) )
+		if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) ) {
 			$checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2
+		}
 		if ( is_array( $checksums ) ) {
 			foreach ( $checksums as $file => $checksum ) {
-				if ( 'wp-content' == substr( $file, 0, 10 ) )
+				if ( 'wp-content' == substr( $file, 0, 10 ) ) {
 					continue;
-				if ( ! file_exists( ABSPATH . $file ) )
+				}
+				if ( ! file_exists( ABSPATH . $file ) ) {
 					continue;
-				if ( ! file_exists( $working_dir_local . $file ) )
+				}
+				if ( ! file_exists( $working_dir_local . $file ) ) {
 					continue;
-				if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) )
+				}
+				if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) ) {
 					continue;
-				if ( md5_file( ABSPATH . $file ) === $checksum )
+				}
+				if ( md5_file( ABSPATH . $file ) === $checksum ) {
 					$skip[] = $file;
-				else
-					$check_is_writable[ $file ] = ABSPATH . $file;
+				} else { $check_is_writable[ $file ] = ABSPATH . $file;
+				}
 			}
 		}
 	}
@@ -920,15 +926,17 @@
 			foreach ( $files_not_writable as $relative_file_not_writable => $file_not_writable ) {
 				// If the writable check failed, chmod file to 0644 and try again, same as copy_dir().
 				$wp_filesystem->chmod( $file_not_writable, FS_CHMOD_FILE );
-				if ( $wp_filesystem->is_writable( $file_not_writable ) )
+				if ( $wp_filesystem->is_writable( $file_not_writable ) ) {
 					unset( $files_not_writable[ $relative_file_not_writable ] );
+				}
 			}
 
 			// Store package-relative paths (the key) of non-writable files in the WP_Error object.
 			$error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : '';
 
-			if ( $files_not_writable )
+			if ( $files_not_writable ) {
 				return new WP_Error( 'files_not_writable', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), implode( ', ', $error_data ) );
+			}
 		}
 	}
 
@@ -937,15 +945,16 @@
 	// Create maintenance file to signal that we are upgrading
 	$maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
 	$maintenance_file = $to . '.maintenance';
-	$wp_filesystem->delete($maintenance_file);
-	$wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE);
+	$wp_filesystem->delete( $maintenance_file );
+	$wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE );
 
 	/** This filter is documented in wp-admin/includes/update-core.php */
 	apply_filters( 'update_feedback', __( 'Copying the required files&#8230;' ) );
 	// Copy new versions of WP files into place.
 	$result = _copy_dir( $from . $distro, $to, $skip );
-	if ( is_wp_error( $result ) )
+	if ( is_wp_error( $result ) ) {
 		$result = new WP_Error( $result->get_error_code(), $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) );
+	}
 
 	// Since we know the core files have copied over, we can now copy the version file
 	if ( ! is_wp_error( $result ) ) {
@@ -961,18 +970,20 @@
 	$failed = array();
 	if ( isset( $checksums ) && is_array( $checksums ) ) {
 		foreach ( $checksums as $file => $checksum ) {
-			if ( 'wp-content' == substr( $file, 0, 10 ) )
+			if ( 'wp-content' == substr( $file, 0, 10 ) ) {
 				continue;
-			if ( ! file_exists( $working_dir_local . $file ) )
+			}
+			if ( ! file_exists( $working_dir_local . $file ) ) {
 				continue;
+			}
 			if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ) ) ) {
 				$skip[] = $file;
 				continue;
 			}
-			if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum )
+			if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum ) {
 				$skip[] = $file;
-			else
-				$failed[] = $file;
+			} else { $failed[] = $file;
+			}
 		}
 	}
 
@@ -980,8 +991,9 @@
 	if ( ! empty( $failed ) ) {
 		$total_size = 0;
 		foreach ( $failed as $file ) {
-			if ( file_exists( $working_dir_local . $file ) )
+			if ( file_exists( $working_dir_local . $file ) ) {
 				$total_size += filesize( $working_dir_local . $file );
+			}
 		}
 
 		// If we don't have enough free space, it isn't worth trying again.
@@ -991,30 +1003,32 @@
 			$result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) );
 		} else {
 			$result = _copy_dir( $from . $distro, $to, $skip );
-			if ( is_wp_error( $result ) )
+			if ( is_wp_error( $result ) ) {
 				$result = new WP_Error( $result->get_error_code() . '_retry', $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) );
+			}
 		}
 	}
 
 	// Custom Content Directory needs updating now.
 	// Copy Languages
-	if ( !is_wp_error($result) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) {
-		if ( WP_LANG_DIR != ABSPATH . WPINC . '/languages' || @is_dir(WP_LANG_DIR) )
+	if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) {
+		if ( WP_LANG_DIR != ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) {
 			$lang_dir = WP_LANG_DIR;
-		else
-			$lang_dir = WP_CONTENT_DIR . '/languages';
+		} else { $lang_dir = WP_CONTENT_DIR . '/languages';
+		}
 
-		if ( !@is_dir($lang_dir) && 0 === strpos($lang_dir, ABSPATH) ) { // Check the language directory exists first
-			$wp_filesystem->mkdir($to . str_replace(ABSPATH, '', $lang_dir), FS_CHMOD_DIR); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck.
+		if ( ! @is_dir( $lang_dir ) && 0 === strpos( $lang_dir, ABSPATH ) ) { // Check the language directory exists first
+			$wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR ); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck.
 			clearstatcache(); // for FTP, Need to clear the stat cache
 		}
 
-		if ( @is_dir($lang_dir) ) {
-			$wp_lang_dir = $wp_filesystem->find_folder($lang_dir);
+		if ( @is_dir( $lang_dir ) ) {
+			$wp_lang_dir = $wp_filesystem->find_folder( $lang_dir );
 			if ( $wp_lang_dir ) {
-				$result = copy_dir($from . $distro . 'wp-content/languages/', $wp_lang_dir);
-				if ( is_wp_error( $result ) )
+				$result = copy_dir( $from . $distro . 'wp-content/languages/', $wp_lang_dir );
+				if ( is_wp_error( $result ) ) {
 					$result = new WP_Error( $result->get_error_code() . '_languages', $result->get_error_message(), substr( $result->get_error_data(), strlen( $wp_lang_dir ) ) );
+				}
 			}
 		}
 	}
@@ -1026,7 +1040,7 @@
 
 	// 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve.
 	if ( '3.5' == $old_wp_version ) {
-		if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' )  ) {
+		if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) {
 			$wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' );
 		}
 	}
@@ -1034,60 +1048,66 @@
 	// Copy New bundled plugins & themes
 	// This gives us the ability to install new plugins & themes bundled with future versions of WordPress whilst avoiding the re-install upon upgrade issue.
 	// $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated
-	if ( !is_wp_error($result) && ( ! defined('CORE_UPGRADE_SKIP_NEW_BUNDLED') || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) {
+	if ( ! is_wp_error( $result ) && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) {
 		foreach ( (array) $_new_bundled_files as $file => $introduced_version ) {
 			// If a $development_build or if $introduced version is greater than what the site was previously running
 			if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) {
-				$directory = ('/' == $file[ strlen($file)-1 ]);
-				list($type, $filename) = explode('/', $file, 2);
+				$directory = ('/' == $file[ strlen( $file ) -1 ]);
+				list($type, $filename) = explode( '/', $file, 2 );
 
 				// Check to see if the bundled items exist before attempting to copy them
-				if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) )
+				if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) ) {
 					continue;
+				}
 
-				if ( 'plugins' == $type )
+				if ( 'plugins' == $type ) {
 					$dest = $wp_filesystem->wp_plugins_dir();
-				elseif ( 'themes' == $type )
-					$dest = trailingslashit($wp_filesystem->wp_themes_dir()); // Back-compat, ::wp_themes_dir() did not return trailingslash'd pre-3.2
-				else
-					continue;
+				} elseif ( 'themes' == $type ) {
+					$dest = trailingslashit( $wp_filesystem->wp_themes_dir() ); // Back-compat, ::wp_themes_dir() did not return trailingslash'd pre-3.2
+				} else { continue;
+				}
 
 				if ( ! $directory ) {
-					if ( ! $development_build && $wp_filesystem->exists( $dest . $filename ) )
+					if ( ! $development_build && $wp_filesystem->exists( $dest . $filename ) ) {
 						continue;
+					}
 
-					if ( ! $wp_filesystem->copy($from . $distro . 'wp-content/' . $file, $dest . $filename, FS_CHMOD_FILE) )
+					if ( ! $wp_filesystem->copy( $from . $distro . 'wp-content/' . $file, $dest . $filename, FS_CHMOD_FILE ) ) {
 						$result = new WP_Error( "copy_failed_for_new_bundled_$type", __( 'Could not copy file.' ), $dest . $filename );
+					}
 				} else {
-					if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) )
+					if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) ) {
 						continue;
+					}
 
-					$wp_filesystem->mkdir($dest . $filename, FS_CHMOD_DIR);
-					$_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename);
+					$wp_filesystem->mkdir( $dest . $filename, FS_CHMOD_DIR );
+					$_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename );
 
 					// If a error occurs partway through this final step, keep the error flowing through, but keep process going.
 					if ( is_wp_error( $_result ) ) {
-						if ( ! is_wp_error( $result ) )
+						if ( ! is_wp_error( $result ) ) {
 							$result = new WP_Error;
+						}
 						$result->add( $_result->get_error_code() . "_$type", $_result->get_error_message(), substr( $_result->get_error_data(), strlen( $dest ) ) );
 					}
 				}
-			}
-		} //end foreach
-	}
+			}// End if().
+		} // End foreach().
+	}// End if().
 
 	// Handle $result error from the above blocks
-	if ( is_wp_error($result) ) {
-		$wp_filesystem->delete($from, true);
+	if ( is_wp_error( $result ) ) {
+		$wp_filesystem->delete( $from, true );
 		return $result;
 	}
 
 	// Remove old files
 	foreach ( $_old_files as $old_file ) {
 		$old_file = $to . $old_file;
-		if ( !$wp_filesystem->exists($old_file) )
+		if ( ! $wp_filesystem->exists( $old_file ) ) {
 			continue;
-		$wp_filesystem->delete($old_file, true);
+		}
+		$wp_filesystem->delete( $old_file, true );
 	}
 
 	// Remove any Genericons example.html's from the filesystem
@@ -1099,8 +1119,10 @@
 	// Upgrade DB with separate request
 	/** This filter is documented in wp-admin/includes/update-core.php */
 	apply_filters( 'update_feedback', __( 'Upgrading database&#8230;' ) );
-	$db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
-	wp_remote_post($db_upgrade_url, array('timeout' => 60));
+	$db_upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
+	wp_remote_post( $db_upgrade_url, array(
+		'timeout' => 60,
+	) );
 
 	// Clear the cache to prevent an update_option() from saving a stale db_version to the cache
 	wp_cache_flush();
@@ -1108,13 +1130,13 @@
 	wp_cache_delete( 'alloptions', 'options' );
 
 	// Remove working directory
-	$wp_filesystem->delete($from, true);
+	$wp_filesystem->delete( $from, true );
 
 	// Force refresh of update information
-	if ( function_exists('delete_site_transient') )
-		delete_site_transient('update_core');
-	else
-		delete_option('update_core');
+	if ( function_exists( 'delete_site_transient' ) ) {
+		delete_site_transient( 'update_core' );
+	} else { delete_option( 'update_core' );
+	}
 
 	/**
 	 * Fires after WordPress core has been successfully updated.
@@ -1126,8 +1148,9 @@
 	do_action( '_core_updated_successfully', $wp_version );
 
 	// Clear the option that blocks auto updates after failures, now that we've been successful.
-	if ( function_exists( 'delete_site_option' ) )
+	if ( function_exists( 'delete_site_option' ) ) {
 		delete_site_option( 'auto_core_update_failed' );
+	}
 
 	return $wp_version;
 }
@@ -1151,29 +1174,32 @@
  * @param array $skip_list a list of files/folders to skip copying
  * @return mixed WP_Error on failure, True on success.
  */
-function _copy_dir($from, $to, $skip_list = array() ) {
+function _copy_dir( $from, $to, $skip_list = array() ) {
 	global $wp_filesystem;
 
-	$dirlist = $wp_filesystem->dirlist($from);
+	$dirlist = $wp_filesystem->dirlist( $from );
 
-	$from = trailingslashit($from);
-	$to = trailingslashit($to);
+	$from = trailingslashit( $from );
+	$to = trailingslashit( $to );
 
 	foreach ( (array) $dirlist as $filename => $fileinfo ) {
-		if ( in_array( $filename, $skip_list ) )
+		if ( in_array( $filename, $skip_list ) ) {
 			continue;
+		}
 
 		if ( 'f' == $fileinfo['type'] ) {
-			if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) ) {
+			if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) {
 				// If copy failed, chmod file to 0644 and try again.
 				$wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE );
-				if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true, FS_CHMOD_FILE) )
+				if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) {
 					return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename );
+				}
 			}
 		} elseif ( 'd' == $fileinfo['type'] ) {
-			if ( !$wp_filesystem->is_dir($to . $filename) ) {
-				if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) )
+			if ( ! $wp_filesystem->is_dir( $to . $filename ) ) {
+				if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) {
 					return new WP_Error( 'mkdir_failed__copy_dir', __( 'Could not create directory.' ), $to . $filename );
+				}
 			}
 
 			/*
@@ -1182,15 +1208,17 @@
 			 */
 			$sub_skip_list = array();
 			foreach ( $skip_list as $skip_item ) {
-				if ( 0 === strpos( $skip_item, $filename . '/' ) )
+				if ( 0 === strpos( $skip_item, $filename . '/' ) ) {
 					$sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item );
+				}
 			}
 
-			$result = _copy_dir($from . $filename, $to . $filename, $sub_skip_list);
-			if ( is_wp_error($result) )
+			$result = _copy_dir( $from . $filename, $to . $filename, $sub_skip_list );
+			if ( is_wp_error( $result ) ) {
 				return $result;
+			}
 		}
-	}
+	}// End foreach().
 	return true;
 }
 
@@ -1210,21 +1238,24 @@
 function _redirect_to_about_wordpress( $new_version ) {
 	global $wp_version, $pagenow, $action;
 
-	if ( version_compare( $wp_version, '3.4-RC1', '>=' ) )
+	if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) {
 		return;
+	}
 
 	// Ensure we only run this on the update-core.php page. The Core_Upgrader may be used in other contexts.
-	if ( 'update-core.php' != $pagenow )
+	if ( 'update-core.php' != $pagenow ) {
 		return;
+	}
 
- 	if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action )
- 		return;
+	if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action ) {
+		return;
+	}
 
 	// Load the updated default text localization domain for new strings.
 	load_default_textdomain();
 
 	// See do_core_upgrade()
-	show_message( __('WordPress updated successfully') );
+	show_message( __( 'WordPress updated successfully' ) );
 
 	// self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
 	show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
@@ -1237,7 +1268,7 @@
 	<?php
 
 	// Include admin-footer.php and exit.
-	include(ABSPATH . 'wp-admin/admin-footer.php');
+	include( ABSPATH . 'wp-admin/admin-footer.php' );
 	exit();
 }
 
Index: src/wp-admin/includes/update.php
===================================================================
--- src/wp-admin/includes/update.php	(revision 40901)
+++ src/wp-admin/includes/update.php	(working copy)
@@ -13,10 +13,14 @@
  */
 function get_preferred_from_update_core() {
 	$updates = get_core_updates();
-	if ( ! is_array( $updates ) )
+	if ( ! is_array( $updates ) ) {
 		return false;
-	if ( empty( $updates ) )
-		return (object) array( 'response' => 'latest' );
+	}
+	if ( empty( $updates ) ) {
+		return (object) array(
+			'response' => 'latest',
+		);
+	}
 	return $updates[0];
 }
 
@@ -28,22 +32,28 @@
  * @return array|false Array of the update objects on success, false on failure.
  */
 function get_core_updates( $options = array() ) {
-	$options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );
+	$options = array_merge( array(
+		'available' => true,
+		'dismissed' => false,
+	), $options );
 	$dismissed = get_site_option( 'dismissed_update_core' );
 
-	if ( ! is_array( $dismissed ) )
+	if ( ! is_array( $dismissed ) ) {
 		$dismissed = array();
+	}
 
 	$from_api = get_site_transient( 'update_core' );
 
-	if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) )
+	if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
 		return false;
+	}
 
 	$updates = $from_api->updates;
 	$result = array();
 	foreach ( $updates as $update ) {
-		if ( $update->response == 'autoupdate' )
+		if ( $update->response == 'autoupdate' ) {
 			continue;
+		}
 
 		if ( array_key_exists( $update->current . '|' . $update->locale, $dismissed ) ) {
 			if ( $options['dismissed'] ) {
@@ -71,22 +81,26 @@
  */
 function find_core_auto_update() {
 	$updates = get_site_transient( 'update_core' );
-	if ( ! $updates || empty( $updates->updates ) )
+	if ( ! $updates || empty( $updates->updates ) ) {
 		return false;
+	}
 
 	include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 
 	$auto_update = false;
 	$upgrader = new WP_Automatic_Updater;
 	foreach ( $updates->updates as $update ) {
-		if ( 'autoupdate' != $update->response )
+		if ( 'autoupdate' != $update->response ) {
 			continue;
+		}
 
-		if ( ! $upgrader->should_update( 'core', $update, ABSPATH ) )
+		if ( ! $upgrader->should_update( 'core', $update, ABSPATH ) ) {
 			continue;
+		}
 
-		if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) )
+		if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) ) {
 			$auto_update = $update;
+		}
 	}
 	return $auto_update;
 }
@@ -103,8 +117,9 @@
 function get_core_checksums( $version, $locale ) {
 	$url = $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
 
-	if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
+	if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
 		$url = set_url_scheme( $url, 'https' );
+	}
 
 	$options = array(
 		'timeout' => wp_doing_cron() ? 30 : 3,
@@ -123,14 +138,16 @@
 		$response = wp_remote_get( $http_url, $options );
 	}
 
-	if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
+	if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
 		return false;
+	}
 
 	$body = trim( wp_remote_retrieve_body( $response ) );
 	$body = json_decode( $body, true );
 
-	if ( ! is_array( $body ) || ! isset( $body['checksums'] ) || ! is_array( $body['checksums'] ) )
+	if ( ! is_array( $body ) || ! isset( $body['checksums'] ) || ! is_array( $body['checksums'] ) ) {
 		return false;
+	}
 
 	return $body['checksums'];
 }
@@ -156,10 +173,11 @@
 	$dismissed = get_site_option( 'dismissed_update_core' );
 	$key = $version . '|' . $locale;
 
-	if ( ! isset( $dismissed[$key] ) )
+	if ( ! isset( $dismissed[ $key ] ) ) {
 		return false;
+	}
 
-	unset( $dismissed[$key] );
+	unset( $dismissed[ $key ] );
 	return update_site_option( 'dismissed_update_core', $dismissed );
 }
 
@@ -172,13 +190,15 @@
 function find_core_update( $version, $locale ) {
 	$from_api = get_site_transient( 'update_core' );
 
-	if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) )
+	if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
 		return false;
+	}
 
 	$updates = $from_api->updates;
 	foreach ( $updates as $update ) {
-		if ( $update->current == $version && $update->locale == $locale )
+		if ( $update->current == $version && $update->locale == $locale ) {
 			return $update;
+		}
 	}
 	return false;
 }
@@ -189,32 +209,37 @@
  * @return string
  */
 function core_update_footer( $msg = '' ) {
-	if ( !current_user_can('update_core') )
+	if ( ! current_user_can( 'update_core' ) ) {
 		return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
+	}
 
 	$cur = get_preferred_from_update_core();
-	if ( ! is_object( $cur ) )
+	if ( ! is_object( $cur ) ) {
 		$cur = new stdClass;
+	}
 
-	if ( ! isset( $cur->current ) )
+	if ( ! isset( $cur->current ) ) {
 		$cur->current = '';
+	}
 
-	if ( ! isset( $cur->url ) )
+	if ( ! isset( $cur->url ) ) {
 		$cur->url = '';
+	}
 
-	if ( ! isset( $cur->response ) )
+	if ( ! isset( $cur->response ) ) {
 		$cur->response = '';
+	}
 
 	switch ( $cur->response ) {
-	case 'development' :
-		/* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */
+		case 'development' :
+			/* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */
 		return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) );
 
-	case 'upgrade' :
+		case 'upgrade' :
 		return '<strong><a href="' . network_admin_url( 'update-core.php' ) . '">' . sprintf( __( 'Get Version %s' ), $cur->current ) . '</a></strong>';
 
-	case 'latest' :
-	default :
+		case 'latest' :
+		default :
 		return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
 	}
 }
@@ -225,18 +250,21 @@
  * @return false|void
  */
 function update_nag() {
-	if ( is_multisite() && !current_user_can('update_core') )
+	if ( is_multisite() && ! current_user_can( 'update_core' ) ) {
 		return false;
+	}
 
 	global $pagenow;
 
-	if ( 'update-core.php' == $pagenow )
+	if ( 'update-core.php' == $pagenow ) {
 		return;
+	}
 
 	$cur = get_preferred_from_update_core();
 
-	if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
+	if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) {
 		return false;
+	}
 
 	if ( current_user_can( 'update_core' ) ) {
 		$msg = sprintf(
@@ -275,11 +303,12 @@
 
 	$msg = '';
 
-	if ( current_user_can('update_core') ) {
+	if ( current_user_can( 'update_core' ) ) {
 		$cur = get_preferred_from_update_core();
 
-		if ( isset( $cur->response ) && $cur->response == 'upgrade' )
+		if ( isset( $cur->response ) && $cur->response == 'upgrade' ) {
 			$msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
+		}
 	}
 
 	/* translators: 1: version number, 2: theme name */
@@ -310,7 +339,7 @@
 	$all_plugins = get_plugins();
 	$upgrade_plugins = array();
 	$current = get_site_transient( 'update_plugins' );
-	foreach ( (array)$all_plugins as $plugin_file => $plugin_data) {
+	foreach ( (array) $all_plugins as $plugin_file => $plugin_data ) {
 		if ( isset( $current->response[ $plugin_file ] ) ) {
 			$upgrade_plugins[ $plugin_file ] = (object) $plugin_data;
 			$upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ];
@@ -324,11 +353,12 @@
  * @since 2.9.0
  */
 function wp_plugin_update_rows() {
-	if ( !current_user_can('update_plugins' ) )
+	if ( ! current_user_can( 'update_plugins' ) ) {
 		return;
+	}
 
 	$plugins = get_site_transient( 'update_plugins' );
-	if ( isset($plugins->response) && is_array($plugins->response) ) {
+	if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {
 		$plugins = array_keys( $plugins->response );
 		foreach ( $plugins as $plugin_file ) {
 			add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
@@ -352,9 +382,16 @@
 	$response = $current->response[ $file ];
 
 	$plugins_allowedtags = array(
-		'a'       => array( 'href' => array(), 'title' => array() ),
-		'abbr'    => array( 'title' => array() ),
-		'acronym' => array( 'title' => array() ),
+		'a'       => array(
+			'href' => array(),
+			'title' => array(),
+		),
+		'abbr'    => array(
+			'title' => array(),
+		),
+		'acronym' => array(
+			'title' => array(),
+		),
 		'code'    => array(),
 		'em'      => array(),
 		'strong'  => array(),
@@ -413,7 +450,7 @@
 					esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
 				)
 			);
-		}
+		}// End if().
 
 		/**
 		 * Fires at the end of the update message container in each
@@ -453,7 +490,7 @@
 		do_action( "in_plugin_update_message-{$file}", $plugin_data, $response );
 
 		echo '</p></div></td></tr>';
-	}
+	}// End if().
 }
 
 /**
@@ -461,10 +498,11 @@
  * @return array
  */
 function get_theme_updates() {
-	$current = get_site_transient('update_themes');
+	$current = get_site_transient( 'update_themes' );
 
-	if ( ! isset( $current->response ) )
+	if ( ! isset( $current->response ) ) {
 		return array();
+	}
 
 	$update_themes = array();
 	foreach ( $current->response as $stylesheet => $data ) {
@@ -479,11 +517,12 @@
  * @since 3.1.0
  */
 function wp_theme_update_rows() {
-	if ( !current_user_can('update_themes' ) )
+	if ( ! current_user_can( 'update_themes' ) ) {
 		return;
+	}
 
 	$themes = get_site_transient( 'update_themes' );
-	if ( isset($themes->response) && is_array($themes->response) ) {
+	if ( isset( $themes->response ) && is_array( $themes->response ) ) {
 		$themes = array_keys( $themes->response );
 
 		foreach ( $themes as $theme ) {
@@ -522,7 +561,7 @@
 	echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
 	if ( ! current_user_can( 'update_themes' ) ) {
 		/* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
-		printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
+		printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
 			$theme['Name'],
 			esc_url( $details_url ),
 			sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
@@ -558,7 +597,7 @@
 				esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) )
 			)
 		);
-	}
+	}// End if().
 
 	/**
 	 * Fires at the end of the update message container in each
@@ -605,17 +644,19 @@
 		 * This flag is cleared whenever a successful update occurs using Core_Upgrader.
 		 */
 		$comparison = ! empty( $failed['critical'] ) ? '>=' : '>';
-		if ( version_compare( $failed['attempted'], $wp_version, $comparison ) )
+		if ( version_compare( $failed['attempted'], $wp_version, $comparison ) ) {
 			$nag = true;
+		}
 	}
 
-	if ( ! $nag )
+	if ( ! $nag ) {
 		return false;
+	}
 
-	if ( current_user_can('update_core') )
-		$msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' );
-	else
-		$msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.');
+	if ( current_user_can( 'update_core' ) ) {
+		$msg = sprintf( __( 'An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.' ), 'update-core.php' );
+	} else { $msg = __( 'An automated WordPress update has failed to complete! Please notify the site administrator.' );
+	}
 
 	echo "<div class='update-nag'>$msg</div>";
 }
Index: src/wp-admin/includes/user.php
===================================================================
--- src/wp-admin/includes/user.php	(revision 40901)
+++ src/wp-admin/includes/user.php	(working copy)
@@ -39,55 +39,67 @@
 		$update = false;
 	}
 
-	if ( !$update && isset( $_POST['user_login'] ) )
-		$user->user_login = sanitize_user($_POST['user_login'], true);
+	if ( ! $update && isset( $_POST['user_login'] ) ) {
+		$user->user_login = sanitize_user( $_POST['user_login'], true );
+	}
 
 	$pass1 = $pass2 = '';
-	if ( isset( $_POST['pass1'] ) )
+	if ( isset( $_POST['pass1'] ) ) {
 		$pass1 = $_POST['pass1'];
-	if ( isset( $_POST['pass2'] ) )
+	}
+	if ( isset( $_POST['pass2'] ) ) {
 		$pass2 = $_POST['pass2'];
+	}
 
 	if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) {
 		$new_role = sanitize_text_field( $_POST['role'] );
-		$potential_role = isset($wp_roles->role_objects[$new_role]) ? $wp_roles->role_objects[$new_role] : false;
+		$potential_role = isset( $wp_roles->role_objects[ $new_role ] ) ? $wp_roles->role_objects[ $new_role ] : false;
 		// Don't let anyone with 'edit_users' (admins) edit their own role to something without it.
 		// Multisite super admins can freely edit their blog roles -- they possess all caps.
-		if ( ( is_multisite() && current_user_can( 'manage_sites' ) ) || $user_id != get_current_user_id() || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) )
+		if ( ( is_multisite() && current_user_can( 'manage_sites' ) ) || $user_id != get_current_user_id() || ($potential_role && $potential_role->has_cap( 'edit_users' ) ) ) {
 			$user->role = $new_role;
+		}
 
 		// If the new role isn't editable by the logged-in user die with error
 		$editable_roles = get_editable_roles();
-		if ( ! empty( $new_role ) && empty( $editable_roles[$new_role] ) )
-			wp_die(__('You can&#8217;t give users that role.'));
+		if ( ! empty( $new_role ) && empty( $editable_roles[ $new_role ] ) ) {
+			wp_die( __( 'You can&#8217;t give users that role.' ) );
+		}
 	}
 
-	if ( isset( $_POST['email'] ))
+	if ( isset( $_POST['email'] ) ) {
 		$user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) );
+	}
 	if ( isset( $_POST['url'] ) ) {
-		if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) {
+		if ( empty( $_POST['url'] ) || $_POST['url'] == 'http://' ) {
 			$user->user_url = '';
 		} else {
 			$user->user_url = esc_url_raw( $_POST['url'] );
 			$protocols = implode( '|', array_map( 'preg_quote', wp_allowed_protocols() ) );
-			$user->user_url = preg_match('/^(' . $protocols . '):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
+			$user->user_url = preg_match( '/^(' . $protocols . '):/is', $user->user_url ) ? $user->user_url : 'http://' . $user->user_url;
 		}
 	}
-	if ( isset( $_POST['first_name'] ) )
+	if ( isset( $_POST['first_name'] ) ) {
 		$user->first_name = sanitize_text_field( $_POST['first_name'] );
-	if ( isset( $_POST['last_name'] ) )
+	}
+	if ( isset( $_POST['last_name'] ) ) {
 		$user->last_name = sanitize_text_field( $_POST['last_name'] );
-	if ( isset( $_POST['nickname'] ) )
+	}
+	if ( isset( $_POST['nickname'] ) ) {
 		$user->nickname = sanitize_text_field( $_POST['nickname'] );
-	if ( isset( $_POST['display_name'] ) )
+	}
+	if ( isset( $_POST['display_name'] ) ) {
 		$user->display_name = sanitize_text_field( $_POST['display_name'] );
+	}
 
-	if ( isset( $_POST['description'] ) )
+	if ( isset( $_POST['description'] ) ) {
 		$user->description = trim( $_POST['description'] );
+	}
 
 	foreach ( wp_get_user_contact_methods( $user ) as $method => $name ) {
-		if ( isset( $_POST[$method] ))
-			$user->$method = sanitize_text_field( $_POST[$method] );
+		if ( isset( $_POST[ $method ] ) ) {
+			$user->$method = sanitize_text_field( $_POST[ $method ] );
+		}
 	}
 
 	if ( $update ) {
@@ -113,14 +125,16 @@
 	$user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : '';
 
 	$user->use_ssl = 0;
-	if ( !empty($_POST['use_ssl']) )
+	if ( ! empty( $_POST['use_ssl'] ) ) {
 		$user->use_ssl = 1;
+	}
 
 	$errors = new WP_Error();
 
 	/* checking that username has been typed */
-	if ( $user->user_login == '' )
+	if ( $user->user_login == '' ) {
 		$errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) );
+	}
 
 	/* checking that nickname has been typed */
 	if ( $update && empty( $user->nickname ) ) {
@@ -140,27 +154,36 @@
 
 	// Check for blank password when adding a user.
 	if ( ! $update && empty( $pass1 ) ) {
-		$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter a password.' ), array( 'form-field' => 'pass1' ) );
+		$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter a password.' ), array(
+			'form-field' => 'pass1',
+		) );
 	}
 
 	// Check for "\" in password.
-	if ( false !== strpos( wp_unslash( $pass1 ), "\\" ) ) {
-		$errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
+	if ( false !== strpos( wp_unslash( $pass1 ), '\\' ) ) {
+		$errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ), array(
+			'form-field' => 'pass1',
+		) );
 	}
 
 	// Checking the password has been typed twice the same.
 	if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) {
-		$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
+		$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.' ), array(
+			'form-field' => 'pass1',
+		) );
 	}
 
-	if ( !empty( $pass1 ) )
+	if ( ! empty( $pass1 ) ) {
 		$user->user_pass = $pass1;
+	}
 
-	if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) )
-		$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
+	if ( ! $update && isset( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) {
+		$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
+	}
 
-	if ( !$update && username_exists( $user->user_login ) )
-		$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));
+	if ( ! $update && username_exists( $user->user_login ) ) {
+		$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
+	}
 
 	/** This filter is documented in wp-includes/user.php */
 	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
@@ -171,11 +194,17 @@
 
 	/* checking email address */
 	if ( empty( $user->user_email ) ) {
-		$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) );
-	} elseif ( !is_email( $user->user_email ) ) {
-		$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
-	} elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
-		$errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
+		$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an email address.' ), array(
+			'form-field' => 'email',
+		) );
+	} elseif ( ! is_email( $user->user_email ) ) {
+		$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ), array(
+			'form-field' => 'email',
+		) );
+	} elseif ( ( $owner_id = email_exists( $user->user_email ) ) && ( ! $update || ( $owner_id != $user->ID ) ) ) {
+		$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ), array(
+			'form-field' => 'email',
+		) );
 	}
 
 	/**
@@ -189,8 +218,9 @@
 	 */
 	do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );
 
-	if ( $errors->get_error_codes() )
+	if ( $errors->get_error_codes() ) {
 		return $errors;
+	}
 
 	if ( $update ) {
 		$user_id = wp_update_user( $user );
@@ -254,8 +284,9 @@
 function get_user_to_edit( $user_id ) {
 	$user = get_userdata( $user_id );
 
-	if ( $user )
+	if ( $user ) {
 		$user->filter = 'edit';
+	}
 
 	return $user;
 }
@@ -272,7 +303,7 @@
  */
 function get_users_drafts( $user_id ) {
 	global $wpdb;
-	$query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id);
+	$query = $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id );
 
 	/**
 	 * Filters the user's drafts query string.
@@ -311,8 +342,9 @@
 	$id = (int) $id;
 	$user = new WP_User( $id );
 
-	if ( !$user->exists() )
+	if ( ! $user->exists() ) {
 		return false;
+	}
 
 	// Normalize $reassign to null or a user ID. 'novalue' was an older default.
 	if ( 'novalue' === $reassign ) {
@@ -354,41 +386,56 @@
 		$post_types_to_delete = implode( "', '", $post_types_to_delete );
 		$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d AND post_type IN ('$post_types_to_delete')", $id ) );
 		if ( $post_ids ) {
-			foreach ( $post_ids as $post_id )
+			foreach ( $post_ids as $post_id ) {
 				wp_delete_post( $post_id );
+			}
 		}
 
 		// Clean links
-		$link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) );
+		$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) );
 
 		if ( $link_ids ) {
-			foreach ( $link_ids as $link_id )
-				wp_delete_link($link_id);
+			foreach ( $link_ids as $link_id ) {
+				wp_delete_link( $link_id );
+			}
 		}
 	} else {
 		$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id ) );
-		$wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) );
+		$wpdb->update( $wpdb->posts, array(
+			'post_author' => $reassign,
+			), array(
+			'post_author' => $id,
+		) );
 		if ( ! empty( $post_ids ) ) {
-			foreach ( $post_ids as $post_id )
+			foreach ( $post_ids as $post_id ) {
 				clean_post_cache( $post_id );
+			}
 		}
-		$link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) );
-		$wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) );
+		$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) );
+		$wpdb->update( $wpdb->links, array(
+			'link_owner' => $reassign,
+			), array(
+			'link_owner' => $id,
+		) );
 		if ( ! empty( $link_ids ) ) {
-			foreach ( $link_ids as $link_id )
+			foreach ( $link_ids as $link_id ) {
 				clean_bookmark_cache( $link_id );
+			}
 		}
-	}
+	}// End if().
 
 	// FINALLY, delete user
 	if ( is_multisite() ) {
 		remove_user_from_blog( $id, get_current_blog_id() );
 	} else {
 		$meta = $wpdb->get_col( $wpdb->prepare( "SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d", $id ) );
-		foreach ( $meta as $mid )
+		foreach ( $meta as $mid ) {
 			delete_metadata_by_mid( 'user', $mid );
+		}
 
-		$wpdb->delete( $wpdb->users, array( 'ID' => $id ) );
+		$wpdb->delete( $wpdb->users, array(
+			'ID' => $id,
+		) );
 	}
 
 	clean_user_cache( $user );
@@ -414,10 +461,10 @@
  *
  * @param int $id User ID.
  */
-function wp_revoke_user($id) {
+function wp_revoke_user( $id ) {
 	$id = (int) $id;
 
-	$user = new WP_User($id);
+	$user = new WP_User( $id );
 	$user->remove_all_caps();
 }
 
@@ -428,16 +475,17 @@
  *
  * @param false $errors Deprecated.
  */
-function default_password_nag_handler($errors = false) {
+function default_password_nag_handler( $errors = false ) {
 	global $user_ID;
 	// Short-circuit it.
-	if ( ! get_user_option('default_password_nag') )
+	if ( ! get_user_option( 'default_password_nag' ) ) {
 		return;
+	}
 
 	// get_user_setting = JS saved UI setting. else no-js-fallback code.
-	if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) {
-		delete_user_setting('default_password_nag');
-		update_user_option($user_ID, 'default_password_nag', false, true);
+	if ( 'hide' == get_user_setting( 'default_password_nag' ) || isset( $_GET['default_password_nag'] ) && '0' == $_GET['default_password_nag'] ) {
+		delete_user_setting( 'default_password_nag' );
+		update_user_option( $user_ID, 'default_password_nag', false, true );
 	}
 }
 
@@ -447,17 +495,18 @@
  * @param int    $user_ID
  * @param object $old_data
  */
-function default_password_nag_edit_user($user_ID, $old_data) {
+function default_password_nag_edit_user( $user_ID, $old_data ) {
 	// Short-circuit it.
-	if ( ! get_user_option('default_password_nag', $user_ID) )
+	if ( ! get_user_option( 'default_password_nag', $user_ID ) ) {
 		return;
+	}
 
-	$new_data = get_userdata($user_ID);
+	$new_data = get_userdata( $user_ID );
 
 	// Remove the nag if the password has been changed.
 	if ( $new_data->user_pass != $old_data->user_pass ) {
-		delete_user_setting('default_password_nag');
-		update_user_option($user_ID, 'default_password_nag', false, true);
+		delete_user_setting( 'default_password_nag' );
+		update_user_option( $user_ID, 'default_password_nag', false, true );
 	}
 }
 
@@ -469,16 +518,17 @@
 function default_password_nag() {
 	global $pagenow;
 	// Short-circuit it.
-	if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') )
+	if ( 'profile.php' == $pagenow || ! get_user_option( 'default_password_nag' ) ) {
 		return;
+	}
 
 	echo '<div class="error default-password-nag">';
 	echo '<p>';
-	echo '<strong>' . __('Notice:') . '</strong> ';
-	_e('You&rsquo;re using the auto-generated password for your account. Would you like to change it?');
+	echo '<strong>' . __( 'Notice:' ) . '</strong> ';
+	_e( 'You&rsquo;re using the auto-generated password for your account. Would you like to change it?' );
 	echo '</p><p>';
-	printf( '<a href="%s">' . __('Yes, take me to my profile page') . '</a> | ', get_edit_profile_url() . '#password' );
-	printf( '<a href="%s" id="default-password-nag-no">' . __('No thanks, do not remind me again') . '</a>', '?default_password_nag=0' );
+	printf( '<a href="%s">' . __( 'Yes, take me to my profile page' ) . '</a> | ', get_edit_profile_url() . '#password' );
+	printf( '<a href="%s" id="default-password-nag-no">' . __( 'No thanks, do not remind me again' ) . '</a>', '?default_password_nag=0' );
 	echo '</p></div>';
 }
 
@@ -486,7 +536,8 @@
  * @since 3.5.0
  * @access private
  */
-function delete_users_add_js() { ?>
+function delete_users_add_js() {
+	?>
 <script>
 jQuery(document).ready( function($) {
 	var submit = $('#submit').prop('disabled', true);
@@ -510,11 +561,11 @@
  *
  * @param object $user User data object
  */
-function use_ssl_preference($user) {
+function use_ssl_preference( $user ) {
 ?>
 	<tr class="user-use-ssl-wrap">
-		<th scope="row"><?php _e('Use https')?></th>
-		<td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked('1', $user->use_ssl); ?> /> <?php _e('Always use https when visiting the admin'); ?></label></td>
+		<th scope="row"><?php _e( 'Use https' )?></th>
+		<td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td>
 	</tr>
 <?php
 }
Index: src/wp-admin/includes/widgets.php
===================================================================
--- src/wp-admin/includes/widgets.php	(revision 40901)
+++ src/wp-admin/includes/widgets.php	(working copy)
@@ -22,31 +22,41 @@
 	$done = array();
 
 	foreach ( $sort as $widget ) {
-		if ( in_array( $widget['callback'], $done, true ) ) // We already showed this multi-widget
+		if ( in_array( $widget['callback'], $done, true ) ) { // We already showed this multi-widget
 			continue;
+		}
 
 		$sidebar = is_active_widget( $widget['callback'], $widget['id'], false, false );
 		$done[] = $widget['callback'];
 
-		if ( ! isset( $widget['params'][0] ) )
+		if ( ! isset( $widget['params'][0] ) ) {
 			$widget['params'][0] = array();
+		}
 
-		$args = array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template' );
+		$args = array(
+			'widget_id' => $widget['id'],
+			'widget_name' => $widget['name'],
+			'_display' => 'template',
+		);
 
-		if ( isset($wp_registered_widget_controls[$widget['id']]['id_base']) && isset($widget['params'][0]['number']) ) {
-			$id_base = $wp_registered_widget_controls[$widget['id']]['id_base'];
+		if ( isset( $wp_registered_widget_controls[ $widget['id'] ]['id_base'] ) && isset( $widget['params'][0]['number'] ) ) {
+			$id_base = $wp_registered_widget_controls[ $widget['id'] ]['id_base'];
 			$args['_temp_id'] = "$id_base-__i__";
-			$args['_multi_num'] = next_widget_id_number($id_base);
+			$args['_multi_num'] = next_widget_id_number( $id_base );
 			$args['_add'] = 'multi';
 		} else {
 			$args['_add'] = 'single';
-			if ( $sidebar )
+			if ( $sidebar ) {
 				$args['_hide'] = '1';
+			}
 		}
 
-		$args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
+		$args = wp_list_widget_controls_dynamic_sidebar( array(
+			0 => $args,
+			1 => $widget['params'][0],
+		) );
 		call_user_func_array( 'wp_widget_control', $args );
-	}
+	}// End foreach().
 }
 
 /**
@@ -117,16 +127,16 @@
 	$i++;
 
 	$widget_id = $params[0]['widget_id'];
-	$id = isset($params[0]['_temp_id']) ? $params[0]['_temp_id'] : $widget_id;
-	$hidden = isset($params[0]['_hide']) ? ' style="display:none;"' : '';
+	$id = isset( $params[0]['_temp_id'] ) ? $params[0]['_temp_id'] : $widget_id;
+	$hidden = isset( $params[0]['_hide'] ) ? ' style="display:none;"' : '';
 
 	$params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>";
-	$params[0]['after_widget'] = "</div>";
-	$params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated
-	$params[0]['after_title'] = "%END_OF_TITLE%"; // deprecated
-	if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) {
-		$wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback'];
-		$wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control';
+	$params[0]['after_widget'] = '</div>';
+	$params[0]['before_title'] = '%BEG_OF_TITLE%'; // deprecated
+	$params[0]['after_title'] = '%END_OF_TITLE%'; // deprecated
+	if ( is_callable( $wp_registered_widgets[ $widget_id ]['callback'] ) ) {
+		$wp_registered_widgets[ $widget_id ]['_callback'] = $wp_registered_widgets[ $widget_id ]['callback'];
+		$wp_registered_widgets[ $widget_id ]['callback'] = 'wp_widget_control';
 	}
 
 	return $params;
@@ -144,8 +154,9 @@
 	$number = 1;
 
 	foreach ( $wp_registered_widgets as $widget_id => $widget ) {
-		if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) )
-			$number = max($number, $matches[1]);
+		if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) {
+			$number = max( $number, $matches[1] );
+		}
 	}
 	$number++;
 
@@ -170,23 +181,25 @@
 	global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets;
 
 	$widget_id = $sidebar_args['widget_id'];
-	$sidebar_id = isset($sidebar_args['id']) ? $sidebar_args['id'] : false;
-	$key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[$sidebar_id] ) : '-1'; // position of widget in sidebar
-	$control = isset($wp_registered_widget_controls[$widget_id]) ? $wp_registered_widget_controls[$widget_id] : array();
-	$widget = $wp_registered_widgets[$widget_id];
+	$sidebar_id = isset( $sidebar_args['id'] ) ? $sidebar_args['id'] : false;
+	$key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[ $sidebar_id ] ) : '-1'; // position of widget in sidebar
+	$control = isset( $wp_registered_widget_controls[ $widget_id ] ) ? $wp_registered_widget_controls[ $widget_id ] : array();
+	$widget = $wp_registered_widgets[ $widget_id ];
 
 	$id_format = $widget['id'];
-	$widget_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : '';
-	$id_base = isset($control['id_base']) ? $control['id_base'] : $widget_id;
-	$multi_number = isset($sidebar_args['_multi_num']) ? $sidebar_args['_multi_num'] : '';
-	$add_new = isset($sidebar_args['_add']) ? $sidebar_args['_add'] : '';
+	$widget_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : '';
+	$id_base = isset( $control['id_base'] ) ? $control['id_base'] : $widget_id;
+	$multi_number = isset( $sidebar_args['_multi_num'] ) ? $sidebar_args['_multi_num'] : '';
+	$add_new = isset( $sidebar_args['_add'] ) ? $sidebar_args['_add'] : '';
 
 	$before_form = isset( $sidebar_args['before_form'] ) ? $sidebar_args['before_form'] : '<form method="post">';
 	$after_form = isset( $sidebar_args['after_form'] ) ? $sidebar_args['after_form'] : '</form>';
 	$before_widget_content = isset( $sidebar_args['before_widget_content'] ) ? $sidebar_args['before_widget_content'] : '<div class="widget-content">';
 	$after_widget_content = isset( $sidebar_args['after_widget_content'] ) ? $sidebar_args['after_widget_content'] : '</div>';
 
-	$query_arg = array( 'editwidget' => $widget['id'] );
+	$query_arg = array(
+		'editwidget' => $widget['id'],
+	);
 	if ( $add_new ) {
 		$query_arg['addnew'] = 1;
 		if ( $multi_number ) {
@@ -202,16 +215,17 @@
 	 * We aren't showing a widget control, we're outputting a template
 	 * for a multi-widget control.
 	 */
-	if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) {
+	if ( isset( $sidebar_args['_display'] ) && 'template' == $sidebar_args['_display'] && $widget_number ) {
 		// number == -1 implies a template where id numbers are replaced by a generic '__i__'
 		$control['params'][0]['number'] = -1;
 		// With id_base widget id's are constructed like {$id_base}-{$id_number}.
-		if ( isset($control['id_base']) )
+		if ( isset( $control['id_base'] ) ) {
 			$id_format = $control['id_base'] . '-__i__';
+		}
 	}
 
-	$wp_registered_widgets[$widget_id]['callback'] = $wp_registered_widgets[$widget_id]['_callback'];
-	unset($wp_registered_widgets[$widget_id]['_callback']);
+	$wp_registered_widgets[ $widget_id ]['callback'] = $wp_registered_widgets[ $widget_id ]['_callback'];
+	unset( $wp_registered_widgets[ $widget_id ]['_callback'] );
 
 	$widget_title = esc_html( strip_tags( $sidebar_args['widget_name'] ) );
 	$has_form = 'noform';
@@ -239,25 +253,27 @@
 	if ( isset( $control['callback'] ) ) {
 		$has_form = call_user_func_array( $control['callback'], $control['params'] );
 	} else {
-		echo "\t\t<p>" . __('There are no options for this widget.') . "</p>\n";
+		echo "\t\t<p>" . __( 'There are no options for this widget.' ) . "</p>\n";
 	}
 	?>
 	<?php echo $after_widget_content; ?>
-	<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
-	<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
-	<input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />
-	<input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />
-	<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
-	<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
-	<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr($add_new); ?>" />
+	<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $id_format ); ?>" />
+	<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $id_base ); ?>" />
+	<input type="hidden" name="widget-width" class="widget-width" value="<?php if ( isset( $control['width'] ) ) { echo esc_attr( $control['width'] );} ?>" />
+	<input type="hidden" name="widget-height" class="widget-height" value="<?php if ( isset( $control['height'] ) ) { echo esc_attr( $control['height'] );} ?>" />
+	<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr( $widget_number ); ?>" />
+	<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr( $multi_number ); ?>" />
+	<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr( $add_new ); ?>" />
 
 	<div class="widget-control-actions">
 		<div class="alignleft">
 			<button type="button" class="button-link button-link-delete widget-control-remove"><?php _e( 'Delete' ); ?></button> |
 			<button type="button" class="button-link widget-control-close"><?php _e( 'Close' ); ?></button>
 		</div>
-		<div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
-			<?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
+		<div class="alignright<?php if ( 'noform' === $has_form ) { echo ' widget-control-noform';} ?>">
+			<?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array(
+				'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget',
+			) ); ?>
 			<span class="spinner"></span>
 		</div>
 		<br class="clear" />
@@ -266,7 +282,7 @@
 	</div>
 
 	<div class="widget-description">
-<?php echo ( $widget_description = wp_widget_description($widget_id) ) ? "$widget_description\n" : "$widget_title\n"; ?>
+<?php echo ( $widget_description = wp_widget_description( $widget_id ) ) ? "$widget_description\n" : "$widget_title\n"; ?>
 	</div>
 <?php
 	echo $sidebar_args['after_widget'];
@@ -279,6 +295,6 @@
  * @param string $classes
  * @return string
  */
-function wp_widgets_access_body_class($classes) {
+function wp_widgets_access_body_class( $classes ) {
 	return "$classes widgets_access ";
 }
Index: src/wp-admin/install-helper.php
===================================================================
--- src/wp-admin/install-helper.php	(revision 40901)
+++ src/wp-admin/install-helper.php	(working copy)
@@ -35,10 +35,10 @@
  */
 
 /** Load WordPress Bootstrap */
-require_once(dirname(dirname(__FILE__)).'/wp-load.php');
+require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
 
-if ( ! function_exists('maybe_create_table') ) :
-/**
+if ( ! function_exists( 'maybe_create_table' ) ) :
+	/**
  * Create database table, if it doesn't already exist.
  *
  * @since 1.0.0
@@ -49,28 +49,28 @@
  * @param string $create_ddl Create database table SQL.
  * @return bool False on error, true if already exists or success.
  */
-function maybe_create_table($table_name, $create_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
+	function maybe_create_table( $table_name, $create_ddl ) {
+		global $wpdb;
+		foreach ( $wpdb->get_col( 'SHOW TABLES',0 ) as $table ) {
+			if ( $table == $table_name ) {
+				return true;
+			}
 		}
-	}
-	// Didn't find it, so try to create it.
-	$wpdb->query($create_ddl);
+		// Didn't find it, so try to create it.
+		$wpdb->query( $create_ddl );
 
-	// We cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
+		// We cannot directly tell that whether this succeeded!
+		foreach ( $wpdb->get_col( 'SHOW TABLES',0 ) as $table ) {
+			if ( $table == $table_name ) {
+				return true;
+			}
 		}
+		return false;
 	}
-	return false;
-}
 endif;
 
-if ( ! function_exists('maybe_add_column') ) :
-/**
+if ( ! function_exists( 'maybe_add_column' ) ) :
+	/**
  * Add column to database table, if column doesn't already exist in table.
  *
  * @since 1.0.0
@@ -82,26 +82,26 @@
  * @param string $create_ddl SQL to add column to table.
  * @return bool False on failure. True, if already exists or was successful.
  */
-function maybe_add_column($table_name, $column_name, $create_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
+	function maybe_add_column( $table_name, $column_name, $create_ddl ) {
+		global $wpdb;
+		foreach ( $wpdb->get_col( "DESC $table_name",0 ) as $column ) {
 
-		if ($column == $column_name) {
-			return true;
+			if ( $column == $column_name ) {
+				return true;
+			}
 		}
-	}
 
-	// Didn't find it, so try to create it.
-	$wpdb->query($create_ddl);
+		// Didn't find it, so try to create it.
+		$wpdb->query( $create_ddl );
 
-	// We cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-		if ($column == $column_name) {
-			return true;
+		// We cannot directly tell that whether this succeeded!
+		foreach ( $wpdb->get_col( "DESC $table_name",0 ) as $column ) {
+			if ( $column == $column_name ) {
+				return true;
+			}
 		}
+		return false;
 	}
-	return false;
-}
 endif;
 
 /**
@@ -116,17 +116,17 @@
  * @param string $drop_ddl SQL statement to drop column.
  * @return bool False on failure, true on success or doesn't exist.
  */
-function maybe_drop_column($table_name, $column_name, $drop_ddl) {
+function maybe_drop_column( $table_name, $column_name, $drop_ddl ) {
 	global $wpdb;
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-		if ($column == $column_name) {
+	foreach ( $wpdb->get_col( "DESC $table_name",0 ) as $column ) {
+		if ( $column == $column_name ) {
 
 			// Found it, so try to drop it.
-			$wpdb->query($drop_ddl);
+			$wpdb->query( $drop_ddl );
 
 			// We cannot directly tell that whether this succeeded!
-			foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-				if ($column == $column_name) {
+			foreach ( $wpdb->get_col( "DESC $table_name",0 ) as $column ) {
+				if ( $column == $column_name ) {
 					return false;
 				}
 			}
@@ -165,36 +165,36 @@
  * @param mixed  $extra      Optional. Extra value.
  * @return bool True, if matches. False, if not matching.
  */
-function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
+function check_column( $table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null ) {
 	global $wpdb;
 	$diffs = 0;
-	$results = $wpdb->get_results("DESC $table_name");
+	$results = $wpdb->get_results( "DESC $table_name" );
 
-	foreach ($results as $row ) {
+	foreach ( $results as $row ) {
 
-		if ($row->Field == $col_name) {
+		if ( $row->Field == $col_name ) {
 
 			// Got our column, check the params.
-			if (($col_type != null) && ($row->Type != $col_type)) {
+			if ( ($col_type != null) && ($row->Type != $col_type) ) {
 				++$diffs;
 			}
-			if (($is_null != null) && ($row->Null != $is_null)) {
+			if ( ($is_null != null) && ($row->Null != $is_null) ) {
 				++$diffs;
 			}
-			if (($key != null) && ($row->Key  != $key)) {
+			if ( ($key != null) && ($row->Key != $key) ) {
 				++$diffs;
 			}
-			if (($default != null) && ($row->Default != $default)) {
+			if ( ($default != null) && ($row->Default != $default) ) {
 				++$diffs;
 			}
-			if (($extra != null) && ($row->Extra != $extra)) {
+			if ( ($extra != null) && ($row->Extra != $extra) ) {
 				++$diffs;
 			}
-			if ($diffs > 0) {
+			if ( $diffs > 0 ) {
 				return false;
 			}
 			return true;
-		} // end if found our column
+		} // End if().
 	}
 	return false;
 }
Index: src/wp-admin/install.php
===================================================================
--- src/wp-admin/install.php	(revision 40901)
+++ src/wp-admin/install.php	(working copy)
@@ -92,7 +92,7 @@
 function display_setup_form( $error = null ) {
 	global $wpdb;
 
-	$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
+	$sql = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->users ) );
 	$user_table = ( $wpdb->get_var( $sql ) != null );
 
 	// Ensure that Blogs appear in search engines by default.
@@ -102,8 +102,8 @@
 	}
 
 	$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
-	$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
-	$admin_email  = isset( $_POST['admin_email']  ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
+	$user_name = isset( $_POST['user_name'] ) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
+	$admin_email  = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
 
 	if ( ! is_null( $error ) ) {
 ?>
@@ -117,11 +117,11 @@
 			<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>" /></td>
 		</tr>
 		<tr>
-			<th scope="row"><label for="user_login"><?php _e('Username'); ?></label></th>
+			<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?></label></th>
 			<td>
 			<?php
 			if ( $user_table ) {
-				_e('User(s) already exists.');
+				_e( 'User(s) already exists.' );
 				echo '<input name="user_name" type="hidden" value="admin" />';
 			} else {
 				?><input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
@@ -193,7 +193,7 @@
 						<?php
 						/** This action is documented in wp-admin/options-reading.php */
 						do_action( 'blog_privacy_selector' );
-					 } else { ?>
+					} else { ?>
 						<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
 						<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
 						<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
@@ -202,7 +202,9 @@
 			</td>
 		</tr>
 	</table>
-	<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
+	<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array(
+		'id' => 'submit',
+	) ); ?></p>
 	<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
 </form>
 <?php
@@ -232,18 +234,18 @@
 $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
 $mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
 
-if ( !$mysql_compat && !$php_compat ) {
+if ( ! $mysql_compat && ! $php_compat ) {
 	/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
 	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
-} elseif ( !$php_compat ) {
+} elseif ( ! $php_compat ) {
 	/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
 	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
-} elseif ( !$mysql_compat ) {
+} elseif ( ! $mysql_compat ) {
 	/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
 	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
 }
 
-if ( !$mysql_compat || !$php_compat ) {
+if ( ! $mysql_compat || ! $php_compat ) {
 	display_header();
 	die( '<h1>' . __( 'Insufficient Requirements' ) . '</h1><p>' . $compat . '</p></body></html>' );
 }
@@ -286,7 +288,7 @@
 
 $scripts_to_print = array( 'jquery' );
 
-switch($step) {
+switch ( $step ) {
 	case 0: // Step 0
 		if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
 			$scripts_to_print[] = 'language-chooser';
@@ -329,17 +331,18 @@
 			$loaded_language = 'en_US';
 		}
 
-		if ( ! empty( $wpdb->error ) )
+		if ( ! empty( $wpdb->error ) ) {
 			wp_die( $wpdb->error->get_error_message() );
+		}
 
 		$scripts_to_print[] = 'user-profile';
 
 		display_header();
 		// Fill in the data we gathered
 		$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
-		$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
-		$admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : '';
-		$admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : '';
+		$user_name = isset( $_POST['user_name'] ) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
+		$admin_password = isset( $_POST['admin_password'] ) ? wp_unslash( $_POST['admin_password'] ) : '';
+		$admin_password_check = isset( $_POST['admin_password2'] ) ? wp_unslash( $_POST['admin_password2'] ) : '';
 		$admin_email  = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : '';
 		$public       = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1;
 
@@ -383,7 +386,7 @@
 	<tr>
 		<th><?php _e( 'Password' ); ?></th>
 		<td><?php
-		if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ): ?>
+		if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) : ?>
 			<code><?php echo esc_html( $result['password'] ) ?></code><br />
 		<?php endif ?>
 			<p><?php echo $result['password_message'] ?></p>
@@ -396,7 +399,7 @@
 <?php
 		}
 		break;
-}
+}// End switch().
 
 if ( ! wp_is_mobile() ) {
 	?>
Index: src/wp-admin/link-add.php
===================================================================
--- src/wp-admin/link-add.php	(revision 40901)
+++ src/wp-admin/link-add.php	(working copy)
@@ -9,19 +9,21 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can('manage_links') )
-	wp_die(__('Sorry, you are not allowed to add links to this site.'));
+if ( ! current_user_can( 'manage_links' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) );
+}
 
-$title = __('Add New Link');
+$title = __( 'Add New Link' );
 $parent_file = 'link-manager.php';
 
-wp_reset_vars( array('action', 'cat_id', 'link_id' ) );
+wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
 
-wp_enqueue_script('link');
-wp_enqueue_script('xfn');
+wp_enqueue_script( 'link' );
+wp_enqueue_script( 'xfn' );
 
-if ( wp_is_mobile() )
+if ( wp_is_mobile() ) {
 	wp_enqueue_script( 'jquery-touch-punch' );
+}
 
 $link = get_default_link_to_edit();
 include( ABSPATH . 'wp-admin/edit-link-form.php' );
Index: src/wp-admin/link-manager.php
===================================================================
--- src/wp-admin/link-manager.php	(revision 40901)
+++ src/wp-admin/link-manager.php	(working copy)
@@ -8,10 +8,11 @@
 
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
-if ( ! current_user_can( 'manage_links' ) )
+if ( ! current_user_can( 'manage_links' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
+}
 
-$wp_list_table = _get_list_table('WP_Links_List_Table');
+$wp_list_table = _get_list_table( 'WP_Links_List_Table' );
 
 // Handle bulk deletes
 $doaction = $wp_list_table->current_action();
@@ -43,28 +44,28 @@
 
 $wp_list_table->prepare_items();
 
-$title = __('Links');
+$title = __( 'Links' );
 $this_file = $parent_file = 'link-manager.php';
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.'), 'widgets.php') . '</p>' .
-    '<p>' . __('Links may be separated into Link Categories; these are different than the categories used on your posts.') . '</p>' .
-    '<p>' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '</p>'
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . sprintf( __( 'You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.' ), 'widgets.php' ) . '</p>' .
+	'<p>' . __( 'Links may be separated into Link Categories; these are different than the categories used on your posts.' ) . '</p>' .
+	'<p>' . __( 'You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.' ) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'deleting-links',
-'title'		=> __('Deleting Links'),
-'content'	=>
-    '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>'
+	'id'		=> 'deleting-links',
+	'title'		=> __( 'Deleting Links' ),
+	'content'	=>
+	'<p>' . __( 'If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Links_Screen">Documentation on Managing Links</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Links_Screen">Documentation on Managing Links</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -73,8 +74,9 @@
 
 include_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-if ( ! current_user_can('manage_links') )
-	wp_die(__('Sorry, you are not allowed to edit the links for this site.'));
+if ( ! current_user_can( 'manage_links' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
+}
 
 ?>
 
@@ -95,12 +97,12 @@
 <hr class="wp-header-end">
 
 <?php
-if ( isset($_REQUEST['deleted']) ) {
+if ( isset( $_REQUEST['deleted'] ) ) {
 	echo '<div id="message" class="updated notice is-dismissible"><p>';
 	$deleted = (int) $_REQUEST['deleted'];
-	printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
+	printf( _n( '%s link deleted.', '%s links deleted', $deleted ), $deleted );
 	echo '</p></div>';
-	$_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
+	$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] );
 }
 ?>
 
Index: src/wp-admin/link-parse-opml.php
===================================================================
--- src/wp-admin/link-parse-opml.php	(revision 40901)
+++ src/wp-admin/link-parse-opml.php	(working copy)
@@ -6,8 +6,9 @@
  * @subpackage Administration
  */
 
-if ( ! defined('ABSPATH') )
+if ( ! defined( 'ABSPATH' ) ) {
 	die();
+}
 
 /**
  * @global string $opml
@@ -30,7 +31,7 @@
  * @param string $tagName XML element name.
  * @param array $attrs XML element attributes.
  */
-function startElement($parser, $tagName, $attrs) {
+function startElement( $parser, $tagName, $attrs ) {
 	global $names, $urls, $targets, $descriptions, $feeds;
 
 	if ( 'OUTLINE' === $tagName ) {
@@ -55,7 +56,7 @@
 		$targets[] = isset( $attrs['TARGET'] ) ? $attrs['TARGET'] :  '';
 		$feeds[] = isset( $attrs['XMLURL'] ) ? $attrs['XMLURL'] :  '';
 		$descriptions[] = isset( $attrs['DESCRIPTION'] ) ? $attrs['DESCRIPTION'] :  '';
-	} // End if outline.
+	} // End if().
 }
 
 /**
@@ -67,7 +68,7 @@
  * @param mixed $parser XML Parser resource.
  * @param string $tagName XML tag name.
  */
-function endElement($parser, $tagName) {
+function endElement( $parser, $tagName ) {
 	// Nothing to do.
 }
 
@@ -80,7 +81,7 @@
 $xml_parser = xml_parser_create();
 
 // Set the functions to handle opening and closing tags
-xml_set_element_handler($xml_parser, "startElement", "endElement");
+xml_set_element_handler( $xml_parser, 'startElement', 'endElement' );
 
 if ( ! xml_parse( $xml_parser, $opml, true ) ) {
 	printf(
@@ -92,4 +93,4 @@
 }
 
 // Free up memory used by the XML parser
-xml_parser_free($xml_parser);
+xml_parser_free( $xml_parser );
Index: src/wp-admin/link.php
===================================================================
--- src/wp-admin/link.php	(revision 40901)
+++ src/wp-admin/link.php	(working copy)
@@ -14,99 +14,107 @@
 
 wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
 
-if ( ! current_user_can('manage_links') )
+if ( ! current_user_can( 'manage_links' ) ) {
 	wp_link_manager_disabled_message();
+}
 
-if ( !empty($_POST['deletebookmarks']) )
+if ( ! empty( $_POST['deletebookmarks'] ) ) {
 	$action = 'deletebookmarks';
-if ( !empty($_POST['move']) )
+}
+if ( ! empty( $_POST['move'] ) ) {
 	$action = 'move';
-if ( !empty($_POST['linkcheck']) )
+}
+if ( ! empty( $_POST['linkcheck'] ) ) {
 	$linkcheck = $_POST['linkcheck'];
+}
 
-$this_file = admin_url('link-manager.php');
+$this_file = admin_url( 'link-manager.php' );
 
-switch ($action) {
+switch ( $action ) {
 	case 'deletebookmarks' :
-		check_admin_referer('bulk-bookmarks');
+		check_admin_referer( 'bulk-bookmarks' );
 
 		// For each link id (in $linkcheck[]) change category to selected value.
-		if (count($linkcheck) == 0) {
-			wp_redirect($this_file);
+		if ( count( $linkcheck ) == 0 ) {
+			wp_redirect( $this_file );
 			exit;
 		}
 
 		$deleted = 0;
-		foreach ($linkcheck as $link_id) {
+		foreach ( $linkcheck as $link_id ) {
 			$link_id = (int) $link_id;
 
-			if ( wp_delete_link($link_id) )
+			if ( wp_delete_link( $link_id ) ) {
 				$deleted++;
+			}
 		}
 
-		wp_redirect("$this_file?deleted=$deleted");
+		wp_redirect( "$this_file?deleted=$deleted" );
 		exit;
 
 	case 'move' :
-		check_admin_referer('bulk-bookmarks');
+		check_admin_referer( 'bulk-bookmarks' );
 
 		// For each link id (in $linkcheck[]) change category to selected value.
-		if (count($linkcheck) == 0) {
-			wp_redirect($this_file);
+		if ( count( $linkcheck ) == 0 ) {
+			wp_redirect( $this_file );
 			exit;
 		}
-		$all_links = join(',', $linkcheck);
+		$all_links = join( ',', $linkcheck );
 		/*
 		 * Should now have an array of links we can change:
 		 *     $q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)");
 		 */
 
-		wp_redirect($this_file);
+		wp_redirect( $this_file );
 		exit;
 
 	case 'add' :
-		check_admin_referer('add-bookmark');
+		check_admin_referer( 'add-bookmark' );
 
 		$redir = wp_get_referer();
-		if ( add_link() )
+		if ( add_link() ) {
 			$redir = add_query_arg( 'added', 'true', $redir );
+		}
 
 		wp_redirect( $redir );
 		exit;
 
 	case 'save' :
 		$link_id = (int) $_POST['link_id'];
-		check_admin_referer('update-bookmark_' . $link_id);
+		check_admin_referer( 'update-bookmark_' . $link_id );
 
-		edit_link($link_id);
+		edit_link( $link_id );
 
-		wp_redirect($this_file);
+		wp_redirect( $this_file );
 		exit;
 
 	case 'delete' :
 		$link_id = (int) $_GET['link_id'];
-		check_admin_referer('delete-bookmark_' . $link_id);
+		check_admin_referer( 'delete-bookmark_' . $link_id );
 
-		wp_delete_link($link_id);
+		wp_delete_link( $link_id );
 
-		wp_redirect($this_file);
+		wp_redirect( $this_file );
 		exit;
 
 	case 'edit' :
-		wp_enqueue_script('link');
-		wp_enqueue_script('xfn');
+		wp_enqueue_script( 'link' );
+		wp_enqueue_script( 'xfn' );
 
-		if ( wp_is_mobile() )
+		if ( wp_is_mobile() ) {
 			wp_enqueue_script( 'jquery-touch-punch' );
+		}
 
 		$parent_file = 'link-manager.php';
 		$submenu_file = 'link-manager.php';
-		$title = __('Edit Link');
+		$title = __( 'Edit Link' );
 
 		$link_id = (int) $_GET['link_id'];
 
-		if (!$link = get_link_to_edit($link_id))
-			wp_die(__('Link not found.'));
+		if ( ! $link = get_link_to_edit( $link_id ) ) {
+			wp_die( __( 'Link not found.' ) );
+		}
 
 		include( ABSPATH . 'wp-admin/edit-link-form.php' );
 		include( ABSPATH . 'wp-admin/admin-footer.php' );
@@ -114,4 +122,4 @@
 
 	default :
 		break;
-}
+}// End switch().
Index: src/wp-admin/load-scripts.php
===================================================================
--- src/wp-admin/load-scripts.php	(revision 40901)
+++ src/wp-admin/load-scripts.php	(working copy)
@@ -5,7 +5,7 @@
  *
  * Set this to error_reporting( -1 ) for debugging.
  */
-error_reporting(0);
+error_reporting( 0 );
 
 /** Set ABSPATH for execution */
 if ( ! defined( 'ABSPATH' ) ) {
@@ -15,26 +15,28 @@
 define( 'WPINC', 'wp-includes' );
 
 $load = $_GET['load'];
-if ( is_array( $load ) )
+if ( is_array( $load ) ) {
 	$load = implode( '', $load );
+}
 
 $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
 $load = array_unique( explode( ',', $load ) );
 
-if ( empty($load) )
+if ( empty( $load ) ) {
 	exit;
+}
 
 require( ABSPATH . 'wp-admin/includes/noop.php' );
 require( ABSPATH . WPINC . '/script-loader.php' );
 require( ABSPATH . WPINC . '/version.php' );
 
-$compress = ( isset($_GET['c']) && $_GET['c'] );
+$compress = ( isset( $_GET['c'] ) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
 $expires_offset = 31536000; // 1 year
 $out = '';
 
 $wp_scripts = new WP_Scripts();
-wp_default_scripts($wp_scripts);
+wp_default_scripts( $wp_scripts );
 
 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
 	$protocol = $_SERVER['SERVER_PROTOCOL'];
@@ -46,25 +48,26 @@
 }
 
 foreach ( $load as $handle ) {
-	if ( !array_key_exists($handle, $wp_scripts->registered) )
+	if ( ! array_key_exists( $handle, $wp_scripts->registered ) ) {
 		continue;
+	}
 
-	$path = ABSPATH . $wp_scripts->registered[$handle]->src;
-	$out .= get_file($path) . "\n";
+	$path = ABSPATH . $wp_scripts->registered[ $handle ]->src;
+	$out .= get_file( $path ) . "\n";
 }
 
-header("Etag: $wp_version");
-header('Content-Type: application/javascript; charset=UTF-8');
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
-
-if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
-	header('Vary: Accept-Encoding'); // Handle proxies
-	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-		header('Content-Encoding: deflate');
+header( "Etag: $wp_version" );
+header( 'Content-Type: application/javascript; charset=UTF-8' );
+header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
+header( "Cache-Control: public, max-age=$expires_offset" );
+
+if ( $compress && ! ini_get( 'zlib.output_compression' ) && 'ob_gzhandler' != ini_get( 'output_handler' ) && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
+	header( 'Vary: Accept-Encoding' ); // Handle proxies
+	if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate' ) && function_exists( 'gzdeflate' ) && ! $force_gzip ) {
+		header( 'Content-Encoding: deflate' );
 		$out = gzdeflate( $out, 3 );
-	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-		header('Content-Encoding: gzip');
+	} elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && function_exists( 'gzencode' ) ) {
+		header( 'Content-Encoding: gzip' );
 		$out = gzencode( $out, 3 );
 	}
 }
Index: src/wp-admin/load-styles.php
===================================================================
--- src/wp-admin/load-styles.php	(revision 40901)
+++ src/wp-admin/load-styles.php	(working copy)
@@ -5,7 +5,7 @@
  *
  * Set this to error_reporting( -1 ) for debugging
  */
-error_reporting(0);
+error_reporting( 0 );
 
 /** Set ABSPATH for execution */
 if ( ! defined( 'ABSPATH' ) ) {
@@ -25,17 +25,18 @@
 $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
 $load = array_unique( explode( ',', $load ) );
 
-if ( empty($load) )
+if ( empty( $load ) ) {
 	exit;
+}
 
-$compress = ( isset($_GET['c']) && $_GET['c'] );
+$compress = ( isset( $_GET['c'] ) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
-$rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] );
+$rtl = ( isset( $_GET['dir'] ) && 'rtl' == $_GET['dir'] );
 $expires_offset = 31536000; // 1 year
 $out = '';
 
 $wp_styles = new WP_Styles();
-wp_default_styles($wp_styles);
+wp_default_styles( $wp_styles );
 
 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
 	$protocol = $_SERVER['SERVER_PROTOCOL'];
@@ -47,10 +48,11 @@
 }
 
 foreach ( $load as $handle ) {
-	if ( !array_key_exists($handle, $wp_styles->registered) )
+	if ( ! array_key_exists( $handle, $wp_styles->registered ) ) {
 		continue;
+	}
 
-	$style = $wp_styles->registered[$handle];
+	$style = $wp_styles->registered[ $handle ];
 
 	if ( empty( $style->src ) ) {
 		continue;
@@ -75,18 +77,18 @@
 	}
 }
 
-header("Etag: $wp_version");
-header('Content-Type: text/css; charset=UTF-8');
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
-
-if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
-	header('Vary: Accept-Encoding'); // Handle proxies
-	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-		header('Content-Encoding: deflate');
+header( "Etag: $wp_version" );
+header( 'Content-Type: text/css; charset=UTF-8' );
+header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
+header( "Cache-Control: public, max-age=$expires_offset" );
+
+if ( $compress && ! ini_get( 'zlib.output_compression' ) && 'ob_gzhandler' != ini_get( 'output_handler' ) && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
+	header( 'Vary: Accept-Encoding' ); // Handle proxies
+	if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate' ) && function_exists( 'gzdeflate' ) && ! $force_gzip ) {
+		header( 'Content-Encoding: deflate' );
 		$out = gzdeflate( $out, 3 );
-	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-		header('Content-Encoding: gzip');
+	} elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && function_exists( 'gzencode' ) ) {
+		header( 'Content-Encoding: gzip' );
 		$out = gzencode( $out, 3 );
 	}
 }
Index: src/wp-admin/maint/repair.php
===================================================================
--- src/wp-admin/maint/repair.php	(revision 40901)
+++ src/wp-admin/maint/repair.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  * @subpackage Database
  */
-define('WP_REPAIRING', true);
+define( 'WP_REPAIRING', true );
 
 require_once( dirname( dirname( dirname( __FILE__ ) ) ) . '/wp-load.php' );
 
@@ -68,7 +68,6 @@
 		// Translators: 1: wp-config.php; 2: Secret key service URL.
 		echo '<p>' . sprintf( __( 'While you are editing your %1$s file, take a moment to make sure you have all 8 keys and that they are unique. You can generate these using the <a href="%2$s">WordPress.org secret key service</a>.' ), '<code>wp-config.php</code>', 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '</p>';
 	}
-
 } elseif ( isset( $_GET['repair'] ) ) {
 
 	echo '<h1 class="screen-reader-text">' . __( 'Database repair results' ) . '</h1>';
@@ -80,7 +79,7 @@
 	$tables = $wpdb->tables();
 
 	// Sitecategories may not exist if global terms are disabled.
-	$query = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->sitecategories ) );
+	$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->sitecategories ) );
 	if ( is_multisite() && ! $wpdb->get_var( $query ) ) {
 		unset( $tables['sitecategories'] );
 	}
@@ -115,7 +114,7 @@
 			} else {
 				/* translators: 1: table name, 2: error message, */
 				echo sprintf( __( 'Failed to repair the %1$s table. Error: %2$s' ), "<code>$table</code>", "<code>$check->Msg_text</code>" ) . '<br />';
-				$problems[$table] = $check->Msg_text;
+				$problems[ $table ] = $check->Msg_text;
 				$okay = false;
 			}
 		}
@@ -124,7 +123,7 @@
 			$check = $wpdb->get_row( "ANALYZE TABLE $table" );
 
 			echo '<br />&nbsp;&nbsp;&nbsp;&nbsp;';
-			if ( 'Table is already up to date' == $check->Msg_text )  {
+			if ( 'Table is already up to date' == $check->Msg_text ) {
 				/* translators: %s: table name */
 				printf( __( 'The %s table is already optimized.' ), "<code>$table</code>" );
 			} else {
@@ -141,13 +140,14 @@
 			}
 		}
 		echo '</p>';
-	}
+	}// End foreach().
 
 	if ( $problems ) {
-		printf( '<p>' . __('Some database problems could not be repaired. Please copy-and-paste the following list of errors to the <a href="%s">WordPress support forums</a> to get additional assistance.') . '</p>', __( 'https://wordpress.org/support/forum/how-to-and-troubleshooting' ) );
+		printf( '<p>' . __( 'Some database problems could not be repaired. Please copy-and-paste the following list of errors to the <a href="%s">WordPress support forums</a> to get additional assistance.' ) . '</p>', __( 'https://wordpress.org/support/forum/how-to-and-troubleshooting' ) );
 		$problem_output = '';
-		foreach ( $problems as $table => $problem )
+		foreach ( $problems as $table => $problem ) {
 			$problem_output .= "$table: $problem\n";
+		}
 		echo '<p><textarea name="errors" id="errors" rows="20" cols="60">' . esc_textarea( $problem_output ) . '</textarea></p>';
 	} else {
 		echo '<p>' . __( 'Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.' ) . "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
@@ -156,16 +156,16 @@
 
 	echo '<h1 class="screen-reader-text">' . __( 'WordPress database repair' ) . '</h1>';
 
-	if ( isset( $_GET['referrer'] ) && 'is_blog_installed' == $_GET['referrer'] )
+	if ( isset( $_GET['referrer'] ) && 'is_blog_installed' == $_GET['referrer'] ) {
 		echo '<p>' . __( 'One or more database tables are unavailable. To allow WordPress to attempt to repair these tables, press the &#8220;Repair Database&#8221; button. Repairing can take a while, so please be patient.' ) . '</p>';
-	else
-		echo '<p>' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '</p>';
+	} else { echo '<p>' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '</p>';
+	}
 ?>
 	<p class="step"><a class="button button-large" href="repair.php?repair=1"><?php _e( 'Repair Database' ); ?></a></p>
 	<p><?php _e( 'WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.' ); ?></p>
 	<p class="step"><a class="button button-large" href="repair.php?repair=2"><?php _e( 'Repair and Optimize Database' ); ?></a></p>
 <?php
-}
+}// End if().
 ?>
 </body>
 </html>
Index: src/wp-admin/media-new.php
===================================================================
--- src/wp-admin/media-new.php	(revision 40901)
+++ src/wp-admin/media-new.php	(working copy)
@@ -12,21 +12,23 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if (!current_user_can('upload_files'))
-	wp_die(__('Sorry, you are not allowed to upload files.'));
+if ( ! current_user_can( 'upload_files' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
+}
 
-wp_enqueue_script('plupload-handlers');
+wp_enqueue_script( 'plupload-handlers' );
 
 $post_id = 0;
 if ( isset( $_REQUEST['post_id'] ) ) {
 	$post_id = absint( $_REQUEST['post_id'] );
-	if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) )
+	if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) {
 		$post_id = 0;
+	}
 }
 
 if ( $_POST ) {
-	if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
-		check_admin_referer('media-form');
+	if ( isset( $_POST['html-upload'] ) && ! empty( $_FILES ) ) {
+		check_admin_referer( 'media-form' );
 		// Upload File button was clicked
 		$upload_id = media_handle_upload( 'async-upload', $post_id );
 		if ( is_wp_error( $upload_id ) ) {
@@ -37,37 +39,38 @@
 	exit;
 }
 
-$title = __('Upload New Media');
+$title = __( 'Upload New Media' );
 $parent_file = 'upload.php';
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __('You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:') . '</p>' .
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . __( 'You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:' ) . '</p>' .
 	'<ul>' .
-		'<li>' . __('<strong>Drag and drop</strong> your files into the area below. Multiple files are allowed.') . '</li>' .
-		'<li>' . __('Clicking <strong>Select Files</strong> opens a navigation window showing you files in your operating system. Selecting <strong>Open</strong> after clicking on the file you want activates a progress bar on the uploader screen.') . '</li>' .
-		'<li>' . __('Revert to the <strong>Browser Uploader</strong> by clicking the link below the drag and drop box.') . '</li>' .
-	'</ul>'
+		'<li>' . __( '<strong>Drag and drop</strong> your files into the area below. Multiple files are allowed.' ) . '</li>' .
+		'<li>' . __( 'Clicking <strong>Select Files</strong> opens a navigation window showing you files in your operating system. Selecting <strong>Open</strong> after clicking on the file you want activates a progress bar on the uploader screen.' ) . '</li>' .
+		'<li>' . __( 'Revert to the <strong>Browser Uploader</strong> by clicking the link below the drag and drop box.' ) . '</li>' .
+	'</ul>',
 ) );
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen">Documentation on Uploading Media Files</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Media_Add_New_Screen">Documentation on Uploading Media Files</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 $form_class = 'media-upload-form type-form validate';
 
-if ( get_user_setting('uploader') || isset( $_GET['browser-uploader'] ) )
+if ( get_user_setting( 'uploader' ) || isset( $_GET['browser-uploader'] ) ) {
 	$form_class .= ' html-uploader';
+}
 ?>
 <div class="wrap">
 	<h1><?php echo esc_html( $title ); ?></h1>
 
-	<form enctype="multipart/form-data" method="post" action="<?php echo admin_url('media-new.php'); ?>" class="<?php echo esc_attr( $form_class ); ?>" id="file-form">
+	<form enctype="multipart/form-data" method="post" action="<?php echo admin_url( 'media-new.php' ); ?>" class="<?php echo esc_attr( $form_class ); ?>" id="file-form">
 
 	<?php media_upload_form(); ?>
 
@@ -75,7 +78,7 @@
 	var post_id = <?php echo $post_id; ?>, shortform = 3;
 	</script>
 	<input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" />
-	<?php wp_nonce_field('media-form'); ?>
+	<?php wp_nonce_field( 'media-form' ); ?>
 	<div id="media-items" class="hide-if-no-js"></div>
 	</form>
 </div>
Index: src/wp-admin/media-upload.php
===================================================================
--- src/wp-admin/media-upload.php	(revision 40901)
+++ src/wp-admin/media-upload.php	(working copy)
@@ -9,8 +9,9 @@
  * @subpackage Administration
  */
 
-if ( ! isset( $_GET['inline'] ) )
+if ( ! isset( $_GET['inline'] ) ) {
 	define( 'IFRAME_REQUEST' , true );
+}
 
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
@@ -19,20 +20,20 @@
 	wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
 }
 
-wp_enqueue_script('plupload-handlers');
-wp_enqueue_script('image-edit');
-wp_enqueue_script('set-post-thumbnail' );
-wp_enqueue_style('imgareaselect');
+wp_enqueue_script( 'plupload-handlers' );
+wp_enqueue_script( 'image-edit' );
+wp_enqueue_script( 'set-post-thumbnail' );
+wp_enqueue_style( 'imgareaselect' );
 wp_enqueue_script( 'media-gallery' );
 
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 
 // IDs should be integers
-$ID = isset($ID) ? (int) $ID : 0;
-$post_id = isset($post_id)? (int) $post_id : 0;
+$ID = isset( $ID ) ? (int) $ID : 0;
+$post_id = isset( $post_id )? (int) $post_id : 0;
 
 // Require an ID for the edit screen.
-if ( isset( $action ) && $action == 'edit' && !$ID ) {
+if ( isset( $action ) && $action == 'edit' && ! $ID ) {
 	wp_die(
 		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
 		'<p>' . __( 'Invalid item ID.' ) . '</p>',
@@ -49,8 +50,8 @@
 }
 
 // Upload type: image, video, file, ..?
-if ( isset($_GET['type']) ) {
-	$type = strval($_GET['type']);
+if ( isset( $_GET['type'] ) ) {
+	$type = strval( $_GET['type'] );
 } else {
 	/**
 	 * Filters the default media upload type in the legacy (pre-3.5.0) media popup.
@@ -64,8 +65,8 @@
 }
 
 // Tab: gallery, library, or type-specific.
-if ( isset($_GET['tab']) ) {
-	$tab = strval($_GET['tab']);
+if ( isset( $_GET['tab'] ) ) {
+	$tab = strval( $_GET['tab'] );
 } else {
 	/**
 	 * Filters the default tab in the legacy (pre-3.5.0) media popup.
Index: src/wp-admin/media.php
===================================================================
--- src/wp-admin/media.php	(revision 40901)
+++ src/wp-admin/media.php	(working copy)
@@ -12,138 +12,152 @@
 $parent_file = 'upload.php';
 $submenu_file = 'upload.php';
 
-wp_reset_vars(array('action'));
+wp_reset_vars( array( 'action' ) );
 
 switch ( $action ) {
-case 'editattachment' :
-	$attachment_id = (int) $_POST['attachment_id'];
-	check_admin_referer('media-form');
-
-	if ( !current_user_can('edit_post', $attachment_id) )
-		wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
-
-	$errors = media_upload_form_handler();
-
-	if ( empty($errors) ) {
-		$location = 'media.php';
-		if ( $referer = wp_get_original_referer() ) {
-			if ( false !== strpos($referer, 'upload.php') || ( url_to_postid($referer) == $attachment_id )  )
-				$location = $referer;
-		}
-		if ( false !== strpos($location, 'upload.php') ) {
-			$location = remove_query_arg('message', $location);
-			$location = add_query_arg('posted',	$attachment_id, $location);
-		} elseif ( false !== strpos($location, 'media.php') ) {
-			$location = add_query_arg('message', 'updated', $location);
-		}
-		wp_redirect($location);
-		exit;
-	}
-
-	// No break.
-case 'edit' :
-	$title = __('Edit Media');
-
-	if ( empty($errors) )
-		$errors = null;
-
-	if ( empty( $_GET['attachment_id'] ) ) {
-		wp_redirect( admin_url('upload.php') );
-		exit();
-	}
-	$att_id = (int) $_GET['attachment_id'];
-
-	if ( !current_user_can('edit_post', $att_id) )
-		wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
-
-	$att = get_post($att_id);
-
-	if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn&#8217;t exist. Perhaps it was deleted?') );
-	if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn&#8217;t an attachment. Please go back and try again.') );
-	if ( $att->post_status == 'trash' ) wp_die( __('You can&#8217;t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
-
-	add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
-
-	wp_enqueue_script( 'wp-ajax-response' );
-	wp_enqueue_script('image-edit');
-	wp_enqueue_style('imgareaselect');
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __('Overview'),
-		'content' =>
-			'<p>' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '</p>' .
-			'<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
-			'<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
-			'<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>'
-	) );
-
-	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
-	);
-
-	require( ABSPATH . 'wp-admin/admin-header.php' );
-
-	$parent_file = 'upload.php';
-	$message = '';
-	$class = '';
-	if ( isset($_GET['message']) ) {
-		switch ( $_GET['message'] ) {
-			case 'updated' :
-				$message = __('Media file updated.');
-				$class = 'updated';
-				break;
-		}
-	}
-	if ( $message )
-		echo "<div id='message' class='$class'><p>$message</p></div>\n";
-
-?>
-
-<div class="wrap">
-<h1 class="wp-heading-inline"><?php
-echo esc_html( $title );
-?></h1>
-
-<?php
-if ( current_user_can( 'upload_files' ) ) { ?>
-	<a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a>
-<?php } ?>
-
-<hr class="wp-header-end">
-
-<form method="post" class="media-upload-form" id="media-single-form">
-<p class="submit" style="padding-bottom: 0;">
-<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
-</p>
-
-<div class="media-single">
-<div id="media-item-<?php echo $att_id; ?>" class="media-item">
-<?php echo get_media_item( $att_id, array( 'toggle' => false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => !empty($errors[$att_id]) ? $errors[$att_id] : null ) ); ?>
-</div>
-</div>
-
-<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
-<input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" />
-<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
-<input type="hidden" name="action" value="editattachment" />
-<?php wp_original_referer_field(true, 'previous'); ?>
-<?php wp_nonce_field('media-form'); ?>
+	case 'editattachment' :
+		$attachment_id = (int) $_POST['attachment_id'];
+		check_admin_referer( 'media-form' );
 
-</form>
+		if ( ! current_user_can( 'edit_post', $attachment_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to edit this attachment.' ) );
+		}
+
+		$errors = media_upload_form_handler();
+
+		if ( empty( $errors ) ) {
+			$location = 'media.php';
+			if ( $referer = wp_get_original_referer() ) {
+				if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) == $attachment_id ) ) {
+					$location = $referer;
+				}
+			}
+			if ( false !== strpos( $location, 'upload.php' ) ) {
+				$location = remove_query_arg( 'message', $location );
+				$location = add_query_arg( 'posted',	$attachment_id, $location );
+			} elseif ( false !== strpos( $location, 'media.php' ) ) {
+				$location = add_query_arg( 'message', 'updated', $location );
+			}
+			wp_redirect( $location );
+			exit;
+		}
+
+		// No break.
+	case 'edit' :
+		$title = __( 'Edit Media' );
+
+		if ( empty( $errors ) ) {
+			$errors = null;
+		}
+
+		if ( empty( $_GET['attachment_id'] ) ) {
+			wp_redirect( admin_url( 'upload.php' ) );
+			exit();
+		}
+		$att_id = (int) $_GET['attachment_id'];
+
+		if ( ! current_user_can( 'edit_post', $att_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to edit this attachment.' ) );
+		}
+
+		$att = get_post( $att_id );
+
+		if ( empty( $att->ID ) ) { wp_die( __( 'You attempted to edit an attachment that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+		}
+		if ( 'attachment' !== $att->post_type ) { wp_die( __( 'You attempted to edit an item that isn&#8217;t an attachment. Please go back and try again.' ) );
+		}
+		if ( $att->post_status == 'trash' ) { wp_die( __( 'You can&#8217;t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.' ) );
+		}
+
+		add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
+
+		wp_enqueue_script( 'wp-ajax-response' );
+		wp_enqueue_script( 'image-edit' );
+		wp_enqueue_style( 'imgareaselect' );
+
+		get_current_screen()->add_help_tab( array(
+			'id'      => 'overview',
+			'title'   => __( 'Overview' ),
+			'content' =>
+			'<p>' . __( 'This screen allows you to edit five fields for metadata in a file within the media library.' ) . '</p>' .
+			'<p>' . __( 'For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.' ) . '</p>' .
+			'<p>' . __( 'Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.' ) . '</p>' .
+			'<p>' . __( 'Remember to click Update Media to save metadata entered or changed.' ) . '</p>',
+		) );
+
+			get_current_screen()->set_help_sidebar(
+				'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+				'<p>' . __( '<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>' ) . '</p>' .
+				'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
+			);
+
+			require( ABSPATH . 'wp-admin/admin-header.php' );
+
+			$parent_file = 'upload.php';
+			$message = '';
+			$class = '';
+		if ( isset( $_GET['message'] ) ) {
+			switch ( $_GET['message'] ) {
+				case 'updated' :
+					$message = __( 'Media file updated.' );
+					$class = 'updated';
+					break;
+			}
+		}
+		if ( $message ) {
+			echo "<div id='message' class='$class'><p>$message</p></div>\n";
+		}
+
+		?>
+
+		<div class="wrap">
+		<h1 class="wp-heading-inline"><?php
+		echo esc_html( $title );
+	?></h1>
+
+	<?php
+	if ( current_user_can( 'upload_files' ) ) { ?>
+		<a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
+	<?php } ?>
+
+		<hr class="wp-header-end">
+
+		<form method="post" class="media-upload-form" id="media-single-form">
+		<p class="submit" style="padding-bottom: 0;">
+		<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
+		</p>
+
+		<div class="media-single">
+		<div id="media-item-<?php echo $att_id; ?>" class="media-item">
+		<?php echo get_media_item( $att_id, array(
+			'toggle' => false,
+			'send' => false,
+			'delete' => false,
+			'show_title' => false,
+			'errors' => ! empty( $errors[ $att_id ] ) ? $errors[ $att_id ] : null,
+		) ); ?>
+		</div>
+		</div>
+
+		<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
+		<input type="hidden" name="post_id" id="post_id" value="<?php echo isset( $post_id ) ? esc_attr( $post_id ) : ''; ?>" />
+		<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $att_id ); ?>" />
+		<input type="hidden" name="action" value="editattachment" />
+		<?php wp_original_referer_field( true, 'previous' ); ?>
+		<?php wp_nonce_field( 'media-form' ); ?>
+
+		</form>
 
-</div>
+		</div>
 
-<?php
+		<?php
 
-	require( ABSPATH . 'wp-admin/admin-footer.php' );
+		require( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	exit;
 
-default:
-	wp_redirect( admin_url('upload.php') );
+	default:
+		wp_redirect( admin_url( 'upload.php' ) );
 	exit;
 
-}
+}// End switch().
Index: src/wp-admin/menu-header.php
===================================================================
--- src/wp-admin/menu-header.php	(revision 40901)
+++ src/wp-admin/menu-header.php	(working copy)
@@ -11,10 +11,10 @@
  *
  * @global string $self
  */
-$self = preg_replace('|^.*/wp-admin/network/|i', '', $_SERVER['PHP_SELF']);
-$self = preg_replace('|^.*/wp-admin/|i', '', $self);
-$self = preg_replace('|^.*/plugins/|i', '', $self);
-$self = preg_replace('|^.*/mu-plugins/|i', '', $self);
+$self = preg_replace( '|^.*/wp-admin/network/|i', '', $_SERVER['PHP_SELF'] );
+$self = preg_replace( '|^.*/wp-admin/|i', '', $self );
+$self = preg_replace( '|^.*/plugins/|i', '', $self );
+$self = preg_replace( '|^.*/mu-plugins/|i', '', $self );
 
 /**
  * For when admin-header is included from within a function.
@@ -83,21 +83,23 @@
 		}
 
 		$submenu_items = array();
-		if ( ! empty( $submenu[$item[2]] ) ) {
+		if ( ! empty( $submenu[ $item[2] ] ) ) {
 			$class[] = 'wp-has-submenu';
-			$submenu_items = $submenu[$item[2]];
+			$submenu_items = $submenu[ $item[2] ];
 		}
 
-		if ( ( $parent_file && $item[2] == $parent_file ) || ( empty($typenow) && $self == $item[2] ) ) {
+		if ( ( $parent_file && $item[2] == $parent_file ) || ( empty( $typenow ) && $self == $item[2] ) ) {
 			$class[] = ! empty( $submenu_items ) ? 'wp-has-current-submenu wp-menu-open' : 'current';
 		} else {
 			$class[] = 'wp-not-current-submenu';
-			if ( ! empty( $submenu_items ) )
+			if ( ! empty( $submenu_items ) ) {
 				$aria_attributes .= 'aria-haspopup="true"';
+			}
 		}
 
-		if ( ! empty( $item[4] ) )
+		if ( ! empty( $item[4] ) ) {
 			$class[] = esc_attr( $item[4] );
+		}
 
 		$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
 		$id = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
@@ -145,8 +147,9 @@
 			$submenu_items = array_values( $submenu_items );  // Re-index.
 			$menu_hook = get_plugin_page_hook( $submenu_items[0][2], $item[2] );
 			$menu_file = $submenu_items[0][2];
-			if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
+			if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
 				$menu_file = substr( $menu_file, 0, $pos );
+			}
 			if ( ! empty( $menu_hook ) || ( ( 'index.php' != $submenu_items[0][2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) {
 				$admin_is_parent = true;
 				echo "<a href='admin.php?page={$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style>$img</div><div class='wp-menu-name'>$title</div></a>";
@@ -156,8 +159,9 @@
 		} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
 			$menu_hook = get_plugin_page_hook( $item[2], 'admin.php' );
 			$menu_file = $item[2];
-			if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
+			if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
 				$menu_file = substr( $menu_file, 0, $pos );
+			}
 			if ( ! empty( $menu_hook ) || ( ( 'index.php' != $item[2] ) && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) ) ) {
 				$admin_is_parent = true;
 				echo "\n\t<a href='admin.php?page={$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>";
@@ -174,8 +178,9 @@
 
 			// 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes
 			foreach ( $submenu_items as $sub_key => $sub_item ) {
-				if ( ! current_user_can( $sub_item[1] ) )
+				if ( ! current_user_can( $sub_item[1] ) ) {
 					continue;
+				}
 
 				$class = array();
 				if ( $first ) {
@@ -185,20 +190,20 @@
 
 				$menu_file = $item[2];
 
-				if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
+				if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
 					$menu_file = substr( $menu_file, 0, $pos );
+				}
 
 				// Handle current for post_type=post|page|foo pages, which won't match $self.
 				$self_type = ! empty( $typenow ) ? $self . '?post_type=' . $typenow : 'nothing';
 
 				if ( isset( $submenu_file ) ) {
-					if ( $submenu_file == $sub_item[2] )
+					if ( $submenu_file == $sub_item[2] ) {
 						$class[] = 'current';
-				// If plugin_page is set the parent must either match the current page or not physically exist.
-				// This allows plugin pages with the same hook to exist under different parents.
+					}
 				} elseif (
 					( ! isset( $plugin_page ) && $self == $sub_item[2] ) ||
-					( isset( $plugin_page ) && $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || file_exists($menu_file) === false ) )
+					( isset( $plugin_page ) && $plugin_page == $sub_item[2] && ( $item[2] == $self_type || $item[2] == $self || file_exists( $menu_file ) === false ) )
 				) {
 					$class[] = 'current';
 				}
@@ -209,30 +214,35 @@
 
 				$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
 
-				$menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
+				$menu_hook = get_plugin_page_hook( $sub_item[2], $item[2] );
 				$sub_file = $sub_item[2];
-				if ( false !== ( $pos = strpos( $sub_file, '?' ) ) )
-					$sub_file = substr($sub_file, 0, $pos);
+				if ( false !== ( $pos = strpos( $sub_file, '?' ) ) ) {
+					$sub_file = substr( $sub_file, 0, $pos );
+				}
 
-				$title = wptexturize($sub_item[0]);
+				$title = wptexturize( $sub_item[0] );
 
 				if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2] ) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) && ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) ) ) {
 					// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
-					if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) )
-						$sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] );
-					else
-						$sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), 'admin.php' );
+					if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) {
+						$sub_item_url = add_query_arg( array(
+							'page' => $sub_item[2],
+						), $item[2] );
+					} else { $sub_item_url = add_query_arg( array(
+							'page' => $sub_item[2],
+					), 'admin.php' );
+					}
 
 					$sub_item_url = esc_url( $sub_item_url );
 					echo "<li$class><a href='$sub_item_url'$class>$title</a></li>";
 				} else {
 					echo "<li$class><a href='{$sub_item[2]}'$class>$title</a></li>";
 				}
-			}
-			echo "</ul>";
-		}
-		echo "</li>";
-	}
+			}// End foreach().
+			echo '</ul>';
+		}// End if().
+		echo '</li>';
+	}// End foreach().
 
 	echo '<li id="collapse-menu" class="hide-if-no-js">' .
 		'<button type="button" id="collapse-button" aria-label="' . esc_attr__( 'Collapse Main menu' ) . '" aria-expanded="true">' .
Index: src/wp-admin/menu.php
===================================================================
--- src/wp-admin/menu.php	(revision 40901)
+++ src/wp-admin/menu.php	(working copy)
@@ -20,12 +20,12 @@
  * @global array $menu
  */
 
-$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
+$menu[2] = array( __( 'Dashboard' ), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
 
-$submenu[ 'index.php' ][0] = array( __('Home'), 'read', 'index.php' );
+$submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' );
 
 if ( is_multisite() ) {
-	$submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
+	$submenu['index.php'][5] = array( __( 'My Sites' ), 'read', 'my-sites.php' );
 }
 
 if ( ! is_multisite() || current_user_can( 'update_core' ) ) {
@@ -33,13 +33,13 @@
 }
 
 if ( ! is_multisite() ) {
-	if ( current_user_can( 'update_core' ) )
+	if ( current_user_can( 'update_core' ) ) {
 		$cap = 'update_core';
-	elseif ( current_user_can( 'update_plugins' ) )
+	} elseif ( current_user_can( 'update_plugins' ) ) {
 		$cap = 'update_plugins';
-	else
-		$cap = 'update_themes';
-	$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
+	} else { $cap = 'update_themes';
+	}
+	$submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . '</span></span>' ), $cap, 'update-core.php' );
 	unset( $cap );
 }
 
@@ -47,24 +47,25 @@
 
 // $menu[5] = Posts
 
-$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
-	$submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
+$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
+	$submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' );
 	/* translators: add new file */
-	$submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
+	$submenu['upload.php'][10] = array( _x( 'Add New', 'file' ), 'upload_files', 'media-new.php' );
 	$i = 15;
-	foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
-		if ( ! $tax->show_ui || ! $tax->show_in_menu )
-			continue;
-
-		$submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&amp;post_type=attachment' );
+foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
+	if ( ! $tax->show_ui || ! $tax->show_in_menu ) {
+		continue;
 	}
+
+	$submenu['upload.php'][ $i++ ] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&amp;post_type=attachment' );
+}
 	unset( $tax, $i );
 
-$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
-	$submenu['link-manager.php'][5] = array( _x('All Links', 'admin menu'), 'manage_links', 'link-manager.php' );
+$menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
+	$submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' );
 	/* translators: add new links */
-	$submenu['link-manager.php'][10] = array( _x('Add New', 'link'), 'manage_links', 'link-add.php' );
-	$submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
+	$submenu['link-manager.php'][10] = array( _x( 'Add New', 'link' ), 'manage_links', 'link-add.php' );
+	$submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
 
 // $menu[20] = Pages
 
@@ -84,17 +85,22 @@
 	unset( $awaiting_mod );
 }
 
-$submenu[ 'edit-comments.php' ][0] = array( __('All Comments'), 'edit_posts', 'edit-comments.php' );
+$submenu['edit-comments.php'][0] = array( __( 'All Comments' ), 'edit_posts', 'edit-comments.php' );
 
 $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
 
-$types = (array) get_post_types( array('show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) );
+$types = (array) get_post_types( array(
+	'show_ui' => true,
+	'_builtin' => false,
+	'show_in_menu' => true,
+) );
 $builtin = array( 'post', 'page' );
 foreach ( array_merge( $builtin, $types ) as $ptype ) {
 	$ptype_obj = get_post_type_object( $ptype );
 	// Check if it should be a submenu.
-	if ( $ptype_obj->show_in_menu !== true )
+	if ( $ptype_obj->show_in_menu !== true ) {
 		continue;
+	}
 	$ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
 	$ptype_for_id = sanitize_html_class( $ptype );
 
@@ -114,9 +120,9 @@
 	// 'post' special case
 	if ( 'post' === $ptype ) {
 		$menu_class .= ' open-if-no-js';
-		$ptype_file = "edit.php";
-		$post_new_file = "post-new.php";
-		$edit_tags_file = "edit-tags.php?taxonomy=%s";
+		$ptype_file = 'edit.php';
+		$post_new_file = 'post-new.php';
+		$edit_tags_file = 'edit-tags.php?taxonomy=%s';
 	} else {
 		$ptype_file = "edit.php?post_type=$ptype";
 		$post_new_file = "post-new.php?post_type=$ptype";
@@ -132,27 +138,28 @@
 	 * If $ptype_menu_position is already populated or will be populated
 	 * by a hard-coded value below, increment the position.
 	 */
-	$core_menu_positions = array(59, 60, 65, 70, 75, 80, 85, 99);
-	while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
-		$ptype_menu_position++;
+	$core_menu_positions = array( 59, 60, 65, 70, 75, 80, 85, 99 );
+	while ( isset( $menu[ $ptype_menu_position ] ) || in_array( $ptype_menu_position, $core_menu_positions ) ) {		$ptype_menu_position++;
+	}
 
-	$menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon );
+	$menu[ $ptype_menu_position ] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon );
 	$submenu[ $ptype_file ][5]  = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts,  $ptype_file );
 	$submenu[ $ptype_file ][10]  = array( $ptype_obj->labels->add_new, $ptype_obj->cap->create_posts, $post_new_file );
 
 	$i = 15;
 	foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
-		if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array($ptype, (array) $tax->object_type, true) )
+		if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array( $ptype, (array) $tax->object_type, true ) ) {
 			continue;
+		}
 
-		$submenu[ $ptype_file ][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) );
+		$submenu[ $ptype_file ][ $i++ ] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) );
 	}
-}
+}// End foreach().
 unset( $ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax, $post_new_file );
 
 $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
 
-$appearance_cap = current_user_can( 'switch_themes') ? 'switch_themes' : 'edit_theme_options';
+$appearance_cap = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options';
 
 $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
 	$submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' );
@@ -160,19 +167,27 @@
 	$customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );
 	$submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
 
-	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
-		$submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
-	}
+if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
+	$submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
+}
 
-	if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize') ) {
-		$customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $customize_url );
-		$submenu['themes.php'][15] = array( __( 'Header' ), $appearance_cap, esc_url( $customize_header_url ), '', 'hide-if-no-customize' );
-	}
+if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize' ) ) {
+	$customize_header_url = add_query_arg( array(
+		'autofocus' => array(
+			'control' => 'header_image',
+		),
+	), $customize_url );
+	$submenu['themes.php'][15] = array( __( 'Header' ), $appearance_cap, esc_url( $customize_header_url ), '', 'hide-if-no-customize' );
+}
 
-	if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize') ) {
-		$customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url );
-		$submenu['themes.php'][20] = array( __( 'Background' ), $appearance_cap, esc_url( $customize_background_url ), '', 'hide-if-no-customize' );
-	}
+if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize' ) ) {
+	$customize_background_url = add_query_arg( array(
+		'autofocus' => array(
+			'control' => 'background_image',
+		),
+	), $customize_url );
+	$submenu['themes.php'][20] = array( __( 'Background' ), $appearance_cap, esc_url( $customize_background_url ), '', 'hide-if-no-customize' );
+}
 
 	unset( $customize_url );
 
@@ -180,7 +195,7 @@
 
 // Add 'Editor' to the bottom of the Appearance menu.
 if ( ! is_multisite() ) {
-	add_action('admin_menu', '_add_themes_utility_last', 101);
+	add_action( 'admin_menu', '_add_themes_utility_last', 101 );
 }
 /**
  * Adds the (theme) 'Editor' link to the bottom of the Appearance menu.
@@ -190,69 +205,72 @@
  */
 function _add_themes_utility_last() {
 	// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
-	add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
+	add_submenu_page( 'themes.php', _x( 'Editor', 'theme editor' ), _x( 'Editor', 'theme editor' ), 'edit_themes', 'theme-editor.php' );
 }
 
 $count = '';
 if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
-	if ( ! isset( $update_data ) )
+	if ( ! isset( $update_data ) ) {
 		$update_data = wp_get_update_data();
-	$count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n($update_data['counts']['plugins']) . "</span></span>";
+	}
+	$count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . '</span></span>';
 }
 
-$menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
+$menu[65] = array( sprintf( __( 'Plugins %s' ), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
 
-$submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );
+$submenu['plugins.php'][5]  = array( __( 'Installed Plugins' ), 'activate_plugins', 'plugins.php' );
 
-	if ( ! is_multisite() ) {
-		/* translators: add new plugin */
-		$submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' );
-		$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
-	}
+if ( ! is_multisite() ) {
+	/* translators: add new plugin */
+	$submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' );
+	$submenu['plugins.php'][15] = array( _x( 'Editor', 'plugin editor' ), 'edit_plugins', 'plugin-editor.php' );
+}
 
 unset( $update_data );
 
-if ( current_user_can('list_users') )
-	$menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
-else
-	$menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
+if ( current_user_can( 'list_users' ) ) {
+	$menu[70] = array( __( 'Users' ), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
+} else { $menu[70] = array( __( 'Profile' ), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
+}
 
-if ( current_user_can('list_users') ) {
+if ( current_user_can( 'list_users' ) ) {
 	$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
-	$submenu['users.php'][5] = array(__('All Users'), 'list_users', 'users.php');
+	$submenu['users.php'][5] = array( __( 'All Users' ), 'list_users', 'users.php' );
 	if ( current_user_can( 'create_users' ) ) {
-		$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
+		$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'create_users', 'user-new.php' );
 	} elseif ( is_multisite() ) {
-		$submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php');
+		$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'promote_users', 'user-new.php' );
 	}
 
-	$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
+	$submenu['users.php'][15] = array( __( 'Your Profile' ), 'read', 'profile.php' );
 } else {
 	$_wp_real_parent_file['users.php'] = 'profile.php';
-	$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
+	$submenu['profile.php'][5] = array( __( 'Your Profile' ), 'read', 'profile.php' );
 	if ( current_user_can( 'create_users' ) ) {
-		$submenu['profile.php'][10] = array(__('Add New User'), 'create_users', 'user-new.php');
+		$submenu['profile.php'][10] = array( __( 'Add New User' ), 'create_users', 'user-new.php' );
 	} elseif ( is_multisite() ) {
-		$submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php');
+		$submenu['profile.php'][10] = array( __( 'Add New User' ), 'promote_users', 'user-new.php' );
 	}
 }
 
-$menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' );
-	$submenu['tools.php'][5] = array( __('Available Tools'), 'edit_posts', 'tools.php' );
-	$submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
-	$submenu['tools.php'][15] = array( __('Export'), 'export', 'export.php' );
-	if ( is_multisite() && !is_main_site() )
-		$submenu['tools.php'][25] = array( __('Delete Site'), 'delete_site', 'ms-delete-site.php' );
-	if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
-		$submenu['tools.php'][50] = array(__('Network Setup'), 'setup_network', 'network.php');
-
-$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
-	$submenu['options-general.php'][10] = array(_x('General', 'settings screen'), 'manage_options', 'options-general.php');
-	$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
-	$submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
-	$submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
-	$submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php');
-	$submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
+$menu[75] = array( __( 'Tools' ), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' );
+	$submenu['tools.php'][5] = array( __( 'Available Tools' ), 'edit_posts', 'tools.php' );
+	$submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' );
+	$submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' );
+if ( is_multisite() && ! is_main_site() ) {
+	$submenu['tools.php'][25] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' );
+}
+if ( ! is_multisite() && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
+	$submenu['tools.php'][50] = array( __( 'Network Setup' ), 'setup_network', 'network.php' );
+}
+
+$menu[80] = array( __( 'Settings' ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
+	$submenu['options-general.php'][10] = array( _x( 'General', 'settings screen' ), 'manage_options', 'options-general.php' );
+	$submenu['options-general.php'][15] = array( __( 'Writing' ), 'manage_options', 'options-writing.php' );
+	$submenu['options-general.php'][20] = array( __( 'Reading' ), 'manage_options', 'options-reading.php' );
+	$submenu['options-general.php'][25] = array( __( 'Discussion' ), 'manage_options', 'options-discussion.php' );
+	$submenu['options-general.php'][30] = array( __( 'Media' ), 'manage_options', 'options-media.php' );
+	$submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' );
 
 $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
 
@@ -280,4 +298,4 @@
 	'themes' => 'appearance',
 	);
 
-require_once(ABSPATH . 'wp-admin/includes/menu.php');
+require_once( ABSPATH . 'wp-admin/includes/menu.php' );
Index: src/wp-admin/moderation.php
===================================================================
--- src/wp-admin/moderation.php	(revision 40901)
+++ src/wp-admin/moderation.php	(working copy)
@@ -8,5 +8,5 @@
  * @subpackage Administration
  */
 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-wp_redirect( admin_url('edit-comments.php?comment_status=moderated') );
+wp_redirect( admin_url( 'edit-comments.php?comment_status=moderated' ) );
 exit;
Index: src/wp-admin/ms-delete-site.php
===================================================================
--- src/wp-admin/ms-delete-site.php	(revision 40901)
+++ src/wp-admin/ms-delete-site.php	(working copy)
@@ -9,11 +9,13 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !is_multisite() )
+if ( ! is_multisite() ) {
 	wp_die( __( 'Multisite support is not enabled.' ) );
+}
 
-if ( ! current_user_can( 'delete_site' ) )
-	wp_die(__( 'Sorry, you are not allowed to delete this site.'));
+if ( ! current_user_can( 'delete_site' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to delete this site.' ) );
+}
 
 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
 	if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
@@ -74,7 +76,7 @@
 	$content = str_replace( '###URL_DELETE###', $url_delete, $content );
 	$content = str_replace( '###SITE_NAME###', get_network()->site_name, $content );
 
-	wp_mail( get_option( 'admin_email' ), "[ " . wp_specialchars_decode( get_option( 'blogname' ) ) . " ] ".__( 'Delete My Site' ), $content );
+	wp_mail( get_option( 'admin_email' ), '[ ' . wp_specialchars_decode( get_option( 'blogname' ) ) . ' ] ' . __( 'Delete My Site' ), $content );
 
 	if ( $switched_locale ) {
 		restore_previous_locale();
@@ -85,7 +87,7 @@
 
 <?php } else {
 	?>
-	<p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), get_network()->site_name); ?></p>
+	<p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.' ), get_network()->site_name ); ?></p>
 	<p><?php _e( 'Remember, once deleted your site cannot be restored.' ) ?></p>
 
 	<form method="post" name="deletedirect">
@@ -96,12 +98,12 @@
 				/* translators: %s: site address */
 				__( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ),
 				$blog->domain . $blog->path
-			);
+            );
 		?></strong></label></p>
 		<?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
 	</form>
- 	<?php
-}
+		<?php
+}// End if().
 echo '</div>';
 
 include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/ms-options.php
===================================================================
--- src/wp-admin/ms-options.php	(revision 40901)
+++ src/wp-admin/ms-options.php	(working copy)
@@ -9,4 +9,4 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-wp_redirect( network_admin_url('settings.php') );
+wp_redirect( network_admin_url( 'settings.php' ) );
Index: src/wp-admin/ms-sites.php
===================================================================
--- src/wp-admin/ms-sites.php	(revision 40901)
+++ src/wp-admin/ms-sites.php	(working copy)
@@ -9,5 +9,5 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-wp_redirect( network_admin_url('sites.php') );
+wp_redirect( network_admin_url( 'sites.php' ) );
 exit;
Index: src/wp-admin/ms-themes.php
===================================================================
--- src/wp-admin/ms-themes.php	(revision 40901)
+++ src/wp-admin/ms-themes.php	(working copy)
@@ -9,5 +9,5 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-wp_redirect( network_admin_url('themes.php') );
+wp_redirect( network_admin_url( 'themes.php' ) );
 exit;
Index: src/wp-admin/ms-upgrade-network.php
===================================================================
--- src/wp-admin/ms-upgrade-network.php	(revision 40901)
+++ src/wp-admin/ms-upgrade-network.php	(working copy)
@@ -9,5 +9,5 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-wp_redirect( network_admin_url('upgrade.php') );
+wp_redirect( network_admin_url( 'upgrade.php' ) );
 exit;
Index: src/wp-admin/ms-users.php
===================================================================
--- src/wp-admin/ms-users.php	(revision 40901)
+++ src/wp-admin/ms-users.php	(working copy)
@@ -9,5 +9,5 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-wp_redirect( network_admin_url('users.php') );
+wp_redirect( network_admin_url( 'users.php' ) );
 exit;
Index: src/wp-admin/my-sites.php
===================================================================
--- src/wp-admin/my-sites.php	(revision 40901)
+++ src/wp-admin/my-sites.php	(working copy)
@@ -9,11 +9,13 @@
 
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !is_multisite() )
+if ( ! is_multisite() ) {
 	wp_die( __( 'Multisite support is not enabled.' ) );
+}
 
-if ( ! current_user_can('read') )
+if ( ! current_user_can( 'read' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
+}
 
 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
 
@@ -37,15 +39,15 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>'
+		'<p>' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -108,7 +110,7 @@
 	reset( $blogs );
 
 	foreach ( $blogs as $user_blog ) {
-		echo "<li>";
+		echo '<li>';
 		echo "<h3>{$user_blog->blogname}</h3>";
 		/**
 		 * Filters the row links displayed for each site on the My Sites screen.
@@ -118,10 +120,10 @@
 		 * @param string $string    The HTML site link markup.
 		 * @param object $user_blog An object containing the site data.
 		 */
-		echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
+		echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ) . "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . '</a>', $user_blog ) . '</p>';
 		/** This filter is documented in wp-admin/my-sites.php */
 		echo apply_filters( 'myblogs_options', '', $user_blog );
-		echo "</li>";
+		echo '</li>';
 	}?>
 	</ul>
 	<?php
Index: src/wp-admin/network/index.php
===================================================================
--- src/wp-admin/network/index.php	(revision 40901)
+++ src/wp-admin/network/index.php	(working copy)
@@ -13,8 +13,9 @@
 /** Load WordPress dashboard API */
 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
 
-if ( ! current_user_can( 'manage_network' ) )
+if ( ! current_user_can( 'manage_network' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $title = __( 'Dashboard' );
 $parent_file = 'index.php';
@@ -29,7 +30,7 @@
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
 	'title'   => __( 'Overview' ),
-	'content' => $overview
+	'content' => $overview,
 ) );
 
 $quick_tasks = '<p>' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '</p>';
@@ -42,13 +43,13 @@
 get_current_screen()->add_help_tab( array(
 	'id'      => 'quick-tasks',
 	'title'   => __( 'Quick Tasks' ),
-	'content' => $quick_tasks
+	'content' => $quick_tasks,
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 wp_dashboard_setup();
Index: src/wp-admin/network/menu.php
===================================================================
--- src/wp-admin/network/menu.php	(revision 40901)
+++ src/wp-admin/network/menu.php	(working copy)
@@ -8,13 +8,13 @@
  */
 
 /* translators: Network menu item */
-$menu[2] = array(__('Dashboard'), 'manage_network', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard');
+$menu[2] = array( __( 'Dashboard' ), 'manage_network', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
 
 $submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' );
 
 $update_data = wp_get_update_data();
 if ( $update_data['counts']['total'] ) {
-	$submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . "</span></span>" ), 'update_core', 'update-core.php' );
+	$submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . '</span></span>' ), 'update_core', 'update-core.php' );
 } else {
 	$submenu['index.php'][10] = array( __( 'Updates' ), 'update_core', 'update-core.php' );
 }
@@ -24,39 +24,39 @@
 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
 
 /* translators: Sites menu item */
-$menu[5] = array(__('Sites'), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'dashicons-admin-multisite');
-$submenu['sites.php'][5]  = array( __('All Sites'), 'manage_sites', 'sites.php' );
-$submenu['sites.php'][10]  = array( _x('Add New', 'site'), 'create_sites', 'site-new.php' );
-
-$menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users');
-$submenu['users.php'][5]  = array( __('All Users'), 'manage_network_users', 'users.php' );
-$submenu['users.php'][10]  = array( _x('Add New', 'user'), 'create_users', 'user-new.php' );
+$menu[5] = array( __( 'Sites' ), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'dashicons-admin-multisite' );
+$submenu['sites.php'][5]  = array( __( 'All Sites' ), 'manage_sites', 'sites.php' );
+$submenu['sites.php'][10]  = array( _x( 'Add New', 'site' ), 'create_sites', 'site-new.php' );
+
+$menu[10] = array( __( 'Users' ), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
+$submenu['users.php'][5]  = array( __( 'All Users' ), 'manage_network_users', 'users.php' );
+$submenu['users.php'][10]  = array( _x( 'Add New', 'user' ), 'create_users', 'user-new.php' );
 
 if ( current_user_can( 'update_themes' ) && $update_data['counts']['themes'] ) {
-	$menu[15] = array(sprintf( __( 'Themes %s' ), "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . "</span></span>" ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
+	$menu[15] = array( sprintf( __( 'Themes %s' ), "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . '</span></span>' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
 } else {
 	$menu[15] = array( __( 'Themes' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
 }
-$submenu['themes.php'][5]  = array( __('Installed Themes'), 'manage_network_themes', 'themes.php' );
-$submenu['themes.php'][10] = array( _x('Add New', 'theme'), 'install_themes', 'theme-install.php' );
-$submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' );
+$submenu['themes.php'][5]  = array( __( 'Installed Themes' ), 'manage_network_themes', 'themes.php' );
+$submenu['themes.php'][10] = array( _x( 'Add New', 'theme' ), 'install_themes', 'theme-install.php' );
+$submenu['themes.php'][15] = array( _x( 'Editor', 'theme editor' ), 'edit_themes', 'theme-editor.php' );
 
 if ( current_user_can( 'update_plugins' ) && $update_data['counts']['plugins'] ) {
-	$menu[20] = array( sprintf( __( 'Plugins %s' ), "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins');
+	$menu[20] = array( sprintf( __( 'Plugins %s' ), "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . '</span></span>' ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
 } else {
-	$menu[20] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
+	$menu[20] = array( __( 'Plugins' ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
 }
-$submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'manage_network_plugins', 'plugins.php' );
-$submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' );
-$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
+$submenu['plugins.php'][5]  = array( __( 'Installed Plugins' ), 'manage_network_plugins', 'plugins.php' );
+$submenu['plugins.php'][10] = array( _x( 'Add New', 'plugin' ), 'install_plugins', 'plugin-install.php' );
+$submenu['plugins.php'][15] = array( _x( 'Editor', 'plugin editor' ), 'edit_plugins', 'plugin-editor.php' );
 
-$menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings');
+$menu[25] = array( __( 'Settings' ), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
 if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
-	$submenu['settings.php'][5]  = array( __('Network Settings'), 'manage_network_options', 'settings.php' );
-	$submenu['settings.php'][10] = array( __('Network Setup'), 'setup_network', 'setup.php' );
+	$submenu['settings.php'][5]  = array( __( 'Network Settings' ), 'manage_network_options', 'settings.php' );
+	$submenu['settings.php'][10] = array( __( 'Network Setup' ), 'setup_network', 'setup.php' );
 }
-unset($update_data);
+unset( $update_data );
 
 $menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
 
-require_once(ABSPATH . 'wp-admin/includes/menu.php');
+require_once( ABSPATH . 'wp-admin/includes/menu.php' );
Index: src/wp-admin/network/plugin-install.php
===================================================================
--- src/wp-admin/network/plugin-install.php	(revision 40901)
+++ src/wp-admin/network/plugin-install.php	(working copy)
@@ -7,8 +7,9 @@
  * @since 3.1.0
  */
 
-if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
+if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) {
 	define( 'IFRAME_REQUEST', true );
+}
 
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
Index: src/wp-admin/network/settings.php
===================================================================
--- src/wp-admin/network/settings.php	(revision 40901)
+++ src/wp-admin/network/settings.php	(working copy)
@@ -13,8 +13,9 @@
 /** WordPress Translation Install API */
 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
 
-if ( ! current_user_can( 'manage_network_options' ) )
+if ( ! current_user_can( 'manage_network_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $title = __( 'Network Settings' );
 $parent_file = 'settings.php';
@@ -23,22 +24,22 @@
 
 get_current_screen()->add_help_tab( array(
 		'id'      => 'overview',
-		'title'   => __('Overview'),
+		'title'   => __( 'Overview' ),
 		'content' =>
-			'<p>' . __('This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site&#8217;s options.') . '</p>' .
-			'<p>' . __('Operational settings has fields for the network&#8217;s name and admin email.') . '</p>' .
-			'<p>' . __('Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.') . '</p>' .
-			'<p>' . __('New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what&#8127;s put in the first post, page, comment, comment author, and comment URL.') . '</p>' .
-			'<p>' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '</p>' .
+			'<p>' . __( 'This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site&#8217;s options.' ) . '</p>' .
+			'<p>' . __( 'Operational settings has fields for the network&#8217;s name and admin email.' ) . '</p>' .
+			'<p>' . __( 'Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.' ) . '</p>' .
+			'<p>' . __( 'New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what&#8127;s put in the first post, page, comment, comment author, and comment URL.' ) . '</p>' .
+			'<p>' . __( 'Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).' ) . '</p>' .
 			'<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
-			'<p>' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '</p>' .
-			'<p>' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '</p>'
+			'<p>' . __( 'Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.' ) . '</p>' .
+			'<p>' . __( 'Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen">Documentation on Network Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen">Documentation on Network Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 if ( $_POST ) {
@@ -47,18 +48,41 @@
 
 	check_admin_referer( 'siteoptions' );
 
-	$checked_options = array( 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1, 'add_new_users' => 0 );
+	$checked_options = array(
+		'menu_items' => array(),
+		'registrationnotification' => 'no',
+		'upload_space_check_disabled' => 1,
+		'add_new_users' => 0,
+	);
 	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
-		if ( ! isset( $_POST[$option_name] ) )
-			$_POST[$option_name] = $option_unchecked_value;
+		if ( ! isset( $_POST[ $option_name ] ) ) {
+			$_POST[ $option_name ] = $option_unchecked_value;
+		}
 	}
 
 	$options = array(
-		'registrationnotification', 'registration', 'add_new_users', 'menu_items',
-		'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name',
-		'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author',
-		'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
-		'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email',
+		'registrationnotification',
+	'registration',
+	'add_new_users',
+	'menu_items',
+		'upload_space_check_disabled',
+	'blog_upload_space',
+	'upload_filetypes',
+	'site_name',
+		'first_post',
+	'first_page',
+	'first_comment',
+	'first_comment_url',
+	'first_comment_author',
+		'welcome_email',
+	'welcome_user_email',
+	'fileupload_maxk',
+	'global_terms_enabled',
+		'illegal_names',
+	'limited_email_domains',
+	'banned_email_domains',
+	'WPLANG',
+	'admin_email',
 		'first_comment_email',
 	);
 
@@ -71,9 +95,10 @@
 	}
 
 	foreach ( $options as $option_name ) {
-		if ( ! isset($_POST[$option_name]) )
+		if ( ! isset( $_POST[ $option_name ] ) ) {
 			continue;
-		$value = wp_unslash( $_POST[$option_name] );
+		}
+		$value = wp_unslash( $_POST[ $option_name ] );
 		update_site_option( $option_name, $value );
 	}
 
@@ -86,7 +111,7 @@
 
 	wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
 	exit();
-}
+}// End if().
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
 
@@ -123,17 +148,18 @@
 			<tr>
 				<th scope="row"><?php _e( 'Allow new registrations' ) ?></th>
 				<?php
-				if ( !get_site_option( 'registration' ) )
+				if ( ! get_site_option( 'registration' ) ) {
 					update_site_option( 'registration', 'none' );
+				}
 				$reg = get_site_option( 'registration' );
 				?>
 				<td>
 					<fieldset>
 					<legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend>
-					<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br />
-					<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br />
-					<label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog') ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br />
-					<label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all') ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label>
+					<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none' ) ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br />
+					<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user' ) ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br />
+					<label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog' ) ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br />
+					<label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all' ) ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label>
 					<?php if ( is_subdomain_install() ) {
 						echo '<p class="description">';
 						/* translators: 1: NOBLOGREDIRECT 2: wp-config.php */
@@ -142,7 +168,7 @@
 							'<code>wp-config.php</code>'
 						);
 						echo '</p>';
-					} ?>
+} ?>
 					</fieldset>
 				</td>
 			</tr>
@@ -150,8 +176,9 @@
 			<tr>
 				<th scope="row"><?php _e( 'Registration notification' ) ?></th>
 				<?php
-				if ( !get_site_option( 'registrationnotification' ) )
+				if ( ! get_site_option( 'registrationnotification' ) ) {
 					update_site_option( 'registrationnotification', 'yes' );
+				}
 				?>
 				<td>
 					<label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_site_option( 'registrationnotification' ), 'yes' ) ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account.' ) ?></label>
@@ -168,7 +195,7 @@
 			<tr>
 				<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
 				<td>
-					<input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
+					<input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( ' ', (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
 					<p class="description" id="illegal-names-desc">
 						<?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
 					</p>
@@ -189,7 +216,7 @@
 			</tr>
 
 			<tr>
-				<th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th>
+				<th scope="row"><label for="banned_email_domains"><?php _e( 'Banned Email Domains' ) ?></label></th>
 				<td>
 					<textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
 <?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
@@ -256,7 +283,7 @@
 			<tr>
 				<th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
 				<td>
-					<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo esc_attr( get_site_option('first_comment_author') ); ?>" />
+					<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_author' ) ); ?>" />
 					<p class="description" id="first-comment-author-desc">
 						<?php _e( 'The author of the first comment on a new site.' ) ?>
 					</p>
@@ -286,7 +313,7 @@
 			<tr>
 				<th scope="row"><?php _e( 'Site upload space' ) ?></th>
 				<td>
-					<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
+					<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option( 'blog_upload_space', 100 ) ) . '" />' ); ?></label><br />
 					<p class="screen-reader-text" id="blog-upload-space-desc">
 						<?php _e( 'Size in megabytes' ) ?>
 					</p>
@@ -381,7 +408,7 @@
 				$fieldset_end = '</fieldset>';
 			}
 			foreach ( (array) $menu_items as $key => $val ) {
-				echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>";
+				echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . ' /> ' . esc_html( $val ) . '</label><br/>';
 			}
 			echo $fieldset_end;
 			?>
Index: src/wp-admin/network/site-info.php
===================================================================
--- src/wp-admin/network/site-info.php	(revision 40901)
+++ src/wp-admin/network/site-info.php	(working copy)
@@ -22,7 +22,7 @@
 		'<p>' . __( '<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.' ) . '</p>' .
 		'<p>' . __( '<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.' ) . '</p>' .
 		'<p>' . sprintf( __( '<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
-		'<p>' . __( '<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.' ) . '</p>'
+		'<p>' . __( '<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
@@ -34,7 +34,7 @@
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 
 if ( ! $id ) {
-	wp_die( __('Invalid site ID.') );
+	wp_die( __( 'Invalid site ID.' ) );
 }
 
 $details = get_site( $id );
@@ -116,9 +116,12 @@
 	}
 
 	restore_current_blog();
-	wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-info.php' ) );
+	wp_redirect( add_query_arg( array(
+		'update' => 'updated',
+		'id' => $id,
+	), 'site-info.php' ) );
 	exit;
-}
+}// End if().
 
 if ( isset( $_GET['update'] ) ) {
 	$messages = array();
@@ -144,7 +147,7 @@
 
 network_edit_site_nav( array(
 	'blog_id'  => $id,
-	'selected' => 'site-info'
+	'selected' => 'site-info',
 ) );
 
 if ( ! empty( $messages ) ) {
@@ -182,7 +185,9 @@
 			<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" /></td>
 		</tr>
 		<?php
-		$attribute_fields = array( 'public' => __( 'Public' ) );
+		$attribute_fields = array(
+			'public' => __( 'Public' ),
+		);
 		if ( ! $is_main_site ) {
 			$attribute_fields['archived'] = __( 'Archived' );
 			$attribute_fields['spam']     = _x( 'Spam', 'site' );
@@ -196,7 +201,8 @@
 			<fieldset>
 			<legend class="screen-reader-text"><?php _e( 'Set site attributes' ) ?></legend>
 			<?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
-				<label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) ); ?> />
+				<label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true );
+				disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) ); ?> />
 				<?php echo $field_label; ?></label><br/>
 			<?php endforeach; ?>
 			<fieldset>
Index: src/wp-admin/network/site-new.php
===================================================================
--- src/wp-admin/network/site-new.php	(revision 40901)
+++ src/wp-admin/network/site-new.php	(working copy)
@@ -19,28 +19,30 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.') . '</p>' .
-		'<p>' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '</p>'
+		'<p>' . __( 'This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.' ) . '</p>' .
+		'<p>' . __( 'If the admin email for the new site does not exist in the database, a new user will also be created.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
-if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
+if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) {
 	check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
 
-	if ( ! is_array( $_POST['blog'] ) )
+	if ( ! is_array( $_POST['blog'] ) ) {
 		wp_die( __( 'Can&#8217;t create an empty site.' ) );
+	}
 
 	$blog = $_POST['blog'];
 	$domain = '';
-	if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
+	if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) {
 		$domain = strtolower( $blog['domain'] );
+	}
 
 	// If not a subdomain install, make sure the domain isn't a reserved word
 	if ( ! is_subdomain_install() ) {
@@ -59,7 +61,7 @@
 	$title = $blog['title'];
 
 	$meta = array(
-		'public' => 1
+		'public' => 1,
 	);
 
 	// Handle translation install for the new site.
@@ -74,8 +76,9 @@
 		}
 	}
 
-	if ( empty( $domain ) )
+	if ( empty( $domain ) ) {
 		wp_die( __( 'Missing or invalid site address.' ) );
+	}
 
 	if ( isset( $blog['email'] ) && '' === trim( $blog['email'] ) ) {
 		wp_die( __( 'Missing email address.' ) );
@@ -95,8 +98,8 @@
 	}
 
 	$password = 'N/A';
-	$user_id = email_exists($email);
-	if ( !$user_id ) { // Create a new user with a random password
+	$user_id = email_exists( $email );
+	if ( ! $user_id ) { // Create a new user with a random password
 		/**
 		 * Fires immediately before a new user is created via the network site-new.php page.
 		 *
@@ -130,7 +133,7 @@
 	$id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, get_current_network_id() );
 	$wpdb->show_errors();
 	if ( ! is_wp_error( $id ) ) {
-		if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) {
+		if ( ! is_super_admin( $user_id ) && ! get_user_option( 'primary_blog', $user_id ) ) {
 			update_user_option( $user_id, 'primary_blog', $id, true );
 		}
 
@@ -163,20 +166,21 @@
 	} else {
 		wp_die( $id->get_error_message() );
 	}
-}
+}// End if().
 
-if ( isset($_GET['update']) ) {
+if ( isset( $_GET['update'] ) ) {
 	$messages = array();
-	if ( 'added' == $_GET['update'] )
+	if ( 'added' == $_GET['update'] ) {
 		$messages[] = sprintf(
 			/* translators: 1: dashboard url, 2: network admin edit url */
 			__( 'Site added. <a href="%1$s">Visit Dashboard</a> or <a href="%2$s">Edit Site</a>' ),
 			esc_url( get_admin_url( absint( $_GET['id'] ) ) ),
 			network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) )
 		);
+	}
 }
 
-$title = __('Add New Site');
+$title = __( 'Add New Site' );
 $parent_file = 'sites.php';
 
 wp_enqueue_script( 'user-suggest' );
@@ -189,8 +193,9 @@
 <h1 id="add-new-site"><?php _e( 'Add New Site' ); ?></h1>
 <?php
 if ( ! empty( $messages ) ) {
-	foreach ( $messages as $msg )
+	foreach ( $messages as $msg ) {
 		echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
+	}
 } ?>
 <form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
 <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
Index: src/wp-admin/network/site-settings.php
===================================================================
--- src/wp-admin/network/site-settings.php	(revision 40901)
+++ src/wp-admin/network/site-settings.php	(working copy)
@@ -10,42 +10,45 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_sites' ) )
+if ( ! current_user_can( 'manage_sites' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
+}
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.') . '</p>' .
-		'<p>' . __('<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' .
-		'<p>' . __('<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' .
-		'<p>' . sprintf( __('<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
-		'<p>' . __('<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.') . '</p>'
+		'<p>' . __( 'The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.' ) . '</p>' .
+		'<p>' . __( '<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.' ) . '</p>' .
+		'<p>' . __( '<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.' ) . '</p>' .
+		'<p>' . sprintf( __( '<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
+		'<p>' . __( '<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 
-if ( ! $id )
-	wp_die( __('Invalid site ID.') );
+if ( ! $id ) {
+	wp_die( __( 'Invalid site ID.' ) );
+}
 
 $details = get_site( $id );
 if ( ! $details ) {
 	wp_die( __( 'The requested site does not exist.' ) );
 }
 
-if ( !can_edit_network( $details->site_id ) )
+if ( ! can_edit_network( $details->site_id ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $is_main_site = is_main_site( $id );
 
-if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_array( $_POST['option'] ) ) {
+if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] && is_array( $_POST['option'] ) ) {
 	check_admin_referer( 'edit-site' );
 
 	switch_to_blog( $id );
@@ -54,8 +57,9 @@
 	foreach ( (array) $_POST['option'] as $key => $val ) {
 		$key = wp_unslash( $key );
 		$val = wp_unslash( $val );
-		if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
+		if ( $key === 0 || is_array( $val ) || in_array( $key, $skip_options ) ) {
 			continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
+		}
 		update_option( $key, $val );
 	}
 
@@ -70,14 +74,15 @@
 	do_action( 'wpmu_update_blog_options', $id );
 
 	restore_current_blog();
-	wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-settings.php') );
+	wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-settings.php' ) );
 	exit;
 }
 
-if ( isset($_GET['update']) ) {
+if ( isset( $_GET['update'] ) ) {
 	$messages = array();
-	if ( 'updated' == $_GET['update'] )
-		$messages[] = __('Site options updated.');
+	if ( 'updated' == $_GET['update'] ) {
+		$messages[] = __( 'Site options updated.' );
+	}
 }
 
 /* translators: %s: site name */
@@ -98,12 +103,13 @@
 
 network_edit_site_nav( array(
 	'blog_id'  => $id,
-	'selected' => 'site-settings'
+	'selected' => 'site-settings',
 ) );
 
 if ( ! empty( $messages ) ) {
-	foreach ( $messages as $msg )
+	foreach ( $messages as $msg ) {
 		echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
+	}
 } ?>
 <form method="post" action="site-settings.php?action=update-site">
 	<?php wp_nonce_field( 'edit-site' ); ?>
@@ -120,8 +126,9 @@
 		);
 		$options = $wpdb->get_results( $query );
 		foreach ( $options as $option ) {
-			if ( $option->option_name == 'default_role' )
+			if ( $option->option_name == 'default_role' ) {
 				$editblog_default_role = $option->option_value;
+			}
 			$disabled = false;
 			$class = 'all-options';
 			if ( is_serialized( $option->option_value ) ) {
@@ -136,14 +143,14 @@
 			if ( strpos( $option->option_value, "\n" ) !== false ) {
 			?>
 				<tr class="form-field">
-					<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></label></th>
+					<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ) ?></label></th>
 					<td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ) ?>]" id="<?php echo esc_attr( $option->option_name ) ?>"<?php disabled( $disabled ) ?>><?php echo esc_textarea( $option->option_value ) ?></textarea></td>
 				</tr>
 			<?php
 			} else {
 			?>
 				<tr class="form-field">
-					<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></label></th>
+					<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo esc_html( ucwords( str_replace( '_', ' ', $option->option_name ) ) ); ?></label></th>
 					<?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
 					<td><code><?php echo esc_html( $option->option_value ) ?></code></td>
 					<?php } else { ?>
@@ -152,7 +159,7 @@
 				</tr>
 			<?php
 			}
-		} // End foreach
+		} // End foreach().
 		/**
 		 * Fires at the end of the Edit Site form, before the submit button.
 		 *
Index: src/wp-admin/network/site-themes.php
===================================================================
--- src/wp-admin/network/site-themes.php	(revision 40901)
+++ src/wp-admin/network/site-themes.php	(working copy)
@@ -10,24 +10,25 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_sites' ) )
+if ( ! current_user_can( 'manage_sites' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
+}
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.') . '</p>' .
-		'<p>' . __('<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' .
-		'<p>' . __('<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' .
-		'<p>' . sprintf( __('<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
-		'<p>' . __('<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.') . '</p>'
+		'<p>' . __( 'The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.' ) . '</p>' .
+		'<p>' . __( '<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.' ) . '</p>' .
+		'<p>' . __( '<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.' ) . '</p>' .
+		'<p>' . sprintf( __( '<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
+		'<p>' . __( '<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -36,11 +37,11 @@
 	'heading_list'       => __( 'Site themes list' ),
 ) );
 
-$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
+$wp_list_table = _get_list_table( 'WP_MS_Themes_List_Table' );
 
 $action = $wp_list_table->current_action();
 
-$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
+$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
 
 // Clean up request URI from temporary args for screen options/paging uri's to work as expected.
 $temp_args = array( 'enabled', 'disabled', 'error' );
@@ -53,8 +54,9 @@
 
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 
-if ( ! $id )
-	wp_die( __('Invalid site ID.') );
+if ( ! $id ) {
+	wp_die( __( 'Invalid site ID.' ) );
+}
 
 $wp_list_table->prepare_items();
 
@@ -63,8 +65,9 @@
 	wp_die( __( 'The requested site does not exist.' ) );
 }
 
-if ( !can_edit_network( $details->site_id ) )
+if ( ! can_edit_network( $details->site_id ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $is_main_site = is_main_site( $id );
 
@@ -78,20 +81,22 @@
 			$theme = $_GET['theme'];
 			$action = 'enabled';
 			$n = 1;
-			if ( !$allowed_themes )
-				$allowed_themes = array( $theme => true );
-			else
-				$allowed_themes[$theme] = true;
+			if ( ! $allowed_themes ) {
+				$allowed_themes = array(
+					$theme => true,
+				);
+			} else { $allowed_themes[ $theme ] = true;
+			}
 			break;
 		case 'disable':
 			check_admin_referer( 'disable-theme_' . $_GET['theme'] );
 			$theme = $_GET['theme'];
 			$action = 'disabled';
 			$n = 1;
-			if ( !$allowed_themes )
+			if ( ! $allowed_themes ) {
 				$allowed_themes = array();
-			else
-				unset( $allowed_themes[$theme] );
+			} else { unset( $allowed_themes[ $theme ] );
+			}
 			break;
 		case 'enable-selected':
 			check_admin_referer( 'bulk-themes' );
@@ -99,8 +104,9 @@
 				$themes = (array) $_POST['checked'];
 				$action = 'enabled';
 				$n = count( $themes );
-				foreach ( (array) $themes as $theme )
+				foreach ( (array) $themes as $theme ) {
 					$allowed_themes[ $theme ] = true;
+				}
 			} else {
 				$action = 'error';
 				$n = 'none';
@@ -112,8 +118,9 @@
 				$themes = (array) $_POST['checked'];
 				$action = 'disabled';
 				$n = count( $themes );
-				foreach ( (array) $themes as $theme )
+				foreach ( (array) $themes as $theme ) {
 					unset( $allowed_themes[ $theme ] );
+				}
 			} else {
 				$action = 'error';
 				$n = 'none';
@@ -146,14 +153,17 @@
 				$action = 'error';
 				$n = 'none';
 			}
-	}
+	}// End switch().
 
 	update_option( 'allowedthemes', $allowed_themes );
 	restore_current_blog();
 
-	wp_safe_redirect( add_query_arg( array( 'id' => $id, $action => $n ), $referer ) );
+	wp_safe_redirect( add_query_arg( array(
+		'id' => $id,
+		$action => $n,
+	), $referer ) );
 	exit;
-}
+}// End if().
 
 if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
 	wp_safe_redirect( $referer );
@@ -178,7 +188,7 @@
 
 network_edit_site_nav( array(
 	'blog_id'  => $id,
-	'selected' => 'site-themes'
+	'selected' => 'site-themes',
 ) );
 
 if ( isset( $_GET['enabled'] ) ) {
@@ -218,4 +228,4 @@
 </form>
 
 </div>
-<?php include(ABSPATH . 'wp-admin/admin-footer.php'); ?>
+<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: src/wp-admin/network/site-users.php
===================================================================
--- src/wp-admin/network/site-users.php	(revision 40901)
+++ src/wp-admin/network/site-users.php	(working copy)
@@ -10,27 +10,28 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can('manage_sites') )
-	wp_die(__('Sorry, you are not allowed to edit this site.'));
+if ( ! current_user_can( 'manage_sites' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
+}
 
-$wp_list_table = _get_list_table('WP_Users_List_Table');
+$wp_list_table = _get_list_table( 'WP_Users_List_Table' );
 $wp_list_table->prepare_items();
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.') . '</p>' .
-		'<p>' . __('<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.') . '</p>' .
-		'<p>' . __('<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.') . '</p>' .
-		'<p>' . sprintf( __('<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
-		'<p>' . __('<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.') . '</p>'
+		'<p>' . __( 'The menu is for editing information specific to individual sites, particularly if the admin area of a site is unavailable.' ) . '</p>' .
+		'<p>' . __( '<strong>Info</strong> &mdash; The site URL is rarely edited as this can cause the site to not work properly. The Registered date and Last Updated date are displayed. Network admins can mark a site as archived, spam, deleted and mature, to remove from public listings or disable.' ) . '</p>' .
+		'<p>' . __( '<strong>Users</strong> &mdash; This displays the users associated with this site. You can also change their role, reset their password, or remove them from the site. Removing the user from the site does not remove the user from the network.' ) . '</p>' .
+		'<p>' . sprintf( __( '<strong>Themes</strong> &mdash; This area shows themes that are not already enabled across the network. Enabling a theme in this menu makes it accessible to this site. It does not activate the theme, but allows it to show in the site&#8217;s Appearance menu. To enable a theme for the entire network, see the <a href="%s">Network Themes</a> screen.' ), network_admin_url( 'themes.php' ) ) . '</p>' .
+		'<p>' . __( '<strong>Settings</strong> &mdash; This page shows a list of all settings associated with this site. Some are created by WordPress and others are created by plugins you activate. Note that some fields are grayed out and say Serialized Data. You cannot modify these values due to the way the setting is stored in the database.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -48,16 +49,18 @@
 
 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
 
-if ( ! $id )
-	wp_die( __('Invalid site ID.') );
+if ( ! $id ) {
+	wp_die( __( 'Invalid site ID.' ) );
+}
 
 $details = get_site( $id );
 if ( ! $details ) {
 	wp_die( __( 'The requested site does not exist.' ) );
 }
 
-if ( ! can_edit_network( $details->site_id ) )
+if ( ! can_edit_network( $details->site_id ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $is_main_site = is_main_site( $id );
 
@@ -74,11 +77,11 @@
 			if ( ! is_array( $_POST['user'] ) || empty( $user['username'] ) || empty( $user['email'] ) ) {
 				$update = 'err_new';
 			} else {
-				$password = wp_generate_password( 12, false);
+				$password = wp_generate_password( 12, false );
 				$user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) );
 
 				if ( false === $user_id ) {
-		 			$update = 'err_new_dup';
+					 $update = 'err_new_dup';
 				} else {
 					add_user_to_blog( $id, $user_id, $_POST['new_role'] );
 					$update = 'newuser';
@@ -96,15 +99,15 @@
 
 		case 'adduser':
 			check_admin_referer( 'add-user', '_wpnonce_add-user' );
-			if ( !empty( $_POST['newuser'] ) ) {
+			if ( ! empty( $_POST['newuser'] ) ) {
 				$update = 'adduser';
 				$newuser = $_POST['newuser'];
 				$user = get_user_by( 'login', $newuser );
 				if ( $user && $user->exists() ) {
-					if ( ! is_user_member_of_blog( $user->ID, $id ) )
+					if ( ! is_user_member_of_blog( $user->ID, $id ) ) {
 						add_user_to_blog( $id, $user->ID, $_POST['new_role'] );
-					else
-						$update = 'err_add_member';
+					} else { $update = 'err_add_member';
+					}
 				} else {
 					$update = 'err_add_notfound';
 				}
@@ -181,11 +184,11 @@
 			$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id );
 			$update = $action;
 			break;
-	}
+	}// End switch().
 
 	wp_safe_redirect( add_query_arg( 'update', $update, $referer ) );
 	exit();
-}
+}// End if().
 
 restore_current_blog();
 
@@ -209,8 +212,9 @@
  *
  * @param bool $bool Whether to show the Add Existing User form. Default true.
  */
-if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) )
+if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) {
 	wp_enqueue_script( 'user-suggest' );
+}
 
 require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
 
@@ -226,40 +230,40 @@
 
 network_edit_site_nav( array(
 	'blog_id'  => $id,
-	'selected' => 'site-users'
+	'selected' => 'site-users',
 ) );
 
-if ( isset($_GET['update']) ) :
-	switch($_GET['update']) {
-	case 'adduser':
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
+if ( isset( $_GET['update'] ) ) :
+	switch ( $_GET['update'] ) {
+		case 'adduser':
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
 		break;
-	case 'err_add_member':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
+		case 'err_add_member':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
 		break;
-	case 'err_add_notfound':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
+		case 'err_add_notfound':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
 		break;
-	case 'promote':
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
+		case 'promote':
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
 		break;
-	case 'err_promote':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
+		case 'err_promote':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
 		break;
-	case 'remove':
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
+		case 'remove':
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
 		break;
-	case 'err_remove':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
+		case 'err_remove':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
 		break;
-	case 'newuser':
-		echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
+		case 'newuser':
+			echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
 		break;
-	case 'err_new':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
+		case 'err_new':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
 		break;
-	case 'err_new_dup':
-		echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
+		case 'err_new_dup':
+			echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
 		break;
 	}
 endif; ?>
@@ -304,7 +308,9 @@
 		</tr>
 	</table>
 	<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
-	<?php submit_button( __( 'Add User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-existing-user' ) ); ?>
+	<?php submit_button( __( 'Add User' ), 'primary', 'add-user', true, array(
+		'id' => 'submit-add-existing-user',
+	) ); ?>
 </form>
 <?php endif; ?>
 
@@ -318,7 +324,7 @@
  */
 if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
 <h2 id="add-new-user"><?php _e( 'Add New User' ); ?></h2>
-<form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post">
+<form action="<?php echo network_admin_url( 'site-users.php?action=newuser' ); ?>" id="newuser" method="post">
 	<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
 	<table class="form-table">
 		<tr>
@@ -340,7 +346,9 @@
 		</tr>
 	</table>
 	<?php wp_nonce_field( 'add-user', '_wpnonce_add-new-user' ) ?>
-	<?php submit_button( __( 'Add New User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-user' ) ); ?>
+	<?php submit_button( __( 'Add New User' ), 'primary', 'add-user', true, array(
+		'id' => 'submit-add-user',
+	) ); ?>
 </form>
 <?php endif; ?>
 </div>
Index: src/wp-admin/network/sites.php
===================================================================
--- src/wp-admin/network/sites.php	(revision 40901)
+++ src/wp-admin/network/sites.php	(working copy)
@@ -10,8 +10,9 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_sites' ) )
+if ( ! current_user_can( 'manage_sites' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
@@ -23,24 +24,24 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '</p>' .
-		'<p>' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '</p>' .
-		'<p>' . __('Hovering over each site reveals seven options (three for the primary site):') . '</p>' .
-		'<ul><li>' . __('An Edit link to a separate Edit Site screen.') . '</li>' .
-		'<li>' . __('Dashboard leads to the Dashboard for that site.') . '</li>' .
-		'<li>' . __('Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.') . '</li>' .
-		'<li>' . __('Delete which is a permanent action after the confirmation screens.') . '</li>' .
-		'<li>' . __('Visit to go to the front-end site live.') . '</li></ul>' .
-		'<p>' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '</p>' .
-		'<p>' . __('Clicking on bold headings can re-sort this table.') . '</p>'
+		'<p>' . __( 'Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.' ) . '</p>' .
+		'<p>' . __( 'This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.' ) . '</p>' .
+		'<p>' . __( 'Hovering over each site reveals seven options (three for the primary site):' ) . '</p>' .
+		'<ul><li>' . __( 'An Edit link to a separate Edit Site screen.' ) . '</li>' .
+		'<li>' . __( 'Dashboard leads to the Dashboard for that site.' ) . '</li>' .
+		'<li>' . __( 'Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.' ) . '</li>' .
+		'<li>' . __( 'Delete which is a permanent action after the confirmation screens.' ) . '</li>' .
+		'<li>' . __( 'Visit to go to the front-end site live.' ) . '</li></ul>' .
+		'<p>' . __( 'The site ID is used internally, and is not shown on the front end of the site or to users/viewers.' ) . '</p>' .
+		'<p>' . __( 'Clicking on bold headings can re-sort this table.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Sites_Screen">Documentation on Site Management</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -115,15 +116,16 @@
 		check_admin_referer( $action . '_' . $id );
 	} elseif ( 'allblogs' === $_GET['action'] ) {
 		check_admin_referer( 'bulk-sites' );
-	}
+	}// End if().
 
 	$updated_action = '';
 
 	switch ( $_GET['action'] ) {
 
 		case 'deleteblog':
-			if ( ! current_user_can( 'delete_sites' ) )
+			if ( ! current_user_can( 'delete_sites' ) ) {
 				wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
+			}
 
 			$updated_action = 'not_deleted';
 			if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) {
@@ -140,8 +142,9 @@
 					if ( $val != '0' && $val != get_network()->site_id ) {
 						switch ( $doaction ) {
 							case 'delete':
-								if ( ! current_user_can( 'delete_site', $val ) )
+								if ( ! current_user_can( 'delete_site', $val ) ) {
 									wp_die( __( 'Sorry, you are not allowed to delete the site.' ) );
+								}
 
 								$updated_action = 'all_delete';
 								wpmu_delete_blog( $val, true );
@@ -172,7 +175,7 @@
 				}
 				wp_redirect( $location );
 				exit();
-			}
+			}// End if().
 		break;
 
 		case 'archiveblog':
@@ -214,17 +217,19 @@
 		case 'matureblog':
 			update_blog_status( $id, 'mature', ( 'matureblog' === $_GET['action'] ) ? '1' : '0' );
 		break;
-	}
+	}// End switch().
 
 	if ( empty( $updated_action ) && array_key_exists( $_GET['action'], $manage_actions ) ) {
 		$updated_action = $_GET['action'];
 	}
 
 	if ( ! empty( $updated_action ) ) {
-		wp_safe_redirect( add_query_arg( array( 'updated' => $updated_action ), wp_get_referer() ) );
+		wp_safe_redirect( add_query_arg( array(
+			'updated' => $updated_action,
+		), wp_get_referer() ) );
 		exit();
 	}
-}
+}// End if().
 
 $msg = '';
 if ( isset( $_GET['updated'] ) ) {
@@ -275,11 +280,12 @@
 			 */
 			$msg = apply_filters( 'network_sites_updated_message_' . $_GET['updated'], __( 'Settings saved.' ) );
 		break;
-	}
+	}// End switch().
 
-	if ( ! empty( $msg ) )
+	if ( ! empty( $msg ) ) {
 		$msg = '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
-}
+	}
+}// End if().
 
 $wp_list_table->prepare_items();
 
@@ -289,8 +295,8 @@
 <div class="wrap">
 <h1 class="wp-heading-inline"><?php _e( 'Sites' ); ?></h1>
 
-<?php if ( current_user_can( 'create_sites') ) : ?>
-	<a href="<?php echo network_admin_url('site-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
+<?php if ( current_user_can( 'create_sites' ) ) : ?>
+	<a href="<?php echo network_admin_url( 'site-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
 <?php endif; ?>
 
 <?php
Index: src/wp-admin/network/theme-install.php
===================================================================
--- src/wp-admin/network/theme-install.php	(revision 40901)
+++ src/wp-admin/network/theme-install.php	(working copy)
@@ -7,8 +7,9 @@
  * @since 3.1.0
  */
 
-if ( isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) )
+if ( isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) ) {
 	define( 'IFRAME_REQUEST', true );
+}
 
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
Index: src/wp-admin/network/themes.php
===================================================================
--- src/wp-admin/network/themes.php	(revision 40901)
+++ src/wp-admin/network/themes.php	(working copy)
@@ -10,15 +10,16 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !current_user_can('manage_network_themes') )
+if ( ! current_user_can( 'manage_network_themes' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
+}
 
-$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
+$wp_list_table = _get_list_table( 'WP_MS_Themes_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 $action = $wp_list_table->current_action();
 
-$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
+$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
 
 // Clean up request URI from temporary args for screen options/paging uri's to work as expected.
 $temp_args = array( 'enabled', 'disabled', 'deleted', 'error' );
@@ -28,22 +29,22 @@
 if ( $action ) {
 	switch ( $action ) {
 		case 'enable':
-			check_admin_referer('enable-theme_' . $_GET['theme']);
+			check_admin_referer( 'enable-theme_' . $_GET['theme'] );
 			WP_Theme::network_enable_theme( $_GET['theme'] );
-			if ( false === strpos( $referer, '/network/themes.php' ) )
+			if ( false === strpos( $referer, '/network/themes.php' ) ) {
 				wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
-			else
-				wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
+			} else { wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
+			}
 			exit;
 		case 'disable':
-			check_admin_referer('disable-theme_' . $_GET['theme']);
+			check_admin_referer( 'disable-theme_' . $_GET['theme'] );
 			WP_Theme::network_disable_theme( $_GET['theme'] );
 			wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
 			exit;
 		case 'enable-selected':
-			check_admin_referer('bulk-themes');
+			check_admin_referer( 'bulk-themes' );
 			$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
-			if ( empty($themes) ) {
+			if ( empty( $themes ) ) {
 				wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
 				exit;
 			}
@@ -51,9 +52,9 @@
 			wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
 			exit;
 		case 'disable-selected':
-			check_admin_referer('bulk-themes');
+			check_admin_referer( 'bulk-themes' );
 			$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
-			if ( empty($themes) ) {
+			if ( empty( $themes ) ) {
 				wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
 				exit;
 			}
@@ -63,31 +64,31 @@
 		case 'update-selected' :
 			check_admin_referer( 'bulk-themes' );
 
-			if ( isset( $_GET['themes'] ) )
+			if ( isset( $_GET['themes'] ) ) {
 				$themes = explode( ',', $_GET['themes'] );
-			elseif ( isset( $_POST['checked'] ) )
+			} elseif ( isset( $_POST['checked'] ) ) {
 				$themes = (array) $_POST['checked'];
-			else
-				$themes = array();
+			} else { $themes = array();
+			}
 
 			$title = __( 'Update Themes' );
 			$parent_file = 'themes.php';
 
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
+			require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 			echo '<div class="wrap">';
 			echo '<h1>' . esc_html( $title ) . '</h1>';
 
-			$url = self_admin_url('update.php?action=update-selected-themes&amp;themes=' . urlencode( join(',', $themes) ));
-			$url = wp_nonce_url($url, 'bulk-update-themes');
+			$url = self_admin_url( 'update.php?action=update-selected-themes&amp;themes=' . urlencode( join( ',', $themes ) ) );
+			$url = wp_nonce_url( $url, 'bulk-update-themes' );
 
 			echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
 			echo '</div>';
-			require_once(ABSPATH . 'wp-admin/admin-footer.php');
+			require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 		case 'delete-selected':
 			if ( ! current_user_can( 'delete_themes' ) ) {
-				wp_die( __('Sorry, you are not allowed to delete themes for this site.') );
+				wp_die( __( 'Sorry, you are not allowed to delete themes for this site.' ) );
 			}
 
 			check_admin_referer( 'bulk-themes' );
@@ -111,7 +112,7 @@
 				$theme_info[ $theme ] = wp_get_theme( $theme );
 			}
 
-			include(ABSPATH . 'wp-admin/update.php');
+			include( ABSPATH . 'wp-admin/update.php' );
 
 			$parent_file = 'themes.php';
 
@@ -132,14 +133,14 @@
 				<?php endif; ?>
 					<ul class="ul-disc">
 					<?php
-						foreach ( $theme_info as $theme ) {
-							echo '<li>' . sprintf(
-								/* translators: 1: theme name, 2: theme author */
-								_x( '%1$s by %2$s', 'theme' ),
-								'<strong>' . $theme->display( 'Name' ) . '</strong>',
-								'<em>' . $theme->display( 'Author' ) . '</em>'
-							) . '</li>';
-						}
+					foreach ( $theme_info as $theme ) {
+						echo '<li>' . sprintf(
+							/* translators: 1: theme name, 2: theme author */
+							_x( '%1$s by %2$s', 'theme' ),
+							'<strong>' . $theme->display( 'Name' ) . '</strong>',
+							'<em>' . $theme->display( 'Author' ) . '</em>'
+						) . '</li>';
+					}
 					?>
 					</ul>
 				<?php if ( 1 == $themes_to_delete ) : ?>
@@ -147,21 +148,21 @@
 				<?php else : ?>
 					<p><?php _e( 'Are you sure you wish to delete these themes?' ); ?></p>
 				<?php endif; ?>
-				<form method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;">
+				<form method="post" action="<?php echo esc_url( $_SERVER['REQUEST_URI'] ); ?>" style="display:inline;">
 					<input type="hidden" name="verify-delete" value="1" />
 					<input type="hidden" name="action" value="delete-selected" />
 					<?php
-						foreach ( (array) $themes as $theme ) {
-							echo '<input type="hidden" name="checked[]" value="' . esc_attr($theme) . '" />';
-						}
+					foreach ( (array) $themes as $theme ) {
+						echo '<input type="hidden" name="checked[]" value="' . esc_attr( $theme ) . '" />';
+					}
 
 						wp_nonce_field( 'bulk-themes' );
 
-						if ( 1 == $themes_to_delete ) {
-							submit_button( __( 'Yes, delete this theme' ), '', 'submit', false );
-						} else {
-							submit_button( __( 'Yes, delete these themes' ), '', 'submit', false );
-						}
+					if ( 1 == $themes_to_delete ) {
+						submit_button( __( 'Yes, delete this theme' ), '', 'submit', false );
+					} else {
+						submit_button( __( 'Yes, delete these themes' ), '', 'submit', false );
+					}
 					?>
 				</form>
 				<?php
@@ -172,16 +173,16 @@
 				</form>
 			</div>
 				<?php
-				require_once(ABSPATH . 'wp-admin/admin-footer.php');
+				require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 				exit;
-			} // Endif verify-delete
+			} // End if().
 
 			foreach ( $themes as $theme ) {
 				$delete_result = delete_theme( $theme, esc_url( add_query_arg( array(
 					'verify-delete' => 1,
 					'action' => 'delete-selected',
 					'checked' => $_REQUEST['checked'],
-					'_wpnonce' => $_REQUEST['_wpnonce']
+					'_wpnonce' => $_REQUEST['_wpnonce'],
 				), network_admin_url( 'themes.php' ) ) ) );
 			}
 
@@ -189,7 +190,7 @@
 			wp_redirect( add_query_arg( array(
 				'deleted' => count( $themes ),
 				'paged' => $paged,
-				's' => $s
+				's' => $s,
 			), network_admin_url( 'themes.php' ) ) );
 			exit;
 		default:
@@ -205,9 +206,8 @@
 
 			wp_safe_redirect( $referer );
 			exit;
-	}
-
-}
+	}// End switch().
+}// End if().
 
 $wp_list_table->prepare_items();
 
@@ -217,17 +217,17 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' .
-		'<p>' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site&#8217;s Appearance > Themes screen.') . '</p>' .
-		'<p>' . __('Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.') . '</p>'
+		'<p>' . __( 'This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.' ) . '</p>' .
+		'<p>' . __( 'If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site&#8217;s Appearance > Themes screen.' ) . '</p>' .
+		'<p>' . __( 'Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Themes_Screen">Documentation on Network Themes</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Themes_Screen">Documentation on Network Themes</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -236,13 +236,13 @@
 	'heading_list'       => __( 'Themes list' ),
 ) );
 
-$title = __('Themes');
+$title = __( 'Themes' );
 $parent_file = 'themes.php';
 
 wp_enqueue_script( 'updates' );
 wp_enqueue_script( 'theme-preview' );
 
-require_once(ABSPATH . 'wp-admin/admin-header.php');
+require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 ?>
 
@@ -302,13 +302,14 @@
 <?php
 $wp_list_table->views();
 
-if ( 'broken' == $status )
+if ( 'broken' == $status ) {
 	echo '<p class="clear">' . __( 'The following themes are installed but incomplete.' ) . '</p>';
+}
 ?>
 
 <form id="bulk-action-form" method="post">
-<input type="hidden" name="theme_status" value="<?php echo esc_attr($status) ?>" />
-<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
+<input type="hidden" name="theme_status" value="<?php echo esc_attr( $status ) ?>" />
+<input type="hidden" name="paged" value="<?php echo esc_attr( $page ) ?>" />
 
 <?php $wp_list_table->display(); ?>
 </form>
@@ -320,4 +321,4 @@
 wp_print_admin_notice_templates();
 wp_print_update_row_templates();
 
-include(ABSPATH . 'wp-admin/admin-footer.php');
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/network/update.php
===================================================================
--- src/wp-admin/network/update.php	(revision 40901)
+++ src/wp-admin/network/update.php	(working copy)
@@ -7,8 +7,9 @@
  * @since 3.1.0
  */
 
-if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ) ) )
+if ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ) ) ) {
 	define( 'IFRAME_REQUEST', true );
+}
 
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
Index: src/wp-admin/network/upgrade.php
===================================================================
--- src/wp-admin/network/upgrade.php	(revision 40901)
+++ src/wp-admin/network/upgrade.php	(working copy)
@@ -17,17 +17,17 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.') . '</p>' .
-		'<p>' . __('If a version update to core has not happened, clicking this button won&#8217;t affect anything.') . '</p>' .
-		'<p>' . __('If this process fails for any reason, users logging in to their sites will force the same update.') . '</p>'
+		'<p>' . __( 'Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.' ) . '</p>' .
+		'<p>' . __( 'If a version update to core has not happened, clicking this button won&#8217;t affect anything.' ) . '</p>' .
+		'<p>' . __( 'If this process fails for any reason, users logging in to their sites will force the same update.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Updates_Screen">Documentation on Upgrade Network</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Updates_Screen">Documentation on Upgrade Network</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -39,11 +39,11 @@
 echo '<div class="wrap">';
 echo '<h1>' . __( 'Upgrade Network' ) . '</h1>';
 
-$action = isset($_GET['action']) ? $_GET['action'] : 'show';
+$action = isset( $_GET['action'] ) ? $_GET['action'] : 'show';
 
 switch ( $action ) {
-	case "upgrade":
-		$n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
+	case 'upgrade':
+		$n = ( isset( $_GET['n'] ) ) ? intval( $_GET['n'] ) : 0;
 
 		if ( $n < 5 ) {
 			/**
@@ -68,7 +68,7 @@
 			echo '<p>' . __( 'All done!' ) . '</p>';
 			break;
 		}
-		echo "<ul>";
+		echo '<ul>';
 		foreach ( (array) $site_ids as $site_id ) {
 			switch_to_blog( $site_id );
 			$siteurl = site_url();
@@ -107,9 +107,9 @@
 			 * @param int $site_id The Site ID.
 			 */
 			do_action( 'wpmu_upgrade_site', $site_id );
-		}
-		echo "</ul>";
-		?><p><?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p>
+		}// End foreach().
+		echo '</ul>';
+		?><p><?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e( 'Next Sites' ); ?></a></p>
 		<script type="text/javascript">
 		<!--
 		function nextpage() {
@@ -137,7 +137,7 @@
 		 */
 		do_action( 'wpmu_upgrade_page' );
 	break;
-}
+}// End switch().
 ?>
 </div>
 
Index: src/wp-admin/network/user-new.php
===================================================================
--- src/wp-admin/network/user-new.php	(revision 40901)
+++ src/wp-admin/network/user-new.php	(working copy)
@@ -10,43 +10,46 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can('create_users') )
-	wp_die(__('Sorry, you are not allowed to add users to this network.'));
+if ( ! current_user_can( 'create_users' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to add users to this network.' ) );
+}
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('Add User will set up a new user account on the network and send that person an email with username and password.') . '</p>' .
-		'<p>' . __('Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.') . '</p>'
+		'<p>' . __( 'Add User will set up a new user account on the network and send that person an email with username and password.' ) . '</p>' .
+		'<p>' . __( 'Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
-if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {
+if ( isset( $_REQUEST['action'] ) && 'add-user' == $_REQUEST['action'] ) {
 	check_admin_referer( 'add-user', '_wpnonce_add-user' );
 
-	if ( ! current_user_can( 'manage_network_users' ) )
+	if ( ! current_user_can( 'manage_network_users' ) ) {
 		wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+	}
 
-	if ( ! is_array( $_POST['user'] ) )
+	if ( ! is_array( $_POST['user'] ) ) {
 		wp_die( __( 'Cannot create an empty user.' ) );
+	}
 
 	$user = wp_unslash( $_POST['user'] );
 
 	$user_details = wpmu_validate_user_signup( $user['username'], $user['email'] );
-	if ( is_wp_error( $user_details[ 'errors' ] ) && ! empty( $user_details[ 'errors' ]->errors ) ) {
-		$add_user_errors = $user_details[ 'errors' ];
+	if ( is_wp_error( $user_details['errors'] ) && ! empty( $user_details['errors']->errors ) ) {
+		$add_user_errors = $user_details['errors'];
 	} else {
-		$password = wp_generate_password( 12, false);
+		$password = wp_generate_password( 12, false );
 		$user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, sanitize_email( $user['email'] ) );
 
 		if ( ! $user_id ) {
-	 		$add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
+			 $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
 		} else {
 			/**
 			  * Fires after a new user has been created via the network user-new.php page.
@@ -56,13 +59,16 @@
 			  * @param int $user_id ID of the newly created user.
 			  */
 			do_action( 'network_user_new_created_user', $user_id );
-			wp_redirect( add_query_arg( array('update' => 'added', 'user_id' => $user_id ), 'user-new.php' ) );
+			wp_redirect( add_query_arg( array(
+				'update' => 'added',
+				'user_id' => $user_id,
+			), 'user-new.php' ) );
 			exit;
 		}
 	}
-}
+}// End if().
 
-if ( isset($_GET['update']) ) {
+if ( isset( $_GET['update'] ) ) {
 	$messages = array();
 	if ( 'added' == $_GET['update'] ) {
 		$edit_link = '';
@@ -82,7 +88,7 @@
 	}
 }
 
-$title = __('Add New User');
+$title = __( 'Add New User' );
 $parent_file = 'users.php';
 
 require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
@@ -91,19 +97,21 @@
 <h1 id="add-new-user"><?php _e( 'Add New User' ); ?></h1>
 <?php
 if ( ! empty( $messages ) ) {
-	foreach ( $messages as $msg )
+	foreach ( $messages as $msg ) {
 		echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
+	}
 }
 
 if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?>
 	<div class="error">
 		<?php
-			foreach ( $add_user_errors->get_error_messages() as $message )
-				echo "<p>$message</p>";
+		foreach ( $add_user_errors->get_error_messages() as $message ) {
+			echo "<p>$message</p>";
+		}
 		?>
 	</div>
 <?php } ?>
-	<form action="<?php echo network_admin_url('user-new.php?action=add-user'); ?>" id="adduser" method="post" novalidate="novalidate">
+	<form action="<?php echo network_admin_url( 'user-new.php?action=add-user' ); ?>" id="adduser" method="post" novalidate="novalidate">
 	<table class="form-table">
 		<tr class="form-field form-required">
 			<th scope="row"><label for="username"><?php _e( 'Username' ) ?></label></th>
@@ -126,7 +134,7 @@
 	do_action( 'network_user_new_form' );
 
 	wp_nonce_field( 'add-user', '_wpnonce_add-user' );
-	submit_button( __('Add User'), 'primary', 'add-user' );
+	submit_button( __( 'Add User' ), 'primary', 'add-user' );
 	?>
 	</form>
 </div>
Index: src/wp-admin/network/users.php
===================================================================
--- src/wp-admin/network/users.php	(revision 40901)
+++ src/wp-admin/network/users.php	(working copy)
@@ -10,8 +10,9 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_network_users' ) )
+if ( ! current_user_can( 'manage_network_users' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+}
 
 if ( isset( $_GET['action'] ) ) {
 	/** This action is documented in wp-admin/network/edit.php */
@@ -19,8 +20,9 @@
 
 	switch ( $_GET['action'] ) {
 		case 'deleteuser':
-			if ( ! current_user_can( 'manage_network_users' ) )
+			if ( ! current_user_can( 'manage_network_users' ) ) {
 				wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+			}
 
 			check_admin_referer( 'deleteuser' );
 
@@ -40,21 +42,23 @@
 			exit();
 
 		case 'allusers':
-			if ( !current_user_can( 'manage_network_users' ) )
+			if ( ! current_user_can( 'manage_network_users' ) ) {
 				wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+			}
 
-			if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
+			if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
 				check_admin_referer( 'bulk-users-network' );
 
 				$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
 				$userfunction = '';
 
 				foreach ( (array) $_POST['allusers'] as $user_id ) {
-					if ( !empty( $user_id ) ) {
+					if ( ! empty( $user_id ) ) {
 						switch ( $doaction ) {
 							case 'delete':
-								if ( ! current_user_can( 'delete_users' ) )
+								if ( ! current_user_can( 'delete_users' ) ) {
 									wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+								}
 								$title = __( 'Users' );
 								$parent_file = 'users.php';
 								require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -66,14 +70,16 @@
 
 							case 'spam':
 								$user = get_userdata( $user_id );
-								if ( is_super_admin( $user->ID ) )
+								if ( is_super_admin( $user->ID ) ) {
 									wp_die( sprintf( __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), esc_html( $user->user_login ) ) );
+								}
 
 								$userfunction = 'all_spam';
 								$blogs = get_blogs_of_user( $user_id, true );
 								foreach ( (array) $blogs as $details ) {
-									if ( $details->userblog_id != get_network()->site_id ) // main blog not a spam !
+									if ( $details->userblog_id != get_network()->site_id ) { // main blog not a spam !
 										update_blog_status( $details->userblog_id, 'spam', '1' );
+									}
 								}
 								update_user_status( $user_id, 'spam', '1' );
 							break;
@@ -81,14 +87,15 @@
 							case 'notspam':
 								$userfunction = 'all_notspam';
 								$blogs = get_blogs_of_user( $user_id, true );
-								foreach ( (array) $blogs as $details )
+								foreach ( (array) $blogs as $details ) {
 									update_blog_status( $details->userblog_id, 'spam', '0' );
+								}
 
 								update_user_status( $user_id, 'spam', '0' );
 							break;
-						}
-					}
-				}
+						}// End switch().
+					}// End if().
+				}// End foreach().
 
 				if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) {
 					$sendback = wp_get_referer();
@@ -101,54 +108,65 @@
 					exit();
 				}
 
-				wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) );
+				wp_safe_redirect( add_query_arg( array(
+					'updated' => 'true',
+					'action' => $userfunction,
+				), wp_get_referer() ) );
 			} else {
 				$location = network_admin_url( 'users.php' );
 
-				if ( ! empty( $_REQUEST['paged'] ) )
+				if ( ! empty( $_REQUEST['paged'] ) ) {
 					$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
+				}
 				wp_redirect( $location );
-			}
+			}// End if().
 			exit();
 
 		case 'dodelete':
 			check_admin_referer( 'ms-users-delete' );
-			if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) )
+			if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) {
 				wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
+			}
 
 			if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) {
 				foreach ( $_POST['blog'] as $id => $users ) {
 					foreach ( $users as $blogid => $user_id ) {
-						if ( ! current_user_can( 'delete_user', $id ) )
+						if ( ! current_user_can( 'delete_user', $id ) ) {
 							continue;
+						}
 
-						if ( ! empty( $_POST['delete'] ) && 'reassign' == $_POST['delete'][$blogid][$id] )
+						if ( ! empty( $_POST['delete'] ) && 'reassign' == $_POST['delete'][ $blogid ][ $id ] ) {
 							remove_user_from_blog( $id, $blogid, $user_id );
-						else
-							remove_user_from_blog( $id, $blogid );
+						} else { remove_user_from_blog( $id, $blogid );
+						}
 					}
 				}
 			}
 			$i = 0;
-			if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) )
+			if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) ) {
 				foreach ( $_POST['user'] as $id ) {
-					if ( ! current_user_can( 'delete_user', $id ) )
+					if ( ! current_user_can( 'delete_user', $id ) ) {
 						continue;
+					}
 					wpmu_delete_user( $id );
 					$i++;
 				}
+			}
 
-			if ( $i == 1 )
+			if ( $i == 1 ) {
 				$deletefunction = 'delete';
-			else
-				$deletefunction = 'all_delete';
+			} else { $deletefunction = 'all_delete';
+			}
 
-			wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $deletefunction ), network_admin_url( 'users.php' ) ) );
+			wp_redirect( add_query_arg( array(
+				'updated' => 'true',
+				'action' => $deletefunction,
+			), network_admin_url( 'users.php' ) ) );
 			exit();
-	}
-}
+	}// End switch().
+}// End if().
 
-$wp_list_table = _get_list_table('WP_MS_Users_List_Table');
+$wp_list_table = _get_list_table( 'WP_MS_Users_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 $wp_list_table->prepare_items();
 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
@@ -164,20 +182,20 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' =>
-		'<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
-		'<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
-		'<p>' . __('You can also go to the user&#8217;s profile page by clicking on the individual username.') . '</p>' .
+		'<p>' . __( 'This table shows all users across the network and the sites to which they are assigned.' ) . '</p>' .
+		'<p>' . __( 'Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.' ) . '</p>' .
+		'<p>' . __( 'You can also go to the user&#8217;s profile page by clicking on the individual username.' ) . '</p>' .
 		'<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' .
-		'<p>' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '</p>' .
-		'<p>' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '</p>'
+		'<p>' . __( 'The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.' ) . '</p>' .
+		'<p>' . __( 'You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -218,8 +236,8 @@
 	<h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1>
 
 	<?php
-	if ( current_user_can( 'create_users') ) : ?>
-		<a href="<?php echo network_admin_url('user-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
+	if ( current_user_can( 'create_users' ) ) : ?>
+		<a href="<?php echo network_admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
 	endif;
 
 	if ( strlen( $usersearch ) ) {
Index: src/wp-admin/network.php
===================================================================
--- src/wp-admin/network.php	(revision 40901)
+++ src/wp-admin/network.php	(working copy)
@@ -56,24 +56,24 @@
 	$parent_file = 'tools.php';
 }
 
-$network_help = '<p>' . __('This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '</p>' .
-	'<p>' . __('Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your install. Fill out the network details, and click install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).') . '</p>' .
-	'<p>' . __('The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.') . '</p>' .
-	'<p>' . __('Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).') . '</p>' .
-	'<p>' . __('Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.') . '</p>' .
-	'<p>' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with &#8220;/blog/&#8221; from the main site. This disabling will be addressed in a future version.') . '</p>' .
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
+$network_help = '<p>' . __( 'This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.' ) . '</p>' .
+	'<p>' . __( 'Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your install. Fill out the network details, and click install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).' ) . '</p>' .
+	'<p>' . __( 'The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.' ) . '</p>' .
+	'<p>' . __( 'Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).' ) . '</p>' .
+	'<p>' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.' ) . '</p>' .
+	'<p>' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with &#8220;/blog/&#8221; from the main site. This disabling will be addressed in a future version.' ) . '</p>' .
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
 	'<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' .
 	'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'network',
-	'title'   => __('Network'),
+	'title'   => __( 'Network' ),
 	'content' => $network_help,
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
 	'<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' .
 	'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>' .
 	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
@@ -93,14 +93,14 @@
 	// Create network tables.
 	install_network();
 	$base              = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH );
-	$subdomain_install = allow_subdomain_install() ? !empty( $_POST['subdomain_install'] ) : false;
+	$subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false;
 	if ( ! network_domain_check() ) {
 		$result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install );
 		if ( is_wp_error( $result ) ) {
-			if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() )
+			if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() ) {
 				network_step2( $result );
-			else
-				network_step1( $result );
+			} else { network_step1( $result );
+			}
 		} else {
 			network_step2();
 		}
Index: src/wp-admin/options-discussion.php
===================================================================
--- src/wp-admin/options-discussion.php	(revision 40901)
+++ src/wp-admin/options-discussion.php	(working copy)
@@ -8,25 +8,26 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
-$title = __('Discussion Settings');
+$title = __( 'Discussion Settings' );
 $parent_file = 'options-general.php';
 
 add_action( 'admin_print_footer_scripts', 'options_discussion_add_js' );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they won&#8217;t all fit here! :) Use the documentation links to get information on what each discussion setting does.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they won&#8217;t all fit here! :) Use the documentation links to get information on what each discussion setting does.' ) . '</p>' .
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen">Documentation on Discussion Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_Discussion_Screen">Documentation on Discussion Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -36,41 +37,41 @@
 <h1><?php echo esc_html( $title ); ?></h1>
 
 <form method="post" action="options.php">
-<?php settings_fields('discussion'); ?>
+<?php settings_fields( 'discussion' ); ?>
 
 <table class="form-table">
 <tr>
-<th scope="row"><?php _e('Default article settings'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Default article settings'); ?></span></legend>
+<th scope="row"><?php _e( 'Default article settings' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default article settings' ); ?></span></legend>
 <label for="default_pingback_flag">
-<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
-<?php _e('Attempt to notify any blogs linked to from the article'); ?></label>
+<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked( '1', get_option( 'default_pingback_flag' ) ); ?> />
+<?php _e( 'Attempt to notify any blogs linked to from the article' ); ?></label>
 <br />
 <label for="default_ping_status">
-<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
-<?php _e('Allow link notifications from other blogs (pingbacks and trackbacks) on new articles'); ?></label>
+<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked( 'open', get_option( 'default_ping_status' ) ); ?> />
+<?php _e( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles' ); ?></label>
 <br />
 <label for="default_comment_status">
-<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
-<?php _e('Allow people to post comments on new articles'); ?></label>
+<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked( 'open', get_option( 'default_comment_status' ) ); ?> />
+<?php _e( 'Allow people to post comments on new articles' ); ?></label>
 <br />
 <p class="description"><?php echo '(' . __( 'These settings may be overridden for individual articles.' ) . ')'; ?></p>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Other comment settings'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Other comment settings'); ?></span></legend>
-<label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and email'); ?></label>
+<th scope="row"><?php _e( 'Other comment settings' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Other comment settings' ); ?></span></legend>
+<label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked( '1', get_option( 'require_name_email' ) ); ?> /> <?php _e( 'Comment author must fill out name and email' ); ?></label>
 <br />
 <label for="comment_registration">
-<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
-<?php _e('Users must be registered and logged in to comment'); ?>
-<?php if ( !get_option( 'users_can_register' ) && is_multisite() ) echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' ); ?>
+<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked( '1', get_option( 'comment_registration' ) ); ?> />
+<?php _e( 'Users must be registered and logged in to comment' ); ?>
+<?php if ( ! get_option( 'users_can_register' ) && is_multisite() ) { echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' );} ?>
 </label>
 <br />
 
 <label for="close_comments_for_old_posts">
-<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
+<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked( '1', get_option( 'close_comments_for_old_posts' ) ); ?> />
 <?php printf(
 	__( 'Automatically close comments on articles older than %s days' ),
 	'</label> <label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr( get_option( 'close_comments_days_old' ) ) . '" class="small-text" />'
@@ -78,7 +79,7 @@
 </label>
 <br />
 <label for="thread_comments">
-<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
+<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked( '1', get_option( 'thread_comments' ) ); ?> />
 <?php
 /**
  * Filters the maximum depth of threaded/nested comments.
@@ -91,13 +92,14 @@
 
 $thread_comments_depth = '</label> <label for="thread_comments_depth"><select name="thread_comments_depth" id="thread_comments_depth">';
 for ( $i = 2; $i <= $maxdeep; $i++ ) {
-	$thread_comments_depth .= "<option value='" . esc_attr($i) . "'";
-	if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
+	$thread_comments_depth .= "<option value='" . esc_attr( $i ) . "'";
+	if ( get_option( 'thread_comments_depth' ) == $i ) { $thread_comments_depth .= " selected='selected'";
+	}
 	$thread_comments_depth .= ">$i</option>";
 }
 $thread_comments_depth .= '</select>';
 
-printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
+printf( __( 'Enable threaded (nested) comments %s levels deep' ), $thread_comments_depth );
 
 ?></label>
 <br />
@@ -105,10 +107,12 @@
 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked( '1', get_option( 'page_comments' ) ); ?> />
 <?php
 $default_comments_page = '</label> <label for="default_comments_page"><select name="default_comments_page" id="default_comments_page"><option value="newest"';
-if ( 'newest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
-$default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
-if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
-$default_comments_page .= '>' . __('first') . '</option></select>';
+if ( 'newest' == get_option( 'default_comments_page' ) ) { $default_comments_page .= ' selected="selected"';
+}
+$default_comments_page .= '>' . __( 'last' ) . '</option><option value="oldest"';
+if ( 'oldest' == get_option( 'default_comments_page' ) ) { $default_comments_page .= ' selected="selected"';
+}
+$default_comments_page .= '>' . __( 'first' ) . '</option></select>';
 printf(
 	/* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page */
 	__( 'Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default' ),
@@ -120,64 +124,66 @@
 <label for="comment_order"><?php
 
 $comment_order = '<select name="comment_order" id="comment_order"><option value="asc"';
-if ( 'asc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
-$comment_order .= '>' . __('older') . '</option><option value="desc"';
-if ( 'desc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
-$comment_order .= '>' . __('newer') . '</option></select>';
+if ( 'asc' == get_option( 'comment_order' ) ) { $comment_order .= ' selected="selected"';
+}
+$comment_order .= '>' . __( 'older' ) . '</option><option value="desc"';
+if ( 'desc' == get_option( 'comment_order' ) ) { $comment_order .= ' selected="selected"';
+}
+$comment_order .= '>' . __( 'newer' ) . '</option></select>';
 
-printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
+printf( __( 'Comments should be displayed with the %s comments at the top of each page' ), $comment_order );
 
 ?></label>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Email me whenever'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Email me whenever'); ?></span></legend>
+<th scope="row"><?php _e( 'Email me whenever' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Email me whenever' ); ?></span></legend>
 <label for="comments_notify">
-<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
-<?php _e('Anyone posts a comment'); ?> </label>
+<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> />
+<?php _e( 'Anyone posts a comment' ); ?> </label>
 <br />
 <label for="moderation_notify">
-<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
-<?php _e('A comment is held for moderation'); ?> </label>
+<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked( '1', get_option( 'moderation_notify' ) ); ?> />
+<?php _e( 'A comment is held for moderation' ); ?> </label>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Before a comment appears'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Before a comment appears'); ?></span></legend>
+<th scope="row"><?php _e( 'Before a comment appears' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Before a comment appears' ); ?></span></legend>
 <label for="comment_moderation">
-<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
-<?php _e('Comment must be manually approved'); ?> </label>
+<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> />
+<?php _e( 'Comment must be manually approved' ); ?> </label>
 <br />
-<label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment'); ?></label>
+<label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked( '1', get_option( 'comment_whitelist' ) ); ?> /> <?php _e( 'Comment author must have a previously approved comment' ); ?></label>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Comment Moderation'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Moderation'); ?></span></legend>
-<p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ); ?></label></p>
+<th scope="row"><?php _e( 'Comment Moderation' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Moderation' ); ?></span></legend>
+<p><label for="comment_max_links"><?php printf( __( 'Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)' ), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr( get_option( 'comment_max_links' ) ) . '" class="small-text" />' ); ?></label></p>
 
-<p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
+<p><label for="moderation_keys"><?php _e( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
 <p>
 <textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php echo esc_textarea( get_option( 'moderation_keys' ) ); ?></textarea>
 </p>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Comment Blacklist'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Blacklist'); ?></span></legend>
-<p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
+<th scope="row"><?php _e( 'Comment Blacklist' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Blacklist' ); ?></span></legend>
+<p><label for="blacklist_keys"><?php _e( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
 <p>
 <textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
 </p>
 </fieldset></td>
 </tr>
-<?php do_settings_fields('discussion', 'default'); ?>
+<?php do_settings_fields( 'discussion', 'default' ); ?>
 </table>
 
-<h2 class="title"><?php _e('Avatars'); ?></h2>
+<h2 class="title"><?php _e( 'Avatars' ); ?></h2>
 
-<p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.'); ?></p>
+<p><?php _e( 'An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.' ); ?></p>
 
 <?php
 // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that?
@@ -187,52 +193,52 @@
 
 <table class="form-table">
 <tr>
-<th scope="row"><?php _e('Avatar Display'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Avatar Display'); ?></span></legend>
+<th scope="row"><?php _e( 'Avatar Display' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Avatar Display' ); ?></span></legend>
 	<label for="show_avatars">
 		<input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( $show_avatars, 1 ); ?> />
 		<?php _e( 'Show Avatars' ); ?>
 	</label>
 </fieldset></td>
 </tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
-<th scope="row"><?php _e('Maximum Rating'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Maximum Rating'); ?></span></legend>
+<tr class="avatar-settings<?php if ( ! $show_avatars ) { echo ' hide-if-js';} ?>">
+<th scope="row"><?php _e( 'Maximum Rating' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Maximum Rating' ); ?></span></legend>
 
 <?php
 $ratings = array(
 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'G' => __('G &#8212; Suitable for all audiences'),
+	'G' => __( 'G &#8212; Suitable for all audiences' ),
 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'),
+	'PG' => __( 'PG &#8212; Possibly offensive, usually for audiences 13 and above' ),
 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'R' => __('R &#8212; Intended for adult audiences above 17'),
+	'R' => __( 'R &#8212; Intended for adult audiences above 17' ),
 	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'X' => __('X &#8212; Even more mature than above')
+	'X' => __( 'X &#8212; Even more mature than above' ),
 );
-foreach ($ratings as $key => $rating) :
-	$selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
-	echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr($key) . "' $selected/> $rating</label><br />";
+foreach ( $ratings as $key => $rating ) :
+	$selected = (get_option( 'avatar_rating' ) == $key) ? 'checked="checked"' : '';
+	echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr( $key ) . "' $selected/> $rating</label><br />";
 endforeach;
 ?>
 
 </fieldset></td>
 </tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
-<th scope="row"><?php _e('Default Avatar'); ?></th>
-<td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e('Default Avatar'); ?></span></legend>
+<tr class="avatar-settings<?php if ( ! $show_avatars ) { echo ' hide-if-js';} ?>">
+<th scope="row"><?php _e( 'Default Avatar' ); ?></th>
+<td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default Avatar' ); ?></span></legend>
 
-<?php _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email address.'); ?><br />
+<?php _e( 'For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email address.' ); ?><br />
 
 <?php
 $avatar_defaults = array(
-	'mystery' => __('Mystery Person'),
-	'blank' => __('Blank'),
-	'gravatar_default' => __('Gravatar Logo'),
-	'identicon' => __('Identicon (Generated)'),
-	'wavatar' => __('Wavatar (Generated)'),
-	'monsterid' => __('MonsterID (Generated)'),
-	'retro' => __('Retro (Generated)')
+	'mystery' => __( 'Mystery Person' ),
+	'blank' => __( 'Blank' ),
+	'gravatar_default' => __( 'Gravatar Logo' ),
+	'identicon' => __( 'Identicon (Generated)' ),
+	'wavatar' => __( 'Wavatar (Generated)' ),
+	'monsterid' => __( 'MonsterID (Generated)' ),
+	'retro' => __( 'Retro (Generated)' ),
 );
 /**
  * Filters the default avatars.
@@ -253,8 +259,10 @@
 
 foreach ( $avatar_defaults as $default_key => $default_name ) {
 	$selected = ($default == $default_key) ? 'checked="checked" ' : '';
-	$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
-	$avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
+	$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr( $default_key ) . "' {$selected}/> ";
+	$avatar_list .= get_avatar( $user_email, 32, $default_key, '', array(
+		'force_default' => true,
+	) );
 	$avatar_list .= ' ' . $default_name . '</label>';
 	$avatar_list .= '<br />';
 }
@@ -273,10 +281,10 @@
 
 </fieldset></td>
 </tr>
-<?php do_settings_fields('discussion', 'avatars'); ?>
+<?php do_settings_fields( 'discussion', 'avatars' ); ?>
 </table>
 
-<?php do_settings_sections('discussion'); ?>
+<?php do_settings_sections( 'discussion' ); ?>
 
 <?php submit_button(); ?>
 </form>
Index: src/wp-admin/options-general.php
===================================================================
--- src/wp-admin/options-general.php	(revision 40901)
+++ src/wp-admin/options-general.php	(working copy)
@@ -12,22 +12,23 @@
 /** WordPress Translation Install API */
 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
-$title = __('General Settings');
+$title = __( 'General Settings' );
 $parent_file = 'options-general.php';
 /* translators: date and time format for exact current time, mainly about timezones, see https://secure.php.net/date */
-$timezone_format = _x('Y-m-d H:i:s', 'timezone date format');
+$timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format' );
 
-add_action('admin_head', 'options_general_add_js');
+add_action( 'admin_head', 'options_general_add_js' );
 
-$options_help = '<p>' . __('The fields on this screen determine some of the basics of your site setup.') . '</p>' .
-	'<p>' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '</p>';
+$options_help = '<p>' . __( 'The fields on this screen determine some of the basics of your site setup.' ) . '</p>' .
+	'<p>' . __( 'Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.' ) . '</p>';
 
 if ( ! is_multisite() ) {
-	$options_help .= '<p>' . __('The WordPress URL and the Site URL can be the same (example.com) or different; for example, having the WordPress core files (example.com/wordpress) in a subdirectory instead of the root directory.') . '</p>' .
-		'<p>' . __('If you want site visitors to be able to register themselves, as opposed to by the site administrator, check the membership box. A default user role can be set for all new users, whether self-registered or registered by the site admin.') . '</p>';
+	$options_help .= '<p>' . __( 'The WordPress URL and the Site URL can be the same (example.com) or different; for example, having the WordPress core files (example.com/wordpress) in a subdirectory instead of the root directory.' ) . '</p>' .
+		'<p>' . __( 'If you want site visitors to be able to register themselves, as opposed to by the site administrator, check the membership box. A default user role can be set for all new users, whether self-registered or registered by the site admin.' ) . '</p>';
 }
 
 $options_help .= '<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
@@ -36,14 +37,14 @@
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' => $options_help,
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_General_Screen">Documentation on General Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_General_Screen">Documentation on General Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -53,56 +54,56 @@
 <h1><?php echo esc_html( $title ); ?></h1>
 
 <form method="post" action="options.php" novalidate="novalidate">
-<?php settings_fields('general'); ?>
+<?php settings_fields( 'general' ); ?>
 
 <table class="form-table">
 <tr>
-<th scope="row"><label for="blogname"><?php _e('Site Title') ?></label></th>
-<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" class="regular-text" /></td>
+<th scope="row"><label for="blogname"><?php _e( 'Site Title' ) ?></label></th>
+<td><input name="blogname" type="text" id="blogname" value="<?php form_option( 'blogname' ); ?>" class="regular-text" /></td>
 </tr>
 <tr>
-<th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
-<td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
+<th scope="row"><label for="blogdescription"><?php _e( 'Tagline' ) ?></label></th>
+<td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option( 'blogdescription' ); ?>" class="regular-text" />
 <p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ) ?></p></td>
 </tr>
-<?php if ( !is_multisite() ) { ?>
+<?php if ( ! is_multisite() ) { ?>
 <tr>
-<th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th>
-<td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
+<th scope="row"><label for="siteurl"><?php _e( 'WordPress Address (URL)' ) ?></label></th>
+<td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) { echo ' disabled'; } ?>" /></td>
 </tr>
 <tr>
-<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
-<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
+<th scope="row"><label for="home"><?php _e( 'Site Address (URL)' ) ?></label></th>
+<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) { echo ' disabled'; } ?>" />
 <?php if ( ! defined( 'WP_HOME' ) ) : ?>
 <p class="description" id="home-description"><?php _e( 'Enter the address here if you <a href="https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">want your site home page to be different from your WordPress installation directory.</a>' ); ?></p></td>
 <?php endif; ?>
 </tr>
 <tr>
-<th scope="row"><label for="admin_email"><?php _e('Email Address') ?> </label></th>
+<th scope="row"><label for="admin_email"><?php _e( 'Email Address' ) ?> </label></th>
 <td><input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
 <p class="description" id="admin-email-description"><?php _e( 'This address is used for admin purposes, like new user notification.' ) ?></p></td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Membership') ?></th>
-<td> <fieldset><legend class="screen-reader-text"><span><?php _e('Membership') ?></span></legend><label for="users_can_register">
-<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
-<?php _e('Anyone can register') ?></label>
+<th scope="row"><?php _e( 'Membership' ) ?></th>
+<td> <fieldset><legend class="screen-reader-text"><span><?php _e( 'Membership' ) ?></span></legend><label for="users_can_register">
+<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked( '1', get_option( 'users_can_register' ) ); ?> />
+<?php _e( 'Anyone can register' ) ?></label>
 </fieldset></td>
 </tr>
 <tr>
-<th scope="row"><label for="default_role"><?php _e('New User Default Role') ?></label></th>
+<th scope="row"><label for="default_role"><?php _e( 'New User Default Role' ) ?></label></th>
 <td>
-<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
+<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option( 'default_role' ) ); ?></select>
 </td>
 </tr>
 <?php } else { ?>
 <tr>
-<th scope="row"><label for="new_admin_email"><?php _e('Email Address') ?> </label></th>
+<th scope="row"><label for="new_admin_email"><?php _e( 'Email Address' ) ?> </label></th>
 <td><input name="new_admin_email" type="email" id="new_admin_email" aria-describedby="new-admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
 <p class="description" id="new-admin-email-description"><?php _e( 'This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ) ?></p>
 <?php
 $new_admin_email = get_option( 'new_admin_email' );
-if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?>
+if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) : ?>
 <div class="updated inline">
 <p><?php
 	printf(
@@ -120,7 +121,7 @@
 <?php endif; ?>
 </td>
 </tr>
-<?php }
+<?php }// End if().
 
 $languages = get_available_languages();
 $translations = wp_get_available_translations();
@@ -153,41 +154,42 @@
 					|| ! is_multisite() && current_user_can( 'manage_options' ) ) {
 					?>
 					<p class="description">
-						<strong><?php _e( 'Note:' ); ?></strong> <?php printf( __( 'The %s constant in your %s file is no longer needed.' ), '<code>WPLANG</code>', '<code>wp-config.php</code>' ); ?>
+						<strong><?php _e( 'Note:' ); ?></strong> <?php printf( __( 'The %1$s constant in your %2$s file is no longer needed.' ), '<code>WPLANG</code>', '<code>wp-config.php</code>' ); ?>
 					</p>
 					<?php
 				}
-				_deprecated_argument( 'define()', '4.0.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
+				_deprecated_argument( 'define()', '4.0.0', sprintf( __( 'The %1$s constant in your %2$s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
 			}
 			?>
 		</td>
 	</tr>
 	<?php
-}
+}// End if().
 ?>
 <tr>
 <?php
-$current_offset = get_option('gmt_offset');
-$tzstring = get_option('timezone_string');
+$current_offset = get_option( 'gmt_offset' );
+$tzstring = get_option( 'timezone_string' );
 
 $check_zone_info = true;
 
 // Remove old Etc mappings. Fallback to gmt_offset.
-if ( false !== strpos($tzstring,'Etc/GMT') )
+if ( false !== strpos( $tzstring,'Etc/GMT' ) ) {
 	$tzstring = '';
+}
 
-if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
+if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists
 	$check_zone_info = false;
-	if ( 0 == $current_offset )
+	if ( 0 == $current_offset ) {
 		$tzstring = 'UTC+0';
-	elseif ($current_offset < 0)
+	} elseif ( $current_offset < 0 ) {
 		$tzstring = 'UTC' . $current_offset;
-	else
-		$tzstring = 'UTC+' . $current_offset;
+	} else { $tzstring = 'UTC+' . $current_offset;
+	}
 }
 
 ?>
-<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
+<th scope="row"><label for="timezone_string"><?php _e( 'Timezone' ) ?></label></th>
 <td>
 
 <select id="timezone_string" name="timezone_string" aria-describedby="timezone-description">
@@ -209,7 +211,7 @@
 		/* translators: %s: local time */
 		printf( __( 'Local time is %s.' ),
 			'<code>' . date_i18n( $timezone_format ) . '</code>'
-		);
+        );
 	?></span>
 <?php endif; ?>
 </p>
@@ -219,25 +221,25 @@
 <span>
 	<?php
 	// Set TZ so localtime works.
-	date_default_timezone_set($tzstring);
-	$now = localtime(time(), true);
-	if ( $now['tm_isdst'] )
-		_e('This timezone is currently in daylight saving time.');
-	else
-		_e('This timezone is currently in standard time.');
+	date_default_timezone_set( $tzstring );
+	$now = localtime( time(), true );
+	if ( $now['tm_isdst'] ) {
+		_e( 'This timezone is currently in daylight saving time.' );
+	} else { _e( 'This timezone is currently in standard time.' );
+	}
 	?>
 	<br />
 	<?php
 	$allowed_zones = timezone_identifiers_list();
 
-	if ( in_array( $tzstring, $allowed_zones) ) {
+	if ( in_array( $tzstring, $allowed_zones ) ) {
 		$found = false;
-		$date_time_zone_selected = new DateTimeZone($tzstring);
-		$tz_offset = timezone_offset_get($date_time_zone_selected, date_create());
+		$date_time_zone_selected = new DateTimeZone( $tzstring );
+		$tz_offset = timezone_offset_get( $date_time_zone_selected, date_create() );
 		$right_now = time();
-		foreach ( timezone_transitions_get($date_time_zone_selected) as $tr) {
+		foreach ( timezone_transitions_get( $date_time_zone_selected ) as $tr ) {
 			if ( $tr['ts'] > $right_now ) {
-			    $found = true;
+				$found = true;
 				break;
 			}
 		}
@@ -246,7 +248,7 @@
 			echo ' ';
 			$message = $tr['isdst'] ?
 				/* translators: %s: date and time  */
-				__( 'Daylight saving time begins on: %s.')  :
+				__( 'Daylight saving time begins on: %s.' )  :
 				/* translators: %s: date and time  */
 				__( 'Standard time begins on: %s.' );
 			// Add the difference between the current offset and the new offset to ts to get the correct transition time from date_i18n().
@@ -261,7 +263,7 @@
 		}
 	}
 	// Set back to UTC.
-	date_default_timezone_set('UTC');
+	date_default_timezone_set( 'UTC' );
 	?>
 	</span>
 </p>
@@ -270,9 +272,9 @@
 
 </tr>
 <tr>
-<th scope="row"><?php _e('Date Format') ?></th>
+<th scope="row"><?php _e( 'Date Format' ) ?></th>
 <td>
-	<fieldset><legend class="screen-reader-text"><span><?php _e('Date Format') ?></span></legend>
+	<fieldset><legend class="screen-reader-text"><span><?php _e( 'Date Format' ) ?></span></legend>
 <?php
 	/**
 	* Filters the default date formats.
@@ -286,14 +288,14 @@
 
 	$custom = true;
 
-	foreach ( $date_formats as $format ) {
-		echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'";
-		if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "==="
-			echo " checked='checked'";
-			$custom = false;
-		}
-		echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
+foreach ( $date_formats as $format ) {
+	echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'";
+	if ( get_option( 'date_format' ) === $format ) { // checked() uses "==" rather than "==="
+		echo " checked='checked'";
+		$custom = false;
 	}
+	echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
+}
 
 	echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
 	checked( $custom );
@@ -307,9 +309,9 @@
 </td>
 </tr>
 <tr>
-<th scope="row"><?php _e('Time Format') ?></th>
+<th scope="row"><?php _e( 'Time Format' ) ?></th>
 <td>
-	<fieldset><legend class="screen-reader-text"><span><?php _e('Time Format') ?></span></legend>
+	<fieldset><legend class="screen-reader-text"><span><?php _e( 'Time Format' ) ?></span></legend>
 <?php
 	/**
 	* Filters the default time formats.
@@ -322,14 +324,14 @@
 
 	$custom = true;
 
-	foreach ( $time_formats as $format ) {
-		echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
-		if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "==="
-			echo " checked='checked'";
-			$custom = false;
-		}
-		echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
+foreach ( $time_formats as $format ) {
+	echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
+	if ( get_option( 'time_format' ) === $format ) { // checked() uses "==" rather than "==="
+		echo " checked='checked'";
+		$custom = false;
 	}
+	echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
+}
 
 	echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
 	checked( $custom );
@@ -339,13 +341,13 @@
 		'<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' .
 		"<span class='spinner'></span>\n";
 
-	echo "\t<p class='date-time-doc'>" . __('<a href="https://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n";
+	echo "\t<p class='date-time-doc'>" . __( '<a href="https://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.' ) . "</p>\n";
 ?>
 	</fieldset>
 </td>
 </tr>
 <tr>
-<th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>
+<th scope="row"><label for="start_of_week"><?php _e( 'Week Starts On' ) ?></label></th>
 <td><select name="start_of_week" id="start_of_week">
 <?php
 /**
@@ -353,17 +355,17 @@
  */
 global $wp_locale;
 
-for ($day_index = 0; $day_index <= 6; $day_index++) :
-	$selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
-	echo "\n\t<option value='" . esc_attr($day_index) . "' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
+for ( $day_index = 0; $day_index <= 6; $day_index++ ) :
+	$selected = (get_option( 'start_of_week' ) == $day_index) ? 'selected="selected"' : '';
+	echo "\n\t<option value='" . esc_attr( $day_index ) . "' $selected>" . $wp_locale->get_weekday( $day_index ) . '</option>';
 endfor;
 ?>
 </select></td>
 </tr>
-<?php do_settings_fields('general', 'default'); ?>
+<?php do_settings_fields( 'general', 'default' ); ?>
 </table>
 
-<?php do_settings_sections('general'); ?>
+<?php do_settings_sections( 'general' ); ?>
 
 <?php submit_button(); ?>
 </form>
Index: src/wp-admin/options-head.php
===================================================================
--- src/wp-admin/options-head.php	(revision 40901)
+++ src/wp-admin/options-head.php	(working copy)
@@ -12,7 +12,7 @@
 
 if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
 	// For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.
-	add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
+	add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
 }
 
 settings_errors();
Index: src/wp-admin/options-media.php
===================================================================
--- src/wp-admin/options-media.php	(revision 40901)
+++ src/wp-admin/options-media.php	(working copy)
@@ -9,30 +9,31 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
-$title = __('Media Settings');
+$title = __( 'Media Settings' );
 $parent_file = 'options-general.php';
 
-$media_options_help = '<p>' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '</p>';
+$media_options_help = '<p>' . __( 'You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.' ) . '</p>';
 
-if ( ! is_multisite() && ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) ) {
-	$media_options_help .= '<p>' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '</p>';
+if ( ! is_multisite() && ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) ) {
+	$media_options_help .= '<p>' . __( 'Uploading Files allows you to choose the folder and path for storing your uploaded files.' ) . '</p>';
 }
 
-$media_options_help .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>';
+$media_options_help .= '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' => $media_options_help,
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Media_Screen">Documentation on Media Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_Media_Screen">Documentation on Media Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -43,45 +44,45 @@
 <h1><?php echo esc_html( $title ); ?></h1>
 
 <form action="options.php" method="post">
-<?php settings_fields('media'); ?>
+<?php settings_fields( 'media' ); ?>
 
-<h2 class="title"><?php _e('Image sizes') ?></h2>
+<h2 class="title"><?php _e( 'Image sizes' ) ?></h2>
 <p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
 
 <table class="form-table">
 <tr>
-<th scope="row"><?php _e('Thumbnail size') ?></th>
+<th scope="row"><?php _e( 'Thumbnail size' ) ?></th>
 <td>
-<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
-<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
-<label for="thumbnail_size_h"><?php _e('Height'); ?></label>
-<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
-<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
-<label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
+<label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label>
+<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" />
+<label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label>
+<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" /><br />
+<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/>
+<label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label>
 </td>
 </tr>
 
 <tr>
-<th scope="row"><?php _e('Medium size') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
-<label for="medium_size_w"><?php _e('Max Width'); ?></label>
-<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
-<label for="medium_size_h"><?php _e('Max Height'); ?></label>
-<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
+<th scope="row"><?php _e( 'Medium size' ) ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Medium size' ); ?></span></legend>
+<label for="medium_size_w"><?php _e( 'Max Width' ); ?></label>
+<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option( 'medium_size_w' ); ?>" class="small-text" />
+<label for="medium_size_h"><?php _e( 'Max Height' ); ?></label>
+<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option( 'medium_size_h' ); ?>" class="small-text" />
 </fieldset></td>
 </tr>
 
 <tr>
-<th scope="row"><?php _e('Large size') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
-<label for="large_size_w"><?php _e('Max Width'); ?></label>
-<input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
-<label for="large_size_h"><?php _e('Max Height'); ?></label>
-<input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
+<th scope="row"><?php _e( 'Large size' ) ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Large size' ); ?></span></legend>
+<label for="large_size_w"><?php _e( 'Max Width' ); ?></label>
+<input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option( 'large_size_w' ); ?>" class="small-text" />
+<label for="large_size_h"><?php _e( 'Max Height' ); ?></label>
+<input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option( 'large_size_h' ); ?>" class="small-text" />
 </fieldset></td>
 </tr>
 
-<?php do_settings_fields('media', 'default'); ?>
+<?php do_settings_fields( 'media', 'default' ); ?>
 </table>
 
 <?php
@@ -89,22 +90,22 @@
  * @global array $wp_settings
  */
 if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
-<h2 class="title"><?php _e('Embeds') ?></h2>
+<h2 class="title"><?php _e( 'Embeds' ) ?></h2>
 <table class="form-table">
 <?php do_settings_fields( 'media', 'embeds' ); ?>
 </table>
 <?php endif; ?>
 
-<?php if ( !is_multisite() ) : ?>
-<h2 class="title"><?php _e('Uploading Files'); ?></h2>
+<?php if ( ! is_multisite() ) : ?>
+<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
 <table class="form-table">
 <?php
 // If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
-if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) :
+if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
 ?>
 <tr>
-<th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
-<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" />
+<th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
+<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
 <p class="description"><?php
 	/* translators: %s: wp-content/uploads */
 	printf( __( 'Default is %s' ), '<code>wp-content/uploads</code>' );
@@ -113,9 +114,9 @@
 </tr>
 
 <tr>
-<th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
-<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
-<p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p>
+<th scope="row"><label for="upload_url_path"><?php _e( 'Full URL path to files' ); ?></label></th>
+<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option( 'upload_url_path' ) ); ?>" class="regular-text code" />
+<p class="description"><?php _e( 'Configuring this is optional. By default, it should be blank.' ); ?></p>
 </td>
 </tr>
 <tr>
@@ -125,17 +126,17 @@
 <td class="td-full">
 <?php endif; ?>
 <label for="uploads_use_yearmonth_folders">
-<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
-<?php _e('Organize my uploads into month- and year-based folders'); ?>
+<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked( '1', get_option( 'uploads_use_yearmonth_folders' ) ); ?> />
+<?php _e( 'Organize my uploads into month- and year-based folders' ); ?>
 </label>
 </td>
 </tr>
 
-<?php do_settings_fields('media', 'uploads'); ?>
+<?php do_settings_fields( 'media', 'uploads' ); ?>
 </table>
 <?php endif; ?>
 
-<?php do_settings_sections('media'); ?>
+<?php do_settings_sections( 'media' ); ?>
 
 <?php submit_button(); ?>
 
Index: src/wp-admin/options-permalink.php
===================================================================
--- src/wp-admin/options-permalink.php	(revision 40901)
+++ src/wp-admin/options-permalink.php	(working copy)
@@ -9,52 +9,54 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
-$title = __('Permalink Settings');
+$title = __( 'Permalink Settings' );
 $parent_file = 'options-general.php';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change &#8212; hence the name permalink.') . '</p>' .
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change &#8212; hence the name permalink.' ) . '</p>' .
 		'<p>' . __( 'This screen allows you to choose your permalink structure. You can choose from common settings or create custom URL structures.' ) . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'permalink-settings',
-	'title'   => __('Permalink Settings'),
+	'title'   => __( 'Permalink Settings' ),
 	'content' => '<p>' . __( 'Permalinks can contain useful information, such as the post date, title, or other elements. You can choose from any of the suggested permalink formats, or you can craft your own if you select Custom Structure.' ) . '</p>' .
 		'<p>' . __( 'If you pick an option other than Plain, your general URL path with structure tags (terms surrounded by <code>%</code>) will also appear in the custom structure field and your path can be further modified there.' ) . '</p>' .
-		'<p>' . __('When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes <code>%category%</code> or <code>%tag%</code>.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+		'<p>' . __( 'When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes <code>%category%</code> or <code>%tag%</code>.' ) . '</p>' .
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'custom-structures',
-	'title'   => __('Custom Structures'),
-	'content' => '<p>' . __('The Optional fields let you customize the &#8220;category&#8221; and &#8220;tag&#8221; base names that will appear in archive URLs. For example, the page listing all posts in the &#8220;Uncategorized&#8221; category could be <code>/topics/uncategorized</code> instead of <code>/category/uncategorized</code>.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+	'title'   => __( 'Custom Structures' ),
+	'content' => '<p>' . __( 'The Optional fields let you customize the &#8220;category&#8221; and &#8220;tag&#8221; base names that will appear in archive URLs. For example, the page listing all posts in the &#8220;Uncategorized&#8221; category could be <code>/topics/uncategorized</code> instead of <code>/category/uncategorized</code>.' ) . '</p>' .
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Permalinks_Screen">Documentation on Permalinks Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Using_Permalinks">Documentation on Using Permalinks</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_Permalinks_Screen">Documentation on Permalinks Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Using_Permalinks">Documentation on Using Permalinks</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
-add_filter('admin_head', 'options_permalink_add_js');
+add_filter( 'admin_head', 'options_permalink_add_js' );
 
 $home_path = get_home_path();
 $iis7_permalinks = iis7_supports_permalinks();
 $permalink_structure = get_option( 'permalink_structure' );
 
 $prefix = $blog_prefix = '';
-if ( ! got_url_rewrite() )
+if ( ! got_url_rewrite() ) {
 	$prefix = '/index.php';
+}
 
 /**
  * In a subdirectory configuration of multisite, the `/blog` prefix is used by
@@ -71,10 +73,10 @@
 $update_required     = false;
 
 if ( $iis7_permalinks ) {
-	if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
+	if ( ( ! file_exists( $home_path . 'web.config' ) && win_is_writable( $home_path ) ) || win_is_writable( $home_path . 'web.config' ) ) {
 		$writable = true;
-	else
-		$writable = false;
+	} else { $writable = false;
+	}
 } elseif ( $is_nginx ) {
 	$writable = false;
 } else {
@@ -90,21 +92,21 @@
 
 $using_index_permalinks = $wp_rewrite->using_index_permalinks();
 
-if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
-	check_admin_referer('update-permalink');
+if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) ) {
+	check_admin_referer( 'update-permalink' );
 
 	if ( isset( $_POST['permalink_structure'] ) ) {
-		if ( isset( $_POST['selection'] ) && 'custom' != $_POST['selection'] )
+		if ( isset( $_POST['selection'] ) && 'custom' != $_POST['selection'] ) {
 			$permalink_structure = $_POST['selection'];
-		else
-			$permalink_structure = $_POST['permalink_structure'];
+		} else { $permalink_structure = $_POST['permalink_structure'];
+		}
 
 		if ( ! empty( $permalink_structure ) ) {
 			$permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
-			if ( $prefix && $blog_prefix )
+			if ( $prefix && $blog_prefix ) {
 				$permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure );
-			else
-				$permalink_structure = $blog_prefix . $permalink_structure;
+			} else { $permalink_structure = $blog_prefix . $permalink_structure;
+			}
 		}
 
 		$permalink_structure = sanitize_option( 'permalink_structure', $permalink_structure );
@@ -114,15 +116,17 @@
 
 	if ( isset( $_POST['category_base'] ) ) {
 		$category_base = $_POST['category_base'];
-		if ( ! empty( $category_base ) )
-			$category_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $category_base ) );
+		if ( ! empty( $category_base ) ) {
+			$category_base = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $category_base ) );
+		}
 		$wp_rewrite->set_category_base( $category_base );
 	}
 
 	if ( isset( $_POST['tag_base'] ) ) {
 		$tag_base = $_POST['tag_base'];
-		if ( ! empty( $tag_base ) )
-			$tag_base = $blog_prefix . preg_replace('#/+#', '/', '/' . str_replace( '#', '', $tag_base ) );
+		if ( ! empty( $tag_base ) ) {
+			$tag_base = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $tag_base ) );
+		}
 		$wp_rewrite->set_tag_base( $tag_base );
 	}
 
@@ -146,7 +150,7 @@
 
 	wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) );
 	exit;
-}
+}// End if().
 
 flush_rewrite_rules();
 
@@ -156,7 +160,7 @@
 <h1><?php echo esc_html( $title ); ?></h1>
 
 <form name="form" action="options-permalink.php" method="post">
-<?php wp_nonce_field('update-permalink') ?>
+<?php wp_nonce_field( 'update-permalink' ) ?>
 
   <p><?php _e( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="https://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.' ); ?></p>
 
@@ -175,93 +179,94 @@
 	4 => $prefix . '/%postname%/',
 );
 ?>
-<h2 class="title"><?php _e('Common Settings'); ?></h2>
+<h2 class="title"><?php _e( 'Common Settings' ); ?></h2>
 <table class="form-table permalink-structure">
 	<tr>
-		<th><label><input name="selection" type="radio" value="" <?php checked('', $permalink_structure); ?> /> <?php _e( 'Plain' ); ?></label></th>
-		<td><code><?php echo get_option('home'); ?>/?p=123</code></td>
+		<th><label><input name="selection" type="radio" value="" <?php checked( '', $permalink_structure ); ?> /> <?php _e( 'Plain' ); ?></label></th>
+		<td><code><?php echo get_option( 'home' ); ?>/?p=123</code></td>
 	</tr>
 	<tr>
-		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[1]); ?>" <?php checked($structures[1], $permalink_structure); ?> /> <?php _e('Day and name'); ?></label></th>
-		<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
+		<th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[1] ); ?>" <?php checked( $structures[1], $permalink_structure ); ?> /> <?php _e( 'Day and name' ); ?></label></th>
+		<td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . date( 'Y' ) . '/' . date( 'm' ) . '/' . date( 'd' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
 	</tr>
 	<tr>
-		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[2]); ?>" <?php checked($structures[2], $permalink_structure); ?> /> <?php _e('Month and name'); ?></label></th>
-		<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
+		<th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[2] ); ?>" <?php checked( $structures[2], $permalink_structure ); ?> /> <?php _e( 'Month and name' ); ?></label></th>
+		<td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . date( 'Y' ) . '/' . date( 'm' ) . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
 	</tr>
 	<tr>
-		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[3]); ?>" <?php checked($structures[3], $permalink_structure); ?> /> <?php _e('Numeric'); ?></label></th>
-		<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/123'; ?></code></td>
+		<th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[3] ); ?>" <?php checked( $structures[3], $permalink_structure ); ?> /> <?php _e( 'Numeric' ); ?></label></th>
+		<td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/123'; ?></code></td>
 	</tr>
 	<tr>
-		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[4]); ?>" <?php checked($structures[4], $permalink_structure); ?> /> <?php _e('Post name'); ?></label></th>
-		<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
+		<th><label><input name="selection" type="radio" value="<?php echo esc_attr( $structures[4] ); ?>" <?php checked( $structures[4], $permalink_structure ); ?> /> <?php _e( 'Post name' ); ?></label></th>
+		<td><code><?php echo get_option( 'home' ) . $blog_prefix . $prefix . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
 	</tr>
 	<tr>
 		<th>
-			<label><input name="selection" id="custom_selection" type="radio" value="custom" <?php checked( !in_array($permalink_structure, $structures) ); ?> />
-			<?php _e('Custom Structure'); ?>
+			<label><input name="selection" id="custom_selection" type="radio" value="custom" <?php checked( ! in_array( $permalink_structure, $structures ) ); ?> />
+			<?php _e( 'Custom Structure' ); ?>
 			</label>
 		</th>
 		<td>
-			<code><?php echo get_option('home') . $blog_prefix; ?></code>
-			<input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" />
+			<code><?php echo get_option( 'home' ) . $blog_prefix; ?></code>
+			<input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr( $permalink_structure ); ?>" class="regular-text code" />
 		</td>
 	</tr>
 </table>
 
-<h2 class="title"><?php _e('Optional'); ?></h2>
+<h2 class="title"><?php _e( 'Optional' ); ?></h2>
 <p><?php
 /* translators: %s is a placeholder that must come at the start of the URL. */
 printf( __( 'If you like, you may enter custom structures for your category and tag URLs here. For example, using <code>topics</code> as your category base would make your category links like <code>%s/topics/uncategorized/</code>. If you leave these blank the defaults will be used.' ), get_option( 'home' ) . $blog_prefix . $prefix ); ?></p>
 
 <table class="form-table">
 	<tr>
-		<th><label for="category_base"><?php /* translators: prefix for category permalinks */ _e('Category base'); ?></label></th>
+		<th><label for="category_base"><?php /* translators: prefix for category permalinks */ _e( 'Category base' ); ?></label></th>
 		<td><?php echo $blog_prefix; ?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>
 	</tr>
 	<tr>
-		<th><label for="tag_base"><?php _e('Tag base'); ?></label></th>
-		<td><?php echo $blog_prefix; ?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
+		<th><label for="tag_base"><?php _e( 'Tag base' ); ?></label></th>
+		<td><?php echo $blog_prefix; ?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr( $tag_base ); ?>" class="regular-text code" /></td>
 	</tr>
-	<?php do_settings_fields('permalink', 'optional'); ?>
+	<?php do_settings_fields( 'permalink', 'optional' ); ?>
 </table>
 
-<?php do_settings_sections('permalink'); ?>
+<?php do_settings_sections( 'permalink' ); ?>
 
 <?php submit_button(); ?>
   </form>
-<?php if ( !is_multisite() ) { ?>
+<?php if ( ! is_multisite() ) { ?>
 <?php if ( $iis7_permalinks ) :
-	if ( isset($_POST['submit']) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
-		if ( file_exists($home_path . 'web.config') ) : ?>
-<p><?php _e('If your <code>web.config</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.') ?></p>
+	if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
+		if ( file_exists( $home_path . 'web.config' ) ) : ?>
+<p><?php _e( 'If your <code>web.config</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.' ) ?></p>
 <form action="options-permalink.php" method="post">
-<?php wp_nonce_field('update-permalink') ?>
+<?php wp_nonce_field( 'update-permalink' ) ?>
 	<p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
 </form>
-<p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p>
+<p><?php _e( 'If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.' ) ?></p>
 		<?php else : ?>
-<p><?php _e('If the root directory of your site were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Create a new file, called <code>web.config</code> in the root directory of your site. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this code into the <code>web.config</code> file.') ?></p>
+<p><?php _e( 'If the root directory of your site were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Create a new file, called <code>web.config</code> in the root directory of your site. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this code into the <code>web.config</code> file.' ) ?></p>
 <form action="options-permalink.php" method="post">
-<?php wp_nonce_field('update-permalink') ?>
-	<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules(true) ); ?></textarea></p>
+<?php wp_nonce_field( 'update-permalink' ) ?>
+	<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
 </form>
-<p><?php _e('If you temporarily make your site&#8217;s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p>
+<p><?php _e( 'If you temporarily make your site&#8217;s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.' ) ?></p>
 		<?php endif; ?>
 	<?php endif; ?>
 <?php elseif ( $is_nginx ) : ?>
 	<p><?php _e( '<a href="https://codex.wordpress.org/Nginx">Documentation on Nginx configuration</a>.' ); ?></p>
-<?php else:
+<?php else :
 	if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) : ?>
-<p><?php _e('If your <code>.htaccess</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
+<p><?php _e( 'If your <code>.htaccess</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.' ) ?></p>
 <form action="options-permalink.php" method="post">
-<?php wp_nonce_field('update-permalink') ?>
+<?php wp_nonce_field( 'update-permalink' ) ?>
 	<p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>
 </form>
 	<?php endif; ?>
 <?php endif; ?>
-<?php } // multisite ?>
+<?php } // End if().
+?>
 
 </div>
 
Index: src/wp-admin/options-reading.php
===================================================================
--- src/wp-admin/options-reading.php	(revision 40901)
+++ src/wp-admin/options-reading.php	(working copy)
@@ -9,21 +9,22 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
 $title = __( 'Reading Settings' );
 $parent_file = 'options-general.php';
 
-add_action('admin_head', 'options_reading_add_js');
+add_action( 'admin_head', 'options_reading_add_js' );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' .
-		'<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>' .
-		'<p>' . __('You can also control the display of your content in RSS feeds, including the maximum number of posts to display and whether to show full text or a summary.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'This screen contains the settings that affect the display of your content.' ) . '</p>' .
+		'<p>' . sprintf( __( 'You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.' ), 'post-new.php?post_type=page' ) . '</p>' .
+		'<p>' . __( 'You can also control the display of your content in RSS feeds, including the maximum number of posts to display and whether to show full text or a summary.' ) . '</p>' .
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 get_current_screen()->add_help_tab( array(
@@ -34,9 +35,9 @@
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Reading_Screen">Documentation on Reading Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_Reading_Screen">Documentation on Reading Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -49,21 +50,25 @@
 <?php
 settings_fields( 'reading' );
 
-if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
-	add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
+if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
+	add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array(
+		'label_for' => 'blog_charset',
+	) );
+}
 ?>
 
 <?php if ( ! get_pages() ) : ?>
 <input name="show_on_front" type="hidden" value="posts" />
 <table class="form-table">
 <?php
-	if ( 'posts' != get_option( 'show_on_front' ) ) :
-		update_option( 'show_on_front', 'posts' );
+if ( 'posts' != get_option( 'show_on_front' ) ) :
+	update_option( 'show_on_front', 'posts' );
 	endif;
 
 else :
-	if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
+	if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) {
 		update_option( 'show_on_front', 'posts' );
+	}
 ?>
 <table class="form-table">
 <tr>
@@ -80,8 +85,20 @@
 	</label>
 	</p>
 <ul>
-	<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
-	<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
+	<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array(
+		'name' => 'page_on_front',
+		'echo' => 0,
+		'show_option_none' => __( '&mdash; Select &mdash;' ),
+		'option_none_value' => '0',
+		'selected' => get_option( 'page_on_front' ),
+	) ) ); ?></label></li>
+	<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array(
+		'name' => 'page_for_posts',
+		'echo' => 0,
+		'show_option_none' => __( '&mdash; Select &mdash;' ),
+		'option_none_value' => '0',
+		'selected' => get_option( 'page_for_posts' ),
+	) ) ); ?></label></li>
 </ul>
 <?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
 <div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
@@ -111,9 +128,9 @@
 <th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
 <td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
 <?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
-	<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
+	<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( '1', get_option( 'blog_public' ) ); ?> />
 	<label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
-	<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
+	<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />
 	<label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
 	<p class="description"><?php _e( 'Note: Neither of these options blocks access to your site &mdash; it is up to search engines to honor your request.' ); ?></p>
 	<?php
Index: src/wp-admin/options-writing.php
===================================================================
--- src/wp-admin/options-writing.php	(revision 40901)
+++ src/wp-admin/options-writing.php	(working copy)
@@ -9,17 +9,18 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can( 'manage_options' ) )
+if ( ! current_user_can( 'manage_options' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
+}
 
-$title = __('Writing Settings');
+$title = __( 'Writing Settings' );
 $parent_file = 'options-general.php';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+	'title'   => __( 'Overview' ),
+	'content' => '<p>' . __( 'You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.' ) . '</p>' .
+		'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 ) );
 
 /** This filter is documented in wp-admin/options.php */
@@ -41,9 +42,9 @@
 }
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -53,25 +54,31 @@
 <h1><?php echo esc_html( $title ); ?></h1>
 
 <form method="post" action="options.php">
-<?php settings_fields('writing'); ?>
+<?php settings_fields( 'writing' ); ?>
 
 <table class="form-table">
 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?>
 <tr>
-<th scope="row"><?php _e('Formatting') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend>
+<th scope="row"><?php _e( 'Formatting' ) ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting' ) ?></span></legend>
 <label for="use_smilies">
-<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> />
-<?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
-<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_option('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
+<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option( 'use_smilies' ) ); ?> />
+<?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display' ) ?></label><br />
+<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option( 'use_balanceTags' ) ); ?> /> <?php _e( 'WordPress should correct invalidly nested XHTML automatically' ) ?></label>
 </fieldset></td>
 </tr>
 <?php endif; ?>
 <tr>
-<th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th>
+<th scope="row"><label for="default_category"><?php _e( 'Default Post Category' ) ?></label></th>
 <td>
 <?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true));
+wp_dropdown_categories( array(
+	'hide_empty' => 0,
+	'name' => 'default_category',
+	'orderby' => 'name',
+	'selected' => get_option( 'default_category' ),
+	'hierarchical' => true,
+) );
 ?>
 </td>
 </tr>
@@ -80,11 +87,11 @@
 unset( $post_formats['standard'] );
 ?>
 <tr>
-<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
+<th scope="row"><label for="default_post_format"><?php _e( 'Default Post Format' ) ?></label></th>
 <td>
 	<select name="default_post_format" id="default_post_format">
 		<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
-<?php foreach ( $post_formats as $format_slug => $format_name ): ?>
+<?php foreach ( $post_formats as $format_slug => $format_name ) : ?>
 		<option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option>
 <?php endforeach; ?>
 	</select>
@@ -94,18 +101,25 @@
 if ( get_option( 'link_manager_enabled' ) ) :
 ?>
 <tr>
-<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
+<th scope="row"><label for="default_link_category"><?php _e( 'Default Link Category' ) ?></label></th>
 <td>
 <?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_link_category', 'orderby' => 'name', 'selected' => get_option('default_link_category'), 'hierarchical' => true, 'taxonomy' => 'link_category'));
+wp_dropdown_categories( array(
+	'hide_empty' => 0,
+	'name' => 'default_link_category',
+	'orderby' => 'name',
+	'selected' => get_option( 'default_link_category' ),
+	'hierarchical' => true,
+	'taxonomy' => 'link_category',
+) );
 ?>
 </td>
 </tr>
 <?php endif; ?>
 
 <?php
-do_settings_fields('writing', 'default');
-do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
+do_settings_fields( 'writing', 'default' );
+do_settings_fields( 'writing', 'remote_publishing' ); // A deprecated section.
 ?>
 </table>
 
@@ -126,33 +140,40 @@
 
 <table class="form-table">
 <tr>
-<th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th>
-<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" />
-<label for="mailserver_port"><?php _e('Port') ?></label>
-<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" />
+<th scope="row"><label for="mailserver_url"><?php _e( 'Mail Server' ) ?></label></th>
+<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option( 'mailserver_url' ); ?>" class="regular-text code" />
+<label for="mailserver_port"><?php _e( 'Port' ) ?></label>
+<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option( 'mailserver_port' ); ?>" class="small-text" />
 </td>
 </tr>
 <tr>
-<th scope="row"><label for="mailserver_login"><?php _e('Login Name') ?></label></th>
-<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" class="regular-text ltr" /></td>
+<th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ) ?></label></th>
+<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td>
 </tr>
 <tr>
-<th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th>
+<th scope="row"><label for="mailserver_pass"><?php _e( 'Password' ) ?></label></th>
 <td>
-<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" />
+<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option( 'mailserver_pass' ); ?>" class="regular-text ltr" />
 </td>
 </tr>
 <tr>
-<th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th>
+<th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ) ?></label></th>
 <td>
 <?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true));
+wp_dropdown_categories( array(
+	'hide_empty' => 0,
+	'name' => 'default_email_category',
+	'orderby' => 'name',
+	'selected' => get_option( 'default_email_category' ),
+	'hierarchical' => true,
+) );
 ?>
 </td>
 </tr>
-<?php do_settings_fields('writing', 'post_via_email'); ?>
+<?php do_settings_fields( 'writing', 'post_via_email' ); ?>
 </table>
-<?php } ?>
+<?php }// End if().
+	?>
 
 <?php
 /**
@@ -166,20 +187,21 @@
 ?>
 <h2 class="title"><?php _e( 'Update Services' ) ?></h2>
 
-<?php if ( 1 == get_option('blog_public') ) : ?>
+<?php if ( 1 == get_option( 'blog_public' ) ) : ?>
 
 <p><label for="ping_sites"><?php _e( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="https://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ) ?></label></p>
 
-<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
+<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option( 'ping_sites' ) ); ?></textarea>
 
 <?php else : ?>
 
-	<p><?php printf(__('WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site&#8217;s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p>
+	<p><?php printf( __( 'WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site&#8217;s <a href="%s">visibility settings</a>.' ), 'options-reading.php' ); ?></p>
 
 <?php endif; ?>
-<?php } // multisite ?>
+<?php } // End if().
+?>
 
-<?php do_settings_sections('writing'); ?>
+<?php do_settings_sections( 'writing' ); ?>
 
 <?php submit_button(); ?>
 </form>
Index: src/wp-admin/options.php
===================================================================
--- src/wp-admin/options.php	(revision 40901)
+++ src/wp-admin/options.php	(working copy)
@@ -18,16 +18,16 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-$title = __('Settings');
+$title = __( 'Settings' );
 $this_file = 'options.php';
 $parent_file = 'options-general.php';
 
-wp_reset_vars(array('action', 'option_page'));
+wp_reset_vars( array( 'action', 'option_page' ) );
 
 $capability = 'manage_options';
 
 // This is for back compat and will eventually be removed.
-if ( empty($option_page) ) {
+if ( empty( $option_page ) ) {
 	$option_page = 'options';
 } else {
 
@@ -54,11 +54,11 @@
 
 // Handle admin email change requests
 if ( is_multisite() ) {
-	if ( ! empty($_GET[ 'adminhash' ] ) ) {
+	if ( ! empty( $_GET['adminhash'] ) ) {
 		$new_admin_details = get_option( 'adminhash' );
 		$redirect = 'options-general.php?updated=false';
-		if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'adminhash' ] ) && !empty($new_admin_details[ 'newemail' ]) ) {
-			update_option( 'admin_email', $new_admin_details[ 'newemail' ] );
+		if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details['hash'], $_GET['adminhash'] ) && ! empty( $new_admin_details['newemail'] ) ) {
+			update_option( 'admin_email', $new_admin_details['newemail'] );
 			delete_option( 'adminhash' );
 			delete_option( 'new_admin_email' );
 			$redirect = 'options-general.php?updated=true';
@@ -87,37 +87,40 @@
 	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
 	'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
 	'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ),
-	'writing' => array( 'default_category', 'default_email_category', 'default_link_category', 'default_post_format' )
+	'writing' => array( 'default_category', 'default_email_category', 'default_link_category', 'default_post_format' ),
 );
 $whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array();
 
-$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
+$mail_options = array( 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass' );
 
-if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
+if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
 	$whitelist_options['reading'][] = 'blog_charset';
+}
 
 if ( get_site_option( 'initial_db_version' ) < 32453 ) {
 	$whitelist_options['writing'][] = 'use_smilies';
 	$whitelist_options['writing'][] = 'use_balanceTags';
 }
 
-if ( !is_multisite() ) {
-	if ( !defined( 'WP_SITEURL' ) )
+if ( ! is_multisite() ) {
+	if ( ! defined( 'WP_SITEURL' ) ) {
 		$whitelist_options['general'][] = 'siteurl';
-	if ( !defined( 'WP_HOME' ) )
+	}
+	if ( ! defined( 'WP_HOME' ) ) {
 		$whitelist_options['general'][] = 'home';
+	}
 
 	$whitelist_options['general'][] = 'admin_email';
 	$whitelist_options['general'][] = 'users_can_register';
 	$whitelist_options['general'][] = 'default_role';
 
-	$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
+	$whitelist_options['writing'] = array_merge( $whitelist_options['writing'], $mail_options );
 	$whitelist_options['writing'][] = 'ping_sites';
 
 	$whitelist_options['media'][] = 'uploads_use_yearmonth_folders';
 
 	// If upload_url_path and upload_path are both default values, they're locked.
-	if ( get_option( 'upload_url_path' ) || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) {
+	if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) {
 		$whitelist_options['media'][] = 'upload_path';
 		$whitelist_options['media'][] = 'upload_url_path';
 	}
@@ -131,9 +134,10 @@
 	 *
 	 * @param bool $enabled Whether post-by-email configuration is enabled. Default true.
 	 */
-	if ( apply_filters( 'enable_post_by_email_configuration', true ) )
-		$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
-}
+	if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
+		$whitelist_options['writing'] = array_merge( $whitelist_options['writing'], $mail_options );
+	}
+}// End if().
 
 /**
  * Filters the options white list.
@@ -148,7 +152,7 @@
  * If $_GET['action'] == 'update' we are saving settings sent from a settings page
  */
 if ( 'update' == $action ) {
-	if ( 'options' == $option_page && !isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed.
+	if ( 'options' == $option_page && ! isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed.
 		$unregistered = true;
 		check_admin_referer( 'update-options' );
 	} else {
@@ -156,28 +160,31 @@
 		check_admin_referer( $option_page . '-options' );
 	}
 
-	if ( !isset( $whitelist_options[ $option_page ] ) )
+	if ( ! isset( $whitelist_options[ $option_page ] ) ) {
 		wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
+	}
 
 	if ( 'options' == $option_page ) {
 		if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) {
 			wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
 		}
-		$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
+		$options = explode( ',', wp_unslash( $_POST['page_options'] ) );
 	} else {
 		$options = $whitelist_options[ $option_page ];
 	}
 
 	if ( 'general' == $option_page ) {
 		// Handle custom date/time formats.
-		if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) )
+		if ( ! empty( $_POST['date_format'] ) && isset( $_POST['date_format_custom'] ) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) ) {
 			$_POST['date_format'] = $_POST['date_format_custom'];
-		if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) )
+		}
+		if ( ! empty( $_POST['time_format'] ) && isset( $_POST['time_format_custom'] ) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) ) {
 			$_POST['time_format'] = $_POST['time_format_custom'];
+		}
 		// Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
-		if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) {
+		if ( ! empty( $_POST['timezone_string'] ) && preg_match( '/^UTC[+-]/', $_POST['timezone_string'] ) ) {
 			$_POST['gmt_offset'] = $_POST['timezone_string'];
-			$_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']);
+			$_POST['gmt_offset'] = preg_replace( '/UTC\+?/', '', $_POST['gmt_offset'] );
 			$_POST['timezone_string'] = '';
 		}
 
@@ -227,18 +234,19 @@
 		 */
 		unset( $GLOBALS['locale'] );
 		$user_language_new = get_user_locale();
-		if ( $user_language_old !== $user_language_new  ) {
+		if ( $user_language_old !== $user_language_new ) {
 			load_default_textdomain( $user_language_new );
 		}
-	}
+	}// End if().
 
 	/**
 	 * Handle settings errors and return to options page
 	 */
 	// If no settings errors were registered add a general 'updated' message.
-	if ( !count( get_settings_errors() ) )
-		add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
-	set_transient('settings_errors', get_settings_errors(), 30);
+	if ( ! count( get_settings_errors() ) ) {
+		add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
+	}
+	set_transient( 'settings_errors', get_settings_errors(), 30 );
 
 	/**
 	 * Redirect back to the settings page that was submitted
@@ -246,14 +254,14 @@
 	$goback = add_query_arg( 'settings-updated', 'true',  wp_get_referer() );
 	wp_redirect( $goback );
 	exit;
-}
+}// End if().
 
 include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
 
 <div class="wrap">
   <h1><?php esc_html_e( 'All Settings' ); ?></h1>
   <form name="form" action="options.php" method="post" id="all-options">
-  <?php wp_nonce_field('options-options') ?>
+	<?php wp_nonce_field( 'options-options' ) ?>
   <input type="hidden" name="action" value="update" />
   <input type="hidden" name="option_page" value="options" />
   <table class="form-table">
@@ -262,8 +270,9 @@
 
 foreach ( (array) $options as $option ) :
 	$disabled = false;
-	if ( $option->option_name == '' )
+	if ( $option->option_name == '' ) {
 		continue;
+	}
 	if ( is_serialized( $option->option_value ) ) {
 		if ( is_serialized_string( $option->option_value ) ) {
 			// This is a serialized string, so we should display it.
@@ -289,7 +298,7 @@
 	<textarea class="<?php echo $class ?>" name="<?php echo $name ?>" id="<?php echo $name ?>" cols="30" rows="5"><?php
 		echo esc_textarea( $value );
 	?></textarea>
-	<?php else: ?>
+	<?php else : ?>
 		<input class="regular-text <?php echo $class ?>" type="text" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"<?php disabled( $disabled, true ) ?> />
 	<?php endif ?></td>
 </tr>
Index: src/wp-admin/plugin-editor.php
===================================================================
--- src/wp-admin/plugin-editor.php	(revision 40901)
+++ src/wp-admin/plugin-editor.php	(working copy)
@@ -14,10 +14,11 @@
 	exit();
 }
 
-if ( !current_user_can('edit_plugins') )
-	wp_die( __('Sorry, you are not allowed to edit plugins for this site.') );
+if ( ! current_user_can( 'edit_plugins' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to edit plugins for this site.' ) );
+}
 
-$title = __("Edit Plugins");
+$title = __( 'Edit Plugins' );
 $parent_file = 'plugins.php';
 
 $plugins = get_plugins();
@@ -53,24 +54,25 @@
 	}
 }
 
-$plugin_files = get_plugin_files($plugin);
+$plugin_files = get_plugin_files( $plugin );
 
-if ( empty($file) )
+if ( empty( $file ) ) {
 	$file = $plugin_files[0];
+}
 
-$file = validate_file_to_edit($file, $plugin_files);
+$file = validate_file_to_edit( $file, $plugin_files );
 $real_file = WP_PLUGIN_DIR . '/' . $file;
-$scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0;
+$scrollto = isset( $_REQUEST['scrollto'] ) ? (int) $_REQUEST['scrollto'] : 0;
 
 if ( isset( $_REQUEST['action'] ) && 'update' === $_REQUEST['action'] ) {
 
-	check_admin_referer('edit-plugin_' . $file);
+	check_admin_referer( 'edit-plugin_' . $file );
 
 	$newcontent = wp_unslash( $_POST['newcontent'] );
-	if ( is_writeable($real_file) ) {
-		$f = fopen($real_file, 'w+');
-		fwrite($f, $newcontent);
-		fclose($f);
+	if ( is_writeable( $real_file ) ) {
+		$f = fopen( $real_file, 'w+' );
+		fwrite( $f, $newcontent );
+		fclose( $f );
 
 		$network_wide = is_plugin_active_for_network( $file );
 
@@ -81,9 +83,13 @@
 			}
 
 			if ( ! is_network_admin() ) {
-				update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) );
+				update_option( 'recently_activated', array(
+					$file => time(),
+				) + (array) get_option( 'recently_activated' ) );
 			} else {
-				update_site_option( 'recently_activated', array( $file => time() ) + (array) get_site_option( 'recently_activated' ) );
+				update_site_option( 'recently_activated', array(
+					$file => time(),
+				) + (array) get_site_option( 'recently_activated' ) );
 			}
 
 			wp_redirect( add_query_arg( '_wpnonce', wp_create_nonce( 'edit-plugin-test_' . $file ), "plugin-editor.php?file=$file&plugin=$plugin&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide ) );
@@ -97,8 +103,8 @@
 
 } else {
 
-	if ( isset($_GET['liveupdate']) ) {
-		check_admin_referer('edit-plugin-test_' . $file);
+	if ( isset( $_GET['liveupdate'] ) ) {
+		check_admin_referer( 'edit-plugin-test_' . $file );
 
 		$error = validate_plugin( $plugin );
 
@@ -108,14 +114,14 @@
 
 		if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network( $file ) ) || ! is_plugin_active( $file ) ) {
 			activate_plugin( $plugin, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) );
-		} // we'll override this later if the plugin can be included without fatal error
+		} // End if().
 
-		wp_redirect( self_admin_url("plugin-editor.php?file=$file&plugin=$plugin&a=te&scrollto=$scrollto") );
+		wp_redirect( self_admin_url( "plugin-editor.php?file=$file&plugin=$plugin&a=te&scrollto=$scrollto" ) );
 		exit;
 	}
 
 	// List of allowable extensions
-	$editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include');
+	$editable_extensions = array( 'php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include' );
 
 	/**
 	 * Filters file type extensions editable in the plugin editor.
@@ -126,50 +132,51 @@
 	 */
 	$editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions );
 
-	if ( ! is_file($real_file) ) {
-		wp_die(sprintf('<p>%s</p>', __('No such file exists! Double check the name and try again.')));
+	if ( ! is_file( $real_file ) ) {
+		wp_die( sprintf( '<p>%s</p>', __( 'No such file exists! Double check the name and try again.' ) ) );
 	} else {
 		// Get the extension of the file
-		if ( preg_match('/\.([^.]+)$/', $real_file, $matches) ) {
-			$ext = strtolower($matches[1]);
+		if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) {
+			$ext = strtolower( $matches[1] );
 			// If extension is not in the acceptable list, skip it
-			if ( !in_array( $ext, $editable_extensions) )
-				wp_die(sprintf('<p>%s</p>', __('Files of this type are not editable.')));
+			if ( ! in_array( $ext, $editable_extensions ) ) {
+				wp_die( sprintf( '<p>%s</p>', __( 'Files of this type are not editable.' ) ) );
+			}
 		}
 	}
 
 	get_current_screen()->add_help_tab( array(
-	'id'		=> 'overview',
-	'title'		=> __('Overview'),
-	'content'	=>
-		'<p>' . __('You can use the editor to make changes to any of your plugins&#8217; individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '</p>' .
-		'<p>' . __('Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don&#8217;t forget to save your changes (Update File) when you&#8217;re finished.') . '</p>' .
-		'<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.') . '</p>' .
+		'id'		=> 'overview',
+		'title'		=> __( 'Overview' ),
+		'content'	=>
+		'<p>' . __( 'You can use the editor to make changes to any of your plugins&#8217; individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.' ) . '</p>' .
+		'<p>' . __( 'Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don&#8217;t forget to save your changes (Update File) when you&#8217;re finished.' ) . '</p>' .
+		'<p>' . __( 'The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.' ) . '</p>' .
 		'<p id="newcontent-description">' . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.' ) . '</p>' .
-		'<p>' . __('If you want to make changes but don&#8217;t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' .
-		( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' )
+		'<p>' . __( 'If you want to make changes but don&#8217;t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.' ) . '</p>' .
+		( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ),
 	) );
 
 	get_current_screen()->set_help_sidebar(
-		'<p><strong>' . __('For more information:') . '</strong></p>' .
-		'<p>' . __('<a href="https://codex.wordpress.org/Plugins_Editor_Screen">Documentation on Editing Plugins</a>') . '</p>' .
-		'<p>' . __('<a href="https://codex.wordpress.org/Writing_a_Plugin">Documentation on Writing Plugins</a>') . '</p>' .
-		'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+		'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+		'<p>' . __( '<a href="https://codex.wordpress.org/Plugins_Editor_Screen">Documentation on Editing Plugins</a>' ) . '</p>' .
+		'<p>' . __( '<a href="https://codex.wordpress.org/Writing_a_Plugin">Documentation on Writing Plugins</a>' ) . '</p>' .
+		'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 	);
 
-	require_once(ABSPATH . 'wp-admin/admin-header.php');
+	require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-	update_recently_edited(WP_PLUGIN_DIR . '/' . $file);
+	update_recently_edited( WP_PLUGIN_DIR . '/' . $file );
 
 	$content = file_get_contents( $real_file );
 
 	if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) {
 		$functions = wp_doc_link_parse( $content );
 
-		if ( !empty($functions) ) {
+		if ( ! empty( $functions ) ) {
 			$docs_select = '<select name="docs-list" id="docs-list">';
 			$docs_select .= '<option value="">' . __( 'Function Name&hellip;' ) . '</option>';
-			foreach ( $functions as $function) {
+			foreach ( $functions as $function ) {
 				$docs_select .= '<option value="' . esc_attr( $function ) . '">' . esc_html( $function ) . '()</option>';
 			}
 			$docs_select .= '</select>';
@@ -178,18 +185,18 @@
 
 	$content = esc_textarea( $content );
 	?>
-<?php if (isset($_GET['a'])) : ?>
- <div id="message" class="updated notice is-dismissible"><p><?php _e('File edited successfully.') ?></p></div>
-<?php elseif (isset($_GET['phperror'])) : ?>
- <div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p>
+<?php if ( isset( $_GET['a'] ) ) : ?>
+ <div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
+<?php elseif ( isset( $_GET['phperror'] ) ) : ?>
+ <div id="message" class="updated"><p><?php _e( 'This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.' ) ?></p>
 	<?php
-		if ( wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $file ) ) {
-			$iframe_url = add_query_arg( array(
-				'action'   => 'error_scrape',
-				'plugin'   => urlencode( $file ),
-				'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
-			), admin_url( 'plugins.php' ) );
-			?>
+	if ( wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $file ) ) {
+		$iframe_url = add_query_arg( array(
+			'action'   => 'error_scrape',
+			'plugin'   => urlencode( $file ),
+			'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
+		), admin_url( 'plugins.php' ) );
+	?>
 	<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
 	<?php } ?>
 </div>
@@ -200,40 +207,40 @@
 <div class="fileedit-sub">
 <div class="alignleft">
 <big><?php
-	if ( is_plugin_active( $plugin ) ) {
-		if ( is_writeable( $real_file ) ) {
-			/* translators: %s: plugin file name */
-			echo sprintf( __( 'Editing %s (active)' ), '<strong>' . $file . '</strong>' );
-		} else {
-			/* translators: %s: plugin file name */
-			echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . $file . '</strong>' );
-		}
+if ( is_plugin_active( $plugin ) ) {
+	if ( is_writeable( $real_file ) ) {
+		/* translators: %s: plugin file name */
+		echo sprintf( __( 'Editing %s (active)' ), '<strong>' . $file . '</strong>' );
 	} else {
-		if ( is_writeable( $real_file ) ) {
-			/* translators: %s: plugin file name */
-			echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . $file . '</strong>' );
-		} else {
-			/* translators: %s: plugin file name */
-			echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . $file . '</strong>' );
-		}
+		/* translators: %s: plugin file name */
+		echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . $file . '</strong>' );
 	}
+} else {
+	if ( is_writeable( $real_file ) ) {
+		/* translators: %s: plugin file name */
+		echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . $file . '</strong>' );
+	} else {
+		/* translators: %s: plugin file name */
+		echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . $file . '</strong>' );
+	}
+}
 	?></big>
 </div>
 <div class="alignright">
 	<form action="plugin-editor.php" method="post">
-		<strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong>
+		<strong><label for="plugin"><?php _e( 'Select plugin to edit:' ); ?> </label></strong>
 		<select name="plugin" id="plugin">
 <?php
-	foreach ( $plugins as $plugin_key => $a_plugin ) {
-		$plugin_name = $a_plugin['Name'];
-		if ( $plugin_key == $plugin )
-			$selected = " selected='selected'";
-		else
-			$selected = '';
-		$plugin_name = esc_attr($plugin_name);
-		$plugin_key = esc_attr($plugin_key);
-		echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";
+foreach ( $plugins as $plugin_key => $a_plugin ) {
+	$plugin_name = $a_plugin['Name'];
+	if ( $plugin_key == $plugin ) {
+		$selected = " selected='selected'";
+	} else { $selected = '';
 	}
+	$plugin_name = esc_attr( $plugin_name );
+	$plugin_key = esc_attr( $plugin_key );
+	echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";
+}
 ?>
 		</select>
 		<?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
@@ -249,11 +256,12 @@
 <?php
 foreach ( $plugin_files as $plugin_file ) :
 	// Get the extension of the file
-	if ( preg_match('/\.([^.]+)$/', $plugin_file, $matches) ) {
-		$ext = strtolower($matches[1]);
+	if ( preg_match( '/\.([^.]+)$/', $plugin_file, $matches ) ) {
+		$ext = strtolower( $matches[1] );
 		// If extension is not in the acceptable list, skip it
-		if ( !in_array( $ext, $editable_extensions ) )
+		if ( ! in_array( $ext, $editable_extensions ) ) {
 			continue;
+		}
 	} else {
 		// No extension found
 		continue;
@@ -264,32 +272,32 @@
 	</ul>
 </div>
 <form name="template" id="template" action="plugin-editor.php" method="post">
-	<?php wp_nonce_field('edit-plugin_' . $file) ?>
+	<?php wp_nonce_field( 'edit-plugin_' . $file ) ?>
 		<div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea>
 		<input type="hidden" name="action" value="update" />
-		<input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
-		<input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" />
+		<input type="hidden" name="file" value="<?php echo esc_attr( $file ) ?>" />
+		<input type="hidden" name="plugin" value="<?php echo esc_attr( $plugin ) ?>" />
 		<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
 		</div>
-		<?php if ( !empty( $docs_select ) ) : ?>
-		<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" /></div>
+		<?php if ( ! empty( $docs_select ) ) : ?>
+		<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e( 'Documentation:' ) ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" /></div>
 		<?php endif; ?>
-<?php if ( is_writeable($real_file) ) : ?>
+<?php if ( is_writeable( $real_file ) ) : ?>
 	<?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) ) { ?>
-		<p><?php _e('<strong>Warning:</strong> Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?></p>
+		<p><?php _e( '<strong>Warning:</strong> Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.' ); ?></p>
 	<?php } ?>
 	<p class="submit">
 	<?php
-		if ( isset($_GET['phperror']) ) {
-			echo "<input type='hidden' name='phperror' value='1' />";
-			submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false );
-		} else {
-			submit_button( __( 'Update File' ), 'primary', 'submit', false );
-		}
+	if ( isset( $_GET['phperror'] ) ) {
+		echo "<input type='hidden' name='phperror' value='1' />";
+		submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false );
+	} else {
+		submit_button( __( 'Update File' ), 'primary', 'submit', false );
+	}
 	?>
 	</p>
 <?php else : ?>
-	<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="https://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>
+	<p><em><?php _e( 'You need to make this file writable before you can save your changes. See <a href="https://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.' ); ?></em></p>
 <?php endif; ?>
 </form>
 <br class="clear" />
@@ -301,6 +309,6 @@
 });
 </script>
 <?php
-}
+}// End if().
 
-include(ABSPATH . "wp-admin/admin-footer.php");
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/plugin-install.php
===================================================================
--- src/wp-admin/plugin-install.php	(revision 40901)
+++ src/wp-admin/plugin-install.php	(working copy)
@@ -6,23 +6,25 @@
  * @subpackage Administration
  */
 // TODO route this pages via a specific iframe handler instead of the do_action below
-if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
+if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) {
 	define( 'IFRAME_REQUEST', true );
+}
 
 /**
  * WordPress Administration Bootstrap.
  */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can('install_plugins') )
-	wp_die(__('Sorry, you are not allowed to install plugins on this site.'));
+if ( ! current_user_can( 'install_plugins' ) ) {
+	wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
+}
 
 if ( is_multisite() && ! is_network_admin() ) {
 	wp_redirect( network_admin_url( 'plugin-install.php' ) );
 	exit();
 }
 
-$wp_list_table = _get_list_table('WP_Plugin_Install_List_Table');
+$wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
@@ -49,8 +51,9 @@
 $parent_file = 'plugins.php';
 
 wp_enqueue_script( 'plugin-install' );
-if ( 'plugin-information' != $tab )
+if ( 'plugin-information' != $tab ) {
 	add_thickbox();
+}
 
 $body_id = $tab;
 
@@ -76,27 +79,27 @@
 }
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . sprintf( __('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/plugins/' ) ) . '</p>' .
-	'<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>'
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . sprintf( __( 'Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/plugins/' ) ) . '</p>' .
+	'<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>',
 
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'adding-plugins',
-'title'		=> __('Adding Plugins'),
-'content'	=>
-	'<p>' . __('If you know what you&#8217;re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
+	'id'		=> 'adding-plugins',
+	'title'		=> __( 'Adding Plugins' ),
+	'content'	=>
+	'<p>' . __( 'If you know what you&#8217;re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.' ) . '</p>' .
 	'<p>' . __( 'If you just want to get an idea of what&#8217;s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '</p>' .
 	'<p>' . __( 'You can also browse a user&#8217;s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '</p>' .
-	'<p>' . __( 'If you want to install a plugin that you&#8217;ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>'
+	'<p>' . __( 'If you want to install a plugin that you&#8217;ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Plugins_Add_New_Screen">Documentation on Installing Plugins</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Plugins_Add_New_Screen">Documentation on Installing Plugins</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -108,7 +111,7 @@
 /**
  * WordPress Administration Template Header.
  */
-include(ABSPATH . 'wp-admin/admin-header.php');
+include( ABSPATH . 'wp-admin/admin-header.php' );
 ?>
 <div class="wrap <?php echo esc_attr( "plugin-install-tab-$tab" ); ?>">
 <h1 class="wp-heading-inline"><?php
@@ -167,4 +170,4 @@
 /**
  * WordPress Administration Template Footer.
  */
-include(ABSPATH . 'wp-admin/admin-footer.php');
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/plugins.php
===================================================================
--- src/wp-admin/plugins.php	(revision 40901)
+++ src/wp-admin/plugins.php	(working copy)
@@ -9,19 +9,20 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( ! current_user_can('activate_plugins') )
+if ( ! current_user_can( 'activate_plugins' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) );
+}
 
-$wp_list_table = _get_list_table('WP_Plugins_List_Table');
+$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
 
 $action = $wp_list_table->current_action();
 
-$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
-$s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
+$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
+$s = isset( $_REQUEST['s'] ) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
 
 // Clean up request URI from temporary args for screen options/paging uri's to work as expected.
-$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);
+$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce' ), $_SERVER['REQUEST_URI'] );
 
 wp_enqueue_script( 'updates' );
 
@@ -29,24 +30,25 @@
 
 	switch ( $action ) {
 		case 'activate':
-			if ( ! current_user_can('activate_plugins') )
-				wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
+			if ( ! current_user_can( 'activate_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to activate plugins for this site.' ) );
+			}
 
 			if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
-			check_admin_referer('activate-plugin_' . $plugin);
+			check_admin_referer( 'activate-plugin_' . $plugin );
 
-			$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );
+			$result = activate_plugin( $plugin, self_admin_url( 'plugins.php?error=true&plugin=' . $plugin ), is_network_admin() );
 			if ( is_wp_error( $result ) ) {
 				if ( 'unexpected_output' == $result->get_error_code() ) {
-					$redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s");
-					wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect));
+					$redirect = self_admin_url( 'plugins.php?error=true&charsout=' . strlen( $result->get_error_data() ) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s" );
+					wp_redirect( add_query_arg( '_error_nonce', wp_create_nonce( 'plugin-activation-error_' . $plugin ), $redirect ) );
 					exit;
 				} else {
-					wp_die($result);
+					wp_die( $result );
 				}
 			}
 
@@ -60,18 +62,19 @@
 				update_site_option( 'recently_activated', $recent );
 			}
 
-			if ( isset($_GET['from']) && 'import' == $_GET['from'] ) {
-				wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix
+			if ( isset( $_GET['from'] ) && 'import' == $_GET['from'] ) {
+				wp_redirect( self_admin_url( 'import.php?import=' . str_replace( '-importer', '', dirname( $plugin ) ) ) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix
 			} else {
-				wp_redirect( self_admin_url("plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s") ); // overrides the ?error=true one above
+				wp_redirect( self_admin_url( "plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s" ) ); // overrides the ?error=true one above
 			}
 			exit;
 
 		case 'activate-selected':
-			if ( ! current_user_can('activate_plugins') )
-				wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
+			if ( ! current_user_can( 'activate_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to activate plugins for this site.' ) );
+			}
 
-			check_admin_referer('bulk-plugins');
+			check_admin_referer( 'bulk-plugins' );
 
 			$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
 
@@ -91,17 +94,17 @@
 				}
 			}
 
-			if ( empty($plugins) ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+			if ( empty( $plugins ) ) {
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
-			activate_plugins($plugins, self_admin_url('plugins.php?error=true'), is_network_admin() );
+			activate_plugins( $plugins, self_admin_url( 'plugins.php?error=true' ), is_network_admin() );
 
 			if ( ! is_network_admin() ) {
-				$recent = (array) get_option('recently_activated' );
+				$recent = (array) get_option( 'recently_activated' );
 			} else {
-				$recent = (array) get_site_option('recently_activated' );
+				$recent = (array) get_site_option( 'recently_activated' );
 			}
 
 			foreach ( $plugins as $plugin ) {
@@ -114,52 +117,54 @@
 				update_site_option( 'recently_activated', $recent );
 			}
 
-			wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") );
+			wp_redirect( self_admin_url( "plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s" ) );
 			exit;
 
 		case 'update-selected' :
 
 			check_admin_referer( 'bulk-plugins' );
 
-			if ( isset( $_GET['plugins'] ) )
+			if ( isset( $_GET['plugins'] ) ) {
 				$plugins = explode( ',', $_GET['plugins'] );
-			elseif ( isset( $_POST['checked'] ) )
+			} elseif ( isset( $_POST['checked'] ) ) {
 				$plugins = (array) $_POST['checked'];
-			else
-				$plugins = array();
+			} else { $plugins = array();
+			}
 
 			$title = __( 'Update Plugins' );
 			$parent_file = 'plugins.php';
 
 			wp_enqueue_script( 'updates' );
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
+			require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 			echo '<div class="wrap">';
 			echo '<h1>' . esc_html( $title ) . '</h1>';
 
-			$url = self_admin_url('update.php?action=update-selected&amp;plugins=' . urlencode( join(',', $plugins) ));
-			$url = wp_nonce_url($url, 'bulk-update-plugins');
+			$url = self_admin_url( 'update.php?action=update-selected&amp;plugins=' . urlencode( join( ',', $plugins ) ) );
+			$url = wp_nonce_url( $url, 'bulk-update-plugins' );
 
 			echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
 			echo '</div>';
-			require_once(ABSPATH . 'wp-admin/admin-footer.php');
+			require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 			exit;
 
 		case 'error_scrape':
-			if ( ! current_user_can('activate_plugins') )
-				wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
+			if ( ! current_user_can( 'activate_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to activate plugins for this site.' ) );
+			}
 
-			check_admin_referer('plugin-activation-error_' . $plugin);
+			check_admin_referer( 'plugin-activation-error_' . $plugin );
 
-			$valid = validate_plugin($plugin);
-			if ( is_wp_error($valid) )
-				wp_die($valid);
+			$valid = validate_plugin( $plugin );
+			if ( is_wp_error( $valid ) ) {
+				wp_die( $valid );
+			}
 
 			if ( ! WP_DEBUG ) {
 				error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
 			}
 
-			@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
+			@ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
 			// Go back to "sandbox" scope so we get the same errors as before
 			plugin_sandbox_scrape( $plugin );
 			/** This action is documented in wp-admin/includes/plugin.php */
@@ -167,35 +172,41 @@
 			exit;
 
 		case 'deactivate':
-			if ( ! current_user_can('activate_plugins') )
-				wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
+			if ( ! current_user_can( 'activate_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to deactivate plugins for this site.' ) );
+			}
 
-			check_admin_referer('deactivate-plugin_' . $plugin);
+			check_admin_referer( 'deactivate-plugin_' . $plugin );
 
 			if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
 			deactivate_plugins( $plugin, false, is_network_admin() );
 
 			if ( ! is_network_admin() ) {
-				update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) );
+				update_option( 'recently_activated', array(
+					$plugin => time(),
+				) + (array) get_option( 'recently_activated' ) );
 			} else {
-				update_site_option( 'recently_activated', array( $plugin => time() ) + (array) get_site_option( 'recently_activated' ) );
+				update_site_option( 'recently_activated', array(
+					$plugin => time(),
+				) + (array) get_site_option( 'recently_activated' ) );
 			}
 
-			if ( headers_sent() )
+			if ( headers_sent() ) {
 				echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />";
-			else
-				wp_redirect( self_admin_url("plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s") );
+			} else { wp_redirect( self_admin_url( "plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) );
+			}
 			exit;
 
 		case 'deactivate-selected':
-			if ( ! current_user_can('activate_plugins') )
-				wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
+			if ( ! current_user_can( 'activate_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to deactivate plugins for this site.' ) );
+			}
 
-			check_admin_referer('bulk-plugins');
+			check_admin_referer( 'bulk-plugins' );
 
 			$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
 			// Do not deactivate plugins which are already deactivated.
@@ -205,8 +216,8 @@
 				$plugins = array_filter( $plugins, 'is_plugin_active' );
 				$plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) );
 			}
-			if ( empty($plugins) ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+			if ( empty( $plugins ) ) {
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
@@ -223,24 +234,24 @@
 				update_site_option( 'recently_activated', $deactivated + (array) get_site_option( 'recently_activated' ) );
 			}
 
-			wp_redirect( self_admin_url("plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s") );
+			wp_redirect( self_admin_url( "plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s" ) );
 			exit;
 
 		case 'delete-selected':
-			if ( ! current_user_can('delete_plugins') ) {
-				wp_die(__('Sorry, you are not allowed to delete plugins for this site.'));
+			if ( ! current_user_can( 'delete_plugins' ) ) {
+				wp_die( __( 'Sorry, you are not allowed to delete plugins for this site.' ) );
 			}
 
-			check_admin_referer('bulk-plugins');
+			check_admin_referer( 'bulk-plugins' );
 
 			//$_POST = from the plugin form; $_GET = from the FTP details screen.
 			$plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
 			if ( empty( $plugins ) ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
-			$plugins = array_filter($plugins, 'is_plugin_inactive'); // Do not allow to delete Activated plugins.
+			$plugins = array_filter( $plugins, 'is_plugin_inactive' ); // Do not allow to delete Activated plugins.
 			if ( empty( $plugins ) ) {
 				wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
@@ -250,46 +261,46 @@
 			// validate_file() returns truthy for invalid files
 			$invalid_plugin_files = array_filter( $plugins, 'validate_file' );
 			if ( $invalid_plugin_files ) {
-				wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
+				wp_redirect( self_admin_url( "plugins.php?plugin_status=$status&paged=$page&s=$s" ) );
 				exit;
 			}
 
-			include(ABSPATH . 'wp-admin/update.php');
+			include( ABSPATH . 'wp-admin/update.php' );
 
 			$parent_file = 'plugins.php';
 
-			if ( ! isset($_REQUEST['verify-delete']) ) {
-				wp_enqueue_script('jquery');
-				require_once(ABSPATH . 'wp-admin/admin-header.php');
+			if ( ! isset( $_REQUEST['verify-delete'] ) ) {
+				wp_enqueue_script( 'jquery' );
+				require_once( ABSPATH . 'wp-admin/admin-header.php' );
 				?>
 			<div class="wrap">
 				<?php
 					$plugin_info = array();
 					$have_non_network_plugins = false;
-					foreach ( (array) $plugins as $plugin ) {
-						$plugin_slug = dirname( $plugin );
+				foreach ( (array) $plugins as $plugin ) {
+					$plugin_slug = dirname( $plugin );
 
-						if ( '.' == $plugin_slug ) {
-							if ( $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ) {
-								$plugin_info[ $plugin ] = $data;
-								$plugin_info[ $plugin ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
-								if ( ! $plugin_info[ $plugin ]['Network'] ) {
-									$have_non_network_plugins = true;
-								}
+					if ( '.' == $plugin_slug ) {
+						if ( $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ) {
+							$plugin_info[ $plugin ] = $data;
+							$plugin_info[ $plugin ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
+							if ( ! $plugin_info[ $plugin ]['Network'] ) {
+								$have_non_network_plugins = true;
 							}
-						} else {
-							// Get plugins list from that folder.
-							if ( $folder_plugins = get_plugins( '/' . $plugin_slug ) ) {
-								foreach ( $folder_plugins as $plugin_file => $data ) {
-									$plugin_info[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $data );
-									$plugin_info[ $plugin_file ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
-									if ( ! $plugin_info[ $plugin_file ]['Network'] ) {
-										$have_non_network_plugins = true;
-									}
+						}
+					} else {
+						// Get plugins list from that folder.
+						if ( $folder_plugins = get_plugins( '/' . $plugin_slug ) ) {
+							foreach ( $folder_plugins as $plugin_file => $data ) {
+								$plugin_info[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $data );
+								$plugin_info[ $plugin_file ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
+								if ( ! $plugin_info[ $plugin_file ]['Network'] ) {
+									$have_non_network_plugins = true;
 								}
 							}
 						}
 					}
+				}
 					$plugins_to_delete = count( $plugin_info );
 				?>
 				<?php if ( 1 == $plugins_to_delete ) : ?>
@@ -298,7 +309,7 @@
 						<div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This plugin may be active on other sites in the network.' ); ?></p></div>
 					<?php endif; ?>
 					<p><?php _e( 'You are about to remove the following plugin:' ); ?></p>
-				<?php else: ?>
+				<?php else : ?>
 					<h1><?php _e( 'Delete Plugins' ); ?></h1>
 					<?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
 						<div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These plugins may be active on other sites in the network.' ); ?></p></div>
@@ -315,26 +326,26 @@
 								$data_to_delete = true;
 							} else {
 								/* translators: 1: plugin name, 2: plugin author */
-								echo '<li>', sprintf( _x('%1$s by %2$s', 'plugin' ), '<strong>' . $plugin['Name'] . '</strong>', '<em>' . $plugin['AuthorName'] ) . '</em>', '</li>';
+								echo '<li>', sprintf( _x( '%1$s by %2$s', 'plugin' ), '<strong>' . $plugin['Name'] . '</strong>', '<em>' . $plugin['AuthorName'] ) . '</em>', '</li>';
 							}
 						}
 						?>
 					</ul>
 				<p><?php
-				if ( $data_to_delete )
-					_e('Are you sure you wish to delete these files and data?');
-				else
-					_e('Are you sure you wish to delete these files?');
+				if ( $data_to_delete ) {
+					_e( 'Are you sure you wish to delete these files and data?' );
+				} else { _e( 'Are you sure you wish to delete these files?' );
+				}
 				?></p>
-				<form method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;">
+				<form method="post" action="<?php echo esc_url( $_SERVER['REQUEST_URI'] ); ?>" style="display:inline;">
 					<input type="hidden" name="verify-delete" value="1" />
 					<input type="hidden" name="action" value="delete-selected" />
 					<?php
-						foreach ( (array) $plugins as $plugin ) {
-							echo '<input type="hidden" name="checked[]" value="' . esc_attr( $plugin ) . '" />';
-						}
+					foreach ( (array) $plugins as $plugin ) {
+						echo '<input type="hidden" name="checked[]" value="' . esc_attr( $plugin ) . '" />';
+					}
 					?>
-					<?php wp_nonce_field('bulk-plugins') ?>
+					<?php wp_nonce_field( 'bulk-plugins' ) ?>
 					<?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), '', 'submit', false ); ?>
 				</form>
 				<?php
@@ -345,16 +356,16 @@
 				</form>
 			</div>
 				<?php
-				require_once(ABSPATH . 'wp-admin/admin-footer.php');
+				require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 				exit;
 			} else {
 				$plugins_to_delete = count( $plugins );
-			} // endif verify-delete
+			} // End if().
 
 			$delete_result = delete_plugins( $plugins );
 
-			set_transient('plugins_delete_result_' . $user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length
-			wp_redirect( self_admin_url("plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s") );
+			set_transient( 'plugins_delete_result_' . $user_ID, $delete_result ); //Store the result in a cache rather than a URL param due to object type & length
+			wp_redirect( self_admin_url( "plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s" ) );
 			exit;
 
 		case 'clear-recent-list':
@@ -367,7 +378,7 @@
 
 		default:
 			if ( isset( $_POST['checked'] ) ) {
-				check_admin_referer('bulk-plugins');
+				check_admin_referer( 'bulk-plugins' );
 				$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
 				$sendback = wp_get_referer();
 
@@ -377,45 +388,46 @@
 				exit;
 			}
 			break;
-	}
-
-}
+	}// End switch().
+}// End if().
 
 $wp_list_table->prepare_items();
 
-wp_enqueue_script('plugin-install');
+wp_enqueue_script( 'plugin-install' );
 add_thickbox();
 
-add_screen_option( 'per_page', array( 'default' => 999 ) );
+add_screen_option( 'per_page', array(
+	'default' => 999,
+) );
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . __( 'Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.' ) . '</p>' .
 	'<p>' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
 	'<p>' . sprintf(
 		/* translators: %s: WordPress Plugin Directory URL */
 		__( 'If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s">WordPress Plugin Directory</a>. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
 		__( 'https://wordpress.org/plugins/' )
-	) . '</p>'
+	) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'compatibility-problems',
-'title'		=> __('Troubleshooting'),
-'content'	=>
-	'<p>' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin&#8217;s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '</p>' .
+	'id'		=> 'compatibility-problems',
+	'title'		=> __( 'Troubleshooting' ),
+	'content'	=>
+	'<p>' . __( 'Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin&#8217;s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.' ) . '</p>' .
 	'<p>' . sprintf(
 		/* translators: WP_PLUGIN_DIR constant value */
 		__( 'If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.' ),
 		'<code>' . WP_PLUGIN_DIR . '</code>'
-	) . '</p>'
+	) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Managing_Plugins#Plugin_Management">Documentation on Managing Plugins</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Managing_Plugins#Plugin_Management">Documentation on Managing Plugins</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 get_current_screen()->set_screen_reader_content( array(
@@ -424,10 +436,10 @@
 	'heading_list'       => __( 'Plugins list' ),
 ) );
 
-$title = __('Plugins');
+$title = __( 'Plugins' );
 $parent_file = 'plugins.php';
 
-require_once(ABSPATH . 'wp-admin/admin-header.php');
+require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 $invalid = validate_active_plugins();
 if ( ! empty( $invalid ) ) {
@@ -437,42 +449,42 @@
 			/* translators: 1: plugin file 2: error message */
 			__( 'The plugin %1$s has been <strong>deactivated</strong> due to an error: %2$s' ),
 			'<code>' . esc_html( $plugin_file ) . '</code>',
-			$error->get_error_message() );
+		$error->get_error_message() );
 		echo '</p></div>';
 	}
 }
 ?>
 
-<?php if ( isset($_GET['error']) ) :
+<?php if ( isset( $_GET['error'] ) ) :
 
-	if ( isset( $_GET['main'] ) )
+	if ( isset( $_GET['main'] ) ) {
 		$errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
-	elseif ( isset($_GET['charsout']) )
-		$errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
-	else
-		$errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.');
+	} elseif ( isset( $_GET['charsout'] ) ) {
+		$errmsg = sprintf( __( 'The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), $_GET['charsout'] );
+	} else { $errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
+	}
 	?>
 	<div id="message" class="error"><p><?php echo $errmsg; ?></p>
 	<?php
-		if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
-			$iframe_url = add_query_arg( array(
-				'action'   => 'error_scrape',
-				'plugin'   => urlencode( $plugin ),
-				'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
-			), admin_url( 'plugins.php' ) );
-		?>
-		<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
+	if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
+		$iframe_url = add_query_arg( array(
+			'action'   => 'error_scrape',
+			'plugin'   => urlencode( $plugin ),
+			'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
+		), admin_url( 'plugins.php' ) );
+	?>
+	<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
 	<?php
-		}
+	}
 	?>
 	</div>
-<?php elseif ( isset($_GET['deleted']) ) :
+<?php elseif ( isset( $_GET['deleted'] ) ) :
 		$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
 		// Delete it once we're done.
 		delete_transient( 'plugins_delete_result_' . $user_ID );
 
-		if ( is_wp_error($delete_result) ) : ?>
-		<div id="message" class="error notice is-dismissible"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
+	if ( is_wp_error( $delete_result ) ) : ?>
+		<div id="message" class="error notice is-dismissible"><p><?php printf( __( 'Plugin could not be deleted due to an error: %s' ), $delete_result->get_error_message() ); ?></p></div>
 		<?php else : ?>
 		<div id="message" class="updated notice is-dismissible">
 			<p>
@@ -486,16 +498,16 @@
 			</p>
 		</div>
 		<?php endif; ?>
-<?php elseif ( isset($_GET['activate']) ) : ?>
-	<div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
-<?php elseif (isset($_GET['activate-multi'])) : ?>
-	<div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>activated</strong>.'); ?></p></div>
-<?php elseif ( isset($_GET['deactivate']) ) : ?>
-	<div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div>
-<?php elseif (isset($_GET['deactivate-multi'])) : ?>
-	<div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div>
+<?php elseif ( isset( $_GET['activate'] ) ) : ?>
+	<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin <strong>activated</strong>.' ) ?></p></div>
+<?php elseif ( isset( $_GET['activate-multi'] ) ) : ?>
+	<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins <strong>activated</strong>.' ); ?></p></div>
+<?php elseif ( isset( $_GET['deactivate'] ) ) : ?>
+	<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin <strong>deactivated</strong>.' ) ?></p></div>
+<?php elseif ( isset( $_GET['deactivate-multi'] ) ) : ?>
+	<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins <strong>deactivated</strong>.' ); ?></p></div>
 <?php elseif ( 'update-selected' == $action ) : ?>
-	<div id="message" class="updated notice is-dismissible"><p><?php _e('All selected plugins are up to date.'); ?></p></div>
+	<div id="message" class="updated notice is-dismissible"><p><?php _e( 'All selected plugins are up to date.' ); ?></p></div>
 <?php endif; ?>
 
 <div class="wrap">
@@ -504,7 +516,7 @@
 ?></h1>
 
 <?php
-if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
+if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) { ?>
 	<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a>
 <?php
 }
@@ -541,8 +553,8 @@
 
 <form method="post" id="bulk-action-form">
 
-<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
-<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
+<input type="hidden" name="plugin_status" value="<?php echo esc_attr( $status ) ?>" />
+<input type="hidden" name="paged" value="<?php echo esc_attr( $page ) ?>" />
 
 <?php $wp_list_table->display(); ?>
 </form>
@@ -555,4 +567,4 @@
 wp_print_admin_notice_templates();
 wp_print_update_row_templates();
 
-include(ABSPATH . 'wp-admin/admin-footer.php');
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/post-new.php
===================================================================
--- src/wp-admin/post-new.php	(revision 40901)
+++ src/wp-admin/post-new.php	(working copy)
@@ -18,7 +18,9 @@
 
 if ( ! isset( $_GET['post_type'] ) ) {
 	$post_type = 'post';
-} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
+} elseif ( in_array( $_GET['post_type'], get_post_types( array(
+	'show_ui' => true,
+) ) ) ) {
 	$post_type = $_GET['post_type'];
 } else {
 	wp_die( __( 'Invalid post type.' ) );
@@ -29,15 +31,16 @@
 	$parent_file = 'edit.php';
 	$submenu_file = 'post-new.php';
 } elseif ( 'attachment' == $post_type ) {
-	if ( wp_redirect( admin_url( 'media-new.php' ) ) )
+	if ( wp_redirect( admin_url( 'media-new.php' ) ) ) {
 		exit;
+	}
 } else {
 	$submenu_file = "post-new.php?post_type=$post_type";
 	if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) {
 		$parent_file = $post_type_object->show_in_menu;
 		// What if there isn't a post-new.php item for this post type?
 		if ( ! isset( $_registered_pages[ get_plugin_page_hookname( "post-new.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
-			if (	isset( $_registered_pages[ get_plugin_page_hookname( "edit.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
+			if ( isset( $_registered_pages[ get_plugin_page_hookname( "edit.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
 				// Fall back to edit.php for that post type, if it exists
 				$submenu_file = "edit.php?post_type=$post_type";
 			} else {
@@ -63,18 +66,23 @@
 }
 
 // Schedule auto-draft cleanup
-if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
+if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) {
 	wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' );
+}
 
 wp_enqueue_script( 'autosave' );
 
 if ( is_multisite() ) {
 	add_action( 'admin_footer', '_admin_notice_post_locked' );
 } else {
-	$check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
+	$check_users = get_users( array(
+		'fields' => 'ID',
+		'number' => 2,
+	) );
 
-	if ( count( $check_users ) > 1 )
+	if ( count( $check_users ) > 1 ) {
 		add_action( 'admin_footer', '_admin_notice_post_locked' );
+	}
 
 	unset( $check_users );
 }
Index: src/wp-admin/post.php
===================================================================
--- src/wp-admin/post.php	(revision 40901)
+++ src/wp-admin/post.php	(working copy)
@@ -16,12 +16,12 @@
 
 wp_reset_vars( array( 'action' ) );
 
-if ( isset( $_GET['post'] ) )
- 	$post_id = $post_ID = (int) $_GET['post'];
-elseif ( isset( $_POST['post_ID'] ) )
- 	$post_id = $post_ID = (int) $_POST['post_ID'];
-else
- 	$post_id = $post_ID = 0;
+if ( isset( $_GET['post'] ) ) {
+	 $post_id = $post_ID = (int) $_GET['post'];
+} elseif ( isset( $_POST['post_ID'] ) ) {
+	 $post_id = $post_ID = (int) $_POST['post_ID'];
+} else { $post_id = $post_ID = 0;
+}
 
 /**
  * @global string  $post_type
@@ -30,23 +30,25 @@
  */
 global $post_type, $post_type_object, $post;
 
-if ( $post_id )
+if ( $post_id ) {
 	$post = get_post( $post_id );
+}
 
 if ( $post ) {
 	$post_type = $post->post_type;
 	$post_type_object = get_post_type_object( $post_type );
 }
 
-if ( isset( $_POST['deletepost'] ) )
+if ( isset( $_POST['deletepost'] ) ) {
 	$action = 'delete';
-elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] )
+} elseif ( isset( $_POST['wp-preview'] ) && 'dopreview' == $_POST['wp-preview'] ) {
 	$action = 'preview';
+}
 
 $sendback = wp_get_referer();
 if ( ! $sendback ||
-     strpos( $sendback, 'post.php' ) !== false ||
-     strpos( $sendback, 'post-new.php' ) !== false ) {
+	 strpos( $sendback, 'post.php' ) !== false ||
+	 strpos( $sendback, 'post-new.php' ) !== false ) {
 	if ( 'attachment' == $post_type ) {
 		$sendback = admin_url( 'upload.php' );
 	} else {
@@ -56,226 +58,255 @@
 		}
 	}
 } else {
-	$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback );
+	$sendback = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'ids' ), $sendback );
 }
 
-switch($action) {
-case 'post-quickdraft-save':
-	// Check nonce and capabilities
-	$nonce = $_REQUEST['_wpnonce'];
-	$error_msg = false;
+switch ( $action ) {
+	case 'post-quickdraft-save':
+		// Check nonce and capabilities
+		$nonce = $_REQUEST['_wpnonce'];
+		$error_msg = false;
 
-	// For output of the quickdraft dashboard widget
-	require_once ABSPATH . 'wp-admin/includes/dashboard.php';
+		// For output of the quickdraft dashboard widget
+		require_once ABSPATH . 'wp-admin/includes/dashboard.php';
 
-	if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
-		$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
+		if ( ! wp_verify_nonce( $nonce, 'add-post' ) ) {
+			$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
+		}
 
-	if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
-		exit;
-	}
+		if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
+			exit;
+		}
 
-	if ( $error_msg )
-		return wp_dashboard_quick_press( $error_msg );
+		if ( $error_msg ) {
+			return wp_dashboard_quick_press( $error_msg );
+		}
 
-	$post = get_post( $_REQUEST['post_ID'] );
-	check_admin_referer( 'add-' . $post->post_type );
+		$post = get_post( $_REQUEST['post_ID'] );
+		check_admin_referer( 'add-' . $post->post_type );
 
-	$_POST['comment_status'] = get_default_comment_status( $post->post_type );
-	$_POST['ping_status']    = get_default_comment_status( $post->post_type, 'pingback' );
+		$_POST['comment_status'] = get_default_comment_status( $post->post_type );
+		$_POST['ping_status']    = get_default_comment_status( $post->post_type, 'pingback' );
 
-	edit_post();
-	wp_dashboard_quick_press();
+		edit_post();
+		wp_dashboard_quick_press();
 	exit;
 
-case 'postajaxpost':
-case 'post':
-	check_admin_referer( 'add-' . $post_type );
-	$post_id = 'postajaxpost' == $action ? edit_post() : write_post();
-	redirect_post( $post_id );
+	case 'postajaxpost':
+	case 'post':
+		check_admin_referer( 'add-' . $post_type );
+		$post_id = 'postajaxpost' == $action ? edit_post() : write_post();
+		redirect_post( $post_id );
 	exit();
 
-case 'edit':
-	$editing = true;
-
-	if ( empty( $post_id ) ) {
-		wp_redirect( admin_url('post.php') );
-		exit();
-	}
+	case 'edit':
+		$editing = true;
 
-	if ( ! $post )
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+		if ( empty( $post_id ) ) {
+			wp_redirect( admin_url( 'post.php' ) );
+			exit();
+		}
 
-	if ( ! $post_type_object )
-		wp_die( __( 'Invalid post type.' ) );
+		if ( ! $post ) {
+			wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
+		}
 
-	if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
-		wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
-	}
+		if ( ! $post_type_object ) {
+			wp_die( __( 'Invalid post type.' ) );
+		}
 
-	if ( ! current_user_can( 'edit_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
+		if ( ! in_array( $typenow, get_post_types( array(
+			'show_ui' => true,
+		) ) ) ) {
+			wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
+		}
 
-	if ( 'trash' == $post->post_status )
-		wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
+		if ( ! current_user_can( 'edit_post', $post_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
+		}
 
-	if ( ! empty( $_GET['get-post-lock'] ) ) {
-		check_admin_referer( 'lock-post_' . $post_id );
-		wp_set_post_lock( $post_id );
-		wp_redirect( get_edit_post_link( $post_id, 'url' ) );
-		exit();
-	}
+		if ( 'trash' == $post->post_status ) {
+			wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
+		}
 
-	$post_type = $post->post_type;
-	if ( 'post' == $post_type ) {
-		$parent_file = "edit.php";
-		$submenu_file = "edit.php";
-		$post_new_file = "post-new.php";
-	} elseif ( 'attachment' == $post_type ) {
-		$parent_file = 'upload.php';
-		$submenu_file = 'upload.php';
-		$post_new_file = 'media-new.php';
-	} else {
-		if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
-			$parent_file = $post_type_object->show_in_menu;
-		else
-			$parent_file = "edit.php?post_type=$post_type";
-		$submenu_file = "edit.php?post_type=$post_type";
-		$post_new_file = "post-new.php?post_type=$post_type";
-	}
+		if ( ! empty( $_GET['get-post-lock'] ) ) {
+			check_admin_referer( 'lock-post_' . $post_id );
+			wp_set_post_lock( $post_id );
+			wp_redirect( get_edit_post_link( $post_id, 'url' ) );
+			exit();
+		}
 
-	if ( ! wp_check_post_lock( $post->ID ) ) {
-		$active_post_lock = wp_set_post_lock( $post->ID );
+		$post_type = $post->post_type;
+		if ( 'post' == $post_type ) {
+			$parent_file = 'edit.php';
+			$submenu_file = 'edit.php';
+			$post_new_file = 'post-new.php';
+		} elseif ( 'attachment' == $post_type ) {
+			$parent_file = 'upload.php';
+			$submenu_file = 'upload.php';
+			$post_new_file = 'media-new.php';
+		} else {
+			if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) {
+				$parent_file = $post_type_object->show_in_menu;
+			} else { $parent_file = "edit.php?post_type=$post_type";
+			}
+				$submenu_file = "edit.php?post_type=$post_type";
+				$post_new_file = "post-new.php?post_type=$post_type";
+		}
 
-		if ( 'attachment' !== $post_type )
-			wp_enqueue_script('autosave');
-	}
+		if ( ! wp_check_post_lock( $post->ID ) ) {
+			$active_post_lock = wp_set_post_lock( $post->ID );
 
-	if ( is_multisite() ) {
-		add_action( 'admin_footer', '_admin_notice_post_locked' );
-	} else {
-		$check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
+			if ( 'attachment' !== $post_type ) {
+				wp_enqueue_script( 'autosave' );
+			}
+		}
 
-		if ( count( $check_users ) > 1 )
+		if ( is_multisite() ) {
 			add_action( 'admin_footer', '_admin_notice_post_locked' );
+		} else {
+			$check_users = get_users( array(
+				'fields' => 'ID',
+				'number' => 2,
+			) );
+
+			if ( count( $check_users ) > 1 ) {
+				add_action( 'admin_footer', '_admin_notice_post_locked' );
+			}
 
-		unset( $check_users );
-	}
+			unset( $check_users );
+		}
 
-	$title = $post_type_object->labels->edit_item;
-	$post = get_post($post_id, OBJECT, 'edit');
+			$title = $post_type_object->labels->edit_item;
+			$post = get_post( $post_id, OBJECT, 'edit' );
 
-	if ( post_type_supports($post_type, 'comments') ) {
-		wp_enqueue_script('admin-comments');
-		enqueue_comment_hotkeys_js();
-	}
+		if ( post_type_supports( $post_type, 'comments' ) ) {
+			wp_enqueue_script( 'admin-comments' );
+			enqueue_comment_hotkeys_js();
+		}
 
-	include( ABSPATH . 'wp-admin/edit-form-advanced.php' );
+			include( ABSPATH . 'wp-admin/edit-form-advanced.php' );
 
 	break;
 
-case 'editattachment':
-	check_admin_referer('update-post_' . $post_id);
+	case 'editattachment':
+		check_admin_referer( 'update-post_' . $post_id );
 
-	// Don't let these be changed
-	unset($_POST['guid']);
-	$_POST['post_type'] = 'attachment';
+		// Don't let these be changed
+		unset( $_POST['guid'] );
+		$_POST['post_type'] = 'attachment';
 
-	// Update the thumbnail filename
-	$newmeta = wp_get_attachment_metadata( $post_id, true );
-	$newmeta['thumb'] = $_POST['thumb'];
+		// Update the thumbnail filename
+		$newmeta = wp_get_attachment_metadata( $post_id, true );
+		$newmeta['thumb'] = $_POST['thumb'];
 
-	wp_update_attachment_metadata( $post_id, $newmeta );
+		wp_update_attachment_metadata( $post_id, $newmeta );
 
-case 'editpost':
-	check_admin_referer('update-post_' . $post_id);
+	case 'editpost':
+		check_admin_referer( 'update-post_' . $post_id );
 
-	$post_id = edit_post();
+		$post_id = edit_post();
 
-	// Session cookie flag that the post was saved
-	if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
-		setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() );
-	}
+		// Session cookie flag that the post was saved
+		if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
+			setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() );
+		}
 
-	redirect_post($post_id); // Send user on their way while we keep working
+		redirect_post( $post_id ); // Send user on their way while we keep working
 
 	exit();
 
-case 'trash':
-	check_admin_referer('trash-post_' . $post_id);
+	case 'trash':
+		check_admin_referer( 'trash-post_' . $post_id );
 
-	if ( ! $post )
-		wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) );
+		if ( ! $post ) {
+			wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) );
+		}
 
-	if ( ! $post_type_object )
-		wp_die( __( 'Invalid post type.' ) );
+		if ( ! $post_type_object ) {
+			wp_die( __( 'Invalid post type.' ) );
+		}
 
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
+		if ( ! current_user_can( 'delete_post', $post_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
+		}
 
-	if ( $user_id = wp_check_post_lock( $post_id ) ) {
-		$user = get_userdata( $user_id );
-		wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
-	}
+		if ( $user_id = wp_check_post_lock( $post_id ) ) {
+			$user = get_userdata( $user_id );
+			wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
+		}
 
-	if ( ! wp_trash_post( $post_id ) )
-		wp_die( __( 'Error in moving to Trash.' ) );
+		if ( ! wp_trash_post( $post_id ) ) {
+			wp_die( __( 'Error in moving to Trash.' ) );
+		}
 
-	wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) );
+		wp_redirect( add_query_arg( array(
+			'trashed' => 1,
+			'ids' => $post_id,
+		), $sendback ) );
 	exit();
 
-case 'untrash':
-	check_admin_referer('untrash-post_' . $post_id);
+	case 'untrash':
+		check_admin_referer( 'untrash-post_' . $post_id );
 
-	if ( ! $post )
-		wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) );
+		if ( ! $post ) {
+			wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) );
+		}
 
-	if ( ! $post_type_object )
-		wp_die( __( 'Invalid post type.' ) );
+		if ( ! $post_type_object ) {
+			wp_die( __( 'Invalid post type.' ) );
+		}
 
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
+		if ( ! current_user_can( 'delete_post', $post_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
+		}
 
-	if ( ! wp_untrash_post( $post_id ) )
-		wp_die( __( 'Error in restoring from Trash.' ) );
+		if ( ! wp_untrash_post( $post_id ) ) {
+			wp_die( __( 'Error in restoring from Trash.' ) );
+		}
 
-	wp_redirect( add_query_arg('untrashed', 1, $sendback) );
+		wp_redirect( add_query_arg( 'untrashed', 1, $sendback ) );
 	exit();
 
-case 'delete':
-	check_admin_referer('delete-post_' . $post_id);
+	case 'delete':
+		check_admin_referer( 'delete-post_' . $post_id );
+
+		if ( ! $post ) {
+			wp_die( __( 'This item has already been deleted.' ) );
+		}
 
-	if ( ! $post )
-		wp_die( __( 'This item has already been deleted.' ) );
+		if ( ! $post_type_object ) {
+			wp_die( __( 'Invalid post type.' ) );
+		}
 
-	if ( ! $post_type_object )
-		wp_die( __( 'Invalid post type.' ) );
+		if ( ! current_user_can( 'delete_post', $post_id ) ) {
+			wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
+		}
 
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
-
-	if ( $post->post_type == 'attachment' ) {
-		$force = ( ! MEDIA_TRASH );
-		if ( ! wp_delete_attachment( $post_id, $force ) )
-			wp_die( __( 'Error in deleting.' ) );
-	} else {
-		if ( ! wp_delete_post( $post_id, true ) )
-			wp_die( __( 'Error in deleting.' ) );
-	}
+		if ( $post->post_type == 'attachment' ) {
+			$force = ( ! MEDIA_TRASH );
+			if ( ! wp_delete_attachment( $post_id, $force ) ) {
+				wp_die( __( 'Error in deleting.' ) );
+			}
+		} else {
+			if ( ! wp_delete_post( $post_id, true ) ) {
+				wp_die( __( 'Error in deleting.' ) );
+			}
+		}
 
-	wp_redirect( add_query_arg('deleted', 1, $sendback) );
+			wp_redirect( add_query_arg( 'deleted', 1, $sendback ) );
 	exit();
 
-case 'preview':
-	check_admin_referer( 'update-post_' . $post_id );
+	case 'preview':
+		check_admin_referer( 'update-post_' . $post_id );
 
-	$url = post_preview();
+		$url = post_preview();
 
-	wp_redirect($url);
+		wp_redirect( $url );
 	exit();
 
-default:
-	/**
+	default:
+		/**
 	 * Fires for a given custom post action request.
 	 *
 	 * The dynamic portion of the hook name, `$action`, refers to the custom post action.
@@ -284,9 +315,9 @@
 	 *
 	 * @param int $post_id Post ID sent with the request.
 	 */
-	do_action( "post_action_{$action}", $post_id );
+		do_action( "post_action_{$action}", $post_id );
 
-	wp_redirect( admin_url('edit.php') );
+		wp_redirect( admin_url( 'edit.php' ) );
 	exit();
-} // end switch
+} // End switch().
 include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/press-this.php
===================================================================
--- src/wp-admin/press-this.php	(revision 40901)
+++ src/wp-admin/press-this.php	(working copy)
@@ -6,7 +6,7 @@
  * @subpackage Press_This
  */
 
-define('IFRAME_REQUEST' , true);
+define( 'IFRAME_REQUEST' , true );
 
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
@@ -19,6 +19,6 @@
 	);
 }
 
-include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' ); 
+include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
 $wp_press_this = new WP_Press_This();
 $wp_press_this->html();
Index: src/wp-admin/profile.php
===================================================================
--- src/wp-admin/profile.php	(revision 40901)
+++ src/wp-admin/profile.php	(working copy)
@@ -12,7 +12,7 @@
  * @since 2.5.0
  * @var bool
  */
-define('IS_PROFILE_PAGE', true);
+define( 'IS_PROFILE_PAGE', true );
 
 /** Load User Editing Page */
 require_once( dirname( __FILE__ ) . '/user-edit.php' );
Index: src/wp-admin/revision.php
===================================================================
--- src/wp-admin/revision.php	(revision 40901)
+++ src/wp-admin/revision.php	(working copy)
@@ -25,67 +25,79 @@
 $revision_id = absint( $revision );
 
 $from = is_numeric( $from ) ? absint( $from ) : null;
-if ( ! $revision_id )
+if ( ! $revision_id ) {
 	$revision_id = absint( $to );
+}
 $redirect = 'edit.php';
 
 switch ( $action ) {
-case 'restore' :
-	if ( ! $revision = wp_get_post_revision( $revision_id ) )
-		break;
-
-	if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
-		break;
-
-	if ( ! $post = get_post( $revision->post_parent ) )
-		break;
-
-	// Restore if revisions are enabled or this is an autosave.
-	if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
-		$redirect = 'edit.php?post_type=' . $post->post_type;
-		break;
-	}
-
-	// Don't allow revision restore when post is locked
-	if ( wp_check_post_lock( $post->ID ) )
-		break;
-
-	check_admin_referer( "restore-post_{$revision->ID}" );
-
-	wp_restore_post_revision( $revision->ID );
-	$redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) );
+	case 'restore' :
+		if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
+			break;
+		}
+
+		if ( ! current_user_can( 'edit_post', $revision->post_parent ) ) {
+			break;
+		}
+
+		if ( ! $post = get_post( $revision->post_parent ) ) {
+			break;
+		}
+
+		// Restore if revisions are enabled or this is an autosave.
+		if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
+			$redirect = 'edit.php?post_type=' . $post->post_type;
+			break;
+		}
+
+		// Don't allow revision restore when post is locked
+		if ( wp_check_post_lock( $post->ID ) ) {
+			break;
+		}
+
+		check_admin_referer( "restore-post_{$revision->ID}" );
+
+		wp_restore_post_revision( $revision->ID );
+		$redirect = add_query_arg( array(
+			'message' => 5,
+			'revision' => $revision->ID,
+		), get_edit_post_link( $post->ID, 'url' ) );
 	break;
-case 'view' :
-case 'edit' :
-default :
-	if ( ! $revision = wp_get_post_revision( $revision_id ) )
-		break;
-	if ( ! $post = get_post( $revision->post_parent ) )
-		break;
-
-	if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) )
-		break;
-
-	// Revisions disabled and we're not looking at an autosave
-	if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
-		$redirect = 'edit.php?post_type=' . $post->post_type;
-		break;
-	}
-
-	$post_edit_link = get_edit_post_link();
-	$post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
-	/* translators: 1: Post title */
-	$h1             = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title );
-	$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>';
-	$title          = __( 'Revisions' );
+	case 'view' :
+	case 'edit' :
+	default :
+		if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
+			break;
+		}
+		if ( ! $post = get_post( $revision->post_parent ) ) {
+			break;
+		}
+
+		if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) ) {
+			break;
+		}
+
+		// Revisions disabled and we're not looking at an autosave
+		if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
+			$redirect = 'edit.php?post_type=' . $post->post_type;
+			break;
+		}
+
+		$post_edit_link = get_edit_post_link();
+		$post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
+		/* translators: 1: Post title */
+		$h1             = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title );
+		$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>';
+		$title          = __( 'Revisions' );
 
-	$redirect = false;
+		$redirect = false;
 	break;
-}
+}// End switch().
 
 // Empty post_type means either malformed object found, or no valid parent was found.
-if ( ! $redirect && empty( $post->post_type ) )
+if ( ! $redirect && empty( $post->post_type ) ) {
 	$redirect = 'edit.php';
+}
 
 if ( ! empty( $redirect ) ) {
 	wp_redirect( $redirect );
@@ -93,10 +105,10 @@
 }
 
 // This is so that the correct "Edit" menu item is selected.
-if ( ! empty( $post->post_type ) && 'post' != $post->post_type )
+if ( ! empty( $post->post_type ) && 'post' != $post->post_type ) {
 	$parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type;
-else
-	$parent_file = $submenu_file = 'edit.php';
+} else { $parent_file = $submenu_file = 'edit.php';
+}
 
 wp_enqueue_script( 'revisions' );
 wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id, $from ) );
@@ -113,7 +125,7 @@
 get_current_screen()->add_help_tab( array(
 	'id'      => 'revisions-overview',
 	'title'   => __( 'Overview' ),
-	'content' => $revisions_overview
+	'content' => $revisions_overview,
 ) );
 
 $revisions_sidebar  = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
Index: src/wp-admin/term.php
===================================================================
--- src/wp-admin/term.php	(revision 40901)
+++ src/wp-admin/term.php	(working copy)
@@ -13,7 +13,9 @@
 if ( empty( $_REQUEST['tag_ID'] ) ) {
 	$sendback = admin_url( 'edit-tags.php' );
 	if ( ! empty( $taxnow ) ) {
-		$sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
+		$sendback = add_query_arg( array(
+			'taxonomy' => $taxnow,
+		), $sendback );
 	}
 	wp_redirect( esc_url( $sendback ) );
 	exit;
@@ -30,8 +32,10 @@
 $taxonomy = $tax->name;
 $title    = $tax->labels->edit_item;
 
-if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
-     ! current_user_can( 'edit_term', $tag->term_id )
+if ( ! in_array( $taxonomy, get_taxonomies( array(
+	'show_ui' => true,
+) ) ) ||
+	 ! current_user_can( 'edit_term', $tag->term_id )
 ) {
 	wp_die(
 		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
Index: src/wp-admin/theme-editor.php
===================================================================
--- src/wp-admin/theme-editor.php	(revision 40901)
+++ src/wp-admin/theme-editor.php	(working copy)
@@ -14,33 +14,34 @@
 	exit();
 }
 
-if ( !current_user_can('edit_themes') )
-	wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>');
+if ( ! current_user_can( 'edit_themes' ) ) {
+	wp_die( '<p>' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '</p>' );
+}
 
-$title = __("Edit Themes");
+$title = __( 'Edit Themes' );
 $parent_file = 'themes.php';
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '</p>
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . __( 'You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>
 	<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>
-	<p>' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '</p>
+	<p>' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '</p>
 	<p id="newcontent-description">' . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.' ) . '</p>
-	<p>' . __('After typing in your edits, click Update File.') . '</p>
-	<p>' . __('<strong>Advice:</strong> think very carefully about your site crashing if you are live-editing the theme currently in use.') . '</p>
-	<p>' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.'), __('https://codex.wordpress.org/Child_Themes') ) . '</p>' .
-	( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' )
+	<p>' . __( 'After typing in your edits, click Update File.' ) . '</p>
+	<p>' . __( '<strong>Advice:</strong> think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '</p>
+	<p>' . sprintf( __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ) . '</p>' .
+	( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ),
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Theme_Development">Documentation on Theme Development</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Using_Themes">Documentation on Using Themes</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Editing_Files">Documentation on Editing Files</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Template_Tags">Documentation on Template Tags</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Theme_Development">Documentation on Theme Development</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes">Documentation on Using Themes</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Editing_Files">Documentation on Editing Files</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Template_Tags">Documentation on Template Tags</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) );
@@ -106,81 +107,87 @@
 validate_file_to_edit( $file, $allowed_files );
 $scrollto = isset( $_REQUEST['scrollto'] ) ? (int) $_REQUEST['scrollto'] : 0;
 
-switch( $action ) {
-case 'update':
-	check_admin_referer( 'edit-theme_' . $file . $stylesheet );
-	$newcontent = wp_unslash( $_POST['newcontent'] );
-	$location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto;
-	if ( is_writeable( $file ) ) {
-		// is_writable() not always reliable, check return value. see comments @ https://secure.php.net/is_writable
-		$f = fopen( $file, 'w+' );
-		if ( $f !== false ) {
-			fwrite( $f, $newcontent );
-			fclose( $f );
-			$location .= '&updated=true';
-			$theme->cache_delete();
+switch ( $action ) {
+	case 'update':
+		check_admin_referer( 'edit-theme_' . $file . $stylesheet );
+		$newcontent = wp_unslash( $_POST['newcontent'] );
+		$location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto;
+		if ( is_writeable( $file ) ) {
+			// is_writable() not always reliable, check return value. see comments @ https://secure.php.net/is_writable
+			$f = fopen( $file, 'w+' );
+			if ( $f !== false ) {
+				fwrite( $f, $newcontent );
+				fclose( $f );
+				$location .= '&updated=true';
+				$theme->cache_delete();
+			}
 		}
-	}
-	wp_redirect( $location );
+		wp_redirect( $location );
 	exit;
 
-default:
-
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
+	default:
 
-	update_recently_edited( $file );
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-	if ( ! is_file( $file ) )
-		$error = true;
+		update_recently_edited( $file );
 
-	$content = '';
-	if ( ! $error && filesize( $file ) > 0 ) {
-		$f = fopen($file, 'r');
-		$content = fread($f, filesize($file));
-
-		if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) {
-			$functions = wp_doc_link_parse( $content );
-
-			$docs_select = '<select name="docs-list" id="docs-list">';
-			$docs_select .= '<option value="">' . esc_attr__( 'Function Name&hellip;' ) . '</option>';
-			foreach ( $functions as $function ) {
-				$docs_select .= '<option value="' . esc_attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
-			}
-			$docs_select .= '</select>';
+		if ( ! is_file( $file ) ) {
+			$error = true;
 		}
 
-		$content = esc_textarea( $content );
-	}
+		$content = '';
+		if ( ! $error && filesize( $file ) > 0 ) {
+			$f = fopen( $file, 'r' );
+			$content = fread( $f, filesize( $file ) );
+
+			if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) {
+				$functions = wp_doc_link_parse( $content );
+
+				$docs_select = '<select name="docs-list" id="docs-list">';
+				$docs_select .= '<option value="">' . esc_attr__( 'Function Name&hellip;' ) . '</option>';
+				foreach ( $functions as $function ) {
+					$docs_select .= '<option value="' . esc_attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
+				}
+				$docs_select .= '</select>';
+			}
 
-	if ( isset( $_GET['updated'] ) ) : ?>
- <div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
-<?php endif;
-
-$description = get_file_description( $relative_file );
-$file_show = array_search( $file, array_filter( $allowed_files ) );
-if ( $description != $file_show )
-	$description .= ' <span>(' . $file_show . ')</span>';
-?>
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
+			$content = esc_textarea( $content );
+		}
 
-<div class="fileedit-sub">
-<div class="alignleft">
-<h2><?php echo $theme->display( 'Name' ); if ( $description ) echo ': ' . $description; ?></h2>
-</div>
-<div class="alignright">
+		if ( isset( $_GET['updated'] ) ) : ?>
+	 <div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
+	<?php endif;
+
+		$description = get_file_description( $relative_file );
+		$file_show = array_search( $file, array_filter( $allowed_files ) );
+		if ( $description != $file_show ) {
+			$description .= ' <span>(' . $file_show . ')</span>';
+		}
+		?>
+		<div class="wrap">
+		<h1><?php echo esc_html( $title ); ?></h1>
+
+	<div class="fileedit-sub">
+	<div class="alignleft">
+	<h2><?php echo $theme->display( 'Name' );
+	if ( $description ) { echo ': ' . $description;} ?></h2>
+	</div>
+	<div class="alignright">
 	<form action="theme-editor.php" method="post">
-		<strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong>
+		<strong><label for="theme"><?php _e( 'Select theme to edit:' ); ?> </label></strong>
 		<select name="theme" id="theme">
-<?php
-foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) {
-	if ( $a_theme->errors() && 'theme_no_stylesheet' == $a_theme->errors()->get_error_code() )
-		continue;
+	<?php
+	foreach ( wp_get_themes( array(
+		'errors' => null,
+	) ) as $a_stylesheet => $a_theme ) {
+		if ( $a_theme->errors() && 'theme_no_stylesheet' == $a_theme->errors()->get_error_code() ) {
+			continue;
+		}
 
-	$selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : '';
-	echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display('Name') . '</option>';
-}
-?>
+		$selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : '';
+		echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display( 'Name' ) . '</option>';
+	}
+	?>
 		</select>
 		<?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
 	</form>
@@ -188,8 +195,9 @@
 <br class="clear" />
 </div>
 <?php
-if ( $theme->errors() )
+if ( $theme->errors() ) {
 	echo '<div class="error"><p><strong>' . __( 'This theme is broken.' ) . '</strong> ' . $theme->errors()->get_error_message() . '</p></div>';
+}
 ?>
 	<div id="templateside">
 <?php
@@ -249,19 +257,19 @@
 <?php endif; ?>
 </div>
 <?php if ( $error ) :
-	echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
-else : ?>
-	<form name="template" id="template" action="theme-editor.php" method="post">
-	<?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?>
+	echo '<div class="error"><p>' . __( 'Oops, no such file exists! Double check the name and try again, merci.' ) . '</p></div>';
+	else : ?>
+		<form name="template" id="template" action="theme-editor.php" method="post">
+		<?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?>
 		<div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea>
 		<input type="hidden" name="action" value="update" />
 		<input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" />
 		<input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" />
 		<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
 		</div>
-	<?php if ( ! empty( $functions ) ) : ?>
+		<?php if ( ! empty( $functions ) ) : ?>
 		<div id="documentation" class="hide-if-no-js">
-		<label for="docs-list"><?php _e('Documentation:') ?></label>
+		<label for="docs-list"><?php _e( 'Documentation:' ) ?></label>
 		<?php echo $docs_select; ?>
 		<input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" />
 		</div>
@@ -272,27 +280,27 @@
 			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
 			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
 		<?php endif; ?>
-<?php
+	<?php
 	if ( is_writeable( $file ) ) :
 		submit_button( __( 'Update File' ), 'primary', 'submit', true );
-	else : ?>
-<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="https://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>
-<?php endif; ?>
-		</div>
-	</form>
-<?php
-endif; // $error
-?>
-<br class="clear" />
-</div>
-<script type="text/javascript">
-jQuery(document).ready(function($){
+		else : ?>
+	<p><em><?php _e( 'You need to make this file writable before you can save your changes. See <a href="https://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.' ); ?></em></p>
+	<?php endif; ?>
+			</div>
+		</form>
+	<?php
+	endif; // $error
+	?>
+	<br class="clear" />
+	</div>
+	<script type="text/javascript">
+	jQuery(document).ready(function($){
 	$('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); });
 	$('#newcontent').scrollTop( $('#scrollto').val() );
-});
-</script>
-<?php
+	});
+	</script>
+	<?php
 break;
-}
+}// End switch().
 
-include(ABSPATH . 'wp-admin/admin-footer.php' );
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/theme-install.php
===================================================================
--- src/wp-admin/theme-install.php	(revision 40901)
+++ src/wp-admin/theme-install.php	(working copy)
@@ -12,8 +12,9 @@
 
 wp_reset_vars( array( 'tab' ) );
 
-if ( ! current_user_can('install_themes') )
+if ( ! current_user_can( 'install_themes' ) ) {
 	wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
+}
 
 if ( is_multisite() && ! is_network_admin() ) {
 	wp_redirect( network_admin_url( 'theme-install.php' ) );
@@ -45,7 +46,7 @@
 		'isInstall'  => true,
 		'canInstall' => current_user_can( 'install_themes' ),
 		'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
-		'adminUrl'   => parse_url( self_admin_url(), PHP_URL_PATH )
+		'adminUrl'   => parse_url( self_admin_url(), PHP_URL_PATH ),
 	),
 	'l10n' => array(
 		'addNew'              => __( 'Add New Theme' ),
@@ -86,41 +87,41 @@
 
 $help_overview =
 	'<p>' . sprintf(
-			/* translators: %s: Theme Directory URL */
+		/* translators: %s: Theme Directory URL */
 			__( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the <a href="%s">WordPress Theme Directory</a>. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ),
-			__( 'https://wordpress.org/themes/' )
-		) . '</p>' .
+		__( 'https://wordpress.org/themes/' )
+	) . '</p>' .
 	'<p>' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' <span id="live-search-desc">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
 	'<p>' . __( 'Alternately, you can browse the themes that are Featured, Popular, or Latest. When you find a theme you like, you can preview it or install it.' ) . '</p>' .
 	'<p>' . sprintf(
-			/* translators: %s: /wp-content/themes */
+		/* translators: %s: /wp-content/themes */
 			__( 'You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme&#8217;s folder via FTP into your %s directory.' ),
-			'<code>/wp-content/themes</code>'
-		) . '</p>';
+		'<code>/wp-content/themes</code>'
+	) . '</p>';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => $help_overview
+	'title'   => __( 'Overview' ),
+	'content' => $help_overview,
 ) );
 
 $help_installing =
-	'<p>' . __('Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you&#8217;re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.') . '</p>' .
-	'<p>' . __('To install the theme so you can preview it with your site&#8217;s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme&#8217;s thumbnail image.') . '</p>';
+	'<p>' . __( 'Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you&#8217;re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.' ) . '</p>' .
+	'<p>' . __( 'To install the theme so you can preview it with your site&#8217;s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme&#8217;s thumbnail image.' ) . '</p>';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'installing',
-	'title'   => __('Previewing and Installing'),
-	'content' => $help_installing
+	'title'   => __( 'Previewing and Installing' ),
+	'content' => $help_installing,
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes">Documentation on Adding New Themes</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes">Documentation on Adding New Themes</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
-include(ABSPATH . 'wp-admin/admin-header.php');
+include( ABSPATH . 'wp-admin/admin-header.php' );
 
 ?>
 <div class="wrap">
@@ -137,7 +138,9 @@
 	 *
 	 * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'.
 	 */
-	$tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
+	$tabs = apply_filters( 'install_themes_tabs', array(
+		'upload' => __( 'Upload Theme' ),
+	) );
 	if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
 		echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>';
 	}
@@ -353,4 +356,4 @@
 wp_print_request_filesystem_credentials_modal();
 wp_print_admin_notice_templates();
 
-include(ABSPATH . 'wp-admin/admin-footer.php');
+include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/themes.php
===================================================================
--- src/wp-admin/themes.php	(revision 40901)
+++ src/wp-admin/themes.php	(working copy)
@@ -17,9 +17,9 @@
 	);
 }
 
-if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
+if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) {
 	if ( 'activate' == $_GET['action'] ) {
-		check_admin_referer('switch-theme_' . $_GET['stylesheet']);
+		check_admin_referer( 'switch-theme_' . $_GET['stylesheet'] );
 		$theme = wp_get_theme( $_GET['stylesheet'] );
 
 		if ( ! $theme->exists() || ! $theme->is_allowed() ) {
@@ -31,10 +31,10 @@
 		}
 
 		switch_theme( $theme->get_stylesheet() );
-		wp_redirect( admin_url('themes.php?activated=true') );
+		wp_redirect( admin_url( 'themes.php?activated=true' ) );
 		exit;
 	} elseif ( 'delete' == $_GET['action'] ) {
-		check_admin_referer('delete-theme_' . $_GET['stylesheet']);
+		check_admin_referer( 'delete-theme_' . $_GET['stylesheet'] );
 		$theme = wp_get_theme( $_GET['stylesheet'] );
 
 		if ( ! current_user_can( 'delete_themes' ) ) {
@@ -61,10 +61,10 @@
 			wp_redirect( admin_url( 'themes.php?deleted=true' ) );
 		}
 		exit;
-	}
-}
+	}// End if().
+}// End if().
 
-$title = __('Manage Themes');
+$title = __( 'Manage Themes' );
 $parent_file = 'themes.php';
 
 // Help tab: Overview
@@ -80,38 +80,38 @@
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'overview',
 		'title'   => __( 'Overview' ),
-		'content' => $help_overview
+		'content' => $help_overview,
 	) );
-} // switch_themes
+} // End if().
 
 // Help tab: Adding Themes
 if ( current_user_can( 'install_themes' ) ) {
 	if ( is_multisite() ) {
-		$help_install = '<p>' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '</p>';
+		$help_install = '<p>' . __( 'Installing themes on Multisite can only be done from the Network Admin section.' ) . '</p>';
 	} else {
-		$help_install = '<p>' . sprintf( __('If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!'), __( 'https://wordpress.org/themes/' ) ) . '</p>';
+		$help_install = '<p>' . sprintf( __( 'If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ), __( 'https://wordpress.org/themes/' ) ) . '</p>';
 	}
 
 	get_current_screen()->add_help_tab( array(
 		'id'      => 'adding-themes',
-		'title'   => __('Adding Themes'),
-		'content' => $help_install
+		'title'   => __( 'Adding Themes' ),
+		'content' => $help_install,
 	) );
-} // install_themes
+} // End if().
 
 // Help tab: Previewing and Customizing
 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
 	$help_customize =
-		'<p>' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '</p>'.
+		'<p>' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '</p>' .
 		'<p>' . __( 'The theme being previewed is fully interactive &mdash; navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Save &amp; Activate button above the menu.' ) . '</p>' .
 		'<p>' . __( 'When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.' ) . '</p>';
 
 	get_current_screen()->add_help_tab( array(
 		'id'		=> 'customize-preview-themes',
 		'title'		=> __( 'Previewing and Customizing' ),
-		'content'	=> $help_customize
+		'content'	=> $help_customize,
 	) );
-} // edit_theme_options && customize
+} // End if().
 
 get_current_screen()->set_help_sidebar(
 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
@@ -134,13 +134,13 @@
 		'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
 		'adminUrl'      => parse_url( admin_url(), PHP_URL_PATH ),
 	),
- 	'l10n' => array(
- 		'addNew'            => __( 'Add New Theme' ),
- 		'search'            => __( 'Search Installed Themes' ),
- 		'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis)
+	 'l10n' => array(
+		 'addNew'            => __( 'Add New Theme' ),
+		 'search'            => __( 'Search Installed Themes' ),
+		 'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis)
 		'themesFound'       => __( 'Number of Themes found: %d' ),
 		'noThemesFound'     => __( 'No themes found. Try a different search.' ),
-  	),
+	  ),
 ) );
 
 add_thickbox();
@@ -165,15 +165,15 @@
 	<hr class="wp-header-end">
 <?php
 if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
-<div id="message1" class="updated notice is-dismissible"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
-<?php elseif ( isset($_GET['activated']) ) :
-		if ( isset( $_GET['previewed'] ) ) { ?>
+<div id="message1" class="updated notice is-dismissible"><p><?php _e( 'The active theme is broken. Reverting to the default theme.' ); ?></p></div>
+<?php elseif ( isset( $_GET['activated'] ) ) :
+	if ( isset( $_GET['previewed'] ) ) { ?>
 		<div id="message2" class="updated notice is-dismissible"><p><?php _e( 'Settings saved and theme activated.' ); ?> <a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Visit site' ); ?></a></p></div>
 		<?php } else { ?>
 <div id="message2" class="updated notice is-dismissible"><p><?php _e( 'New theme activated.' ); ?> <a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Visit site' ); ?></a></p></div><?php
-		}
-	elseif ( isset($_GET['deleted']) ) : ?>
-<div id="message3" class="updated notice is-dismissible"><p><?php _e('Theme deleted.') ?></p></div>
+}
+	elseif ( isset( $_GET['deleted'] ) ) : ?>
+<div id="message3" class="updated notice is-dismissible"><p><?php _e( 'Theme deleted.' ) ?></p></div>
 <?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
 	<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
 <?php
@@ -193,44 +193,46 @@
 
 	// Pretend you didn't see this.
 	$current_theme_actions = array();
-	if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
-		foreach ( (array) $submenu['themes.php'] as $item) {
-			$class = '';
-			if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 0 === strpos( $item[2], 'customize.php' ) )
-				continue;
-			// 0 = name, 1 = capability, 2 = file
-			if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
-				$class = ' current';
-			if ( !empty($submenu[$item[2]]) ) {
-				$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
-				$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
-				if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
-					$current_theme_actions[] = "<a class='button$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
-				else
-					$current_theme_actions[] = "<a class='button$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
-			} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
-				$menu_file = $item[2];
-
-				if ( current_user_can( 'customize' ) ) {
-					if ( 'custom-header' === $menu_file ) {
-						$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
-					} elseif ( 'custom-background' === $menu_file ) {
-						$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
-					}
-				}
+if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
+	foreach ( (array) $submenu['themes.php'] as $item ) {
+		$class = '';
+		if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 0 === strpos( $item[2], 'customize.php' ) ) {
+			continue;
+		}
+		// 0 = name, 1 = capability, 2 = file
+		if ( ( strcmp( $self, $item[2] ) == 0 && empty( $parent_file )) || ($parent_file && ($item[2] == $parent_file)) ) {
+			$class = ' current';
+		}
+		if ( ! empty( $submenu[ $item[2] ] ) ) {
+			$submenu[ $item[2] ] = array_values( $submenu[ $item[2] ] ); // Re-index.
+			$menu_hook = get_plugin_page_hook( $submenu[ $item[2] ][0][2], $item[2] );
+			if ( file_exists( WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}" ) || ! empty( $menu_hook ) ) {
+				$current_theme_actions[] = "<a class='button$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
+			} else { $current_theme_actions[] = "<a class='button$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
+			}
+		} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
+			$menu_file = $item[2];
 
-				if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
-					$menu_file = substr( $menu_file, 0, $pos );
+			if ( current_user_can( 'customize' ) ) {
+				if ( 'custom-header' === $menu_file ) {
+					$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
+				} elseif ( 'custom-background' === $menu_file ) {
+					$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
 				}
+			}
 
-				if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
-					$current_theme_actions[] = "<a class='button$class' href='{$item[2]}'>{$item[0]}</a>";
-				} else {
-					$current_theme_actions[] = "<a class='button$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
-				}
+			if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
+				$menu_file = substr( $menu_file, 0, $pos );
+			}
+
+			if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
+				$current_theme_actions[] = "<a class='button$class' href='{$item[2]}'>{$item[0]}</a>";
+			} else {
+				$current_theme_actions[] = "<a class='button$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
 			}
 		}
-	}
+	}// End foreach().
+}// End if().
 
 ?>
 
@@ -246,7 +248,7 @@
 	$aria_action = esc_attr( $theme['id'] . '-action' );
 	$aria_name   = esc_attr( $theme['id'] . '-name' );
 	?>
-<div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">
+<div class="theme<?php if ( $theme['active'] ) { echo ' active';} ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">
 	<?php if ( ! empty( $theme['screenshot'][0] ) ) { ?>
 		<div class="theme-screenshot">
 			<img src="<?php echo $theme['screenshot'][0]; ?>" alt="" />
@@ -307,11 +309,13 @@
 
 <?php
 // List broken themes, if any.
-if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
+if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes = wp_get_themes( array(
+	'errors' => true,
+) ) ) {
 ?>
 
 <div class="broken-themes">
-<h3><?php _e('Broken Themes'); ?></h3>
+<h3><?php _e( 'Broken Themes' ); ?></h3>
 <p><?php _e( 'The following themes are installed but incomplete.' ); ?></p>
 
 <?php
@@ -320,8 +324,8 @@
 ?>
 <table>
 	<tr>
-		<th><?php _ex('Name', 'theme name'); ?></th>
-		<th><?php _e('Description'); ?></th>
+		<th><?php _ex( 'Name', 'theme name' ); ?></th>
+		<th><?php _e( 'Description' ); ?></th>
 		<?php if ( $can_delete ) { ?>
 			<td></td>
 		<?php } ?>
@@ -348,7 +352,9 @@
 
 			if ( $can_install && 'theme_no_parent' === $broken_theme->errors()->get_error_code() ) {
 				$parent_theme_name = $broken_theme->get( 'Template' );
-				$parent_theme = themes_api( 'theme_information', array( 'slug' => urlencode( $parent_theme_name ) ) );
+				$parent_theme = themes_api( 'theme_information', array(
+					'slug' => urlencode( $parent_theme_name ),
+				) );
 
 				if ( ! is_wp_error( $parent_theme ) ) {
 					$install_url = add_query_arg( array(
@@ -368,7 +374,7 @@
 </div>
 
 <?php
-}
+}// End if().
 ?>
 </div><!-- .wrap -->
 
Index: src/wp-admin/tools.php
===================================================================
--- src/wp-admin/tools.php	(revision 40901)
+++ src/wp-admin/tools.php	(working copy)
@@ -9,24 +9,24 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-$title = __('Tools');
+$title = __( 'Tools' );
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'press-this',
-	'title'   => __('Press This'),
-	'content' => '<p>' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you&#8217;ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '</p>',
+	'title'   => __( 'Press This' ),
+	'content' => '<p>' . __( 'Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you&#8217;ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.' ) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
 	'id'      => 'converter',
-	'title'   => __('Categories and Tags Converter'),
-	'content' => '<p>' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' .
+	'title'   => __( 'Categories and Tags Converter' ),
+	'content' => '<p>' . __( 'Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' .
 	'<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin &amp; Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -35,9 +35,9 @@
 <div class="wrap">
 <h1><?php echo esc_html( $title ); ?></h1>
 
-<?php if ( current_user_can('edit_posts') ) : ?>
+<?php if ( current_user_can( 'edit_posts' ) ) : ?>
 <div class="card pressthis">
-	<h2><?php _e('Press This') ?></h2>
+	<h2><?php _e( 'Press This' ) ?></h2>
 	<p><?php _e( 'Press This is a little tool that lets you grab bits of the web and create new posts with ease.' );?></p>
 	<p><?php _e( 'Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.' ); ?></p>
 
@@ -96,14 +96,14 @@
 endif;
 
 if ( current_user_can( 'import' ) ) :
-$cats = get_taxonomy('category');
-$tags = get_taxonomy('post_tag');
-if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
-<div class="card">
-	<h2 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h2>
-	<p><?php printf( __('If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.'), 'import.php' ); ?></p>
-</div>
-<?php
+	$cats = get_taxonomy( 'category' );
+	$tags = get_taxonomy( 'post_tag' );
+	if ( current_user_can( $cats->cap->manage_terms ) || current_user_can( $tags->cap->manage_terms ) ) : ?>
+		<div class="card">
+			<h2 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h2>
+			<p><?php printf( __( 'If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.' ), 'import.php' ); ?></p>
+		</div>
+		<?php
 endif;
 endif;
 
Index: src/wp-admin/update.php
===================================================================
--- src/wp-admin/update.php	(revision 40901)
+++ src/wp-admin/update.php	(working copy)
@@ -6,35 +6,37 @@
  * @subpackage Administration
  */
 
-if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ) ) )
+if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ) ) ) {
 	define( 'IFRAME_REQUEST', true );
+}
 
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
 
-if ( isset($_GET['action']) ) {
-	$plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
-	$theme = isset($_REQUEST['theme']) ? urldecode($_REQUEST['theme']) : '';
-	$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
+if ( isset( $_GET['action'] ) ) {
+	$plugin = isset( $_REQUEST['plugin'] ) ? trim( $_REQUEST['plugin'] ) : '';
+	$theme = isset( $_REQUEST['theme'] ) ? urldecode( $_REQUEST['theme'] ) : '';
+	$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
 
 	if ( 'update-selected' == $action ) {
-		if ( ! current_user_can( 'update_plugins' ) )
+		if ( ! current_user_can( 'update_plugins' ) ) {
 			wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
+		}
 
 		check_admin_referer( 'bulk-update-plugins' );
 
-		if ( isset( $_GET['plugins'] ) )
-			$plugins = explode( ',', stripslashes($_GET['plugins']) );
-		elseif ( isset( $_POST['checked'] ) )
+		if ( isset( $_GET['plugins'] ) ) {
+			$plugins = explode( ',', stripslashes( $_GET['plugins'] ) );
+		} elseif ( isset( $_POST['checked'] ) ) {
 			$plugins = (array) $_POST['checked'];
-		else
-			$plugins = array();
+		} else { $plugins = array();
+		}
 
-		$plugins = array_map('urldecode', $plugins);
+		$plugins = array_map( 'urldecode', $plugins );
 
-		$url = 'update.php?action=update-selected&amp;plugins=' . urlencode(implode(',', $plugins));
+		$url = 'update.php?action=update-selected&amp;plugins=' . urlencode( implode( ',', $plugins ) );
 		$nonce = 'bulk-update-plugins';
 
 		wp_enqueue_script( 'updates' );
@@ -46,54 +48,58 @@
 		iframe_footer();
 
 	} elseif ( 'upgrade-plugin' == $action ) {
-		if ( ! current_user_can('update_plugins') )
-			wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
+		if ( ! current_user_can( 'update_plugins' ) ) {
+			wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
+		}
 
-		check_admin_referer('upgrade-plugin_' . $plugin);
+		check_admin_referer( 'upgrade-plugin_' . $plugin );
 
-		$title = __('Update Plugin');
+		$title = __( 'Update Plugin' );
 		$parent_file = 'plugins.php';
 		$submenu_file = 'plugins.php';
 
 		wp_enqueue_script( 'updates' );
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 		$nonce = 'upgrade-plugin_' . $plugin;
 		$url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
 
-		$upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) );
-		$upgrader->upgrade($plugin);
+		$upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) ) );
+		$upgrader->upgrade( $plugin );
+
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+	} elseif ( 'activate-plugin' == $action ) {
+		if ( ! current_user_can( 'update_plugins' ) ) {
+			wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
+		}
 
-	} elseif ('activate-plugin' == $action ) {
-		if ( ! current_user_can('update_plugins') )
-			wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
-
-		check_admin_referer('activate-plugin_' . $plugin);
-		if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
-			wp_redirect( admin_url('update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) );
+		check_admin_referer( 'activate-plugin_' . $plugin );
+		if ( ! isset( $_GET['failure'] ) && ! isset( $_GET['success'] ) ) {
+			wp_redirect( admin_url( 'update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) );
 			activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true );
-			wp_redirect( admin_url('update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) );
+			wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) );
 			die();
 		}
-		iframe_header( __('Plugin Reactivation'), true );
-		if ( isset($_GET['success']) )
-			echo '<p>' . __('Plugin reactivated successfully.') . '</p>';
+		iframe_header( __( 'Plugin Reactivation' ), true );
+		if ( isset( $_GET['success'] ) ) {
+			echo '<p>' . __( 'Plugin reactivated successfully.' ) . '</p>';
+		}
 
-		if ( isset($_GET['failure']) ){
-			echo '<p>' . __('Plugin failed to reactivate due to a fatal error.') . '</p>';
+		if ( isset( $_GET['failure'] ) ) {
+			echo '<p>' . __( 'Plugin failed to reactivate due to a fatal error.' ) . '</p>';
 
 			error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
-			@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
+			@ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
 			wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
 			include( WP_PLUGIN_DIR . '/' . $plugin );
 		}
 		iframe_footer();
 	} elseif ( 'install-plugin' == $action ) {
 
-		if ( ! current_user_can('install_plugins') )
+		if ( ! current_user_can( 'install_plugins' ) ) {
 			wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
+		}
 
 		include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
 
@@ -117,26 +123,27 @@
 		) );
 
 		if ( is_wp_error( $api ) ) {
-	 		wp_die( $api );
+			 wp_die( $api );
 		}
 
-		$title = __('Plugin Install');
+		$title = __( 'Plugin Install' );
 		$parent_file = 'plugins.php';
 		$submenu_file = 'plugin-install.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-		$title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
+		$title = sprintf( __( 'Installing Plugin: %s' ), $api->name . ' ' . $api->version );
 		$nonce = 'install-plugin_' . $plugin;
 		$url = 'update.php?action=install-plugin&plugin=' . urlencode( $plugin );
-		if ( isset($_GET['from']) )
-			$url .= '&from=' . urlencode(stripslashes($_GET['from']));
+		if ( isset( $_GET['from'] ) ) {
+			$url .= '&from=' . urlencode( stripslashes( $_GET['from'] ) );
+		}
 
 		$type = 'web'; //Install plugin type, From Web or an Upload.
 
-		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
-		$upgrader->install($api->download_link);
+		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
+		$upgrader->install( $api->download_link );
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	} elseif ( 'upload-plugin' == $action ) {
 
@@ -144,66 +151,71 @@
 			wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
 		}
 
-		check_admin_referer('plugin-upload');
+		check_admin_referer( 'plugin-upload' );
 
-		$file_upload = new File_Upload_Upgrader('pluginzip', 'package');
+		$file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' );
 
-		$title = __('Upload Plugin');
+		$title = __( 'Upload Plugin' );
 		$parent_file = 'plugins.php';
 		$submenu_file = 'plugin-install.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-		$title = sprintf( __('Installing Plugin from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) );
+		$title = sprintf( __( 'Installing Plugin from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
 		$nonce = 'plugin-upload';
-		$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-plugin');
+		$url = add_query_arg( array(
+			'package' => $file_upload->id,
+		), 'update.php?action=upload-plugin' );
 		$type = 'upload'; //Install plugin type, From Web or an Upload.
 
-		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
+		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
 		$result = $upgrader->install( $file_upload->package );
 
-		if ( $result || is_wp_error($result) )
+		if ( $result || is_wp_error( $result ) ) {
 			$file_upload->cleanup();
+		}
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	} elseif ( 'upgrade-theme' == $action ) {
 
-		if ( ! current_user_can('update_themes') )
-			wp_die(__('Sorry, you are not allowed to update themes for this site.'));
+		if ( ! current_user_can( 'update_themes' ) ) {
+			wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
+		}
 
-		check_admin_referer('upgrade-theme_' . $theme);
+		check_admin_referer( 'upgrade-theme_' . $theme );
 
 		wp_enqueue_script( 'customize-loader' );
 		wp_enqueue_script( 'updates' );
 
-		$title = __('Update Theme');
+		$title = __( 'Update Theme' );
 		$parent_file = 'themes.php';
 		$submenu_file = 'themes.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 		$nonce = 'upgrade-theme_' . $theme;
 		$url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
 
-		$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) );
-		$upgrader->upgrade($theme);
+		$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
+		$upgrader->upgrade( $theme );
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 	} elseif ( 'update-selected-themes' == $action ) {
-		if ( ! current_user_can( 'update_themes' ) )
+		if ( ! current_user_can( 'update_themes' ) ) {
 			wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
+		}
 
 		check_admin_referer( 'bulk-update-themes' );
 
-		if ( isset( $_GET['themes'] ) )
-			$themes = explode( ',', stripslashes($_GET['themes']) );
-		elseif ( isset( $_POST['checked'] ) )
+		if ( isset( $_GET['themes'] ) ) {
+			$themes = explode( ',', stripslashes( $_GET['themes'] ) );
+		} elseif ( isset( $_POST['checked'] ) ) {
 			$themes = (array) $_POST['checked'];
-		else
-			$themes = array();
+		} else { $themes = array();
+		}
 
-		$themes = array_map('urldecode', $themes);
+		$themes = array_map( 'urldecode', $themes );
 
-		$url = 'update.php?action=update-selected-themes&amp;themes=' . urlencode(implode(',', $themes));
+		$url = 'update.php?action=update-selected-themes&amp;themes=' . urlencode( implode( ',', $themes ) );
 		$nonce = 'bulk-update-themes';
 
 		wp_enqueue_script( 'updates' );
@@ -215,33 +227,41 @@
 		iframe_footer();
 	} elseif ( 'install-theme' == $action ) {
 
-		if ( ! current_user_can('install_themes') )
+		if ( ! current_user_can( 'install_themes' ) ) {
 			wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
+		}
 
 		include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
 
 		check_admin_referer( 'install-theme_' . $theme );
-		$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
+		$api = themes_api( 'theme_information', array(
+			'slug' => $theme,
+			'fields' => array(
+			'sections' => false,
+			'tags' => false,
+			),
+		) ); //Save on a bit of bandwidth.
 
-		if ( is_wp_error($api) )
-	 		wp_die($api);
+		if ( is_wp_error( $api ) ) {
+			 wp_die( $api );
+		}
 
 		wp_enqueue_script( 'customize-loader' );
 
-		$title = __('Install Themes');
+		$title = __( 'Install Themes' );
 		$parent_file = 'themes.php';
 		$submenu_file = 'themes.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-		$title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version );
+		$title = sprintf( __( 'Installing Theme: %s' ), $api->name . ' ' . $api->version );
 		$nonce = 'install-theme_' . $theme;
 		$url = 'update.php?action=install-theme&theme=' . urlencode( $theme );
 		$type = 'web'; //Install theme type, From Web or an Upload.
 
-		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
-		$upgrader->install($api->download_link);
+		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
+		$upgrader->install( $api->download_link );
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	} elseif ( 'upload-theme' == $action ) {
 
@@ -249,30 +269,33 @@
 			wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
 		}
 
-		check_admin_referer('theme-upload');
+		check_admin_referer( 'theme-upload' );
 
-		$file_upload = new File_Upload_Upgrader('themezip', 'package');
+		$file_upload = new File_Upload_Upgrader( 'themezip', 'package' );
 
 		wp_enqueue_script( 'customize-loader' );
 
-		$title = __('Upload Theme');
+		$title = __( 'Upload Theme' );
 		$parent_file = 'themes.php';
 		$submenu_file = 'theme-install.php';
 
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
+		require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-		$title = sprintf( __('Installing Theme from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) );
+		$title = sprintf( __( 'Installing Theme from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
 		$nonce = 'theme-upload';
-		$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-theme');
+		$url = add_query_arg( array(
+			'package' => $file_upload->id,
+		), 'update.php?action=upload-theme' );
 		$type = 'upload'; //Install plugin type, From Web or an Upload.
 
-		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
+		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
 		$result = $upgrader->install( $file_upload->package );
 
-		if ( $result || is_wp_error($result) )
+		if ( $result || is_wp_error( $result ) ) {
 			$file_upload->cleanup();
+		}
 
-		include(ABSPATH . 'wp-admin/admin-footer.php');
+		include( ABSPATH . 'wp-admin/admin-footer.php' );
 
 	} else {
 		/**
@@ -285,5 +308,5 @@
 		 * @since 2.8.0
 		 */
 		do_action( "update-custom_{$action}" );
-	}
-}
+	}// End if().
+}// End if().
Index: src/wp-admin/upgrade-functions.php
===================================================================
--- src/wp-admin/upgrade-functions.php	(revision 40901)
+++ src/wp-admin/upgrade-functions.php	(working copy)
@@ -8,5 +8,5 @@
  * @subpackage Administration
  */
 
-_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/upgrade.php' );
-require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
+_deprecated_file( basename( __FILE__ ), '2.5.0', 'wp-admin/includes/upgrade.php' );
+require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
Index: src/wp-admin/upgrade.php
===================================================================
--- src/wp-admin/upgrade.php	(revision 40901)
+++ src/wp-admin/upgrade.php	(working copy)
@@ -22,12 +22,12 @@
 timer_start();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 
-delete_site_transient('update_core');
+delete_site_transient( 'update_core' );
 
-if ( isset( $_GET['step'] ) )
+if ( isset( $_GET['step'] ) ) {
 	$step = $_GET['step'];
-else
-	$step = 0;
+} else { $step = 0;
+}
 
 // Do it. No output.
 if ( 'upgrade_db' === $step ) {
@@ -48,10 +48,10 @@
 $php_version    = phpversion();
 $mysql_version  = $wpdb->db_version();
 $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
-if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
+if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
 	$mysql_compat = true;
-else
-	$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
+} else { $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
+}
 
 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 ?>
@@ -70,43 +70,44 @@
 <body class="wp-core-ui">
 <p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
 
-<?php if ( get_option( 'db_version' ) == $wp_db_version || !is_blog_installed() ) : ?>
+<?php if ( get_option( 'db_version' ) == $wp_db_version || ! is_blog_installed() ) : ?>
 
 <h1><?php _e( 'No Update Required' ); ?></h1>
 <p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p>
 <p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
 
-<?php elseif ( !$php_compat || !$mysql_compat ) :
-	if ( !$mysql_compat && !$php_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
-	elseif ( !$php_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );
-	elseif ( !$mysql_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );
+<?php elseif ( ! $php_compat || ! $mysql_compat ) :
+	if ( ! $mysql_compat && ! $php_compat ) {
+		printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
+	} elseif ( ! $php_compat ) {
+		printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
+	} elseif ( ! $mysql_compat ) {
+		printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
+	}
 ?>
 <?php else :
-switch ( $step ) :
-	case 0:
-		$goback = wp_get_referer();
-		if ( $goback ) {
-			$goback = esc_url_raw( $goback );
-			$goback = urlencode( $goback );
-		}
-?>
-<h1><?php _e( 'Database Update Required' ); ?></h1>
+	switch ( $step ) :
+		case 0:
+			$goback = wp_get_referer();
+			if ( $goback ) {
+				$goback = esc_url_raw( $goback );
+				$goback = urlencode( $goback );
+			}
+	?>
+	<h1><?php _e( 'Database Update Required' ); ?></h1>
 <p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p>
 <p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p>
 <p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
 <?php
 		break;
-	case 1:
-		wp_upgrade();
+		case 1:
+			wp_upgrade();
 
-			$backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
+			$backto = ! empty( $_GET['backto'] ) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
 			$backto = esc_url( $backto );
-			$backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
-?>
-<h1><?php _e( 'Update Complete' ); ?></h1>
+			$backto = wp_validate_redirect( $backto, __get_option( 'home' ) . '/' );
+	?>
+	<h1><?php _e( 'Update Complete' ); ?></h1>
 	<p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
 	<p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
 
Index: src/wp-admin/user/admin.php
===================================================================
--- src/wp-admin/user/admin.php	(revision 40901)
+++ src/wp-admin/user/admin.php	(working copy)
@@ -7,9 +7,9 @@
  * @since 3.1.0
  */
 
-define('WP_USER_ADMIN', true);
+define( 'WP_USER_ADMIN', true );
 
-require_once( dirname(dirname(__FILE__)) . '/admin.php');
+require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
 
 if ( ! is_multisite() ) {
 	wp_redirect( admin_url() );
Index: src/wp-admin/user/menu.php
===================================================================
--- src/wp-admin/user/menu.php	(revision 40901)
+++ src/wp-admin/user/menu.php	(working copy)
@@ -7,11 +7,11 @@
  * @since 3.1.0
  */
 
-$menu[2] = array(__('Dashboard'), 'exist', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard');
+$menu[2] = array( __( 'Dashboard' ), 'exist', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
 
 $menu[4] = array( '', 'exist', 'separator1', '', 'wp-menu-separator' );
 
-$menu[70] = array( __('Profile'), 'exist', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
+$menu[70] = array( __( 'Profile' ), 'exist', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
 
 $menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
 
@@ -19,4 +19,4 @@
 $compat = array();
 $submenu = array();
 
-require_once(ABSPATH . 'wp-admin/includes/menu.php');
+require_once( ABSPATH . 'wp-admin/includes/menu.php' );
Index: src/wp-admin/user-new.php
===================================================================
--- src/wp-admin/user-new.php	(revision 40901)
+++ src/wp-admin/user-new.php	(working copy)
@@ -29,7 +29,7 @@
 	add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );
 }
 
-if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
+if ( isset( $_REQUEST['action'] ) && 'adduser' == $_REQUEST['action'] ) {
 	check_admin_referer( 'add-user', '_wpnonce_add-user' );
 
 	$user_details = null;
@@ -40,13 +40,17 @@
 		if ( current_user_can( 'manage_network_users' ) ) {
 			$user_details = get_user_by( 'login', $user_email );
 		} else {
-			wp_redirect( add_query_arg( array('update' => 'enter_email'), 'user-new.php' ) );
+			wp_redirect( add_query_arg( array(
+				'update' => 'enter_email',
+			), 'user-new.php' ) );
 			die();
 		}
 	}
 
-	if ( !$user_details ) {
-		wp_redirect( add_query_arg( array('update' => 'does_not_exist'), 'user-new.php' ) );
+	if ( ! $user_details ) {
+		wp_redirect( add_query_arg( array(
+			'update' => 'does_not_exist',
+		), 'user-new.php' ) );
 		die();
 	}
 
@@ -64,14 +68,26 @@
 	$username = $user_details->user_login;
 	$user_id = $user_details->ID;
 	if ( $username != null && array_key_exists( $blog_id, get_blogs_of_user( $user_id ) ) ) {
-		$redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' );
+		$redirect = add_query_arg( array(
+			'update' => 'addexisting',
+		), 'user-new.php' );
 	} else {
-		if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) {
-			add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) );
-			$redirect = add_query_arg( array( 'update' => 'addnoconfirmation' , 'user_id' => $user_id ), 'user-new.php' );
+		if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
+			add_existing_user_to_blog( array(
+				'user_id' => $user_id,
+				'role' => $_REQUEST['role'],
+			) );
+			$redirect = add_query_arg( array(
+				'update' => 'addnoconfirmation',
+				'user_id' => $user_id,
+			), 'user-new.php' );
 		} else {
 			$newuser_key = substr( md5( $user_id ), 0, 5 );
-			add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
+			add_option( 'new_user_' . $newuser_key, array(
+				'user_id' => $user_id,
+				'email' => $user_details->user_email,
+				'role' => $_REQUEST['role'],
+			) );
 
 			$roles = get_editable_roles();
 			$role = $roles[ $_REQUEST['role'] ];
@@ -103,12 +119,14 @@
 				restore_previous_locale();
 			}
 
-			$redirect = add_query_arg( array('update' => 'add'), 'user-new.php' );
-		}
-	}
+			$redirect = add_query_arg( array(
+				'update' => 'add',
+			), 'user-new.php' );
+		}// End if().
+	}// End if().
 	wp_redirect( $redirect );
 	die();
-} elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) {
+} elseif ( isset( $_REQUEST['action'] ) && 'createuser' == $_REQUEST['action'] ) {
 	check_admin_referer( 'create-user', '_wpnonce_create-user' );
 
 	if ( ! current_user_can( 'create_users' ) ) {
@@ -125,10 +143,10 @@
 		if ( is_wp_error( $user_id ) ) {
 			$add_user_errors = $user_id;
 		} else {
-			if ( current_user_can( 'list_users' ) )
+			if ( current_user_can( 'list_users' ) ) {
 				$redirect = 'users.php?update=add&id=' . $user_id;
-			else
-				$redirect = add_query_arg( 'update', 'add', 'user-new.php' );
+			} else { $redirect = add_query_arg( 'update', 'add', 'user-new.php' );
+			}
 			wp_redirect( $redirect );
 			die();
 		}
@@ -136,8 +154,8 @@
 		// Adding a new user to this site
 		$new_user_email = wp_unslash( $_REQUEST['email'] );
 		$user_details = wpmu_validate_user_signup( $_REQUEST['user_login'], $new_user_email );
-		if ( is_wp_error( $user_details[ 'errors' ] ) && !empty( $user_details[ 'errors' ]->errors ) ) {
-			$add_user_errors = $user_details[ 'errors' ];
+		if ( is_wp_error( $user_details['errors'] ) && ! empty( $user_details['errors']->errors ) ) {
+			$add_user_errors = $user_details['errors'];
 		} else {
 			/**
 			 * Filters the user_login, also known as the username, before it is added to the site.
@@ -147,74 +165,85 @@
 			 * @param string $user_login The sanitized username.
 			 */
 			$new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) );
-			if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) {
+			if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
 				add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
 				add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email
 			}
-			wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST['role'] ) );
-			if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) {
+			wpmu_signup_user( $new_user_login, $new_user_email, array(
+				'add_to_blog' => $wpdb->blogid,
+				'new_role' => $_REQUEST['role'],
+			) );
+			if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
 				$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) );
 				$new_user = wpmu_activate_signup( $key );
 				if ( is_wp_error( $new_user ) ) {
-					$redirect = add_query_arg( array( 'update' => 'addnoconfirmation' ), 'user-new.php' );
+					$redirect = add_query_arg( array(
+						'update' => 'addnoconfirmation',
+					), 'user-new.php' );
 				} else {
-					$redirect = add_query_arg( array( 'update' => 'addnoconfirmation', 'user_id' => $new_user['user_id'] ), 'user-new.php' );
+					$redirect = add_query_arg( array(
+						'update' => 'addnoconfirmation',
+						'user_id' => $new_user['user_id'],
+					), 'user-new.php' );
 				}
 			} else {
-				$redirect = add_query_arg( array('update' => 'newuserconfirmation'), 'user-new.php' );
+				$redirect = add_query_arg( array(
+					'update' => 'newuserconfirmation',
+				), 'user-new.php' );
 			}
 			wp_redirect( $redirect );
 			die();
-		}
-	}
-}
+		}// End if().
+	}// End if().
+}// End if().
 
-$title = __('Add New User');
+$title = __( 'Add New User' );
 $parent_file = 'users.php';
 
 $do_both = false;
-if ( is_multisite() && current_user_can('promote_users') && current_user_can('create_users') )
+if ( is_multisite() && current_user_can( 'promote_users' ) && current_user_can( 'create_users' ) ) {
 	$do_both = true;
+}
 
-$help = '<p>' . __('To add a new user to your site, fill in the form on this screen and click the Add New User button at the bottom.') . '</p>';
+$help = '<p>' . __( 'To add a new user to your site, fill in the form on this screen and click the Add New User button at the bottom.' ) . '</p>';
 
 if ( is_multisite() ) {
-	$help .= '<p>' . __('Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user&#8217;s name to Edit the user profile under Network Admin > All Users.') . '</p>' .
-	'<p>' . __('New users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain their password. Check the box if you don&#8217;t want the user to receive a welcome email.') . '</p>';
+	$help .= '<p>' . __( 'Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user&#8217;s name to Edit the user profile under Network Admin > All Users.' ) . '</p>' .
+	'<p>' . __( 'New users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain their password. Check the box if you don&#8217;t want the user to receive a welcome email.' ) . '</p>';
 } else {
-	$help .= '<p>' . __('New users are automatically assigned a password, which they can change after logging in. You can view or edit the assigned password by clicking the Show Password button. The username cannot be changed once the user has been added.') . '</p>' .
+	$help .= '<p>' . __( 'New users are automatically assigned a password, which they can change after logging in. You can view or edit the assigned password by clicking the Show Password button. The username cannot be changed once the user has been added.' ) . '</p>' .
 
-	'<p>' . __('By default, new users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you don&#8217;t want to send the new user a welcome email.') . '</p>';
+	'<p>' . __( 'By default, new users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you don&#8217;t want to send the new user a welcome email.' ) . '</p>';
 }
 
-$help .= '<p>' . __('Remember to click the Add New User button at the bottom of this screen when you are finished.') . '</p>';
+$help .= '<p>' . __( 'Remember to click the Add New User button at the bottom of this screen when you are finished.' ) . '</p>';
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
-	'title'   => __('Overview'),
+	'title'   => __( 'Overview' ),
 	'content' => $help,
 ) );
 
 get_current_screen()->add_help_tab( array(
-'id'      => 'user-roles',
-'title'   => __('User Roles'),
-'content' => '<p>' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '</p>' .
+	'id'      => 'user-roles',
+	'title'   => __( 'User Roles' ),
+	'content' => '<p>' . __( 'Here is a basic overview of the different user roles and the permissions associated with each one:' ) . '</p>' .
 				'<ul>' .
-				'<li>' . __('Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.') . '</li>' .
-				'<li>' . __('Contributors can write and manage their posts but not publish posts or upload media files.') . '</li>' .
-				'<li>' . __('Authors can publish and manage their own posts, and are able to upload files.') . '</li>' .
-				'<li>' . __('Editors can publish posts, manage posts as well as manage other people&#8217;s posts, etc.') . '</li>' .
-				'<li>' . __('Administrators have access to all the administration features.') . '</li>' .
-				'</ul>'
+				'<li>' . __( 'Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.' ) . '</li>' .
+				'<li>' . __( 'Contributors can write and manage their posts but not publish posts or upload media files.' ) . '</li>' .
+				'<li>' . __( 'Authors can publish and manage their own posts, and are able to upload files.' ) . '</li>' .
+				'<li>' . __( 'Editors can publish posts, manage posts as well as manage other people&#8217;s posts, etc.' ) . '</li>' .
+				'<li>' . __( 'Administrators have access to all the administration features.' ) . '</li>' .
+				'</ul>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-    '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Add_New_Screen">Documentation on Adding New Users</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Users_Add_New_Screen">Documentation on Adding New Users</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
-wp_enqueue_script('wp-ajax-response');
+wp_enqueue_script( 'wp-ajax-response' );
 wp_enqueue_script( 'user-profile' );
 
 /**
@@ -232,7 +261,7 @@
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
-if ( isset($_GET['update']) ) {
+if ( isset( $_GET['update'] ) ) {
 	$messages = array();
 	if ( is_multisite() ) {
 		$edit_link = '';
@@ -244,13 +273,13 @@
 		}
 
 		switch ( $_GET['update'] ) {
-			case "newuserconfirmation":
-				$messages[] = __('Invitation email sent to new user. A confirmation link must be clicked before their account is created.');
+			case 'newuserconfirmation':
+				$messages[] = __( 'Invitation email sent to new user. A confirmation link must be clicked before their account is created.' );
 				break;
-			case "add":
-				$messages[] = __('Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.');
+			case 'add':
+				$messages[] = __( 'Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.' );
 				break;
-			case "addnoconfirmation":
+			case 'addnoconfirmation':
 				if ( empty( $edit_link ) ) {
 					$messages[] = __( 'User has been added to your site.' );
 				} else {
@@ -258,21 +287,22 @@
 					$messages[] = sprintf( __( 'User has been added to your site. <a href="%s">Edit user</a>' ), $edit_link );
 				}
 				break;
-			case "addexisting":
-				$messages[] = __('That user is already a member of this site.');
+			case 'addexisting':
+				$messages[] = __( 'That user is already a member of this site.' );
 				break;
-			case "does_not_exist":
-				$messages[] = __('The requested user does not exist.');
+			case 'does_not_exist':
+				$messages[] = __( 'The requested user does not exist.' );
 				break;
-			case "enter_email":
-				$messages[] = __('Please enter a valid email address.');
+			case 'enter_email':
+				$messages[] = __( 'Please enter a valid email address.' );
 				break;
 		}
 	} else {
-		if ( 'add' == $_GET['update'] )
-			$messages[] = __('User added.');
-	}
-}
+		if ( 'add' == $_GET['update'] ) {
+			$messages[] = __( 'User added.' );
+		}
+	}// End if().
+}// End if().
 ?>
 <div class="wrap">
 <h1 id="add-new-user"><?php
@@ -283,27 +313,30 @@
 } ?>
 </h1>
 
-<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
+<?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?>
 	<div class="error">
 		<ul>
 		<?php
-			foreach ( $errors->get_error_messages() as $err )
-				echo "<li>$err</li>\n";
+		foreach ( $errors->get_error_messages() as $err ) {
+			echo "<li>$err</li>\n";
+		}
 		?>
 		</ul>
 	</div>
 <?php endif;
 
 if ( ! empty( $messages ) ) {
-	foreach ( $messages as $msg )
+	foreach ( $messages as $msg ) {
 		echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
+	}
 } ?>
 
-<?php if ( isset($add_user_errors) && is_wp_error( $add_user_errors ) ) : ?>
+<?php if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) : ?>
 	<div class="error">
 		<?php
-			foreach ( $add_user_errors->get_error_messages() as $message )
-				echo "<p>$message</p>";
+		foreach ( $add_user_errors->get_error_messages() as $message ) {
+			echo "<p>$message</p>";
+		}
 		?>
 	</div>
 <?php endif; ?>
@@ -311,15 +344,16 @@
 
 <?php
 if ( is_multisite() ) {
-	if ( $do_both )
+	if ( $do_both ) {
 		echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
+	}
 	if ( ! current_user_can( 'manage_network_users' ) ) {
 		echo '<p>' . __( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
-		$label = __('Email');
+		$label = __( 'Email' );
 		$type  = 'email';
 	} else {
 		echo '<p>' . __( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
-		$label = __('Email or Username');
+		$label = __( 'Email or Username' );
 		$type  = 'text';
 	}
 ?>
@@ -340,9 +374,9 @@
 		<td><input name="email" type="<?php echo $type; ?>" id="adduser-email" class="wp-suggest-user" value="" /></td>
 	</tr>
 	<tr class="form-field">
-		<th scope="row"><label for="adduser-role"><?php _e('Role'); ?></label></th>
+		<th scope="row"><label for="adduser-role"><?php _e( 'Role' ); ?></label></th>
 		<td><select name="role" id="adduser-role">
-			<?php wp_dropdown_roles( get_option('default_role') ); ?>
+			<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
 			</select>
 		</td>
 	</tr>
@@ -370,16 +404,19 @@
  */
 do_action( 'user_new_form', 'add-existing-user' );
 ?>
-<?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?>
+<?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array(
+	'id' => 'addusersub',
+) ); ?>
 </form>
 <?php
-} // is_multisite()
+} // End if().
 
-if ( current_user_can( 'create_users') ) {
-	if ( $do_both )
+if ( current_user_can( 'create_users' ) ) {
+	if ( $do_both ) {
 		echo '<h2 id="create-new-user">' . __( 'Add New User' ) . '</h2>';
+	}
 ?>
-<p><?php _e('Create a brand new user and add them to this site.'); ?></p>
+<p><?php _e( 'Create a brand new user and add them to this site.' ); ?></p>
 <form method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php
 	/** This action is documented in wp-admin/user-new.php */
 	do_action( 'user_new_form_tag' );
@@ -402,24 +439,24 @@
 ?>
 <table class="form-table">
 	<tr class="form-field form-required">
-		<th scope="row"><label for="user_login"><?php _e('Username'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
+		<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
 		<td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" maxlength="60" /></td>
 	</tr>
 	<tr class="form-field form-required">
-		<th scope="row"><label for="email"><?php _e('Email'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
+		<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
 		<td><input name="email" type="email" id="email" value="<?php echo esc_attr( $new_user_email ); ?>" /></td>
 	</tr>
-<?php if ( !is_multisite() ) { ?>
+<?php if ( ! is_multisite() ) { ?>
 	<tr class="form-field">
-		<th scope="row"><label for="first_name"><?php _e('First Name') ?> </label></th>
-		<td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr($new_user_firstname); ?>" /></td>
+		<th scope="row"><label for="first_name"><?php _e( 'First Name' ) ?> </label></th>
+		<td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr( $new_user_firstname ); ?>" /></td>
 	</tr>
 	<tr class="form-field">
-		<th scope="row"><label for="last_name"><?php _e('Last Name') ?> </label></th>
-		<td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr($new_user_lastname); ?>" /></td>
+		<th scope="row"><label for="last_name"><?php _e( 'Last Name' ) ?> </label></th>
+		<td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr( $new_user_lastname ); ?>" /></td>
 	</tr>
 	<tr class="form-field">
-		<th scope="row"><label for="url"><?php _e('Website') ?></label></th>
+		<th scope="row"><label for="url"><?php _e( 'Website' ) ?></label></th>
 		<td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td>
 	</tr>
 	<tr class="form-field form-required user-pass1-wrap">
@@ -470,14 +507,16 @@
 			<label for="send_user_notification"><?php _e( 'Send the new user an email about their account.' ); ?></label>
 		</td>
 	</tr>
-<?php } // !is_multisite ?>
+<?php } // End if().
+?>
 	<tr class="form-field">
-		<th scope="row"><label for="role"><?php _e('Role'); ?></label></th>
+		<th scope="row"><label for="role"><?php _e( 'Role' ); ?></label></th>
 		<td><select name="role" id="role">
 			<?php
-			if ( !$new_user_role )
-				$new_user_role = !empty($current_role) ? $current_role : get_option('default_role');
-			wp_dropdown_roles($new_user_role);
+			if ( ! $new_user_role ) {
+				$new_user_role = ! empty( $current_role ) ? $current_role : get_option( 'default_role' );
+			}
+			wp_dropdown_roles( $new_user_role );
 			?>
 			</select>
 		</td>
@@ -498,10 +537,13 @@
 do_action( 'user_new_form', 'add-new-user' );
 ?>
 
-<?php submit_button( __( 'Add New User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
+<?php submit_button( __( 'Add New User' ), 'primary', 'createuser', true, array(
+	'id' => 'createusersub',
+) ); ?>
 
 </form>
-<?php } // current_user_can('create_users') ?>
+<?php } // End if().
+?>
 </div>
 <?php
 include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: src/wp-admin/widgets.php
===================================================================
--- src/wp-admin/widgets.php	(revision 40901)
+++ src/wp-admin/widgets.php	(working copy)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 /** WordPress Administration Widgets API */
-require_once(ABSPATH . 'wp-admin/includes/widgets.php');
+require_once( ABSPATH . 'wp-admin/includes/widgets.php' );
 
 if ( ! current_user_can( 'edit_theme_options' ) ) {
 	wp_die(
@@ -21,7 +21,7 @@
 }
 
 $widgets_access = get_user_setting( 'widgets_access' );
-if ( isset($_GET['widgets-access']) ) {
+if ( isset( $_GET['widgets-access'] ) ) {
 	check_admin_referer( 'widgets-access' );
 
 	$widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
@@ -31,10 +31,11 @@
 if ( 'on' == $widgets_access ) {
 	add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
 } else {
-	wp_enqueue_script('admin-widgets');
+	wp_enqueue_script( 'admin-widgets' );
 
-	if ( wp_is_mobile() )
+	if ( wp_is_mobile() ) {
 		wp_enqueue_script( 'jquery-touch-punch' );
+	}
 }
 
 /**
@@ -49,32 +50,32 @@
 $parent_file = 'themes.php';
 
 get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '</p>
-	<p>' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '</p>'
+	'id'		=> 'overview',
+	'title'		=> __( 'Overview' ),
+	'content'	=>
+	'<p>' . __( 'Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.' ) . '</p>
+	<p>' . __( 'The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.' ) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'removing-reusing',
-'title'		=> __('Removing and Reusing'),
-'content'	=>
-	'<p>' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '</p>
-	<p>' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it&#8217;s not required.') . '</p>
-	<p>' . __('Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.') . '</p>'
+	'id'		=> 'removing-reusing',
+	'title'		=> __( 'Removing and Reusing' ),
+	'content'	=>
+	'<p>' . __( 'If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.' ) . '</p>
+	<p>' . __( 'Widgets may be used multiple times. You can give each widget a title, to display on your site, but it&#8217;s not required.' ) . '</p>
+	<p>' . __( 'Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.' ) . '</p>',
 ) );
 get_current_screen()->add_help_tab( array(
-'id'		=> 'missing-widgets',
-'title'		=> __('Missing Widgets'),
-'content'	=>
-	'<p>' . __('Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.') . '</p>' .
-		'<p>' . __('When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.') . '</p>'
+	'id'		=> 'missing-widgets',
+	'title'		=> __( 'Missing Widgets' ),
+	'content'	=>
+	'<p>' . __( 'Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.' ) . '</p>' .
+		'<p>' . __( 'When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.' ) . '</p>',
 ) );
 
 get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Appearance_Widgets_Screen">Documentation on Widgets</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
+	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
+	'<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Widgets_Screen">Documentation on Widgets</a>' ) . '</p>' .
+	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
 );
 
 if ( ! current_theme_supports( 'widgets' ) ) {
@@ -84,12 +85,14 @@
 // These are the widgets grouped by sidebar
 $sidebars_widgets = wp_get_sidebars_widgets();
 
-if ( empty( $sidebars_widgets ) )
+if ( empty( $sidebars_widgets ) ) {
 	$sidebars_widgets = wp_get_widget_defaults();
+}
 
 foreach ( $sidebars_widgets as $sidebar_id => $widgets ) {
-	if ( 'wp_inactive_widgets' == $sidebar_id )
+	if ( 'wp_inactive_widgets' == $sidebar_id ) {
 		continue;
+	}
 
 	if ( ! is_registered_sidebar( $sidebar_id ) ) {
 		if ( ! empty( $widgets ) ) { // register the inactive_widgets area as sidebar
@@ -111,7 +114,7 @@
 
 // register the inactive_widgets area as sidebar
 register_sidebar(array(
-	'name' => __('Inactive Widgets'),
+	'name' => __( 'Inactive Widgets' ),
 	'id' => 'wp_inactive_widgets',
 	'class' => 'inactive-sidebar',
 	'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ),
@@ -124,36 +127,43 @@
 retrieve_widgets();
 
 // We're saving a widget without js
-if ( isset($_POST['savewidget']) || isset($_POST['removewidget']) ) {
+if ( isset( $_POST['savewidget'] ) || isset( $_POST['removewidget'] ) ) {
 	$widget_id = $_POST['widget-id'];
-	check_admin_referer("save-delete-widget-$widget_id");
+	check_admin_referer( "save-delete-widget-$widget_id" );
 
-	$number = isset($_POST['multi_number']) ? (int) $_POST['multi_number'] : '';
+	$number = isset( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : '';
 	if ( $number ) {
 		foreach ( $_POST as $key => $val ) {
-			if ( is_array($val) && preg_match('/__i__|%i%/', key($val)) ) {
-				$_POST[$key] = array( $number => array_shift($val) );
+			if ( is_array( $val ) && preg_match( '/__i__|%i%/', key( $val ) ) ) {
+				$_POST[ $key ] = array(
+					$number => array_shift( $val ),
+				);
 				break;
 			}
 		}
 	}
 
 	$sidebar_id = $_POST['sidebar'];
-	$position = isset($_POST[$sidebar_id . '_position']) ? (int) $_POST[$sidebar_id . '_position'] - 1 : 0;
+	$position = isset( $_POST[ $sidebar_id . '_position' ] ) ? (int) $_POST[ $sidebar_id . '_position' ] - 1 : 0;
 
 	$id_base = $_POST['id_base'];
-	$sidebar = isset($sidebars_widgets[$sidebar_id]) ? $sidebars_widgets[$sidebar_id] : array();
+	$sidebar = isset( $sidebars_widgets[ $sidebar_id ] ) ? $sidebars_widgets[ $sidebar_id ] : array();
 
 	// Delete.
-	if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) {
+	if ( isset( $_POST['removewidget'] ) && $_POST['removewidget'] ) {
 
-		if ( !in_array($widget_id, $sidebar, true) ) {
-			wp_redirect( admin_url('widgets.php?error=0') );
+		if ( ! in_array( $widget_id, $sidebar, true ) ) {
+			wp_redirect( admin_url( 'widgets.php?error=0' ) );
 			exit;
 		}
 
-		$sidebar = array_diff( $sidebar, array($widget_id) );
-		$_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1');
+		$sidebar = array_diff( $sidebar, array( $widget_id ) );
+		$_POST = array(
+			'sidebar' => $sidebar_id,
+			'widget-' . $id_base => array(),
+			'the-widget-id' => $widget_id,
+			'delete_widget' => '1',
+		);
 
 		/**
 		 * Fires immediately after a widget has been marked for deletion.
@@ -170,8 +180,9 @@
 	$_POST['widget-id'] = $sidebar;
 
 	foreach ( (array) $wp_registered_widget_updates as $name => $control ) {
-		if ( $name != $id_base || !is_callable($control['callback']) )
+		if ( $name != $id_base || ! is_callable( $control['callback'] ) ) {
 			continue;
+		}
 
 		ob_start();
 			call_user_func_array( $control['callback'], $control['params'] );
@@ -180,21 +191,22 @@
 		break;
 	}
 
-	$sidebars_widgets[$sidebar_id] = $sidebar;
+	$sidebars_widgets[ $sidebar_id ] = $sidebar;
 
 	// Remove old position.
-	if ( !isset($_POST['delete_widget']) ) {
+	if ( ! isset( $_POST['delete_widget'] ) ) {
 		foreach ( $sidebars_widgets as $key => $sb ) {
-			if ( is_array($sb) )
-				$sidebars_widgets[$key] = array_diff( $sb, array($widget_id) );
+			if ( is_array( $sb ) ) {
+				$sidebars_widgets[ $key ] = array_diff( $sb, array( $widget_id ) );
+			}
 		}
-		array_splice( $sidebars_widgets[$sidebar_id], $position, 0, $widget_id );
+		array_splice( $sidebars_widgets[ $sidebar_id ], $position, 0, $widget_id );
 	}
 
-	wp_set_sidebars_widgets($sidebars_widgets);
-	wp_redirect( admin_url('widgets.php?message=0') );
+	wp_set_sidebars_widgets( $sidebars_widgets );
+	wp_redirect( admin_url( 'widgets.php?message=0' ) );
 	exit;
-}
+}// End if().
 
 // Remove inactive widgets without js
 if ( isset( $_POST['removeinactivewidgets'] ) ) {
@@ -206,9 +218,9 @@
 			$multi_number = array_pop( $pieces );
 			$id_base = implode( '-', $pieces );
 			$widget = get_option( 'widget_' . $id_base );
-			unset( $widget[$multi_number] );
+			unset( $widget[ $multi_number ] );
 			update_option( 'widget_' . $id_base, $widget );
-			unset( $sidebars_widgets['wp_inactive_widgets'][$key] );
+			unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] );
 		}
 
 		wp_set_sidebars_widgets( $sidebars_widgets );
@@ -219,15 +231,15 @@
 }
 
 // Output the widget form without js
-if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
+if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) {
 	$widget_id = $_GET['editwidget'];
 
-	if ( isset($_GET['addnew']) ) {
+	if ( isset( $_GET['addnew'] ) ) {
 		// Default to the first sidebar
 		$keys = array_keys( $wp_registered_sidebars );
 		$sidebar = reset( $keys );
 
-		if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget
+		if ( isset( $_GET['base'] ) && isset( $_GET['num'] ) ) { // multi-widget
 			// Copy minimal info from an existing instance of this widget to a new instance
 			foreach ( $wp_registered_widget_controls as $control ) {
 				if ( $_GET['base'] === $control['id_base'] ) {
@@ -235,34 +247,37 @@
 					$multi_number = (int) $_GET['num'];
 					$control['params'][0]['number'] = -1;
 					$widget_id = $control['id'] = $control['id_base'] . '-' . $multi_number;
-					$wp_registered_widget_controls[$control['id']] = $control;
+					$wp_registered_widget_controls[ $control['id'] ] = $control;
 					break;
 				}
 			}
 		}
 	}
 
-	if ( isset($wp_registered_widget_controls[$widget_id]) && !isset($control) ) {
-		$control = $wp_registered_widget_controls[$widget_id];
+	if ( isset( $wp_registered_widget_controls[ $widget_id ] ) && ! isset( $control ) ) {
+		$control = $wp_registered_widget_controls[ $widget_id ];
 		$control_callback = $control['callback'];
-	} elseif ( !isset($wp_registered_widget_controls[$widget_id]) && isset($wp_registered_widgets[$widget_id]) ) {
-		$name = esc_html( strip_tags($wp_registered_widgets[$widget_id]['name']) );
+	} elseif ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) && isset( $wp_registered_widgets[ $widget_id ] ) ) {
+		$name = esc_html( strip_tags( $wp_registered_widgets[ $widget_id ]['name'] ) );
 	}
 
-	if ( !isset($name) )
-		$name = esc_html( strip_tags($control['name']) );
+	if ( ! isset( $name ) ) {
+		$name = esc_html( strip_tags( $control['name'] ) );
+	}
 
-	if ( !isset($sidebar) )
-		$sidebar = isset($_GET['sidebar']) ? $_GET['sidebar'] : 'wp_inactive_widgets';
+	if ( ! isset( $sidebar ) ) {
+		$sidebar = isset( $_GET['sidebar'] ) ? $_GET['sidebar'] : 'wp_inactive_widgets';
+	}
 
-	if ( !isset($multi_number) )
-		$multi_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : '';
+	if ( ! isset( $multi_number ) ) {
+		$multi_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : '';
+	}
 
-	$id_base = isset($control['id_base']) ? $control['id_base'] : $control['id'];
+	$id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id'];
 
 	// Show the widget form.
-	$width = ' style="width:' . max($control['width'], 350) . 'px"';
-	$key = isset($_GET['key']) ? (int) $_GET['key'] : 0;
+	$width = ' style="width:' . max( $control['width'], 350 ) . 'px"';
+	$key = isset( $_GET['key'] ) ? (int) $_GET['key'] : 0;
 
 	require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
 	<div class="wrap">
@@ -273,57 +288,59 @@
 	<form action="widgets.php" method="post">
 	<div class="widget-inside">
 <?php
-	if ( is_callable( $control_callback ) )
-		call_user_func_array( $control_callback, $control['params'] );
-	else
-		echo '<p>' . __('There are no options for this widget.') . "</p>\n"; ?>
+if ( is_callable( $control_callback ) ) {
+	call_user_func_array( $control_callback, $control['params'] );
+} else { echo '<p>' . __( 'There are no options for this widget.' ) . "</p>\n";
+} ?>
 	</div>
 
-	<p class="describe"><?php _e('Select both the sidebar for this widget and the position of the widget in that sidebar.'); ?></p>
+	<p class="describe"><?php _e( 'Select both the sidebar for this widget and the position of the widget in that sidebar.' ); ?></p>
 	<div class="widget-position">
-	<table class="widefat"><thead><tr><th><?php _e('Sidebar'); ?></th><th><?php _e('Position'); ?></th></tr></thead><tbody>
+	<table class="widefat"><thead><tr><th><?php _e( 'Sidebar' ); ?></th><th><?php _e( 'Position' ); ?></th></tr></thead><tbody>
 <?php
-	foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) {
-		echo "\t\t<tr><td><label><input type='radio' name='sidebar' value='" . esc_attr($sbname) . "'" . checked( $sbname, $sidebar, false ) . " /> $sbvalue[name]</label></td><td>";
-		if ( 'wp_inactive_widgets' == $sbname || 'orphaned_widgets' == substr( $sbname, 0, 16 ) ) {
-			echo '&nbsp;';
+foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) {
+	echo "\t\t<tr><td><label><input type='radio' name='sidebar' value='" . esc_attr( $sbname ) . "'" . checked( $sbname, $sidebar, false ) . " /> $sbvalue[name]</label></td><td>";
+	if ( 'wp_inactive_widgets' == $sbname || 'orphaned_widgets' == substr( $sbname, 0, 16 ) ) {
+		echo '&nbsp;';
+	} else {
+		if ( ! isset( $sidebars_widgets[ $sbname ] ) || ! is_array( $sidebars_widgets[ $sbname ] ) ) {
+			$j = 1;
+			$sidebars_widgets[ $sbname ] = array();
 		} else {
-			if ( !isset($sidebars_widgets[$sbname]) || !is_array($sidebars_widgets[$sbname]) ) {
-				$j = 1;
-				$sidebars_widgets[$sbname] = array();
-			} else {
-				$j = count($sidebars_widgets[$sbname]);
-				if ( isset($_GET['addnew']) || !in_array($widget_id, $sidebars_widgets[$sbname], true) )
-					$j++;
+			$j = count( $sidebars_widgets[ $sbname ] );
+			if ( isset( $_GET['addnew'] ) || ! in_array( $widget_id, $sidebars_widgets[ $sbname ], true ) ) {
+				$j++;
 			}
-			$selected = '';
-			echo "\t\t<select name='{$sbname}_position'>\n";
-			echo "\t\t<option value=''>" . __('&mdash; Select &mdash;') . "</option>\n";
-			for ( $i = 1; $i <= $j; $i++ ) {
-				if ( in_array($widget_id, $sidebars_widgets[$sbname], true) )
-					$selected = selected( $i, $key + 1, false );
-				echo "\t\t<option value='$i'$selected> $i </option>\n";
+		}
+		$selected = '';
+		echo "\t\t<select name='{$sbname}_position'>\n";
+		echo "\t\t<option value=''>" . __( '&mdash; Select &mdash;' ) . "</option>\n";
+		for ( $i = 1; $i <= $j; $i++ ) {
+			if ( in_array( $widget_id, $sidebars_widgets[ $sbname ], true ) ) {
+				$selected = selected( $i, $key + 1, false );
 			}
-			echo "\t\t</select>\n";
+			echo "\t\t<option value='$i'$selected> $i </option>\n";
 		}
-		echo "</td></tr>\n";
-	} ?>
+		echo "\t\t</select>\n";
+	}
+	echo "</td></tr>\n";
+} ?>
 	</tbody></table>
 	</div>
 
 	<div class="widget-control-actions">
 <?php
-	if ( isset($_GET['addnew']) ) { ?>
-	<a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
+if ( isset( $_GET['addnew'] ) ) { ?>
+	<a href="widgets.php" class="button alignleft"><?php _e( 'Cancel' ); ?></a>
 <?php
-	} else {
-		submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
-	}
+} else {
+	submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
+}
 	submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false ); ?>
-	<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
-	<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
-	<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
-<?php	wp_nonce_field("save-delete-widget-$widget_id"); ?>
+	<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $widget_id ); ?>" />
+	<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $id_base ); ?>" />
+	<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr( $multi_number ); ?>" />
+<?php	wp_nonce_field( "save-delete-widget-$widget_id" ); ?>
 	<br class="clear" />
 	</div>
 	</form>
@@ -332,15 +349,15 @@
 <?php
 	require_once( ABSPATH . 'wp-admin/admin-footer.php' );
 	exit;
-}
+}// End if().
 
 $messages = array(
-	__('Changes saved.')
+	__( 'Changes saved.' )
 );
 
 $errors = array(
-	__('Error while saving.'),
-	__('Error in displaying the widget settings form.')
+	__( 'Error while saving.' ),
+	__( 'Error in displaying the widget settings form.' ),
 );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
@@ -356,8 +373,12 @@
 		' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
 		esc_url( add_query_arg(
 			array(
-				array( 'autofocus' => array( 'panel' => 'widgets' ) ),
-				'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
+				array(
+					'autofocus' => array(
+						'panel' => 'widgets',
+					),
+				),
+				'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
 			),
 			admin_url( 'customize.php' )
 		) ),
@@ -368,11 +389,11 @@
 
 <hr class="wp-header-end">
 
-<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
-<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div>
+<?php if ( isset( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { ?>
+<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[ $_GET['message'] ]; ?></p></div>
 <?php } ?>
-<?php if ( isset($_GET['error']) && isset($errors[$_GET['error']]) ) { ?>
-<div id="message" class="error"><p><?php echo $errors[$_GET['error']]; ?></p></div>
+<?php if ( isset( $_GET['error'] ) && isset( $errors[ $_GET['error'] ] ) ) { ?>
+<div id="message" class="error"><p><?php echo $errors[ $_GET['error'] ]; ?></p></div>
 <?php } ?>
 
 <?php
@@ -392,7 +413,7 @@
 		</div>
 		<div class="widget-holder">
 			<div class="sidebar-description">
-				<p class="description"><?php _e('To activate a widget drag it to a sidebar or click on it. To deactivate a widget and delete its settings, drag it back.'); ?></p>
+				<p class="description"><?php _e( 'To activate a widget drag it to a sidebar or click on it. To deactivate a widget and delete its settings, drag it back.' ); ?></p>
 			</div>
 			<div id="widget-list">
 				<?php wp_list_widgets(); ?>
@@ -408,8 +429,9 @@
 foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
 	if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) {
 		$wrap_class = 'widgets-holder-wrap';
-		if ( !empty( $registered_sidebar['class'] ) )
+		if ( ! empty( $registered_sidebar['class'] ) ) {
 			$wrap_class .= ' ' . $registered_sidebar['class'];
+		}
 
 		$is_inactive_widgets = 'wp_inactive_widgets' == $registered_sidebar['id'];
 		?>
@@ -422,9 +444,11 @@
 					<form action="" method="post">
 						<p>
 							<?php
-							$attributes = array( 'id' => 'inactive-widgets-control-remove' );
+							$attributes = array(
+								'id' => 'inactive-widgets-control-remove',
+							);
 
-							if ( empty($sidebars_widgets['wp_inactive_widgets']) ) {
+							if ( empty( $sidebars_widgets['wp_inactive_widgets'] ) ) {
 								$attributes['disabled'] = '';
 							}
 
@@ -444,9 +468,9 @@
 		<?php
 
 	} else {
-		$theme_sidebars[$sidebar] = $registered_sidebar;
-	}
-}
+		$theme_sidebars[ $sidebar ] = $registered_sidebar;
+	}// End if().
+}// End foreach().
 
 ?>
 </div>
@@ -471,11 +495,13 @@
 
 foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
 	$wrap_class = 'widgets-holder-wrap';
-	if ( !empty( $registered_sidebar['class'] ) )
+	if ( ! empty( $registered_sidebar['class'] ) ) {
 		$wrap_class .= ' sidebar-' . $registered_sidebar['class'];
+	}
 
-	if ( $i > 0 )
+	if ( $i > 0 ) {
 		$wrap_class .= ' closed';
+	}
 
 	if ( $split && $i == $split ) {
 		?>
