|
@@ 1746-1749 (lines=4) @@
|
| 1743 |
|
$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 $order $limit"; |
| 1744 |
|
$key = md5( $query ); |
| 1745 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 1746 |
|
if ( ! $results = wp_cache_get( $key, 'posts' ) ) { |
| 1747 |
|
$results = $wpdb->get_results( $query ); |
| 1748 |
|
wp_cache_set( $key, $results, 'posts' ); |
| 1749 |
|
} |
| 1750 |
|
if ( $results ) { |
| 1751 |
|
$after = $r['after']; |
| 1752 |
|
foreach ( (array) $results as $result ) { |
|
@@ 1769-1772 (lines=4) @@
|
| 1766 |
|
$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"; |
| 1767 |
|
$key = md5( $query ); |
| 1768 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 1769 |
|
if ( ! $results = wp_cache_get( $key, 'posts' ) ) { |
| 1770 |
|
$results = $wpdb->get_results( $query ); |
| 1771 |
|
wp_cache_set( $key, $results, 'posts' ); |
| 1772 |
|
} |
| 1773 |
|
if ( $results ) { |
| 1774 |
|
$after = $r['after']; |
| 1775 |
|
foreach ( (array) $results as $result) { |
|
@@ 1791-1794 (lines=4) @@
|
| 1788 |
|
$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit"; |
| 1789 |
|
$key = md5( $query ); |
| 1790 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 1791 |
|
if ( ! $results = wp_cache_get( $key, 'posts' ) ) { |
| 1792 |
|
$results = $wpdb->get_results( $query ); |
| 1793 |
|
wp_cache_set( $key, $results, 'posts' ); |
| 1794 |
|
} |
| 1795 |
|
if ( $results ) { |
| 1796 |
|
$after = $r['after']; |
| 1797 |
|
foreach ( (array) $results as $result ) { |
|
@@ 1815-1818 (lines=4) @@
|
| 1812 |
|
$query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit"; |
| 1813 |
|
$key = md5( $query ); |
| 1814 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 1815 |
|
if ( ! $results = wp_cache_get( $key, 'posts' ) ) { |
| 1816 |
|
$results = $wpdb->get_results( $query ); |
| 1817 |
|
wp_cache_set( $key, $results, 'posts' ); |
| 1818 |
|
} |
| 1819 |
|
$arc_w_last = ''; |
| 1820 |
|
if ( $results ) { |
| 1821 |
|
$after = $r['after']; |
|
@@ 1846-1849 (lines=4) @@
|
| 1843 |
|
$query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; |
| 1844 |
|
$key = md5( $query ); |
| 1845 |
|
$key = "wp_get_archives:$key:$last_changed"; |
| 1846 |
|
if ( ! $results = wp_cache_get( $key, 'posts' ) ) { |
| 1847 |
|
$results = $wpdb->get_results( $query ); |
| 1848 |
|
wp_cache_set( $key, $results, 'posts' ); |
| 1849 |
|
} |
| 1850 |
|
if ( $results ) { |
| 1851 |
|
foreach ( (array) $results as $result ) { |
| 1852 |
|
if ( $result->post_date != '0000-00-00 00:00:00' ) { |