restore_current_locale() WP 4.7.0
Restores the translations according to the original locale.
Хуков нет.
Возвращает
Строку/false. Locale on success, false on error.
Использование
restore_current_locale();
Заметки
- Global. WP_Locale_Switcher. $wp_locale_switcher WordPress locale switcher object.
Список изменений
С версии 4.7.0 | Введена. |
Код restore_current_locale() restore current locale WP 5.6.2
function restore_current_locale() {
/* @var WP_Locale_Switcher $wp_locale_switcher */
global $wp_locale_switcher;
return $wp_locale_switcher->restore_current_locale();
}