Same name and namespace in other branches
  1. 6.x modules/system/system.admin.inc \system_site_maintenance_settings()
1 string reference to 'system_site_maintenance_settings'
system_menu in modules/system/system.module
Implementation of hook_menu().

File

modules/system/system.module, line 858
Configuration system that lets administrators modify the workings of the site.

Code

function system_site_maintenance_settings() {
  $form['site_offline'] = array(
    '#type' => 'radios',
    '#title' => t('Site status'),
    '#default_value' => variable_get('site_offline', 0),
    '#options' => array(
      t('Online'),
      t('Off-line'),
    ),
    '#description' => t('When set to "Online", all visitors will be able to browse your site normally. When set to "Off-line", only users with the "administer site configuration" permission will be able to access your site to perform maintenance; all other visitors will see the site off-line message configured below. Authorized users can log in during "Off-line" mode directly via the <a href="@user-login">user login</a> page.', array(
      '@user-login' => url('user'),
    )),
  );
  $form['site_offline_message'] = array(
    '#type' => 'textarea',
    '#title' => t('Site off-line message'),
    '#default_value' => variable_get('site_offline_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array(
      '@site' => variable_get('site_name', 'Drupal'),
    ))),
    '#description' => t('Message to show visitors when the site is in off-line mode.'),
  );
  return system_settings_form($form);
}