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 |
---|---|
2079 | return $term_info; |
2080 | $term_ids[] = $term_info['term_id']; |
2081 | $tt_id = $term_info['term_taxonomy_id']; |
2082 | $tt_ids[] = $tt_id; |
2083 |
|
2084 | if ( $wpdb->get_var( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $object_id, $tt_id ) ) ) |
2085 | continue; |
2086 | do_action( 'add_term_relationship', $object_id, $tt_id ); |
2087 | $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) ); |
2088 | do_action( 'added_term_relationship', $object_id, $tt_id ); |
2089 | } |
2090 |
|
2091 | wp_update_term_count($tt_ids, $taxonomy); |
2092 |
|
2093 | if ( ! $append ) { |
2094 | $delete_terms = array_diff($old_tt_ids, $tt_ids); |
2095 | if ( $delete_terms ) { |
2096 | $in_delete_terms = "'" . implode("', '", $delete_terms) . "'"; |
2097 | do_action( 'delete_term_relationships', $object_id, $delete_terms ); |