WordPress at a glance
function is not described

_get_post_ancestors() WP 2.3.4

Deprecated in 3.5.0. It is no longer supported and can be removed in future releases. Use get_post_ancestors() instead.

Retrieve post ancestors.

This is no longer needed as WP_Post lazy-loads the ancestors property with get_post_ancestors().

  • See: get_post_ancestors()

No Hooks.


Nothing (null).


_get_post_ancestors( $post );
$post(WP_Post) (required) (passed by reference — &)
Post object, passed by reference (unused).

Code of get post ancestors: wp-includes/deprecated.php WP 5.2.1

function _get_post_ancestors( &$post ) {
	_deprecated_function( __FUNCTION__, '3.5.0' );