function aggregator_block_info
7.x aggregator.module | aggregator_block_info() |
Implements hook_block_info().
File
- drupal-7.x/
modules/ aggregator/ aggregator.module, line 348 - Used to aggregate syndicated content (RSS, RDF, and Atom).
Code
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;
}