$terms =
array_merge( $terms, array
( $default ) );
} } $terms =
array_map( 'intval',
$terms );
wp_set_object_terms( $object_id,
$terms,
$taxonomy );
} // Clean the relationship caches for all object types using this term.
$tax_object =
get_taxonomy( $taxonomy );
foreach ( $tax_object->object_type
as $object_type ) { clean_object_term_cache( $object_ids,
$object_type );
} $term_meta_ids =
$wpdb->
get_col( $wpdb->
prepare( "SELECT meta_id FROM
$wpdb->termmeta WHERE term_id = %d ",
$term ) );
foreach ( $term_meta_ids as $mid ) { delete_metadata_by_mid( 'term',
$mid );
} /**
* Fires immediately before a term taxonomy ID is deleted.
*
* @since 2.9.0
*
* @param int $tt_id Term taxonomy ID.
*/