|
@@ 100-103 (lines=4) @@
|
| 97 |
|
$query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM {$wpdb->posts} $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit"; |
| 98 |
|
$key = md5($query); |
| 99 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 100 |
|
if (!$results = wp_cache_get($key, 'posts')) { |
| 101 |
|
$results = $wpdb->get_results($query); |
| 102 |
|
wp_cache_set($key, $results, 'posts'); |
| 103 |
|
} |
| 104 |
|
if ($results) { |
| 105 |
|
foreach ( (array)$results as $result ) { |
| 106 |
|
$url = get_year_link( $result->year ); |
|
@@ 140-143 (lines=4) @@
|
| 137 |
|
. "ORDER BY post_date $order $limit"; |
| 138 |
|
$key = md5($query); |
| 139 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 140 |
|
if (!$results = wp_cache_get($key, 'posts')) { |
| 141 |
|
$results = $wpdb->get_results($query); |
| 142 |
|
wp_cache_set($key, $results, 'posts'); |
| 143 |
|
} |
| 144 |
|
if ($results) { |
| 145 |
|
foreach ((array)$results as $result) { |
| 146 |
|
$url = get_month_link($result->year, $result->month); |
|
@@ 269-272 (lines=4) @@
|
| 266 |
|
. "count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit"; |
| 267 |
|
$key = md5($query); |
| 268 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 269 |
|
if (!$results = wp_cache_get($key, 'posts')) { |
| 270 |
|
$results = $wpdb->get_results($query); |
| 271 |
|
wp_cache_set($key, $results, 'posts'); |
| 272 |
|
} |
| 273 |
|
$arc_w_last = ''; |
| 274 |
|
if ( $results ) { |
| 275 |
|
foreach ( (array)$results as $result ) { |
|
@@ 293-296 (lines=4) @@
|
| 290 |
|
$query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; |
| 291 |
|
$key = md5($query); |
| 292 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 293 |
|
if ( !$results = wp_cache_get($key, 'posts') ) { |
| 294 |
|
$results = $wpdb->get_results($query); |
| 295 |
|
wp_cache_set($key, $results, 'posts'); |
| 296 |
|
} |
| 297 |
|
if ( $results ) { |
| 298 |
|
foreach ( (array)$results as $result ) { |
| 299 |
|
if ($result->post_date != '0000-00-00 00:00:00') { |