Remove redundant assignment. see [28379], [28534].

see #22400.
Built from https://develop.svn.wordpress.org/trunk@28538


git-svn-id: http://core.svn.wordpress.org/trunk@28364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-05-22 17:35:13 +00:00
parent 219321eedc
commit f4646b47e7
1 changed files with 21 additions and 25 deletions

View File

@ -1261,15 +1261,14 @@ function wp_get_archives( $args = '' ) {
} }
if ( $results ) { if ( $results ) {
$after = $r['after']; $after = $r['after'];
$afterafter = $r['after'];
foreach ( (array) $results as $result ) { foreach ( (array) $results as $result ) {
$url = get_month_link( $result->year, $result->month ); $url = get_month_link( $result->year, $result->month );
/* translators: 1: month name, 2: 4-digit year */ /* translators: 1: month name, 2: 4-digit year */
$text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year ); $text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year );
if ( $r['show_post_count'] ) { if ( $r['show_post_count'] ) {
$after = ' ('.$result->posts.')' . $afterafter; $r['after'] = ' (' . $result->posts . ')' . $after;
} }
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
} }
} }
} elseif ( 'yearly' == $r['type'] ) { } elseif ( 'yearly' == $r['type'] ) {
@ -1282,14 +1281,13 @@ function wp_get_archives( $args = '' ) {
} }
if ( $results ) { if ( $results ) {
$after = $r['after']; $after = $r['after'];
$afterafter = $r['after'];
foreach ( (array) $results as $result) { foreach ( (array) $results as $result) {
$url = get_year_link( $result->year ); $url = get_year_link( $result->year );
$text = sprintf( '%d', $result->year ); $text = sprintf( '%d', $result->year );
if ( $r['show_post_count'] ) { if ( $r['show_post_count'] ) {
$after = ' ('.$result->posts.')' . $afterafter; $r['after'] = ' (' . $result->posts . ')' . $after;
} }
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
} }
} }
} elseif ( 'daily' == $r['type'] ) { } elseif ( 'daily' == $r['type'] ) {
@ -1303,13 +1301,12 @@ function wp_get_archives( $args = '' ) {
} }
if ( $results ) { if ( $results ) {
$after = $r['after']; $after = $r['after'];
$afterafter = $r['after'];
foreach ( (array) $results as $result ) { foreach ( (array) $results as $result ) {
$url = get_day_link( $result->year, $result->month, $result->dayofmonth ); $url = get_day_link( $result->year, $result->month, $result->dayofmonth );
$date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth ); $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth );
$text = mysql2date( $archive_day_date_format, $date ); $text = mysql2date( $archive_day_date_format, $date );
if ( $r['show_post_count'] ) { if ( $r['show_post_count'] ) {
$after = ' (' . $result->posts . ')' . $afterafter; $r['after'] = ' (' . $result->posts . ')' . $after;
} }
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after );
} }
@ -1326,7 +1323,6 @@ function wp_get_archives( $args = '' ) {
$arc_w_last = ''; $arc_w_last = '';
if ( $results ) { if ( $results ) {
$after = $r['after']; $after = $r['after'];
$afterafter = $r['after'];
foreach ( (array) $results as $result ) { foreach ( (array) $results as $result ) {
if ( $result->week != $arc_w_last ) { if ( $result->week != $arc_w_last ) {
$arc_year = $result->yr; $arc_year = $result->yr;
@ -1337,9 +1333,9 @@ function wp_get_archives( $args = '' ) {
$url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week );
$text = $arc_week_start . $archive_week_separator . $arc_week_end; $text = $arc_week_start . $archive_week_separator . $arc_week_end;
if ( $r['show_post_count'] ) { if ( $r['show_post_count'] ) {
$after = ' (' . $result->posts . ')' . $afterafter; $r['after'] = ' (' . $result->posts . ')' . $after;
} }
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
} }
} }
} }