aggregator_block_info

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 aggregator_block_info()

Implements hook_block_info().

Code

modules/aggregator/aggregator.module, line 345

<?php
function aggregator_block_info() {
  $blocks = array();
  $result = db_query('SELECT cid, title FROM {aggregator_category} ORDER BY title');
  foreach ($result as $category) {
    $blocks['category-' . $category->cid]['info'] = t('!title category latest items', array('!title' => $category->title));
  }
  $result = db_query('SELECT fid, title FROM {aggregator_feed} WHERE block <> 0 ORDER BY fid');
  foreach ($result as $feed) {
    $blocks['feed-' . $feed->fid]['info'] = t('!title feed latest items', array('!title' => $feed->title));
  }
  return $blocks;
}
?>