Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_insert_post_parent

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2545      if ( ! isset($pinged) )
2546           $pinged = '';
2547
2548      if ( isset($post_parent) )
2549           $post_parent = (int) $post_parent;
2550      else
2551           $post_parent = 0;
2552
2553      // Check the post_parent to see if it will cause a hierarchy loop
2554      $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );
2555
2556      if ( isset($menu_order) )
2557           $menu_order = (int) $menu_order;
2558      else
2559           $menu_order = 0;
2560
2561      if ( !isset($post_password) || 'private' == $post_status )
2562           $post_password = '';
2563