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:
ryan
2006-09-21 20:46:39 +00:00
parent 8ca163a2d2
commit 7a032342b3
7 changed files with 25 additions and 22 deletions

View File

@@ -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);
}
?>
?>