Add optional path arg to load_theme_textdomain(). Props filosofo. fixes #6951
git-svn-id: https://develop.svn.wordpress.org/trunk@9212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5f2a75db7b
commit
6e4773588a
@ -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…
x
Reference in New Issue
Block a user