Fires after a single term is completely created or updated via the REST API. The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. Possible hook names include: - `rest_after_insert_category` - `rest_after_insert_post_tag`
$term, $request, true
Sortie :
@param WP_Term $term Inserted or updated term object. @param WP_REST_Request $request Request object. @param bool $creating True when creating a term, false when updating.
// Ajouter une fonction au hook action 'rest_after_insert_{$this->taxonomy}'
add_action('rest_after_insert_{$this->taxonomy}', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($term, $request, true) {
// Votre code ici
error_log('Hook rest_after_insert_{$this->taxonomy} déclenché');
}
Chargement des actualités...