get_archives_link filter. Props codealsatian. fixes #5530 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@7959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-20 16:43:44 +00:00
parent d917ddc2f5
commit e9ea1ab0ef
1 changed files with 8 additions and 4 deletions

View File

@ -356,13 +356,17 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
$url = clean_url($url);
if ('link' == $format)
return "\t<link rel='archives' title='$title_text' href='$url' />\n";
$link_html = "\t<link rel='archives' title='$title_text' href='$url' />\n";
elseif ('option' == $format)
return "\t<option value='$url'>$before $text $after</option>\n";
$link_html = "\t<option value='$url'>$before $text $after</option>\n";
elseif ('html' == $format)
return "\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\n";
$link_html = "\t<li>$before<a href='$url' title='$title_text'>$text</a>$after</li>\n";
else // custom
return "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
$link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
$link_html = apply_filters( "get_archives_link", $link_html );
return $link_html;
}