WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 2297 | * |
| 2298 | * @since 5.1.0 |
| 2299 | * |
| 2300 | * @param object $duplicate_term Duplicate term row from terms table, if found. |
| 2301 | * @param string $term Term being inserted. |
| 2302 | * @param string $taxonomy Taxonomy name. |
| 2303 | * @param array $args Term arguments passed to the function. |
| 2304 | * @param int $tt_id term_taxonomy_id for the newly created term. |
| 2305 | */ |
| 2306 | $duplicate_term = apply_filters( 'wp_insert_term_duplicate_term_check', $duplicate_term, $term, $taxonomy, $args, $tt_id ); |
| 2307 | |
| 2308 | if ( $duplicate_term ) { |
| 2309 | $wpdb->delete( $wpdb->terms, array( 'term_id' => $term_id ) ); |
| 2310 | $wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) ); |
| 2311 | |
| 2312 | $term_id = (int) $duplicate_term->term_id; |
| 2313 | $tt_id = (int) $duplicate_term->term_taxonomy_id; |
| 2314 | |
| 2315 | clean_term_cache( $term_id, $taxonomy ); |