Filters the duplicate term check that takes place during term creation.
Description
Term parent + taxonomy + slug combinations are meant to be unique, and wp_insert_term() performs a last-minute confirmation of this uniqueness before allowing a new term to be created. Plugins with different uniqueness requirements may use this filter to bypass or modify the duplicate-term check.
2635* @param object$duplicate_term Duplicate term row from terms table,if found.2636* @param string$term Term being inserted.2637* @param string$taxonomy Taxonomy name.2638* @param array$args Arguments passed to wp_insert_term().2639* @param int$tt_id term_taxonomy_id for the newly created term.2640*/2641$duplicate_term=apply_filters('wp_insert_term_duplicate_term_check',$duplicate_term,$term,$taxonomy,$args,$tt_id);26422643if($duplicate_term){2644$wpdb->delete($wpdb->terms,array('term_id'=>$term_id));2645$wpdb->delete($wpdb->term_taxonomy,array('term_taxonomy_id'=>$tt_id));26462647$term_id=(int)$duplicate_term->term_id;
History
Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.