WP_REST_Template_Autosaves_Controller::get_parent( int $parent_id ): WP_Post|WP_Error

In this article

Get the parent post.

Parameters

$parent_idintrequired
Supplied ID.

Return

WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise.

Source

protected function get_parent( $parent_id ) {
	return $this->revisions_controller->get_parent( $parent_id );
}

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.