You are here

function autotag_admin_settings in Taxonomy Autotagger 6.2

autotag settings page

1 string reference to 'autotag_admin_settings'
autotag_menu in ./autotag.module
hook_menu

File

./autotag.settings.inc, line 6

Code

function autotag_admin_settings() {
  $form['autotag_only_leaves'] = array(
    '#type' => 'checkbox',
    '#title' => t('Tag nodes with only terms at the very tip of a taxonomy (i.e. Terms which are not the parent of any other term)'),
    '#default_value' => variable_get('autotag_only_leaves', false),
    '#description' => t('If checked, only the leaf terms will be used by autotag'),
  );
  $form['content_types'] = array(
    '#type' => 'fieldset',
    '#title' => t('Default for "Autotag on save"'),
    '#collapsible' => TRUE,
  );
  $form['content_types']['autotag_save_checkbox'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content types'),
    '#default_value' => variable_get('autotag_save_checkbox', array()),
    '#options' => array_map('check_plain', node_get_types('names')),
    '#description' => t('Set the default status for the "Autotag on save" checkbox on every node form by content type.'),
  );
  $form['autotag_by_content_type'] = array(
    '#type' => 'fieldset',
    '#title' => t('Re-Autotag by content type'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['autotag_by_content_type']['content_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Content types'),
    '#description' => t('Note, re-autotagging existing content will not only update the tags associated with the node, but it will also update the date/time the node was last edited, and can also update other settings, like automatically generated aliases.'),
    '#default_value' => array_map('check_plain', node_get_types('names')),
    '#options' => array_map('check_plain', node_get_types('names')),
    '#theme' => 'autotag_admin_settings',
  );
  $form['autotag_by_content_type']['autotag_content_type_submit'] = array(
    '#type' => 'button',
    '#value' => t('Autotag selected content types'),
    '#submit' => array(
      'autotag_tag_content_type_submit',
    ),
    '#executes_submit_callback' => TRUE,
  );
  return system_settings_form($form);
}