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:

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, _get_term_hierarchy, wp_find_hierarchy_loop, wp_check_term_meta_support_prefilter, wp_check_widget_editor_deps

Top Google Results

User discussions

wpseek mobile