restore_previous_locale(): string|false

In this article

Restores the translations according to the previous locale.

Return

string|false Locale on success, false on error.

Source

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

	if ( ! $wp_locale_switcher ) {
		return false;
	}

	return $wp_locale_switcher->restore_previous_locale();
}

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

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