set_object_terms

ACTION wp-includes\taxonomy.php (ligne 2972) github
Fires after an object's terms have been set.

Paramètres

Entrée :
$object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids
Sortie :
@param int    $object_id  Object ID.
@param array  $terms      An array of object term IDs or slugs.
@param array  $tt_ids     An array of term taxonomy IDs.
@param string $taxonomy   Taxonomy slug.
@param bool   $append     Whether to append new terms to the old terms.
@param array  $old_tt_ids Old array of term taxonomy IDs.

Utilisation

// Ajouter une fonction au hook action 'set_object_terms'
add_action('set_object_terms', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids) {
    // Votre code ici
    error_log('Hook set_object_terms déclenché');
}

Actualités

Chargement des actualités...