Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 44640)
+++ src/wp-includes/general-template.php	(working copy)
@@ -1660,21 +1660,22 @@
  *
  * @since 1.0.0
  *
- * @param string $url    URL to archive.
- * @param string $text   Archive text description.
- * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom.
- * @param string $before Optional. Content to prepend to the description. Default empty.
- * @param string $after  Optional. Content to append to the description. Default empty.
- * @return string HTML link content for archive.
+ * @param string $url      URL to archive.
+ * @param string $text     Archive text description.
+ * @param string $format   Optional, default is 'html'. Can be 'link', 'option', 'html', or custom.
+ * @param string $before   Optional. Content to prepend to the description. Default empty.
+ * @param string $after    Optional. Content to append to the description. Default empty.
+ * @param bool   $selected Optional. Set to true if the current page is the selected archive page
  */
-function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '' ) {
+function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '', $selected = false ) {
 	$text = wptexturize( $text );
 	$url  = esc_url( $url );
 
 	if ( 'link' == $format ) {
 		$link_html = "\t<link rel='archives' title='" . esc_attr( $text ) . "' href='$url' />\n";
-	} elseif ( 'option' == $format ) {
-		$link_html = "\t<option value='$url'>$before $text $after</option>\n";
+	} elseif ('option' == $format) {
+		$selected_attr = $selected ? " selected='selected'" : '';
+		$link_html = "\t<option value='$url'$selected_attr>$before $text $after</option>\n";
 	} elseif ( 'html' == $format ) {
 		$link_html = "\t<li>$before<a href='$url'>$text</a>$after</li>\n";
 	} else { // custom
@@ -1693,8 +1694,9 @@
 	 * @param string $format    Link format. Can be 'link', 'option', 'html', or custom.
 	 * @param string $before    Content to prepend to the description.
 	 * @param string $after     Content to append to the description.
+	 * @param bool   $selected  True if the current page is the selected archive
 	 */
-	return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after );
+	return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );
 }
 
 /**
@@ -1745,6 +1747,10 @@
 		'echo'            => 1,
 		'order'           => 'DESC',
 		'post_type'       => 'post',
+		'year'            => get_query_var( 'year' ),
+		'monthnum'        => get_query_var( 'monthnum' ),
+		'day'             => get_query_var( 'day' ),
+		'week'            => get_query_var( 'w' ),
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -1820,7 +1826,8 @@
 				if ( $r['show_post_count'] ) {
 					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
 				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
+				$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year && ( string ) $r[ 'monthnum' ] === $result->month;
+				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
 			}
 		}
 	} elseif ( 'yearly' == $r['type'] ) {
@@ -1842,7 +1849,8 @@
 				if ( $r['show_post_count'] ) {
 					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
 				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
+				$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year;
+				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
 			}
 		}
 	} elseif ( 'daily' == $r['type'] ) {
@@ -1865,7 +1873,8 @@
 				if ( $r['show_post_count'] ) {
 					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
 				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
+				$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year && ( string ) $r[ 'monthnum' ] === $result->month && ( string ) $r[ 'day' ] === $result->dayofmonth;
+				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
 			}
 		}
 	} elseif ( 'weekly' == $r['type'] ) {
@@ -1901,7 +1910,8 @@
 					if ( $r['show_post_count'] ) {
 						$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
 					}
-					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
+					$selected = is_archive() && ( string ) $r[ 'year' ] === $result->yr && ( string ) $r[ 'week' ] === $result->week;
+					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
 				}
 			}
 		}
@@ -1924,7 +1934,8 @@
 					} else {
 						$text = $result->ID;
 					}
-					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
+					$selected = $result->ID === get_the_ID();
+					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
 				}
 			}
 		}
