delete_term_relationships хук-событиеWP 2.9.0

Fires immediately before an object-term relationship is deleted.

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

add_action( 'delete_term_relationships', 'wp_kama_delete_term_relationships_action', 10, 3 );

/**
 * Function for `delete_term_relationships` action-hook.
 * 
 * @param int    $object_id Object ID.
 * @param array  $tt_ids    An array of term taxonomy IDs.
 * @param string $taxonomy  Taxonomy slug.
 *
 * @return void
 */
function wp_kama_delete_term_relationships_action( $object_id, $tt_ids, $taxonomy ){

	// action...
}
$object_id(int)
Object ID.
$tt_ids(массив)
An array of term taxonomy IDs.
$taxonomy(строка)
Taxonomy slug.

Список изменений

С версии 2.9.0 Введена.
С версии 4.7.0 Added the $taxonomy parameter.

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

wp_remove_object_terms()
delete_term_relationships
wp-includes/taxonomy.php 2958
do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy );

Где используется хук в WordPress

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