From 3359d369220eaaf8b97bc860ffc80ae29e916f47 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Mon, 18 Oct 2004 23:45:26 +0000 Subject: [PATCH] fixed single_month_title. thanks to Brak (http://wordpress.org/support/6/14897) git-svn-id: https://develop.svn.wordpress.org/trunk@1815 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-general.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 5e118abb57..3c3f6ae43d 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -216,14 +216,15 @@ 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 $monthnum, $month, $year; + if(!empty($monthnum)) { + $my_year = $year; + $my_month = $month[$monthnum]; + if ($display) { + echo $prefix . $my_month . $prefix . " " . $my_year; + } else { + return $monthnum; + } } } @@ -631,4 +632,4 @@ function the_weekday_date($before='',$after='') { echo $the_weekday_date; } -?> \ No newline at end of file +?>