restore_previous_locale
Fires when the locale is restored to the previous one.
Использование
add_action( 'restore_previous_locale', 'wp_kama_restore_previous_locale_action', 10, 2 ); /** * Function for `restore_previous_locale` action-hook. * * @param string $locale The new locale. * @param string $previous_locale The previous locale. * * @return void */ function wp_kama_restore_previous_locale_action( $locale, $previous_locale ){ // action... }
- $locale(строка)
- The new locale.
- $previous_locale(строка)
- The previous locale.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
restore_previous_locale
wp-includes/class-wp-locale-switcher.php 149
do_action( 'restore_previous_locale', $locale, $previous_locale[0] );