Turn hard-coded paths to defines. Pull gettext includes int wp-settings. Props mdawaffe. fixes #3157
git-svn-id: http://svn.automattic.com/wordpress/trunk@4202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
<?php
|
||||
|
||||
if ( defined('WPLANG') && '' != constant('WPLANG') ) {
|
||||
include_once(ABSPATH . 'wp-includes/streams.php');
|
||||
include_once(ABSPATH . 'wp-includes/gettext.php');
|
||||
}
|
||||
|
||||
function get_locale() {
|
||||
global $locale;
|
||||
|
||||
@@ -75,13 +69,15 @@ function load_default_textdomain() {
|
||||
global $l10n;
|
||||
|
||||
$locale = get_locale();
|
||||
$mofile = ABSPATH . "wp-includes/languages/$locale.mo";
|
||||
$mofile = ABSPATH . LANGDIR . "/$locale.mo";
|
||||
|
||||
load_textdomain('default', $mofile);
|
||||
}
|
||||
|
||||
function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {
|
||||
function load_plugin_textdomain($domain, $path = false) {
|
||||
$locale = get_locale();
|
||||
if ( false === $path )
|
||||
$path = PLUGINDIR;
|
||||
|
||||
$mofile = ABSPATH . "$path/$domain-$locale.mo";
|
||||
load_textdomain($domain, $mofile);
|
||||
@@ -94,4 +90,4 @@ function load_theme_textdomain($domain) {
|
||||
load_textdomain($domain, $mofile);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user