function taxonomy_term_add

Returns a rendered edit form to create a new term associated to the given vocabulary.

1 string reference to 'taxonomy_term_add'
taxonomy_menu in drupal/core/modules/taxonomy/taxonomy.module
Implements hook_menu().

File

drupal/core/modules/taxonomy/taxonomy.admin.inc, line 540
Administrative page callbacks for the taxonomy module.

Code

function taxonomy_term_add($vocabulary) {
  $term = entity_create('taxonomy_term', array(
    'vid' => $vocabulary->vid,
    'vocabulary_machine_name' => $vocabulary->machine_name,
  ));
  if (module_exists('language')) {
    $term->langcode = language_get_default_langcode('taxonomy_term', $vocabulary->machine_name);
  }
  return entity_get_form($term);
}