saved_{$taxonomy}

ACTION wp-includes\taxonomy.php (ligne 2785) github
Fires after a term in a specific taxonomy has been saved, and the term cache has been cleared. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include:  - `saved_category`  - `saved_post_tag`

Paramètres

Entrée :
$term_id, $tt_id, false, $args
Sortie :
@param int   $term_id Term ID.
@param int   $tt_id   Term taxonomy ID.
@param bool  $update  Whether this is an existing term being updated.
@param array $args    Arguments passed to wp_insert_term().

Utilisation

// Ajouter une fonction au hook action 'saved_{$taxonomy}'
add_action('saved_{$taxonomy}', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($term_id, $tt_id, false, $args) {
    // Votre code ici
    error_log('Hook saved_{$taxonomy} déclenché');
}

Actualités

Chargement des actualités...