wp-includes/post-template.php:2086Retrieves the parent post object for the given post.
$postint|WP_Post|nulloptionalnullWP_Post|nullfunction get_post_parent( $post = null ) { $wp_post = get_post( $post ); return ! empty( $wp_post->post_parent ) ? get_post( $wp_post->post_parent ) : null;}Introduced in 5.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/post-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.