Add wp_title filter.

git-svn-id: https://develop.svn.wordpress.org/trunk@3274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-05 23:57:41 +00:00
parent 579e426260
commit 77a91d9096
1 changed files with 11 additions and 4 deletions

View File

@ -195,11 +195,18 @@ function wp_title($sep = '»', $display = true) {
$title = apply_filters('single_post_title', $title);
}
$prefix = '';
if ( isset($title) )
$prefix = " $sep ";
$title = $prefix . $title;
$title = apply_filters('wp_title', $title, $sep);
// Send it out
if ( $display && isset($title) )
echo " $sep $title";
elseif ( !$display && isset($title) )
return " $sep $title";
if ( $display )
echo $title;
else
return $title;
}