wp_update_term_parent хук-фильтр . WP 3.1.0
Filters the term parent.
Hook to this filter to see if it will cause a hierarchy loop.
Использование
add_filter( 'wp_update_term_parent', 'filter_function_name_8276', 10, 5 ); function filter_function_name_8276( $parent, $term_id, $taxonomy, $parsed_args, $args ){ // filter... return $parent; }
- $parent(число)
- ID of the parent term.
- $term_id(число)
- Term ID.
- $taxonomy(строка)
- Taxonomy slug.
- $parsed_args(массив)
- An array of potentially altered update arguments for the given term.
- $args(массив)
- An array of update arguments for the given term.
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp_update_term_parent
wp-includes/taxonomy.php 3056
$parent = (int) apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args );
Где используется хук в ядре WordPress
wp-includes/taxonomy.php 165
add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );