-
Notifications
You must be signed in to change notification settings - Fork 0
/
breezyarchives_chrono.php
39 lines (39 loc) · 1.57 KB
/
breezyarchives_chrono.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
if (count($years) > 0) {
echo '<ul id="breezy-chronology-archive">';
foreach ($years as $year => $months) {
printf('<li class="year"><a href="%1$s" rel="archives">%2$s</a><ul class="breezy-yearly-archive">',
URL::get('display_entries_by_date', array('year' => $year)),
$year);
if ($show_monthly_post_count) {
foreach ($months as $month => $count) {
if ($count > 0) {
printf('<li class="month"><a href="%1$s" rel="archives">%2$s</a> <span class="post-count" title="%3$s">%4$d</span></li>',
URL::get('display_entries_by_date', array('year' => $year, 'month' => $month)),
Utils::locale_date($month_format, mktime(0,0,0,$month,1)),
sprintf(_n('%1$d Post', '%1$d Posts', $count, $this->class_name), $count),
$count);
} else {
printf('<li class="month"><span>%1$s</span> <span class="post-count" title="%2$s">%3$d</span></li>',
Utils::locale_date($month_format, mktime(0,0,0,$month,1)),
sprintf(_n('%1$d Post', '%1$d Posts', $count, $this->class_name), $count),
$count);
}
}
} else {
foreach ($months as $month => $count) {
if ($count > 0) {
printf('<li class="month"><a href="%1$s" rel="archives">%2$s</a></li>',
URL::get('display_entries_by_date', array('year' => $year, 'month' => $month)),
Utils::locale_date($month_format, mktime(0,0,0,$month,1)));
} else {
printf('<li class="month"><span>%1$s</span></li>',
Utils::locale_date($month_format, mktime(0,0,0,$month,1)));
}
}
}
echo '</ul></li>';
}
echo '</ul>';
}
?>