Skip to content

Instantly share code, notes, and snippets.

@herewithme
Created June 2, 2015 15:37
Show Gist options
  • Save herewithme/fb65d93ca9c8a2c5cf1b to your computer and use it in GitHub Desktop.
Save herewithme/fb65d93ca9c8a2c5cf1b to your computer and use it in GitHub Desktop.
Force english on WP admin !
<?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