Allow wp-content to exist outside of webroot. Props sambauers. see #6938

git-svn-id: https://develop.svn.wordpress.org/trunk@7999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-05-27 17:55:24 +00:00
parent f213f87d59
commit 6cc11cbf1e
23 changed files with 140 additions and 112 deletions

View File

@@ -278,7 +278,7 @@ function load_default_textdomain() {
*
* The plugin may place all of the .mo files in another folder and set
* the $path based on the relative location from ABSPATH constant. The
* plugin may use the constant PLUGINDIR and/or plugin_basename() to
* plugin may use the constant WP_PLUGIN_DIR and/or plugin_basename() to
* get path of the plugin and then add the folder which holds the .mo
* files.
*
@@ -291,9 +291,9 @@ function load_plugin_textdomain($domain, $path = false) {
$locale = get_locale();
if ( false === $path )
$path = PLUGINDIR;
$path = WP_PLUGIN_DIR;
$mofile = ABSPATH . "$path/$domain-$locale.mo";
$mofile = $path . '/'. $domain . '-' . $locale . '.mo';
load_textdomain($domain, $mofile);
}