_WP_Editors::get_mce_locale() public WP 4.8.0
Returns the TinyMCE locale.
{} It's a method of the class: _WP_Editors{}
This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.
No Hooks.
Return
String
. Null. Nothing.
Usage
$result = _WP_Editors::get_mce_locale();
Changelog
Since 4.8.0 | Introduced. |
Code of _WP_Editors::get_mce_locale() WP Editors::get mce locale WP 5.7
public static function get_mce_locale() {
if ( empty( self::$mce_locale ) ) {
$mce_locale = get_user_locale();
self::$mce_locale = empty( $mce_locale ) ? 'en' : strtolower( substr( $mce_locale, 0, 2 ) ); // ISO 639-1.
}
return self::$mce_locale;
}