function theme_archive_separator in Archive 6
Same name and namespace in other branches
- 7.2 archive.pages.inc \theme_archive_separator()
- 7 archive.pages.inc \theme_archive_separator()
Theme the date separators between nodes of different year/month/day.
Parameters
$date_created: A UNIX timestamp.
$separators: An array with 'year', 'month', and 'day' keys. A value of 1 for any of those keys means a transition for that unit of time. Ex. array('year' => 0, 'month' => 1, 'day' => 1) ^ Means the month has transitioned
1 theme call to theme_archive_separator()
- archive_page in ./
archive.pages.inc - Fetch nodes for the selected date, or current date if none selected.
File
- ./
archive.pages.inc, line 395
Code
function theme_archive_separator($date_created, $separators) {
$date_sep = '';
if ($separators['year'] && $separators['month'] && $separators['day']) {
$date_sep = format_date($date_created, 'custom', 'F jS, Y');
}
else {
if ($separators['month'] && $separators['day']) {
$date_sep = format_date($date_created, 'custom', 'F jS');
}
else {
if ($separators['day']) {
$date_sep = format_date($date_created, 'custom', 'F jS');
}
}
}
return '<h3>' . $date_sep . '</h3>';
}