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

Checks 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_filter_post_meta_footnotes

Top Google Results

User discussions

wpseek mobile