apply_filters( ‘get_ancestors’, int[] $ancestors, int $object_id, string $object_type, string $resource_type )

In this article

Filters a given object’s ancestors.

Parameters

$ancestorsint[]
An array of IDs of object ancestors.
$object_idint
Object ID.
$object_typestring
Type of object.
$resource_typestring
Type of resource $object_type is.

Source

return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );

Changelog

VersionDescription
4.1.1Introduced the $resource_type parameter.
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.