restore_previous_locale WordPress Action Hook
The restore_previous_locale WordPress hook is called when the current locale is about to be switched to a new one. It gives the developer an opportunity to restore the previous locale, if desired.
do_action( 'restore_previous_locale', string $locale , string $previous_locale ) #
Fires when the locale is restored to the previous one.
Parameters
- $locale
(string)The new locale.
- $previous_locale
(string)The previous locale.
Source
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |