delete_{$taxonomy} WordPress Action Hook
The delete_{$taxonomy} hook is triggered after a taxonomy is deleted. It gives you the opportunity to perform cleanup tasks such as deleting associated data or deregistering settings.
do_action( "delete_{$taxonomy}", int $term , int $tt_id , WP_Term $deleted_term , array $object_ids ) #
Fires after a term in a specific taxonomy is deleted.
Description
The dynamic portion of the hook name, $taxonomy
, refers to the specific taxonomy the term belonged to.
Possible hook names include:
delete_category
delete_post_tag
Parameters
- $term
(int)Term ID.
- $tt_id
(int)Term taxonomy ID.
- $deleted_term
(WP_Term)Copy of the already-deleted term.
- $object_ids
(array)List of term object IDs.
Source
File: wp-includes/taxonomy.php
Changelog
Version | Description |
---|---|
4.5.0 | Introduced the $object_ids argument. |
2.3.0 | Introduced. |