Filter hook 'override_unload_textdomain'

in WP Core File wp-includes/l10n.php at line 894

View Source

override_unload_textdomain

Filter Hook
Description
Filters whether to override the text domain unloading.

Hook Information

File Location wp-includes/l10n.php View on GitHub
Hook Type Filter
Line Number 894

Hook Parameters

Type Name Description
bool $override Whether to override the text domain unloading. Default false.
string $domain Text domain. Unique identifier for retrieving translated strings.
bool $reloadable Whether the text domain can be loaded just-in-time again.

Usage Examples

Basic Usage
<?php
// Hook into override_unload_textdomain
add_filter('override_unload_textdomain', 'my_custom_filter', 10, 3);

function my_custom_filter($override, $domain, $reloadable) {
    // Your custom filtering logic here
    return $override;
}

Source Code Context

wp-includes/l10n.php:894 - How this hook is used in WordPress core
<?php
 889  	 *
 890  	 * @param bool   $override   Whether to override the text domain unloading. Default false.
 891  	 * @param string $domain     Text domain. Unique identifier for retrieving translated strings.
 892  	 * @param bool   $reloadable Whether the text domain can be loaded just-in-time again.
 893  	 */
 894  	$plugin_override = apply_filters( 'override_unload_textdomain', false, $domain, $reloadable );
 895  
 896  	if ( $plugin_override ) {
 897  		if ( ! $reloadable ) {
 898  			$l10n_unloaded[ $domain ] = true;
 899  		}

PHP Documentation

<?php
/**
	 * Filters whether to override the text domain unloading.
	 *
	 * @since 3.0.0
	 * @since 6.1.0 Added the `$reloadable` parameter.
	 *
	 * @param bool   $override   Whether to override the text domain unloading. Default false.
	 * @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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/l10n.php
Related Hooks

Related hooks will be displayed here in future updates.