function weather_block_info in Weather 7
Same name and namespace in other branches
- 7.3 weather.module \weather_block_info()
- 7.2 weather.module \weather_block_info()
Implement hook_block_info().
File
- ./
weather.module, line 218 - Display current weather data from many places in the world.
Code
function weather_block_info() {
$blocks['user'] = array(
'info' => t('Weather: custom user'),
);
$blocks['location'] = array(
'info' => t('Weather: location of nodes (requires Location module)'),
);
$blocks['geofield'] = array(
'info' => t('Weather: location of nodes (requires Geofield module)'),
);
$blocks['ip'] = array(
'info' => t('Weather: IP-based location of user (requires Smart IP module)'),
);
$current_displays = weather_get_displays_in_use();
foreach ($current_displays as $display_number) {
$key = 'system_' . $display_number;
$blocks[$key] = array(
'info' => t('Weather: system-wide display (#!number)', array(
'!number' => $display_number,
)),
);
}
return $blocks;
}