[wp-trac] [WordPress Trac] #22653: Extra spaces in wp_title
WordPress Trac
noreply at wordpress.org
Fri Nov 30 12:38:08 UTC 2012
#22653: Extra spaces in wp_title
-----------------------------+-------------------------
Reporter: nbspjr | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: | Severity: normal
Keywords: |
-----------------------------+-------------------------
Greetings.
wp_title adds extra spaces to the title even if separator is set to be
empty. The spaces are added on the side where separator's location is set.
For example, if I have title "Blog", then wp_title(""); will output "
Blog" and wp_title("", "right"); - "Blog ". At this moment I have to call
'wp_title' filter to trim spaces if there is empty separator passed,
something like this:
{{{
function my_wp_title($title, $sep, $loc) {
return ( empty($sep) ) ? trim($title) : $title;
}
add_filter('wp_title', 'my_wp_title', 10, 3);
}}}
What do you think of enhancing wp_title function to not add spaces if
there is an empty separator?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22653>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list