system_site_maintenance_settings

5 system.module system_site_maintenance_settings()
6 system.admin.inc system_site_maintenance_settings()

1 string reference to 'system_site_maintenance_settings'

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);
}
Login or register to post comments