wp_insert_post_parent хук-фильтр . 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_5097', 10, 4 ); function filter_function_name_5097( $post_parent, $post_ID, $new_postarr, $postarr ){ // filter... return $post_parent; }
- $post_parent(число)
- Post parent ID.
- $post_ID(число)
- Post ID.
- $new_postarr(массив)
- Array of parsed post data.
- $postarr(массив)
- Array of sanitized, but otherwise unmodified post data.
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp_insert_post_parent
wp-includes/post.php 3937
$post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, $new_postarr, $postarr );
Где используется хук в ядре WordPress
wp-includes/post.php 164
add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );