wp_check_post_hierarchy_for_loops


wp_check_post_hierarchy_for_loops ( $post_parent, $post_ID )

Parameters:
  • (int) $post_parent ID of the parent for the post we're checking.
  • (int) $post_ID ID of the post we're checking.
See:
Returns:
  • (int) The new post_parent for the post, 0 otherwise.
Defined at:

Description

Check the given subset of the post hierarchy for hierarchy loops.

Prevents loops from forming and breaks those that it finds. Attached to the {@see 'wp_insert_post_parent'} filter.

Related Functions

wp_check_term_hierarchy_for_loops, wp_find_hierarchy_loop, wp_check_post_lock, wp_check_comment_flood, wp_check_browser_version

Top Google Results

User discussions

wpseek mobile