You are here

function footer_message_form_system_site_information_settings_alter in Footer Message 7

Same name and namespace in other branches
  1. 8 footer_message.module \footer_message_form_system_site_information_settings_alter()

Implements hook_form_FORM_ID_alter().

File

./footer_message.module, line 11
This module provides a configurable footer message as a block.

Code

function footer_message_form_system_site_information_settings_alter(&$form, &$form_state, $form_id) {

  // Add a footer text area to the "Site Information" admin page.
  // Note the use of Drupal 7's new "text format" property, described
  // http://drupal.org/update/modules/6/7#text_format. Note that both the
  // value of this 'footer_message_msg' textarea and its filter format are
  // stored as a serial value in the variables table.
  $site_footer = variable_get('footer_message_msg', array(
    'value' => 'This is default site footer content.',
  ));
  $form['footer_message_msg'] = array(
    '#type' => 'text_format',
    '#base_type' => 'textarea',
    '#title' => t('Site Footer message'),
    '#default_value' => $site_footer['value'],
    '#format' => isset($site_footer['format']) ? $site_footer['format'] : NULL,
    '#required' => FALSE,
  );
  $form['#submit'][] = 'footer_message_form_submit';
}