You are here

function _patterns_taxonomy_form in Patterns 6.2

Same name and namespace in other branches
  1. 6 patterns.module \_patterns_taxonomy_form()

Custom implementation of Drupal's taxonomy_form()

Used to override static caching for taxonomy terms on node edit form.

1 call to _patterns_taxonomy_form()
patterns_form_alter in ./patterns.module

File

./patterns.module, line 3140
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function _patterns_taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
  $vocabulary = taxonomy_vocabulary_load($vid);
  $help = $help ? $help : $vocabulary->help;
  if (!$vocabulary->multiple) {
    $blank = $vocabulary->required ? t('- Please choose -') : t('- None selected -');
  }
  else {
    $blank = $vocabulary->required ? 0 : t('- None -');
  }
  return _patterns_taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank);
}