You are here

function content_slider_block_info in Featured Content Slider 7

Same name and namespace in other branches
  1. 7.3 content_slider.module \content_slider_block_info()
  2. 7.2 content_slider.module \content_slider_block_info()

Implements hook_block_info().

File

./content_slider.module, line 45
Module file for content slider module.

Code

function content_slider_block_info() {

  // This is an hard limit which isn't good
  $blocks = array();
  for ($i = 0; $i < 3; $i++) {
    $content_type = variable_get('content_slider_source_' . $i, '');
    if ($content_type != '') {
      $blocks['content_slider_source_' . $i]['info'] = t('Content Slider !delta - !content_type', array(
        '!delta' => $i,
        '!content_type' => $content_type,
      ));
    }
  }
  return $blocks;
}