You are here

function node_import_display_taxonomy_term in Node import 6

Display a taxonomy term during preview.

1 call to node_import_display_taxonomy_term()
node_import_create_taxonomy in supported/taxonomy.inc
Create a new vocabulary or term by submitting the corresponding form.
1 string reference to 'node_import_display_taxonomy_term'
node_import_create_taxonomy in supported/taxonomy.inc
Create a new vocabulary or term by submitting the corresponding form.

File

supported/taxonomy.inc, line 144
Support file for the core taxonomy module.

Code

function node_import_display_taxonomy_term($tid) {
  static $output;
  if (!isset($output)) {
    $output = array();
  }
  if (!isset($output[$tid])) {
    if ($tid === 0) {
      $output[$tid] = theme('placeholder', t('The term will be created during import'));
    }
    else {
      if ($term = taxonomy_get_term($tid)) {
        $output[$tid] = l($term->name, 'taxonomy/term/' . $tid);
      }
      else {
        $output[$tid] = theme('placeholder', $tid);
      }
    }
  }
  return $output[$tid];
}