WP_Locale_Switcher::restore_current_locale()
Restores the translations according to the original locale.
Method of the class: WP_Locale_Switcher{}
No Hooks.
Return
String|false
. Locale on success, false on failure.
Usage
$WP_Locale_Switcher = new WP_Locale_Switcher(); $WP_Locale_Switcher->restore_current_locale();
Changelog
Since 4.7.0 | Introduced. |
WP_Locale_Switcher::restore_current_locale() WP Locale Switcher::restore current locale code WP 6.5.2
public function restore_current_locale() { if ( empty( $this->stack ) ) { return false; } $this->stack = array( array( $this->original_locale, false ) ); return $this->restore_previous_locale(); }