You are here

function rotor_block_content in Rotor Banner 5

Same name and namespace in other branches
  1. 5.7 rotor.module \rotor_block_content()
  2. 6 rotor.module \rotor_block_content()

Returns the block content.

1 call to rotor_block_content()
rotor_block in ./rotor.module
Implementation of hook_block().

File

./rotor.module, line 457
A rotor banner consists in a set of images that will be changing. This module is made using jquery.

Code

function rotor_block_content() {
  $limit = variable_get('rotor_max_items', 3);
  $random = variable_get('rotor_random_items', 0);
  $items = rotor_get_items($limit, $random);
  if (sizeof($items > 0)) {
    drupal_add_css(drupal_get_path('module', 'rotor') . '/rotor.css');
    _rotor_setup_js();
    return theme('rotor_block', $items);
  }
}