过滤后父级 – 用于检查和阻止层次结构循环。
原型
apply_filters( 'wp_insert_post_parent', int $post_parent, int $post_ID, array $new_postarr, array $postarr )
参数
$post_parent
(int)
发布父ID。
$post_ID
(int)
帖子ID。
$new_postarr
(array)
解析后的数据数组。
$postarr
(array)
已清理但未经修改的帖子数据的数组。
源文件
路径:wp-includes/post.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/wp_insert_post_parent/