Add optional path arg to load_theme_textdomain(). Props filosofo. fixes #6951
git-svn-id: http://svn.automattic.com/wordpress/trunk@9212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de52fa23a2
commit
5ec329b4f1
|
@ -301,10 +301,12 @@ function load_plugin_textdomain($domain, $abs_rel_path = false, $plugin_rel_path
|
|||
*
|
||||
* @param string $domain Unique identifier for retrieving translated strings
|
||||
*/
|
||||
function load_theme_textdomain($domain) {
|
||||
function load_theme_textdomain($domain, $path = false) {
|
||||
$locale = get_locale();
|
||||
|
||||
$mofile = get_template_directory() . "/$locale.mo";
|
||||
$path = ( empty( $path ) ) ? get_template_directory() : $path;
|
||||
|
||||
$mofile = "$path/$locale.mo";
|
||||
load_textdomain($domain, $mofile);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue