From b8d33ee4370ddcc0011f95f4e78c5e49382dd4b4 Mon Sep 17 00:00:00 2001 From: rboren Date: Mon, 17 May 2004 00:31:33 +0000 Subject: [PATCH] show_post_count, after, and custom format were not playing nicely in get_archives. git-svn-id: http://svn.automattic.com/wordpress/trunk@1291 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-general.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 6dd838960..3fc8e827e 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -246,11 +246,12 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after if ('monthly' == $type) { $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $tableposts WHERE post_date < '$now' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit); if ($arcresults) { + $afterafter = $after; foreach ($arcresults as $arcresult) { $url = get_month_link($arcresult->year, $arcresult->month); if ($show_post_count) { $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year); - $after = ' ('.$arcresult->posts.')'; + $after = ' ('.$arcresult->posts.')' . $afterafter; } else { $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year); }