You are here

function weather_block_info in Weather 7.3

Same name and namespace in other branches
  1. 7 weather.module \weather_block_info()
  2. 7.2 weather.module \weather_block_info()

Implements hook_block_info().

File

./weather.module, line 281
Display current weather data from many places in the world.

Code

function weather_block_info() {
  module_load_include('inc', 'weather', 'weather.common');
  $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['geofieldtaxonomyterms'] = array(
    'info' => t('Weather: location of taxonomy terms (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;
}