wp_insert_post_parent WordPress Filter Hook
The wp_insert_post_parent hook is used to insert a new post parent for a post. This hook is called when a new post is created or when an existing post is updated.
apply_filters( 'wp_insert_post_parent', int $post_parent , int $post_ID , array $new_postarr , array $postarr ) #
Filters the post parent — used to check for and prevent hierarchy loops.
Parameters
- $post_parent
(int)Post parent ID.
- $post_ID
(int)Post ID.
- $new_postarr
(array)Array of parsed post data.
- $postarr
(array)Array of sanitized, but otherwise unmodified post data.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |