WP_REST_Template_Autosaves_Controller::get_parent
Get the parent post.
Method of the class: WP_REST_Template_Autosaves_Controller{}
No Hooks.
Returns
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 6.4.0 | Introduced. |
WP_REST_Template_Autosaves_Controller::get_parent() WP REST Template Autosaves Controller::get parent code WP 7.0
protected function get_parent( $parent_id ) {
return $this->revisions_controller->get_parent( $parent_id );
}