Created
June 2, 2015 15:37
-
-
Save herewithme/fb65d93ca9c8a2c5cf1b to your computer and use it in GitHub Desktop.
Force english on WP admin !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Languages Admin | |
Plugin URI: http://www.beapi.fr | |
Description: Force English on WP admin | |
Author: BeAPI | |
Author URI: http://www.beapi.fr | |
Version: 0.1 | |
Text Domain: bea-languages | |
---- | |
Copyright 2015 - BeAPI Team ([email protected]) | |
---- | |
*/ | |
class Languages_Admin { | |
public function __construct() { | |
add_filter( 'locale', array( __CLASS__, 'locale' ), 9999999999999999 ); | |
} | |
public static function locale( $locale ) { | |
if ( is_admin() ) { | |
$GLOBALS['locale'] = $locale = 'en_US'; | |
} | |
return $locale; | |
} | |
} | |
new Languages_Admin(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment