Make WordPress Core

Ticket #1468: locale-patch.txt

File locale-patch.txt, 471 bytes (added by firas, 19 years ago)

patch to take optional second argument for load_plugin_textdomain specifying path

Line 
1--- wp-l10n-old.php     Thu Mar 17 18:15:18 2005
2+++ wp-l10n-new.php     Sat Jun 25 07:22:20 2005
3@@ -86,10 +86,10 @@
4        load_textdomain('default', $mofile);
5 }
6 
7-function load_plugin_textdomain($domain) {
8+function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {
9        $locale = get_locale();
10       
11-       $mofile = ABSPATH . "wp-content/plugins/$domain-$locale.mo";
12+       $mofile = ABSPATH . "$path/$domain-$locale.mo";
13        load_textdomain($domain, $mofile);
14 }
15