WordPress at a glance
filter is not described

get_ancestors filter-hook . WP 3.1.0

Filters a given object's ancestors.

Usage

add_filter( 'get_ancestors', 'filter_function_name_3227', 10, 4 );
function filter_function_name_3227( $ancestors, $object_id, $object_type, $resource_type ){
	// filter...

	return $ancestors;
}
$ancestors(array)
An array of object ancestors.
$object_id(int)
Object ID.
$object_type(string)
Type of object.
$resource_type(string)
Type of resource $object_type is.

Notes

  • Since 4.1.1 Introduced the $resource_type parameter.

Where the hook is called

get_ancestors()
wp-includes/taxonomy.php 4253
return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
wp-includes/taxonomy.php 4221
return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );

Where the hook is used (in WP core)

Does not used.