A WordPress-centric search engine for devs and theme authors



wp_insert_term_duplicate_term_check ›

Since5.0.0
Deprecatedn/a
apply_filters( 'wp_insert_term_duplicate_term_check', $duplicate_term, $term, $taxonomy, $args, $tt_id )
Parameters: (5)
  • (object) $duplicate_term Duplicate term row from terms table, if found.
    Required: Yes
  • (string) $term Term being inserted.
    Required: Yes
  • (string) $taxonomy Taxonomy name.
    Required: Yes
  • (array) $args Term arguments passed to the function.
    Required: Yes
  • (int) $tt_id term_taxonomy_id for the newly created term.
    Required: Yes
Defined at:
Codex:

Filters the duplicate term check that takes place during term creation.

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.





Source

$duplicate_term = apply_filters( 'wp_insert_term_duplicate_term_check', $duplicate_term, $term, $taxonomy, $args, $tt_id );