Warning: This function has been deprecated. Use get_post_ancestors() instead.
_get_post_ancestors() WordPress Function
The get_post_ancestors() function is used to get the ancestors of a post. This function returns an array of ancestor IDs, from the top-level ancestor (the parent of the parent of the post) to the immediate ancestor (the parent of the post).
_get_post_ancestors( WP_Post $post ) #
Retrieve post ancestors.
Description
This is no longer needed as WP_Post lazy-loads the ancestors property with get_post_ancestors().
See also
Parameters
- $post
 (WP_Post)(Required)Post object, passed by reference (unused).
Source
File: wp-includes/deprecated.php
function _get_post_ancestors( &$post ) {
	_deprecated_function( __FUNCTION__, '3.5.0' );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description | 
|---|---|
| 3.5.0 | Use get_post_ancestors() | 
| 2.3.4 | Introduced. |