WordPress at a glance
filter is not described

wp_insert_post_parent filter-hook . WP 3.1.0

Filters the post parent -- used to check for and prevent hierarchy loops.


add_filter( 'wp_insert_post_parent', 'filter_function_name_1748', 10, 4 );
function filter_function_name_1748( $post_parent, $post_ID, $new_postarr, $postarr ){
	// filter...

	return $post_parent;
Post parent ID.
Post ID.
Array of parsed post data.
Array of sanitized, but otherwise unmodified post data.

Where the hook is called

wp-includes/post.php 3651
$post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, $new_postarr, $postarr );

Where the hook is used (in WP core)

wp-includes/default-filters.php 164
add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );