WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Шаблоны сайтов на русском
событие не описано

delete_(taxonomy) хук-событие . 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.

Использование

add_action( 'delete_(taxonomy)', 'action_function_name_2744', 10, 4 );
function action_function_name_2744( $term, $tt_id, $deleted_term, $object_ids ){
	// action...
}
$term(число)
Term ID.
$tt_id(число)
Term taxonomy ID.
$deleted_term(смешанный)
Copy of the already-deleted term, in the form specified by the parent function. WP_Error otherwise.
$object_ids(массив)
List of term object IDs.

Заметки

  • C версии 4.5.0 Introduced the $object_ids argument.

Где вызывается хук

wp_delete_term()
delete_(taxonomy)
wp-includes/taxonomy.php 1923
do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids );

Где используется хук (в ядре WP)

wp-admin/includes/class-wp-site-icon.php 72
add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );
wp-includes/default-filters.php 113
add_filter( 'delete_term_metadata', 'wp_check_term_meta_support_prefilter' );
wp-includes/default-filters.php 116
add_filter( 'delete_term_metadata_by_mid', 'wp_check_term_meta_support_prefilter' );
wp-includes/default-filters.php 377
add_action( 'delete_expired_transients', 'delete_expired_transients' );
wp-includes/default-filters.php 380
add_action( 'delete_post', '_wp_delete_post_menu_item' );
wp-includes/default-filters.php 381
add_action( 'delete_term', '_wp_delete_tax_menu_item', 10, 3 );
wp-includes/default-filters.php 383
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/default-filters.php 462
add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
wp-includes/default-filters.php 467
add_action( 'delete_post', 'delete_get_calendar_cache' );
wp-includes/ms-default-filters.php 63
add_filter( 'delete_blog_metadata', 'wp_check_site_meta_support_prefilter' );
wp-includes/ms-default-filters.php 66
add_filter( 'delete_blog_metadata_by_mid', 'wp_check_site_meta_support_prefilter' );
wp-includes/ms-default-filters.php 78
add_action( 'delete_post', '_update_posts_count_on_delete' );
wp-includes/ms-default-filters.php 79
add_action( 'delete_post', '_update_blog_date_on_post_delete' );
wp-includes/nav-menu.php 1100
remove_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );
wp-includes/nav-menu.php 1112
add_action( 'delete_post', '_wp_delete_customize_changeset_dependent_auto_drafts' );