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

git-svn-id: https://develop.svn.wordpress.org/trunk@6538 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-01-02 20:45:17 +00:00
parent 5a9f249b34
commit 5546161120
1 changed files with 8 additions and 2 deletions

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