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

git-svn-id: http://svn.automattic.com/wordpress/trunk@4346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-10-05 03:12:24 +00:00
parent a9d23d40d5
commit 44cfde6f04

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;
}