better fix for single_month_title, preserves backward-compatibility with
git-svn-id: http://svn.automattic.com/wordpress/trunk@1816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d6928c9df3
commit
8990d8c02f
|
@ -216,17 +216,21 @@ function single_cat_title($prefix = '', $display = true ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function single_month_title($prefix = '', $display = true ) {
|
function single_month_title($prefix = '', $display = true ) {
|
||||||
global $monthnum, $month, $year;
|
global $m, $monthnum, $month, $year;
|
||||||
if(!empty($monthnum)) {
|
if(!empty($monthnum) && !empty($year)) {
|
||||||
$my_year = $year;
|
$my_year = $year;
|
||||||
$my_month = $month[$monthnum];
|
$my_month = $month[$monthnum];
|
||||||
if ($display) {
|
} elseif(!empty($m)) {
|
||||||
echo $prefix . $my_month . $prefix . " " . $my_year;
|
$my_year = substr($m, 0, 4);
|
||||||
|
$my_month = $month[substr($m, 4, 2)];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($my_month) && $display) {
|
||||||
|
echo $prefix . $my_month . $prefix . $my_year;
|
||||||
} else {
|
} else {
|
||||||
return $monthnum;
|
return $monthnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* link navigation hack by Orien http://icecode.com/ */
|
/* link navigation hack by Orien http://icecode.com/ */
|
||||||
function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
|
function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
|
||||||
|
|
Loading…
Reference in New Issue