delete_(taxonomy) action-hook . WP 2.3.0
Fires after a term in a specific taxonomy is deleted.
The dynamic portion of the hook name, $taxonomy, refers to the specific taxonomy the term belonged to.
Usage
add_action( 'delete_(taxonomy)', 'action_function_name_7100', 10, 4 ); function action_function_name_7100( $term, $tt_id, $deleted_term, $object_ids ){ // action... }
- $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.
Changelog
Since 2.3.0 | Introduced. |
Since 4.5.0 | Introduced the $object_ids argument. |
Where the hook is called
delete_(taxonomy)
wp-includes/taxonomy.php 2020
do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids );
Where in WP core the hook is used WordPress
wp-includes/taxonomy.php 72
add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );
wp-includes/taxonomy.php 113
add_filter( 'delete_term_metadata', 'wp_check_term_meta_support_prefilter' );
wp-includes/taxonomy.php 116
add_filter( 'delete_term_metadata_by_mid', 'wp_check_term_meta_support_prefilter' );
wp-includes/taxonomy.php 387
add_action( 'delete_expired_transients', 'delete_expired_transients' );
wp-includes/taxonomy.php 390
add_action( 'delete_post', '_wp_delete_post_menu_item' );
wp-includes/taxonomy.php 391
add_action( 'delete_term', '_wp_delete_tax_menu_item', 10, 3 );
wp-includes/taxonomy.php 393
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/taxonomy.php 482
add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
wp-includes/taxonomy.php 487
add_action( 'delete_post', 'delete_get_calendar_cache' );
wp-includes/taxonomy.php 64
add_filter( 'delete_blog_metadata', 'wp_check_site_meta_support_prefilter' );
wp-includes/taxonomy.php 67
add_filter( 'delete_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );
wp-includes/taxonomy.php 79
add_action( 'delete_post', '_update_posts_count_on_delete' );
wp-includes/taxonomy.php 80
add_action( 'delete_post', '_update_blog_date_on_post_delete' );
wp-includes/taxonomy.php 1137
remove_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/taxonomy.php 1149
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );