#29122 closed defect (bug) (fixed)
Trailing slash in theme Domain Path header causes double slashes in path
| Reported by: | bradyvercher | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
The Domain Path header in themes is used to load the theme's translation files in WP_Theme::load_textdomain() when it is inactive.
The default value is /languages without a trailing slash and is appended to the theme directory, which is then prepended to the MO file in load_theme_textdomain().
If the Domain Path header has a trailing slash (ex: /languages/), the path ends up with double slashes. I'm not sure it's actually documented anywhere that the header shouldn't have a trailing slash, many of the popular themes in the directory use a trailing slash, and even the Automattic VIP Scanner plugin requires it to have one.
The load_plugin_textdomain() trims trailing slashes in various places to account for this. The attached patch does the same for load_theme_textdomain().
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 29984: