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 |
|---|---|
| 2322 | if ( in_array($tt_id, $final_tt_ids) ) |
| 2323 | $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order); |
| 2324 | if ( $values ) |
| 2325 | if ( false === $wpdb->query( "INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join( ',', $values ) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)" ) ) |
| 2326 | return new WP_Error( 'db_insert_error', __( 'Could not insert term relationship into the database' ), $wpdb->last_error ); |
| 2327 | } |
| 2328 | |
| 2329 | wp_cache_delete( $object_id, $taxonomy . '_relationships' ); |
| 2330 | |
| 2331 | do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids); |
| 2332 | return $tt_ids; |
| 2333 | } |
| 2334 | |
| 2335 | /** |
| 2336 | * Add term(s) associated with a given object. |
| 2337 | * |
| 2338 | * @package WordPress |
| 2339 | * @subpackage Taxonomy |
| 2340 | * @since 3.6 |