function blocks_blocks

4.x blocks.module blocks_blocks()
5.x blocks.module blocks_blocks()

Implementation of hook_blocks

We want to provide every "content_block" piece of content as a block.

Return value

unknown

File

modules/blocks/blocks.module, line 239

Code

function blocks_blocks() {
  $rtn = array();

  $res = db_query("SELECT * FROM content WHERE type = 'content_block'
                   ORDER BY title");
  while ($cur = db_fetch_array($res)) {
    $rtn ["block_" . $cur ["cid"]] = $cur ["title"];
  }

  return $rtn;
}