function theme_archive_month_list in Archive 5
1 theme call to theme_archive_month_list()
- archive_block in ./
archive.module - Implementation of hook_block().
File
- ./
archive.module, line 512
Code
function theme_archive_month_list($list_items) {
// Sort by year then by month
krsort($list_items);
foreach ($list_items as $year => $v) {
krsort($list_items[$year]);
}
$links = array();
foreach ($list_items as $year => $months) {
foreach ($months as $month => $data) {
$links[] = l(t($data['month_name'] . ' ' . $year), 'archive/all/' . $year . '/' . $month, array(
'title' => format_plural($data['count'], '1 post', '@count posts'),
));
}
}
if (count($links) == variable_get('archive_block_months', 6)) {
$links[] = '<div class="more-link">' . l(t('all'), 'archive', array(
'title' => t('Browse all of the archives'),
)) . '</div>';
}
return theme('item_list', $links);
}