summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-06-17 15:35:07 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-06-17 15:35:07 +0000
commit100ea61fda565fc02deee9d3042261400c8f0100 (patch)
tree865f7bbe7b0f0d44a144a08dba1a53817a737240
parent04ff98c32dda0e32e0146e1a2986ac80ee23705f (diff)
downloadwordpress-mu-100ea61fda565fc02deee9d3042261400c8f0100.tar.gz
wordpress-mu-100ea61fda565fc02deee9d3042261400c8f0100.tar.xz
wordpress-mu-100ea61fda565fc02deee9d3042261400c8f0100.zip
Move locale setup into a filter, may fix #655
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1331 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-includes/wpmu-functions.php13
-rw-r--r--wp-settings.php6
2 files changed, 13 insertions, 6 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 03c4b53..4812b10 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1909,4 +1909,17 @@ function wpmu_upload_bypass_url($url) {
add_filter('media_upload_form_url', 'wpmu_upload_bypass_url');
+function mu_locale( $locale ) {
+ if( defined('WP_INSTALLING') == false ) {
+ $mu_locale = get_option('WPLANG');
+ if( $mu_locale === false )
+ $mu_locale = get_site_option('WPLANG');
+
+ if( $mu_locale !== false )
+ return $mu_locale;
+ }
+ return $locale;
+}
+add_filter( 'locale', 'mu_locale' );
+
?>
diff --git a/wp-settings.php b/wp-settings.php
index 11ca15f..2283d0d 100644
--- a/wp-settings.php
+++ b/wp-settings.php
@@ -311,12 +311,6 @@ $cookiehash = '';
*/
define('COOKIEHASH', '' );
-if( defined('WP_INSTALLING') == false ) {
- $locale = get_option('WPLANG');
- if( $locale === false )
- $locale = get_site_option('WPLANG');
-}
-
$wpdb->hide_errors();
if( defined( 'MUPLUGINDIR' ) == false )
define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );