Filter hook 'get_ancestors'

in WP Core File wp-includes/taxonomy.php at line 4962

Description

Gets an array of ancestor IDs for a given object.

Occurrences

Filename Line Number
wp-includes/taxonomy.php 4962
wp-includes/taxonomy.php 4994

Parameters

Type Name Description
int $object_id Optional. The ID of the object. Default 0.
string $object_type Optional. The type of object for which we'll be retrieving ancestors. Accepts a post type or a taxonomy name. Default empty.
string $resource_type Optional. Type of resource $object_type is. Accepts 'post_type' or 'taxonomy'. Default empty.

PHP Doc

/**
 * Gets an array of ancestor IDs for a given object.
 *
 * @since 3.1.0
 * @since 4.1.0 Introduced the `$resource_type` argument.
 *
 * @param int    $object_id     Optional. The ID of the object. Default 0.
 * @param string $object_type   Optional. The type of object for which we'll be retrieving
 *                              ancestors. Accepts a post type or a taxonomy name. Default empty.
 * @param string $resource_type Optional. Type of resource $object_type is. Accepts 'post_type'
 *                              or 'taxonomy'. Default empty.
 * @return int[] An array of IDs of ancestors from lowest to highest in the hierarchy.
 */