WP_REST_Autosaves_Controller::get_parent()protectedWP 5.0.0

Get the parent post.

Method of the class: WP_REST_Autosaves_Controller{}

No Hooks.

Return

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

Usage

// protected - for code of main (parent) or child class
$result = $this->get_parent( $parent_id );
$parent_id(int) (required)
Supplied ID.

Changelog

Since 5.0.0 Introduced.

WP_REST_Autosaves_Controller::get_parent() code WP 6.5.2

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