function system_site_maintenance_settings in Drupal 6
Same name and namespace in other branches
- 5 modules/system/system.module \system_site_maintenance_settings()
Form builder; Configure the site's maintenance status.
See also
Related topics
1 string reference to 'system_site_maintenance_settings'
- system_menu in modules/
system/ system.module - Implementation of hook_menu().
File
- modules/
system/ system.admin.inc, line 1665 - Admin page callbacks for the system module.
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);
}