wp_check_term_hierarchy_for_loops

SummerySummery

Checks the given subset of the term hierarchy for hierarchy loops.

Syntax

wp_check_term_hierarchy_for_loops( int $parent, int $term_id, string $taxonomy )

DescriptionDescription

Prevents loops from forming and breaks those that it finds.

Attached to the ‘wp_update_term_parent’ filter.

ParametersParameters

$parent

(int) (Required) term_id of the parent for the term we're checking.

$term_id

(int) (Required) The term we're checking.

$taxonomy

(string) (Required) The taxonomy of the term we're checking.

ReturnReturn

(int) The new parent for the term.

SourceSource

File: wp-includes/taxonomy.php


			

ChangelogChangelog

Changelog
Version Description
3.1.0 Introduced.
Scroll to Top