WordPress at a glance
function is not described

_get_post_ancestors() WP 2.3.4

Deprecated from version 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().

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

null. Null. Nothing.

Usage

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

Notes

  • See: get_post_ancestors()

Changelog

Since 2.3.4 Introduced.
Deprecated Since 3.5.0 Use get_post_ancestors()

Code of _get_post_ancestors() WP 5.7

<?php
function _get_post_ancestors( &$post ) {
	_deprecated_function( __FUNCTION__, '3.5.0' );
}