You are here

function imagepicker_block_info in Image Picker 7

Implements hook_block_info().

This hook declares what blocks are provided by the module.

File

./imagepicker.module, line 599
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function imagepicker_block_info() {
  $blocks = array();
  if (imagepicker_variable_get('imagepicker_galleryblocks_enabled', 0) && module_exists('colorbox')) {
    $howmany = imagepicker_variable_get('imagepicker_galleryblocks_howmany', 0);
    if ($howmany) {
      for ($i = 1; $i <= $howmany; $i++) {
        if (imagepicker_variable_get('imagepicker_galleryblocks_enable_' . $i, 0)) {
          $blocks[$i]['info'] = t('Imagepicker Gallery block !i', array(
            '!i' => $i,
          ));
          $blocks[$i]['cache'] = DRUPAL_NO_CACHE;
        }
      }
    }
  }
  return $blocks;
}