On this page
WP_REST_Autosaves_Controller::get_parent( int $parent_id ): WP_Post|WP_Error
Get the parent post.
Parameters
$parent_idint Required-
Supplied ID.
Return
WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php. View all references
protected function get_parent( $parent_id ) {
return $this->revisions_controller->get_parent( $parent_id );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Autosaves_Controller::get_items_permissions_check() wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php | Checks if a given request has access to get autosaves. |
| WP_REST_Autosaves_Controller::get_items() wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php | Gets a collection of autosaves using wp_get_post_autosave. |
Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_autosaves_controller/get_parent