You are here

function views_timelinejs_taxonomy_term_reference_tag in Views TimelineJS integration 7

Parses taxonomy term reference and returns name as tag.

Parameters

array $value: Taxonomy term reference value.

array $options: Optional configuration; not used.

Return value

string|boolean String containing tag or boolean FALSE if not found.

1 string reference to 'views_timelinejs_taxonomy_term_reference_tag'
taxonomy_term_reference_field.inc in plugins/tag_sources/taxonomy_term_reference_field.inc

File

plugins/tag_sources/taxonomy_term_reference_field.inc, line 25

Code

function views_timelinejs_taxonomy_term_reference_tag($value, $options = array()) {
  if (isset($value['tid']) && $value['tid'] != '') {
    $tid = $value['tid'];
    $term = taxonomy_term_load($tid);
    return $term->name;
  }
  else {
    return FALSE;
  }
}