Opened 11 years ago
Last modified 2 years ago
#19674 reviewing defect (bug)
Do not prefix wp_title() with spaces if $sep is empty
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | trivial | Version: | 2.0 |
Component: | Themes | Keywords: | has-patch close reporter-feedback |
Focuses: | Cc: |
Description
- Add
wp_title('')
toheader.php
. - Notice two spaces before the title:
<title> Hello World</title>
This was previously brought up in #7114, but the fix suggested there wasn't backward compatible.
Attachments (2)
Change History (12)
#5
in reply to:
↑ 1
@
10 years ago
Replying to nacin:
Wondering if one space might still be expected by themes. For example, if bloginfo('name') is used before wp_title();
Themes should not be putting anything other than <?php wp_title(); ?>
inside of the HTML <title></title>
tags. Adding bloginfo( 'name' )
should be done via wp_title
filter, even in Themes. Note that this is enforced in the Theme Review guidelines, so if that use case the only impediment, I would recommend not holding up this patch because of it.
#7
@
7 years ago
- Keywords 2nd-opinion removed
- Owner set to obenland
- Status changed from new to reviewing
19674.diff is a refresh after 4.4
#8
@
7 years ago
Hm, I'm not sure how much of an issue this really is in wp_document_title()
. If the separator happens to be empty, the double space is only inserted between title parts, never before or after. This seems to be more of an issue with wp_title()
's $prefix
content.
Does this need fixing at all? It's not something that is visible in browser tabs, is it?
Wondering if one space might still be expected by themes. For example, if bloginfo('name') is used before wp_title();