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.
2641* @param object$duplicate_term Duplicate term row from terms table,if found.2642* @param string$term Term being inserted.2643* @param string$taxonomy Taxonomy name.2644* @param array$args Arguments passed to wp_insert_term().2645* @param int$tt_id term_taxonomy_id for the newly created term.2646*/2647$duplicate_term=apply_filters('wp_insert_term_duplicate_term_check',$duplicate_term,$term,$taxonomy,$args,$tt_id);26482649if($duplicate_term){2650$wpdb->delete($wpdb->terms,array('term_id'=>$term_id));2651$wpdb->delete($wpdb->term_taxonomy,array('term_taxonomy_id'=>$tt_id));26522653$term_id=(int)$duplicate_term->term_id;
History
Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.