From 8fa9b9fb761faa08e62d18251d37b2ff0988d3b0 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 2 Jan 2008 20:45:17 +0000 Subject: [PATCH] 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 --- wp-includes/general-template.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 3302d291e..d735c9efa 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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; + }