get_ancestors

get_ancestors

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

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('get_ancestors') is found 2 times:

  • /wp-includes/taxonomy.php line 4963
     
    	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
    	 * @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