Add wp_title filter.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-05 23:57:41 +00:00
parent 3d55d1e28c
commit 181dd79885

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