WordPress at a glance
function is not described

WP_REST_Autosaves_Controller::get_parent() protected WP 5.0.0

Get the parent post.

{} It's a 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.

Code of WP_REST_Autosaves_Controller::get_parent() WP 5.5.1

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