Make WordPress Core


Ignore:
Timestamp:
05/17/2004 12:31:33 AM (22 years ago)
Author:
rboren
Message:

show_post_count, after, and custom format were not playing nicely in get_archives.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-general.php

    r1286 r1291  
    247247        $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $tableposts WHERE post_date < '$now' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit);
    248248        if ($arcresults) {
     249            $afterafter = $after;
    249250            foreach ($arcresults as $arcresult) {
    250251                $url  = get_month_link($arcresult->year,   $arcresult->month);
    251252                if ($show_post_count) {
    252253                    $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
    253                     $after = '&nbsp;('.$arcresult->posts.')';
     254                    $after = '&nbsp;('.$arcresult->posts.')' . $afterafter;
    254255                } else {
    255256                    $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
Note: See TracChangeset for help on using the changeset viewer.