function aggregator_block_info
Implements hook_block_info().
File
-
modules/
aggregator/ aggregator.module, line 348
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.