You are here

contentoptimizer.admin.inc in Content Optimizer 6

Admin include file.

File

contentoptimizer.admin.inc
View source
<?php

/**
 * @file
 * Admin include file.
 */

/**
 * Displays the form for the standard settings tab.
 *
 * @return
 *   array A structured array for use with Forms API.
 */
function contentoptimizer_admin_settings() {

  //Define the titles
  $form['contentoptimizer_display'] = array(
    '#type' => 'checkboxes',
    '#title' => 'Analysis box display options',
    '#description' => t('Controls where the analysis messages display on node edit forms.'),
    '#options' => array(
      'sections' => t('On each content section'),
      'main' => t('On content optmizer fieldset'),
    ),
    '#default_value' => variable_get('contentoptimizer_display', array(
      'sections',
      'main',
    )),
  );
  $form['contentoptimizer_analyze_on_start'] = array(
    '#type' => 'checkbox',
    '#title' => 'Auto-analyze on edit',
    '#description' => t('Turns on if you want content to be automatically analized when node is edited.'),
    '#default_value' => variable_get('contentoptimizer_analyze_on_start', '0'),
  );
  if (module_exists('setags')) {
    $form['contentoptimizer_include_setags'] = array(
      '#type' => 'checkbox',
      '#title' => 'Include search engine tags.',
      '#description' => t('Will add tags from the search engine tags module on analysis.'),
      '#default_value' => variable_get('contentoptimizer_include_setags', '0'),
    );
  }

  //Add the system buttons to the form
  $form = system_settings_form($form);

  //Overide the theme function back to our own one
  return $form;
}

Functions

Namesort descending Description
contentoptimizer_admin_settings Displays the form for the standard settings tab.