restore_previous_locale()WP 4.7.0

Restores the translations according to the previous locale.

Хуков нет.

Возвращает

Строку|false. Locale on success, false on error.

Использование

restore_previous_locale();

Заметки

  • Global. WP_Locale_Switcher. $wp_locale_switcher WordPress locale switcher object.

Список изменений

С версии 4.7.0 Введена.

Код restore_previous_locale() WP 6.0

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

	return $wp_locale_switcher->restore_previous_locale();
}