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 |
|---|---|
| 3262 | * |
| 3263 | * @since 3.1.0 |
| 3264 | * |
| 3265 | * @param int $parent_term ID of the parent term. |
| 3266 | * @param int $term_id Term ID. |
| 3267 | * @param string $taxonomy Taxonomy slug. |
| 3268 | * @param array $parsed_args An array of potentially altered update arguments for the given term. |
| 3269 | * @param array $args Arguments passed to wp_update_term(). |
| 3270 | */ |
| 3271 | $parent = (int) apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args ); |
| 3272 | |
| 3273 | // Check for duplicate slug. |
| 3274 | $duplicate = get_term_by( 'slug', $slug, $taxonomy ); |
| 3275 | if ( $duplicate && $duplicate->term_id !== $term_id ) { |
| 3276 | /* |
| 3277 | * If an empty slug was passed or the parent changed, reset the slug to something unique. |
| 3278 | * Otherwise, bail. |
| 3279 | */ |
| 3280 | if ( $empty_slug || ( $parent !== (int) $term['parent'] ) ) { |