wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php:166Gets the parent post, if the template ID is valid.
$parent_template_idstringWP_Post|WP_Error protected function get_parent( $parent_template_id ) { $template = get_block_template( $parent_template_id, $this->parent_post_type ); if ( ! $template ) { return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid template parent ID.' ), array( 'status' => 404 ) ); } return get_post( $template->wp_id ); }Introduced in 6.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.