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 |
---|---|
2314 | // The alias isn't in a group, so let's create a new one and firstly add the alias term to it. |
2315 | $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1; |
2316 | do_action( 'edit_terms', $alias->term_id ); |
2317 | $wpdb->update( $wpdb->terms, compact('term_group'), array( 'term_id' => $alias->term_id ) ); |
2318 | do_action( 'edited_terms', $alias->term_id ); |
2319 | } |
2320 | } |
2321 |
|
2322 | // Check $parent to see if it will cause a hierarchy loop |
2323 | $parent = apply_filters( 'wp_update_term_parent', $parent, $term_id, $taxonomy, compact( array_keys( $args ) ), $args ); |
2324 |
|
2325 | // Check for duplicate slug |
2326 | $id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE slug = %s", $slug ) ); |
2327 | if ( $id && ($id != $term_id) ) { |
2328 | // If an empty slug was passed or the parent changed, reset the slug to something unique. |
2329 | // Otherwise, bail. |
2330 | if ( $empty_slug || ( $parent != $term['parent']) ) |
2331 | $slug = wp_unique_term_slug($slug, (object) $args); |
2332 | else |