Changeset 4953 for trunk/wp-includes/general-template.php
- Timestamp:
- 02/27/2007 03:24:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r4928 r4953 352 352 $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts WHERE post_type ='post' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC" . $limit); 353 353 if ($arcresults) { 354 355 356 357 354 $afterafter = $after; 355 foreach ($arcresults as $arcresult) { 356 $url = get_year_link($arcresult->year); 357 $text = sprintf('%d', $arcresult->year); 358 358 if ($show_post_count) 359 360 361 362 } 359 $after = ' ('.$arcresult->posts.')' . $afterafter; 360 echo get_archives_link($url, $text, $format, $before, $after); 361 } 362 } 363 363 } elseif ( 'daily' == $type ) { 364 364 $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date DESC" . $limit);
Note: See TracChangeset
for help on using the changeset viewer.