You are here

function _taxonomy_menu_get_options in Taxonomy menu 6.3

Helper Functoin for taxonomy_menu_get_options

1 call to _taxonomy_menu_get_options()
taxonomy_menu_get_options in ./taxonomy_menu.module
Used to create a form array of taxonomy menu options invokes hook_taxonomy_menu_options().

File

./taxonomy_menu.module, line 273
It Generates menu links for all selected taxonomy terms

Code

function _taxonomy_menu_get_options(&$options, $field_name, $op, $type_key) {

  //if the variable is set then use that, if the default key is set then use that, otherwise use false
  $options[$field_name]['#default_value'] = taxonomy_menu_get_option($field_name, $op, !empty($options[$field_name]['default']) ? $options[$field_name]['default'] : FALSE, $type_key);

  //set the type to checkbox if it is empty
  if (empty($options[$field_name]['#type'])) {
    $options[$field_name]['#type'] = 'checkbox';
  }

  //remove the default and option type values from the array so we don't pass it to the form
  unset($options[$field_name]['default']);
  unset($options[$field_name]['option_type']);
  unset($options[$field_name]['taxonomy_menu_path']);
}