W3cubDocs

/WordPress

WP_REST_Global_Styles_Revisions_Controller::get_parent( int $parent_post_id ): WP_Post|WP_Error

Gets the parent post, if the ID is valid.

Description

Duplicate of WP_REST_Revisions_Controller::get_parent.

Parameters

$parent_post_idintrequired
Supplied ID.

Return

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

Source

Changelog

Version Description
6.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_global_styles_revisions_controller/get_parent