You are here

function weather_es_block_view in Weather_es 7

hook_block_view()

@author jmsirvent

File

./weather_es.module, line 141

Code

function weather_es_block_view($delta = '') {
  $show_block = FALSE;
  switch ($delta) {
    case 'system':
      if (user_access('access content')) {
        $content = _weather_es_contents($delta);
        $block = array(
          'subject' => t('System weather'),
          'content' => $content,
        );
        $show_block = TRUE;
      }
      break;
    case 'user':
      if (user_access('administer custom weather_es block')) {
        $content = _weather_es_contents($delta);
        $block = array(
          'subject' => t('User weather'),
          'content' => $content,
        );
        $show_block = TRUE;
      }
      break;
  }
  if ($show_block) {
    return $block;
  }
}