override_unload_textdomain
Filters whether to override the text domain unloading.
Usage
add_filter( 'override_unload_textdomain', 'wp_kama_override_unload_textdomain_filter', 10, 3 ); /** * Function for `override_unload_textdomain` filter-hook. * * @param bool $override Whether to override the text domain unloading. * @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 bool */ function wp_kama_override_unload_textdomain_filter( $override, $domain, $reloadable ){ // filter... return $override; }
- $override(true|false)
- Whether to override the text domain unloading.
Default: false - $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
override_unload_textdomain
wp-includes/l10n.php 893
$plugin_override = apply_filters( 'override_unload_textdomain', false, $domain, $reloadable );