split_shared_term

ACTION wp-includes\taxonomy.php (ligne 4389) github
Fires after a previously shared taxonomy term is split into two separate terms.

Paramètres

Entrée :
$term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy
Sortie :
@param int    $term_id          ID of the formerly shared term.
@param int    $new_term_id      ID of the new term created for the $term_taxonomy_id.
@param int    $term_taxonomy_id ID for the term_taxonomy row affected by the split.
@param string $taxonomy         Taxonomy for the split term.

Utilisation

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

function ma_fonction_personnalisee($term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy) {
    // Votre code ici
    error_log('Hook split_shared_term déclenché');
}

Actualités

Chargement des actualités...