get_ancestors

get_ancestors

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('get_ancestors') is found 2 times:

  • /wp-includes/taxonomy.php line 4963
    4960
    4961
    4962
    4963
    4964
    4965
    4966
    4967
    4968
    4969
    if ( empty( $object_id ) ) {
     
        /** This filter is documented in wp-includes/taxonomy.php */
        return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
    }
     
    if ( ! $resource_type ) {
        if ( is_taxonomy_hierarchical( $object_type ) ) {
            $resource_type = 'taxonomy';
        } elseif ( post_type_exists( $object_type ) ) {
  • /wp-includes/taxonomy.php line 4995
    4991
    4992
    4993
    4994
    4995
    4996
    4997
    4998
    4999
    5000
    5001
         * @param int    $object_id     Object ID.
         * @param string $object_type   Type of object.
         * @param string $resource_type Type of resource $object_type is.
         */
        return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
    }
     
    /**
     * Returns the term's parent's term ID.
     *
     * @since 3.1.0