wpseek.com
A WordPress-centric search engine for devs and theme authors



restore_current_locale › WordPress Function

Since4.7.0
Deprecatedn/a
restore_current_locale ( No parameters )
Returns:
  • (string|false) Locale on success, false on error.
Defined at:
Codex:

Restores the translations according to the original locale.



Source

function restore_current_locale() {
	/* @var WP_Locale_Switcher $wp_locale_switcher */
	global $wp_locale_switcher;

	if ( ! $wp_locale_switcher ) {
		return false;
	}

	return $wp_locale_switcher->restore_current_locale();
}