Missing $before from Josh Kaufman-Horner and some code cleanup.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-07-06 17:04:07 +00:00
parent 78397fa62c
commit d1640ab7fe

View File

@ -141,28 +141,29 @@ function single_cat_title($prefix = '', $display = true ) {
} }
function single_month_title($prefix = '', $display = true ) { function single_month_title($prefix = '', $display = true ) {
global $m, $month; global $m, $month;
if(!empty($m)) { if(!empty($m)) {
$my_year = substr($m,0,4); $my_year = substr($m, 0, 4);
$my_month = $month[substr($m,4,2)]; $my_month = $month[substr($m, 4, 2)];
if ($display) if ($display)
echo $prefix.$my_month.$prefix.$my_year; echo $prefix . $my_month . $prefix . $my_year;
else else
return $m; return $m;
} }
} }
/* 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 = '') {
if ('link' == $format) { $text = wptexturize($text);
return "\t".'<link rel="archives" title="'.$text.'" href="'.$url.'" />'."\n"; if ('link' == $format) {
} else if ('option' == $format) { return "\t<link rel='archives' title='$text' href='$url' />\n";
return '<option value="'.$url.'">'.$text.'</option>'."\n"; } elseif ('option' == $format) {
} else if ('html' == $format) { return "\t<option value='$url'>$text</option>\n";
return "\t".'<li><a href="'.$url.'" title="'.$text.'">'.$text.'</a>'.$after.'</li>'."\n"; } elseif ('html' == $format) {
} else { // custom return "\t<li>$before<a href='$url' title='$text'>$text</a>$after</li>\n";
return "\t".$before.'<a href="'.$url.'" title="'.$text.'">'.$text.'</a>'.$after."\n"; } else { // custom
} return "\t$before<a href='$url' title='$text'>$text</a>$after\n";
}
} }
function wp_get_archives($args = '') { function wp_get_archives($args = '') {