pre_load_textdomain

FILTER wp-includes\l10n.php (ligne 749) github
Filters whether to short-circuit loading .mo file. Returning a non-null value from the filter will effectively short-circuit the loading, returning the passed value instead.

Paramètres

Entrée :
null, $domain, $mofile, $locale
Sortie :
@param bool|null   $loaded The result of loading a .mo file. Default null.
@param string      $domain Text domain. Unique identifier for retrieving translated strings.
@param string      $mofile Path to the MO file.
@param string|null $locale Locale.

Utilisation

// Modifier la valeur avec le filtre 'pre_load_textdomain'
add_filter('pre_load_textdomain', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...