You are here

function headerimage_get_blocks in Header image 5

Same name and namespace in other branches
  1. 6 headerimage.module \headerimage_get_blocks()
  2. 7 headerimage.module \headerimage_get_blocks()

Return all Header Image blocks

Return value

array of Header Image blocks

7 calls to headerimage_get_blocks()
headerimage_block in ./headerimage.module
Implementation of hook_block().
headerimage_block_confirm_delete in ./headerimage.module
Delete block form
headerimage_form_alter in ./headerimage.module
Implementation of hook_form_alter
headerimage_settings_block_add in ./headerimage.module
Overview of all image blocks
headerimage_settings_block_add_validate in ./headerimage.module

... See full list

File

./headerimage.module, line 764
headerimage.module Conditionally display an node in a block.

Code

function headerimage_get_blocks() {
  static $blocks;
  if (!isset($blocks)) {
    $blocks = array();
    $result = db_query("SELECT * FROM {headerimage_block}");
    while ($block = db_fetch_object($result)) {
      if (!empty($block)) {
        $blocks[$block->delta] = $block->title;
      }
    }
  }
  return $blocks;
}