make /languages/ directory default to /wp-content/languages/ with fallback to /wp-includes/languages/. Props Nazgul. fixes #3315

git-svn-id: https://develop.svn.wordpress.org/trunk@4446 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2006-11-04 05:20:39 +00:00
parent 697897019a
commit 59c610ec06

View File

@ -82,8 +82,14 @@ if ( defined('WP_CACHE') )
require (ABSPATH . 'wp-content/advanced-cache.php');
define('WPINC', 'wp-includes');
if ( !defined('LANGDIR') )
define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash
if ( !defined('LANGDIR') ) {
if ( file_exists(ABSPATH . 'wp-content/languages') && @is_dir(ABSPATH . 'wp-content/languages') )
define('LANGDIR', 'wp-content/languages'); // no leading slash, no trailing slash
else
define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash
}
if ( !defined('PLUGINDIR') )
define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash
if ( file_exists(ABSPATH . 'wp-content/db.php') )