You are here

function _exif_create_term in Exif 7

Parameters

$vid:

$name:

$parent_term:

Return value

stdClass the newly created term

1 call to _exif_create_term()
_exif_handle_taxonomy_field in ./exif.module
handle taxonomy field.

File

./exif.module, line 368

Code

function _exif_create_term($vid, $name, $parent_term = 0) {
  $term = new stdClass();
  $term->vid = $vid;
  $term->name = $name;
  $term->parent = array(
    $parent_term,
  );
  taxonomy_term_save($term);
  return $term;
}