unload_textdomain
Fires before the text domain is unloaded.
Usage
add_action( 'unload_textdomain', 'wp_kama_unload_textdomain_action', 10, 2 );
/**
* Function for `unload_textdomain` action-hook.
*
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @param bool $reloadable Whether the text domain can be loaded just-in-time again.
*
* @return void
*/
function wp_kama_unload_textdomain_action( $domain, $reloadable ){
// action...
}
- $domain(string)
- Text domain. Unique identifier for retrieving translated strings.
- $reloadable(true|false)
- Whether the text domain can be loaded just-in-time again.
Changelog
| Since 3.0.0 | Introduced. |
| Since 6.1.0 | Added the $reloadable parameter. |
Where the hook is called
unload_textdomain
wp-includes/l10n.php 913
do_action( 'unload_textdomain', $domain, $reloadable );