fix usage of $m and return behavior in single_month_title(). fixes #3207

git-svn-id: https://develop.svn.wordpress.org/trunk@4346 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2006-10-05 03:12:24 +00:00
parent 40aafdb326
commit c5923e342d

View File

@ -260,13 +260,17 @@ function single_month_title($prefix = '', $display = true ) {
$my_month = $wp_locale->get_month($monthnum);
} elseif ( !empty($m) ) {
$my_year = substr($m, 0, 4);
$my_month = $wp_locale->get_month($m);
$my_month = $wp_locale->get_month(substr($m, 4, 2));
}
if ( !empty($my_month) && $display )
echo $prefix . $my_month . $prefix . $my_year;
else
return $monthnum;
if ( empty($my_month) )
return false;
$result = $prefix . $my_month . $prefix . $my_year;
if ( !$display )
return $result;
echo $result;
}