Translations_Loader::restore()
Restored the locale to the previous one and removes the class filters.
Return
(void) Translations for each domain will be reloaded.
Source
File: src/Common/Translations_Loader.php
public function restore() { if ( ! $this->has_loaded_translations ) { return; } $this->override_locale = ''; /** * Fires before the locale translations are restored. * * @since 5.0.8 * * @param array<string> $domains The list of domains translations will be loaded for. */ do_action( 'tec_locale_translations_restore_before', $this->loaded_domains ); // Reload the translations using the currently determined locale. $this->load_locale_translations( $this->loaded_domains, determine_locale() ); /** * Fires after the locale translations are restored. * * @since 5.0.8 * * @param array<string> $domains The list of domains translations have been loaded for. */ do_action( 'tec_locale_translations_restore_after', $this->loaded_domains ); $this->has_loaded_translations = false; }
Changelog
Version | Description |
---|---|
5.0.8 | Introduced. |