WordPress at Your Fingertips
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_4117', 10, 4 );
function filter_function_name_4117( $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 4096
$post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, $new_postarr, $postarr );

Where in WP core the hook is used WordPress

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