wp_find_hierarchy_loop


wp_find_hierarchy_loop ( $callback, $start, $start_parent, $callback_args = array() )

Access:
  • private
Parameters:
  • (callable) callback Function that accepts ( ID, $callback_args ) and outputs parent_ID.
  • (int) start The ID to start the loop check at.
  • (int) start_parent The parent_ID of $start to use instead of calling $callback( $start ). Use null to always use $callback.
  • (array) callback_args Optional. Additional arguments to send to $callback. Default empty array.
Returns:
  • (array) IDs of all members of loop.
Defined at:

Description

Finds hierarchy loops using a callback function that maps object IDs to parent IDs.

Related Functions

wp_find_hierarchy_loop_tortoise_hare, wp_check_post_hierarchy_for_loops, wp_check_term_hierarchy_for_loops, in_the_loop, get_page_hierarchy

Top Google Results

User discussions

wpseek mobile