WP_Locale_Switcher::restore_current_locale() public WP 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 Locale Switcher::restore current locale WP 5.7
public function restore_current_locale() {
if ( empty( $this->locales ) ) {
return false;
}
$this->locales = array( $this->original_locale );
return $this->restore_previous_locale();
}