Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 21841)
+++ wp-includes/general-template.php	(working copy)
@@ -31,7 +31,7 @@
 	$templates[] = 'header.php';
 
 	// Backward compat code will be removed in a future release
-	if ('' == locate_template($templates, true))
+	if ( '' == locate_template( $templates, true ) )
 		load_template( ABSPATH . WPINC . '/theme-compat/header.php');
 }
 
@@ -60,7 +60,7 @@
 	$templates[] = 'footer.php';
 
 	// Backward compat code will be removed in a future release
-	if ('' == locate_template($templates, true))
+	if ( '' == locate_template( $templates, true ) )
 		load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
 }
 
@@ -89,7 +89,7 @@
 	$templates[] = 'sidebar.php';
 
 	// Backward compat code will be removed in a future release
-	if ('' == locate_template($templates, true))
+	if ( '' == locate_template( $templates, true ) )
 		load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
 }
 
@@ -125,7 +125,7 @@
 
 	$templates[] = "{$slug}.php";
 
-	locate_template($templates, true, false);
+	locate_template( $templates, true, false );
 }
 
 /**
@@ -147,13 +147,14 @@
  *
  * @since 2.7.0
  * @param boolean $echo Default to echo and not return the form.
+ * @return mixed, string search form if $echo set to false
  */
-function get_search_form($echo = true) {
+function get_search_form( $echo = true ) {
 	do_action( 'get_search_form' );
 
 	$search_form_template = locate_template('searchform.php');
 	if ( '' != $search_form_template ) {
-		require($search_form_template);
+		require( $search_form_template );
 		return;
 	}
 
@@ -165,9 +166,9 @@
 	</form>';
 
 	if ( $echo )
-		echo apply_filters('get_search_form', $form);
+		echo apply_filters( 'get_search_form', $form );
 	else
-		return apply_filters('get_search_form', $form);
+		return apply_filters( 'get_search_form', $form );
 }
 
 /**
@@ -181,17 +182,18 @@
  *
  * @param string $redirect Optional path to redirect to on login/logout.
  * @param boolean $echo Default to echo and not return the link.
+ * @return mixed, string log In/Out link if echo set to false
  */
-function wp_loginout($redirect = '', $echo = true) {
+function wp_loginout( $redirect = '', $echo = true ) {
 	if ( ! is_user_logged_in() )
-		$link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
+		$link = '<a href="' . esc_url( wp_login_url( $redirect ) ) . '">' . __('Log in') . '</a>';
 	else
-		$link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
+		$link = '<a href="' . esc_url( wp_logout_url( $redirect ) ) . '">' . __('Log out') . '</a>';
 
 	if ( $echo )
-		echo apply_filters('loginout', $link);
+		echo apply_filters( 'loginout', $link );
 	else
-		return apply_filters('loginout', $link);
+		return apply_filters( 'loginout', $link );
 }
 
 /**
@@ -205,17 +207,18 @@
  * @uses apply_filters() calls 'logout_url' hook on final logout url
  *
  * @param string $redirect Path to redirect to on logout.
+ * @return string The logout url
  */
-function wp_logout_url($redirect = '') {
+function wp_logout_url( $redirect = '' ) {
 	$args = array( 'action' => 'logout' );
-	if ( !empty($redirect) ) {
+	if ( !empty( $redirect ) ) {
 		$args['redirect_to'] = urlencode( $redirect );
 	}
 
-	$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
+	$logout_url = add_query_arg( $args, site_url( 'wp-login.php', 'login' ) );
 	$logout_url = wp_nonce_url( $logout_url, 'log-out' );
 
-	return apply_filters('logout_url', $logout_url, $redirect);
+	return apply_filters( 'logout_url', $logout_url, $redirect );
 }
 
 /**
@@ -231,16 +234,16 @@
  * @param bool $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false.
  * @return string A log in url
  */
-function wp_login_url($redirect = '', $force_reauth = false) {
-	$login_url = site_url('wp-login.php', 'login');
+function wp_login_url( $redirect = '', $force_reauth = false ) {
+	$login_url = site_url( 'wp-login.php', 'login' );
 
-	if ( !empty($redirect) )
-		$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
+	if ( !empty( $redirect ) )
+		$login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url );
 
 	if ( $force_reauth )
-		$login_url = add_query_arg('reauth', '1', $login_url);
+		$login_url = add_query_arg( 'reauth', '1', $login_url );
 
-	return apply_filters('login_url', $login_url, $redirect);
+	return apply_filters( 'login_url', $login_url, $redirect );
 }
 
 /**
@@ -249,7 +252,7 @@
  *
  * @since 3.0.0
  * @param array $args Configuration options to modify the form output
- * @return Void, or string containing the form
+ * @return mixed, string containing the form is $echo set to false
  */
 function wp_login_form( $args = array() ) {
 	$defaults = array( 'echo' => true,
@@ -305,14 +308,15 @@
  * @uses apply_filters() calls 'lostpassword_url' hook on the lostpassword url
  *
  * @param string $redirect Path to redirect to on login.
+ * @return string
  */
 function wp_lostpassword_url( $redirect = '' ) {
 	$args = array( 'action' => 'lostpassword' );
-	if ( !empty($redirect) ) {
+	if ( !empty( $redirect ) ) {
 		$args['redirect_to'] = $redirect;
 	}
 
-	$lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
+	$lostpassword_url = add_query_arg( $args, network_site_url( 'wp-login.php', 'login' ) );
 	return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
 }
 
@@ -328,22 +332,23 @@
  * @param string $before Text to output before the link (defaults to <li>).
  * @param string $after Text to output after the link (defaults to </li>).
  * @param boolean $echo Default to echo and not return the link.
+ * @return mixed, string if $echo set to false
  */
 function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
 
 	if ( ! is_user_logged_in() ) {
-		if ( get_option('users_can_register') )
-			$link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;
+		if ( get_option( 'users_can_register' ) )
+			$link = $before . '<a href="' . site_url( 'wp-login.php?action=register', 'login' ) . '">' . __( 'Register' ) . '</a>' . $after;
 		else
 			$link = '';
 	} else {
-		$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
+		$link = $before . '<a href="' . admin_url() . '">' . __( 'Site Admin' ) . '</a>' . $after;
 	}
 
 	if ( $echo )
-		echo apply_filters('register', $link);
+		echo apply_filters( 'register', $link );
 	else
-		return apply_filters('register', $link);
+		return apply_filters( 'register', $link );
 }
 
 /**
@@ -357,7 +362,7 @@
  * @uses do_action() Calls 'wp_meta' hook.
  */
 function wp_meta() {
-	do_action('wp_meta');
+	do_action( 'wp_meta' );
 }
 
 /**
@@ -483,9 +488,9 @@
 
 	if ( 'display' == $filter ) {
 		if ( $url )
-			$output = apply_filters('bloginfo_url', $output, $show);
+			$output = apply_filters( 'bloginfo_url', $output, $show );
 		else
-			$output = apply_filters('bloginfo', $output, $show);
+			$output = apply_filters( 'bloginfo', $output, $show );
 	}
 
 	return $output;
@@ -513,7 +518,7 @@
  * @param string $seplocation Optional. Direction to display title, 'right'.
  * @return string|null String on retrieve, null when displaying.
  */
-function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
+function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
 	global $wpdb, $wp_locale;
 
 	$m = get_query_var('m');
@@ -555,24 +560,24 @@
 	// If there's a month
 	if ( is_archive() && !empty($m) ) {
 		$my_year = substr($m, 0, 4);
-		$my_month = $wp_locale->get_month(substr($m, 4, 2));
-		$my_day = intval(substr($m, 6, 2));
+		$my_month = $wp_locale->get_month( substr( $m, 4, 2 ) );
+		$my_day = intval( substr( $m, 6, 2 ) );
 		$title = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' );
 	}
 
 	// If there's a year
 	if ( is_archive() && !empty($year) ) {
 		$title = $year;
-		if ( !empty($monthnum) )
-			$title .= $t_sep . $wp_locale->get_month($monthnum);
-		if ( !empty($day) )
-			$title .= $t_sep . zeroise($day, 2);
+		if ( !empty( $monthnum ) )
+			$title .= $t_sep . $wp_locale->get_month( $monthnum );
+		if ( !empty( $day ) )
+			$title .= $t_sep . zeroise( $day, 2 );
 	}
 
 	// If it's a search
 	if ( is_search() ) {
 		/* translators: 1: separator, 2: search phrase */
-		$title = sprintf(__('Search Results %1$s %2$s'), $t_sep, strip_tags($search));
+		$title = sprintf(__( 'Search Results %1$s %2$s' ), $t_sep, strip_tags( $search ) );
 	}
 
 	// If it's a 404 page
@@ -594,7 +599,7 @@
 		$title = $prefix . implode( " $sep ", $title_array );
 	}
 
-	$title = apply_filters('wp_title', $title, $sep, $seplocation);
+	$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
 
 	// Send it out
 	if ( $display )
@@ -620,13 +625,13 @@
  * @param bool $display Optional, default is true. Whether to display or retrieve title.
  * @return string|null Title when retrieving, null when displaying or failure.
  */
-function single_post_title($prefix = '', $display = true) {
+function single_post_title( $prefix = '', $display = true ) {
 	$_post = get_queried_object();
 
 	if ( !isset($_post->post_title) )
 		return;
 
-	$title = apply_filters('single_post_title', $_post->post_title, $_post);
+	$title = apply_filters( 'single_post_title', $_post->post_title, $_post );
 	if ( $display )
 		echo $prefix . $title;
 	else
@@ -650,7 +655,7 @@
 		return;
 
 	$post_type_obj = get_queried_object();
-	$title = apply_filters('post_type_archive_title', $post_type_obj->labels->name );
+	$title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name );
 
 	if ( $display )
 		echo $prefix . $title;
@@ -759,22 +764,22 @@
  * @param bool $display Optional, default is true. Whether to display or retrieve title.
  * @return string|null Title when retrieving, null when displaying or failure.
  */
-function single_month_title($prefix = '', $display = true ) {
+function single_month_title( $prefix = '', $display = true ) {
 	global $wp_locale;
 
 	$m = get_query_var('m');
 	$year = get_query_var('year');
 	$monthnum = get_query_var('monthnum');
 
-	if ( !empty($monthnum) && !empty($year) ) {
+	if ( !empty( $monthnum ) && !empty( $year ) ) {
 		$my_year = $year;
-		$my_month = $wp_locale->get_month($monthnum);
-	} elseif ( !empty($m) ) {
-		$my_year = substr($m, 0, 4);
-		$my_month = $wp_locale->get_month(substr($m, 4, 2));
+		$my_month = $wp_locale->get_month( $monthnum );
+	} elseif ( !empty( $m ) ) {
+		$my_year = substr( $m, 0, 4 );
+		$my_month = $wp_locale->get_month( substr( $m, 4, 2 ) );
 	}
 
-	if ( empty($my_month) )
+	if ( empty( $my_month ) )
 		return false;
 
 	$result = $prefix . $my_month . $prefix . $my_year;
@@ -817,14 +822,14 @@
  * @param string $after Optional.
  * @return string HTML link content for archive.
  */
-function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
-	$text = wptexturize($text);
-	$title_text = esc_attr($text);
-	$url = esc_url($url);
+function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '' ) {
+	$text = wptexturize( $text );
+	$title_text = esc_attr( $text );
+	$url = esc_url( $url );
 
-	if ('link' == $format)
+	if ( 'link' == $format )
 		$link_html = "\t<link rel='archives' title='$title_text' href='$url' />\n";
-	elseif ('option' == $format)
+	elseif ( 'option' == $format )
 		$link_html = "\t<option value='$url'>$before $text $after</option>\n";
 	elseif ('html' == $format)
 		$link_html = "\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\n";
@@ -861,8 +866,9 @@
  * @since 1.2.0
  *
  * @param string|array $args Optional. Override defaults.
+ * @return mixed, string if $echo set to false
  */
-function wp_get_archives($args = '') {
+function wp_get_archives( $args = '' ) {
 	global $wpdb, $wp_locale;
 
 	$defaults = array(
@@ -879,7 +885,7 @@
 		$type = 'monthly';
 
 	if ( '' != $limit ) {
-		$limit = absint($limit);
+		$limit = absint( $limit );
 		$limit = ' LIMIT '.$limit;
 	}
 
@@ -1046,9 +1052,9 @@
  * @param int $num Number of day.
  * @return int Days since the start of the week.
  */
-function calendar_week_mod($num) {
+function calendar_week_mod( $num ) {
 	$base = 7;
-	return ($num - $base*floor($num/$base));
+	return ( $num - $base*floor( $num/$base ) );
 }
 
 /**
@@ -1062,14 +1068,15 @@
  *
  * @param bool $initial Optional, default is true. Use initial calendar names.
  * @param bool $echo Optional, default is true. Set to false for return.
+ * @return mixed, string if $echo set to false
  */
-function get_calendar($initial = true, $echo = true) {
+function get_calendar( $initial = true, $echo = true ) {
 	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
 
 	$cache = array();
 	$key = md5( $m . $monthnum . $year );
 	if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
-		if ( is_array($cache) && isset( $cache[ $key ] ) ) {
+		if ( is_array( $cache ) && isset( $cache[$key] ) ) {
 			if ( $echo ) {
 				echo apply_filters( 'get_calendar',  $cache[$key] );
 				return;
@@ -1079,7 +1086,7 @@
 		}
 	}
 
-	if ( !is_array($cache) )
+	if ( !is_array( $cache ) )
 		$cache = array();
 
 	// Quick check. If we have no posts at all, abort!
@@ -1096,15 +1103,15 @@
 		$w = ''.intval($_GET['w']);
 
 	// week_begins = 0 stands for Sunday
-	$week_begins = intval(get_option('start_of_week'));
+	$week_begins = intval( get_option('start_of_week'));
 
 	// Let's figure out when we are
-	if ( !empty($monthnum) && !empty($year) ) {
-		$thismonth = ''.zeroise(intval($monthnum), 2);
-		$thisyear = ''.intval($year);
-	} elseif ( !empty($w) ) {
+	if ( !empty($monthnum) && !empty( $year ) ) {
+		$thismonth = ''.zeroise( intval( $monthnum ), 2 );
+		$thisyear = ''.intval( $year );
+	} elseif ( !empty( $w ) ) {
 		// We need to get the month from MySQL
-		$thisyear = ''.intval(substr($m, 0, 4));
+		$thisyear = ''.intval( substr( $m, 0, 4 ) );
 		$d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
 		$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')");
 	} elseif ( !empty($m) ) {
@@ -1112,14 +1119,14 @@
 		if ( strlen($m) < 6 )
 				$thismonth = '01';
 		else
-				$thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
+				$thismonth = ''.zeroise( intval( substr( $m, 4, 2 ) ), 2 );
 	} else {
-		$thisyear = gmdate('Y', current_time('timestamp'));
-		$thismonth = gmdate('m', current_time('timestamp'));
+		$thisyear = gmdate( 'Y', current_time( 'timestamp' ) );
+		$thismonth = gmdate( 'm', current_time( 'timestamp' ) );
 	}
 
-	$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
-	$last_day = date('t', $unixmonth);
+	$unixmonth = mktime( 0, 0 , 0, $thismonth, 1, $thisyear );
+	$last_day = date( 't', $unixmonth );
 
 	// Get the next and previous month and year with at least one post
 	$previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year
@@ -1138,19 +1145,19 @@
 	/* translators: Calendar caption: 1: month name, 2: 4-digit year */
 	$calendar_caption = _x('%1$s %2$s', 'calendar caption');
 	$calendar_output = '<table id="wp-calendar">
-	<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
+	<caption>' . sprintf( $calendar_caption, $wp_locale->get_month( $thismonth ), date( 'Y', $unixmonth ) ) . '</caption>
 	<thead>
 	<tr>';
 
 	$myweek = array();
 
 	for ( $wdcount=0; $wdcount<=6; $wdcount++ ) {
-		$myweek[] = $wp_locale->get_weekday(($wdcount+$week_begins)%7);
+		$myweek[] = $wp_locale->get_weekday( ( $wdcount+$week_begins ) %7 );
 	}
 
 	foreach ( $myweek as $wd ) {
-		$day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
-		$wd = esc_attr($wd);
+		$day_name = ( true == $initial ) ? $wp_locale->get_weekday_initial( $wd ) : $wp_locale->get_weekday_abbrev( $wd );
+		$wd = esc_attr( $wd );
 		$calendar_output .= "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>";
 	}
 
@@ -1300,7 +1307,7 @@
 		}
 		$allowed .= '> ';
 	}
-	return htmlentities($allowed);
+	return htmlentities( $allowed );
 }
 
 /***** Date/Time tags *****/
@@ -1343,7 +1350,7 @@
 		$the_date .= $after;
 		$previousday = $currentday;
 
-		$the_date = apply_filters('the_date', $the_date, $d, $before, $after);
+		$the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
 
 		if ( $echo )
 			echo $the_date;
@@ -1388,9 +1395,9 @@
  * @param bool $echo Optional, default is display. Whether to echo the date or return it.
  * @return string|null Null if displaying, string if retrieving.
  */
-function the_modified_date($d = '', $before='', $after='', $echo = true) {
+function the_modified_date( $d = '', $before='', $after='', $echo = true ) {
 
-	$the_modified_date = $before . get_the_modified_date($d) . $after;
+	$the_modified_date = $before . get_the_modified_date( $d ) . $after;
 	$the_modified_date = apply_filters('the_modified_date', $the_modified_date, $d, $before, $after);
 
 	if ( $echo )
@@ -1408,12 +1415,12 @@
  * @param string $d Optional. PHP date format. Defaults to the "date_format" option
  * @return string
  */
-function get_the_modified_date($d = '') {
+function get_the_modified_date( $d = '' ) {
 	if ( '' == $d )
-		$the_time = get_post_modified_time(get_option('date_format'), null, null, true);
+		$the_time = get_post_modified_time( get_option('date_format'), null, null, true);
 	else
-		$the_time = get_post_modified_time($d, null, null, true);
-	return apply_filters('get_the_modified_date', $the_time, $d);
+		$the_time = get_post_modified_time( $d, null, null, true );
+	return apply_filters( 'get_the_modified_date', $the_time, $d );
 }
 
 /**
@@ -1424,7 +1431,7 @@
  * @param string $d Either 'G', 'U', or php date format.
  */
 function the_time( $d = '' ) {
-	echo apply_filters('the_time', get_the_time( $d ), $d);
+	echo apply_filters( 'the_time', get_the_time( $d ), $d );
 }
 
 /**
@@ -1437,13 +1444,13 @@
  * @return string
  */
 function get_the_time( $d = '', $post = null ) {
-	$post = get_post($post);
+	$post = get_post( $post );
 
 	if ( '' == $d )
-		$the_time = get_post_time(get_option('time_format'), false, $post, true);
+		$the_time = get_post_time( get_option( 'time_format' ), false, $post, true );
 	else
-		$the_time = get_post_time($d, false, $post, true);
-	return apply_filters('get_the_time', $the_time, $d, $post);
+		$the_time = get_post_time( $d, false, $post, true );
+	return apply_filters( 'get_the_time', $the_time, $d, $post );
 }
 
 /**
@@ -1458,15 +1465,15 @@
  * @return string
  */
 function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { // returns timestamp
-	$post = get_post($post);
+	$post = get_post( $post );
 
 	if ( $gmt )
 		$time = $post->post_date_gmt;
 	else
 		$time = $post->post_date;
 
-	$time = mysql2date($d, $time, $translate);
-	return apply_filters('get_post_time', $time, $d, $gmt);
+	$time = mysql2date( $d, $time, $translate );
+	return apply_filters( 'get_post_time', $time, $d, $gmt );
 }
 
 /**
@@ -1476,8 +1483,8 @@
  *
  * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
  */
-function the_modified_time($d = '') {
-	echo apply_filters('the_modified_time', get_the_modified_time($d), $d);
+function the_modified_time( $d = '' ) {
+	echo apply_filters('the_modified_time', get_the_modified_time( $d ), $d );
 }
 
 /**
@@ -1488,12 +1495,12 @@
  * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
  * @return string
  */
-function get_the_modified_time($d = '') {
+function get_the_modified_time( $d = '' ) {
 	if ( '' == $d )
-		$the_time = get_post_modified_time(get_option('time_format'), null, null, true);
+		$the_time = get_post_modified_time( get_option( 'time_format' ), null, null, true );
 	else
-		$the_time = get_post_modified_time($d, null, null, true);
-	return apply_filters('get_the_modified_time', $the_time, $d);
+		$the_time = get_post_modified_time( $d, null, null, true );
+	return apply_filters( 'get_the_modified_time', $the_time, $d );
 }
 
 /**
@@ -1508,15 +1515,15 @@
  * @return string Returns timestamp
  */
 function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
-	$post = get_post($post);
+	$post = get_post( $post );
 
 	if ( $gmt )
 		$time = $post->post_modified_gmt;
 	else
 		$time = $post->post_modified;
-	$time = mysql2date($d, $time, $translate);
+	$time = mysql2date( $d, $time, $translate );
 
-	return apply_filters('get_post_modified_time', $time, $d, $gmt);
+	return apply_filters( 'get_post_modified_time', $time, $d, $gmt );
 }
 
 /**
@@ -1529,7 +1536,7 @@
 function the_weekday() {
 	global $wp_locale;
 	$the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
-	$the_weekday = apply_filters('the_weekday', $the_weekday);
+	$the_weekday = apply_filters( 'the_weekday', $the_weekday );
 	echo $the_weekday;
 }
 
@@ -1544,7 +1551,7 @@
  * @param string $before Optional Output before the date.
  * @param string $after Optional Output after the date.
  */
-function the_weekday_date($before='',$after='') {
+function the_weekday_date( $before='',$after='' ) {
 	global $wp_locale, $day, $previousweekday;
 	$the_weekday_date = '';
 	if ( $currentday != $previousweekday ) {
@@ -1553,7 +1560,7 @@
 		$the_weekday_date .= $after;
 		$previousweekday = $currentday;
 	}
-	$the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after);
+	$the_weekday_date = apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
 	echo $the_weekday_date;
 }
 
@@ -1564,7 +1571,7 @@
  * @uses do_action() Calls 'wp_head' hook.
  */
 function wp_head() {
-	do_action('wp_head');
+	do_action( 'wp_head' );
 }
 
 /**
@@ -1574,7 +1581,7 @@
  * @uses do_action() Calls 'wp_footer' hook.
  */
 function wp_footer() {
-	do_action('wp_footer');
+	do_action( 'wp_footer' );
 }
 
 /**
@@ -1585,7 +1592,7 @@
  * @param array $args Optional arguments.
  */
 function feed_links( $args = array() ) {
-	if ( !current_theme_supports('automatic-feed-links') )
+	if ( !current_theme_supports( 'automatic-feed-links' ) )
 		return;
 
 	$defaults = array(
@@ -1842,7 +1849,7 @@
  *
  * @param string $doctype The type of html document (xhtml|html).
  */
-function language_attributes($doctype = 'html') {
+function language_attributes( $doctype = 'html' ) {
 	$attributes = array();
 	$output = '';
 
@@ -1858,7 +1865,7 @@
 	}
 
 	$output = implode(' ', $attributes);
-	$output = apply_filters('language_attributes', $output);
+	$output = apply_filters( 'language_attributes', $output );
 	echo $output;
 }
 
@@ -1925,7 +1932,7 @@
 	);
 
 	$args = wp_parse_args( $args, $defaults );
-	extract($args, EXTR_SKIP);
+	extract( $args, EXTR_SKIP );
 
 	// Who knows what else people pass in $args
 	$total = (int) $total;
@@ -2037,12 +2044,13 @@
  * @since 2.3.0
  *
  * @param string $file file relative to wp-admin/ without its ".css" extension.
+ * @return string admin css file url
  */
 function wp_admin_css_uri( $file = 'wp-admin' ) {
 	if ( defined('WP_INSTALLING') ) {
 		$_file = "./$file.css";
 	} else {
-		$_file = admin_url("$file.css");
+		$_file = admin_url( "$file.css" );
 	}
 	$_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
 
@@ -2255,8 +2263,8 @@
  * @since 2.8.0
  * @access private
  *
- * @param any $helper One of the values to compare
- * @param any $current (true) The other value to compare if not just true
+ * @param mixed $helper One of the values to compare
+ * @param mixed $current (true) The other value to compare if not just true
  * @param bool $echo Whether to echo or just return the string
  * @param string $type The type of checked|selected|disabled we are doing
  * @return string html attribute or empty string
