wp_check_term_hierarchy_for_loops


wp_check_term_hierarchy_for_loops ( $parent, $term_id, $taxonomy )

Parameters:
  • (int) $parent `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:

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.

Related Functions

wp_check_post_hierarchy_for_loops, wp_find_hierarchy_loop, _get_term_hierarchy, wp_check_term_meta_support_prefilter, wp_check_comment_flood

Top Google Results

User discussions

wpseek mobile