Changeset 28538
- Timestamp:
- 05/22/2014 05:34:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r28534 r28538 1262 1262 if ( $results ) { 1263 1263 $after = $r['after']; 1264 $afterafter = $r['after'];1265 1264 foreach ( (array) $results as $result ) { 1266 1265 $url = get_month_link( $result->year, $result->month ); … … 1268 1267 $text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year ); 1269 1268 if ( $r['show_post_count'] ) { 1270 $ after = ' ('.$result->posts.')' . $afterafter;1269 $r['after'] = ' (' . $result->posts . ')' . $after; 1271 1270 } 1272 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $ after);1271 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] ); 1273 1272 } 1274 1273 } … … 1283 1282 if ( $results ) { 1284 1283 $after = $r['after']; 1285 $afterafter = $r['after'];1286 1284 foreach ( (array) $results as $result) { 1287 1285 $url = get_year_link( $result->year ); 1288 1286 $text = sprintf( '%d', $result->year ); 1289 1287 if ( $r['show_post_count'] ) { 1290 $ after = ' ('.$result->posts.')' . $afterafter;1288 $r['after'] = ' (' . $result->posts . ')' . $after; 1291 1289 } 1292 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $ after);1290 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] ); 1293 1291 } 1294 1292 } … … 1304 1302 if ( $results ) { 1305 1303 $after = $r['after']; 1306 $afterafter = $r['after'];1307 1304 foreach ( (array) $results as $result ) { 1308 $url 1305 $url = get_day_link( $result->year, $result->month, $result->dayofmonth ); 1309 1306 $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth ); 1310 1307 $text = mysql2date( $archive_day_date_format, $date ); 1311 1308 if ( $r['show_post_count'] ) { 1312 $ after = ' (' . $result->posts . ')' . $afterafter;1309 $r['after'] = ' (' . $result->posts . ')' . $after; 1313 1310 } 1314 1311 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); … … 1326 1323 $arc_w_last = ''; 1327 1324 if ( $results ) { 1328 $after = $r['after']; 1329 $afterafter = $r['after']; 1330 foreach ( (array) $results as $result ) { 1331 if ( $result->week != $arc_w_last ) { 1332 $arc_year = $result->yr; 1333 $arc_w_last = $result->week; 1334 $arc_week = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) ); 1335 $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] ); 1336 $arc_week_end = date_i18n( $archive_week_end_date_format, $arc_week['end'] ); 1337 $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); 1338 $text = $arc_week_start . $archive_week_separator . $arc_week_end; 1339 if ( $r['show_post_count'] ) { 1340 $after = ' (' . $result->posts . ')' . $afterafter; 1341 } 1342 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $after ); 1325 $after = $r['after']; 1326 foreach ( (array) $results as $result ) { 1327 if ( $result->week != $arc_w_last ) { 1328 $arc_year = $result->yr; 1329 $arc_w_last = $result->week; 1330 $arc_week = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) ); 1331 $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] ); 1332 $arc_week_end = date_i18n( $archive_week_end_date_format, $arc_week['end'] ); 1333 $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); 1334 $text = $arc_week_start . $archive_week_separator . $arc_week_end; 1335 if ( $r['show_post_count'] ) { 1336 $r['after'] = ' (' . $result->posts . ')' . $after; 1343 1337 } 1338 $output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] ); 1344 1339 } 1340 } 1345 1341 } 1346 1342 } elseif ( ( 'postbypost' == $r['type'] ) || ('alpha' == $r['type'] ) ) { … … 1356 1352 foreach ( (array) $results as $result ) { 1357 1353 if ( $result->post_date != '0000-00-00 00:00:00' ) { 1358 $url 1354 $url = get_permalink( $result ); 1359 1355 if ( $result->post_title ) { 1360 1356 /** This filter is documented in wp-includes/post-template.php */
Note: See TracChangeset
for help on using the changeset viewer.