You are here

function adsense_managed_settings in Google AdSense integration 6

Same name and namespace in other branches
  1. 5.3 managed/adsense_managed.admin.inc \adsense_managed_settings()
  2. 7 managed/adsense_managed.admin.inc \adsense_managed_settings()

Menu callback for the adsense_managed module settings form.

1 string reference to 'adsense_managed_settings'
adsense_managed_menu in managed/adsense_managed.module
Implementation of hook_menu().

File

managed/adsense_managed.admin.inc, line 16
Contains the administrative functions of the adsense_managed module.

Code

function adsense_managed_settings() {
  module_load_include('inc', 'adsense_managed', 'help/adsense_managed.help');
  $form['help'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('Help and instructions'),
  );
  $form['help']['help'] = array(
    '#type' => 'markup',
    '#value' => adsense_managed_help_text(),
  );
  $form['blocks'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#title' => t('AdSense Blocks'),
  );
  $form['blocks']['adsense_managed_number_blocks'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of blocks'),
    '#default_value' => variable_get('adsense_managed_number_blocks', ADSENSE_MANAGED_NUMBER_BLOCKS_DEFAULT),
    '#size' => 2,
    '#maxlength' => 2,
  );
  $form['#validate'][] = '_adsense_managed_settings_validate';
  return system_settings_form($form);
}