diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 6b5b78758a..0b290f0f81 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -141,28 +141,29 @@ function single_cat_title($prefix = '', $display = true ) { } function single_month_title($prefix = '', $display = true ) { - global $m, $month; - if(!empty($m)) { - $my_year = substr($m,0,4); - $my_month = $month[substr($m,4,2)]; - if ($display) - echo $prefix.$my_month.$prefix.$my_year; - else - return $m; - } + global $m, $month; + if(!empty($m)) { + $my_year = substr($m, 0, 4); + $my_month = $month[substr($m, 4, 2)]; + if ($display) + echo $prefix . $my_month . $prefix . $my_year; + else + return $m; + } } /* link navigation hack by Orien http://icecode.com/ */ -function get_archives_link($url, $text, $format = "html", $before = "", $after = "") { - if ('link' == $format) { - return "\t".''."\n"; - } else if ('option' == $format) { - return ''."\n"; - } else if ('html' == $format) { - return "\t".'
  • '.$text.''.$after.'
  • '."\n"; - } else { // custom - return "\t".$before.''.$text.''.$after."\n"; - } +function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') { + $text = wptexturize($text); + if ('link' == $format) { + return "\t\n"; + } elseif ('option' == $format) { + return "\t\n"; + } elseif ('html' == $format) { + return "\t
  • $before$text$after
  • \n"; + } else { // custom + return "\t$before$text$after\n"; + } } function wp_get_archives($args = '') {