WP_Locale_Switcher::restore_current_locale()publicWP 4.7.0

Restores the translations according to the original locale.

Метод класса: WP_Locale_Switcher{}

Хуков нет.

Возвращает

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

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

$WP_Locale_Switcher = new WP_Locale_Switcher();
$WP_Locale_Switcher->restore_current_locale();

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

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

Код WP_Locale_Switcher::restore_current_locale() WP 6.5.2

public function restore_current_locale() {
	if ( empty( $this->stack ) ) {
		return false;
	}

	$this->stack = array( array( $this->original_locale, false ) );

	return $this->restore_previous_locale();
}