function weather_main_page_form in Weather 5.6
Same name and namespace in other branches
- 6.5 weather.module \weather_main_page_form()
Construct a form for general settings of the Weather module
1 string reference to 'weather_main_page_form'
- weather_main_page in ./
weather.module - Show an overview of configured locations and the default location, if on the admin pages
File
- ./
weather.module, line 539 - Display <acronym title="METeorological Aerodrome Report">METAR</acronym> weather data from anywhere in the world
Code
function weather_main_page_form() {
$form['use_cron'] = array(
'#type' => 'checkbox',
'#title' => t('Use cron to clear the cache once per hour'),
'#description' => t('If you use Drupal\'s cache, the system weather block will not be updated for anonymous users unless the cache is cleared. This happens e.g. when new nodes are created. If you want the system weather block to be updated when new weather data is available, you can clear the cache once per hour. Please note that this might slow down your site.'),
'#default_value' => variable_get('weather_use_cron', FALSE),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}