Fires after a single term is deleted via the REST API. The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. Possible hook names include: - `rest_delete_category` - `rest_delete_post_tag`
$term, $response, $request
Sortie :
@param WP_Term $term The deleted term. @param WP_REST_Response $response The response data. @param WP_REST_Request $request The request sent to the API.
// Ajouter une fonction au hook action 'rest_delete_{$this->taxonomy}'
add_action('rest_delete_{$this->taxonomy}', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($term, $response, $request) {
// Votre code ici
error_log('Hook rest_delete_{$this->taxonomy} déclenché');
}
Chargement des actualités...