_WP_Editors::get_mce_locale(): string

Returns the TinyMCE locale.


Return

string


Top ↑

Source

File: wp-includes/class-wp-editor.php. View all references

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;
}


Top ↑

Changelog

Changelog
Version Description
4.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.