Add separator location arg to wp_title. Props cpoteet. fixes #4407

git-svn-id: http://svn.automattic.com/wordpress/trunk@6538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-01-02 20:45:17 +00:00
parent 0bc86efb8c
commit 8fa9b9fb76

View File

@ -159,7 +159,7 @@ function get_bloginfo($show = '', $filter = 'raw') {
}
function wp_title($sep = '»', $display = true) {
function wp_title($sep = '»', $display = true, $seplocation = '') {
global $wpdb, $wp_locale, $wp_query;
$cat = get_query_var('cat');
@ -235,7 +235,12 @@ function wp_title($sep = '»', $display = true) {
if ( !empty($title) )
$prefix = " $sep ";
$title = $prefix . $title;
// Determines position of the separator
if ( 'right' == $seplocation )
$title = $title . $prefix;
else
$title = $prefix . $title;
$title = apply_filters('wp_title', $title, $sep);
// Send it out
@ -243,6 +248,7 @@ function wp_title($sep = '»', $display = true) {
echo $title;
else
return $title;
}