#11033 closed defect (bug) (fixed)
Function needed to support l10n for child themes
Reported by: | johnjamesjacoby | Owned by: | westi |
---|---|---|---|
Milestone: | 2.9 | Priority: | high |
Severity: | major | Version: | 2.9 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
The "load_theme_textdomain" function falls short when there is a parent theme to the currently active child theme style. Because load_theme_textdomain uses get_theme_directory, it will always load the parents textdomain, even if there are text changes included in the child style.
This patch includes a new function "load_style_textdomain" to allow child themes to have their own po/mo's. This would presumably be called in the child themes functions.php, or somewhere relative to it.
This may become more important with BuddyPress 1.1+ as the parent/child theme/style relationships become more popular.
Attachments (1)
Change History (9)
#2
@
15 years ago
- Priority changed from normal to high
- Severity changed from normal to major
Any chance to have this put to the test for 2.9?
#4
@
15 years ago
It would have been perfect to be able to do it in load_theme_textdomain()
, but we don't know the domain of the child theme there. so we can't load the strings to the right place. So, we need this function.
But I think we should call it load_child_theme_textdomain()
. It should state what is the effect, not what it does under the hood. Also, I can't imagine why would you want to load the MO file from the stylesheet directory if you are not in a child theme.
#6
@
15 years ago
No where in the WordPress code does the nomenclature "child_theme" appear.
Instead the differences are always referred to as "theme" and "style".
If we're going for effect, almost all of these functions need to be renamed to match the parent/child relationship.
STYLESHEETPATH, get_stylesheet_directory(), etc...
+1 for putting this to core :D
-1 for renaming it in a way that doesn't match the rest :(
load_style_textdomain