You are here

function _taxonomy_menu_save_options in Taxonomy menu 6.3

Function to save an array of options

Parameters

$type: either GROUP/ITEM/GLOBAL/PATH/TERM_SET

$options: array of options (name => value)

$type_key: either mgid or mgi_id or path key depending on key of options

2 calls to _taxonomy_menu_save_options()
taxonomy_menu_group_form_submit in ./taxonomy_menu.admin.inc
Submit Handler for taxonomy_menu_group_form
taxonomy_menu_term_set_form_submit in ./taxonomy_menu.admin.inc
Submit handler for taxonomy_term_set_form

File

./taxonomy_menu.admin.inc, line 351
admin section for taxonomy menu

Code

function _taxonomy_menu_save_options($type, $options, $type_key) {
  $option = new stdClass();
  foreach ($options as $name => $value) {
    $option->name = $name;
    $option->type = $type;
    $option->type_key = $type_key;
    $option->value = $value;
    taxonomy_menu_save_option($option);
  }
}