From 53ed0b4b61ab89020e08818752fbf8b9892a0d0e Mon Sep 17 00:00:00 2001 From: Mike Little Date: Sun, 26 Oct 2003 00:35:45 +0000 Subject: [PATCH] Moved post count outside the link in monthly version of get_archives(). git-svn-id: https://develop.svn.wordpress.org/trunk@469 602fd350-edb4-49c9-b593-d223f7449a82 --- b2-include/b2template.functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index 8d4af5aca3..43c498dc35 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -115,7 +115,7 @@ function get_archives_link($url, $text, $format = "html", $before = "", $after = } else if ('option' == $format) { return ''."\n"; } else if ('html' == $format) { - return "\t".'
  • '.$text.'
  • '."\n"; + return "\t".'
  • '.$text.''.$after.'
  • '."\n"; } else { // custom return "\t".$before.''.$text.''.$after."\n"; } @@ -165,10 +165,12 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after if ($arcresults) { foreach ($arcresults as $arcresult) { $url = sprintf("%s%d%02d", $archive_link_m, $arcresult->year, $arcresult->month); - if ($show_post_count) - $text = sprintf("%s %d (%d)", $month[zeroise($arcresult->month,2)], $arcresult->year, $arcresult->posts); - else + if ($show_post_count) { $text = sprintf("%s %d", $month[zeroise($arcresult->month,2)], $arcresult->year); + $after = " ($arcresult->posts)"; + } else { + $text = sprintf("%s %d", $month[zeroise($arcresult->month,2)], $arcresult->year); + } echo get_archives_link($url, $text, $format, $before, $after); } }