Ticket #7114: wp_title_sep.patch
| File wp_title_sep.patch, 1.5 KB (added by mm6, 5 years ago) |
|---|
-
general-template.php
161 161 } 162 162 163 163 164 function wp_title($sep = ' »', $display = true, $seplocation = '') {164 function wp_title($sep = ' » ', $display = true, $seplocation = '') { 165 165 global $wpdb, $wp_locale, $wp_query; 166 166 167 167 $cat = get_query_var('cat'); … … 216 216 $my_year = substr($m, 0, 4); 217 217 $my_month = $wp_locale->get_month(substr($m, 4, 2)); 218 218 $my_day = intval(substr($m, 6, 2)); 219 $title = "$my_year" . ($my_month ? "$sep $my_month" : "") . ($my_day ? "$sep$my_day" : "");219 $title = "$my_year" . ($my_month ? "$sep$my_month" : "") . ($my_day ? "$sep$my_day" : ""); 220 220 } 221 221 222 222 if ( !empty($year) ) { 223 223 $title = $year; 224 224 if ( !empty($monthnum) ) 225 $title .= " $sep ". $wp_locale->get_month($monthnum);225 $title .= $sep . $wp_locale->get_month($monthnum); 226 226 if ( !empty($day) ) 227 $title .= " $sep ". zeroise($day, 2);227 $title .= $sep . zeroise($day, 2); 228 228 } 229 229 230 230 // If there is a post … … 241 241 $term = $wp_query->get_queried_object(); 242 242 $term = $term->name; 243 243 if ( 'right' == $seplocation ) 244 $title = "$term $sep$tax";244 $title = "$term$sep$tax"; 245 245 else 246 $title = "$tax $sep$term";246 $title = "$tax$sep$term"; 247 247 } 248 248 249 249 $prefix = ''; 250 250 if ( !empty($title) ) 251 $prefix = " $sep ";251 $prefix = $sep; 252 252 253 253 // Determines position of the separator 254 254 if ( 'right' == $seplocation )