Make WordPress Core

Ticket #4407: separator-location.diff

File separator-location.diff, 902 bytes (added by cpoteet, 17 years ago)
  • C:/WAMP/www/wpsvn/wp-includes/general-template.php

     
    159159}
    160160
    161161
    162 function wp_title($sep = '»', $display = true) {
     162function wp_title($sep = '»', $display = true, $seplocation = '') {
    163163        global $wpdb, $wp_locale, $wp_query;
    164164
    165165        $cat = get_query_var('cat');
     
    237237        if ( !empty($title) )
    238238                $prefix = " $sep ";
    239239
    240         $title = $prefix . $title;
     240        // Determines position of the separator
     241        if ( $seplocation == "right" ) {
     242                $title = $title . $prefix;
     243        }
     244        else {
     245                $title = $prefix . $title;
     246        }
     247       
    241248        $title = apply_filters('wp_title', $title, $sep);
    242249
    243250        // Send it out
     
    245252                echo $title;
    246253        else
    247254                return $title;
     255
    248256}
    249257
    250258