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.


Top ↑

Source

File: wp-includes/class-wp-locale-switcher.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.