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 REST Autosaves Controller::get parent WP 5.6
protected function get_parent( $parent_id ) {
return $this->revisions_controller->get_parent( $parent_id );
}