| 1 | Index: general-template.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- general-template.php (revision 15497) |
|---|
| 4 | +++ general-template.php (working copy) |
|---|
| 5 | @@ -867,6 +867,8 @@ |
|---|
| 6 | 'type' => 'monthly', 'limit' => '', |
|---|
| 7 | 'format' => 'html', 'before' => '', |
|---|
| 8 | 'after' => '', 'show_post_count' => false, |
|---|
| 9 | + 'title' => '', 'title_before' => '', 'title_after' => '', |
|---|
| 10 | + 'list_before' => '', 'list_after' => '', |
|---|
| 11 | 'echo' => 1 |
|---|
| 12 | ); |
|---|
| 13 | |
|---|
| 14 | @@ -906,6 +908,11 @@ |
|---|
| 15 | |
|---|
| 16 | $output = ''; |
|---|
| 17 | |
|---|
| 18 | + $output .= $list_before; |
|---|
| 19 | + |
|---|
| 20 | + if( '' != $title ) |
|---|
| 21 | + $output .= $title_before . $title . $title_after; |
|---|
| 22 | + |
|---|
| 23 | if ( 'monthly' == $type ) { |
|---|
| 24 | $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit"; |
|---|
| 25 | $key = md5($query); |
|---|
| 26 | @@ -1027,6 +1034,9 @@ |
|---|
| 27 | } |
|---|
| 28 | } |
|---|
| 29 | } |
|---|
| 30 | + |
|---|
| 31 | + $output .= $list_after; |
|---|
| 32 | + |
|---|
| 33 | if ( $echo ) |
|---|
| 34 | echo $output; |
|---|
| 35 | else |
|---|