pre_load_script_translations

FILTER wp-includes\l10n.php (ligne 1307) github
Pre-filters script translations for the given file, script handle and text domain. Returning a non-null value allows to override the default logic, effectively short-circuiting the function.

Paramètres

Entrée :
null, $file, $handle, $domain
Sortie :
@param string|false|null $translations JSON-encoded translation data. Default null.
@param string|false      $file         Path to the translation file to load. False if there isn't one.
@param string            $handle       Name of the script to register a translation domain to.
@param string            $domain       The text domain.

Utilisation

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

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

Actualités

Chargement des actualités...