do_action( "delete_{$taxonomy}", int $term, int $tt_id, WP_Term $deleted_term, array $object_ids )
- Since
- 2.3.0, 4.5.0
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_categorydelete_post_tag
Compatibility
- WordPress
- since 4.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$termint- Term ID.
$tt_idint- Term taxonomy ID.
$deleted_termWP_Term- Copy of the already-deleted term.
$object_idsarray- List of term object IDs.
Where this hook fires · 1
wp-includes/taxonomy.php:2216wp_delete_term()
Source code
* * @param int $term Term ID. * @param int $tt_id Term taxonomy ID. * @param WP_Term $deleted_term Copy of the already-deleted term. * @param array $object_ids List of term object IDs. */ do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids ); return true;} /** * Deletes one existing category.Changelog
Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.5.0
Introduced the
$object_ids argument.from the docblock2.3.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.