theme_mod_{$name}

FILTER wp-includes\theme.php (ligne 1082) github
Filters the theme modification, or 'theme_mod', value. The dynamic portion of the hook name, `$name`, refers to the key name of the modification array. For example, 'header_textcolor', 'header_image', and so on depending on the theme options.

Paramètres

Entrée :
$mods[ $name ]
Sortie :
@param mixed $current_mod The value of the active theme modification.

Utilisation

// Modifier la valeur avec le filtre 'theme_mod_{$name}'
add_filter('theme_mod_{$name}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($mods[ $name ]) {
    // Modifier la valeur
    return $mods[ $name ];
}

Actualités

Chargement des actualités...