Opened 13 years ago
Closed 13 years ago
#22653 closed enhancement (duplicate)
Extra spaces in wp_title
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
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?
Change History (1)
Note: See
TracTickets for help on using
tickets.
Duplicate of #19674.