wp_check_term_hierarchy_for_loops
wp_check_term_hierarchy_for_loops ( $parent_term, $term_id, $taxonomy )
Parameters:- (int) parent_term `term_id` of the parent for the term we're checking.
- (int) term_id The term we're checking.
- (string) taxonomy The taxonomy of the term we're checking.
Returns:- (int) The new parent for the term.
Defined at: - Introduced in WordPress: 3.1.0
- Deprecated in WordPress: —
Description
Checks the given subset of the term hierarchy for hierarchy loops.Prevents loops from forming and breaks those that it finds.
Attached to the {@see 'wp_update_term_parent'} filter.