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.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More