You are here

function block_term_settings in Block Visibility by Term 7

Hook menu page argument callback.

1 string reference to 'block_term_settings'
block_term_menu in ./block_term.module
Implements hook_menu().

File

./block_term.module, line 179
Controls block visibility by term.

Code

function block_term_settings($form_state) {
  $vocabs = taxonomy_vocabulary_get_names();
  $options = array();
  foreach ($vocabs as $item) {
    $options[$item->vid] = $item->name;
  }
  $form['block_term_restrict_vocab'] = array(
    '#type' => 'select',
    '#title' => t('Restrict terms on block settings to one vocabulary'),
    '#options' => $options,
    '#default_value' => variable_get('block_term_restrict_vocab', ''),
    '#empty_option' => t('- Select a vocabulary -'),
  );
  return system_settings_form($form);
}