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 |
---|---|
2921 | * |
2922 | * @since 3.1.0 |
2923 | * |
2924 | * @param int $parent ID of the parent term. |
2925 | * @param int $term_id Term ID. |
2926 | * @param string $taxonomy Taxonomy slug. |
2927 | * @param array $args Compacted array of update arguments for the given term. |
2928 | * @param array $args An array of update arguments for the given term. |
2929 | */ |
2930 | $parent = apply_filters( 'wp_update_term_parent', $parent, $term_id, $taxonomy, compact( array_keys( $args ) ), $args ); |
2931 |
|
2932 | // Check for duplicate slug |
2933 | $id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE slug = %s", $slug ) ); |
2934 | if ( $id && ($id != $term_id) ) { |
2935 | // If an empty slug was passed or the parent changed, reset the slug to something unique. |
2936 | // Otherwise, bail. |
2937 | if ( $empty_slug || ( $parent != $term['parent']) ) |
2938 | $slug = wp_unique_term_slug($slug, (object) $args); |
2939 | else |