From 54d7ccba56044c98dd8b9a5d68508ffecdd684e8 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sat, 4 Nov 2006 05:20:39 +0000 Subject: [PATCH] make /languages/ directory default to /wp-content/languages/ with fallback to /wp-includes/languages/. Props Nazgul. fixes #3315 git-svn-id: http://svn.automattic.com/wordpress/trunk@4446 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 07661f458..f4f284d4d 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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') )