Opened 15 years ago
Closed 3 years ago
#19674 closed defect (bug) (maybelater)
Do not prefix wp_title() with spaces if $sep is empty
| Reported by: | SergeyBiryukov | Owned by: | obenland |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 2.0 |
| Severity: | trivial | Keywords: | has-patch close reporter-feedback |
| Cc: | Focuses: |
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 (13)
#5
in reply to: ↑ 1
@
13 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
@
11 years ago
- Keywords 2nd-opinion removed
- Owner set to
- Status new → reviewing
19674.diff is a refresh after 4.4
#8
@
11 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Wondering if one space might still be expected by themes. For example, if bloginfo('name') is used before wp_title();