public function get_title_by_type($id, $type, $subtype = '')
{
$title = get_the_title($id);
if (!$title) {
$title = '(no title) - ID: ' . $id;
}
/**
* Filter the title of the relationship item.
*
* @param string $title The unfiltered item title.
* @param string $name Name of the relationship field.
* @param int $id The database ID of the item.
* @param string $type Item type (post, term, user, comment, or a custom one).
* @param string $subtype Subtype - "page", "post", "category", etc.
*/
return apply_filters('carbon_relationship_title', $title, $this->get_name(), $id, $type, $subtype);
}