| 478 | | $posts = $wp_query->posts; |
| 479 | | preg_match('#WHERE\s(.*)\sGROUP BY#siU', $wp_query->request, $matches); |
| 480 | | $where = preg_replace('/( AND )?post_date >= (\'|\")(.*?)(\'|\")( AND post_date <= (\'\")(.*?)(\'\"))?/siU', '', $matches[1]); |
| 481 | | $num_days = $wpdb->query("SELECT DISTINCT post_date FROM $wpdb->posts WHERE $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date)"); |
| | 478 | preg_match('#FROM\s(.*)\sGROUP BY#siU', $wp_query->request, $matches); |
| | 479 | $fromwhere = preg_replace('/( AND )?post_date >= (\'|\")(.*?)(\'|\")( AND post_date <= (\'\")(.*?)(\'\"))?/siU', '', $matches[1]); |
| | 480 | $num_days = $wpdb->query("SELECT DISTINCT post_date FROM $fromwhere GROUP BY year(post_date), month(post_date), dayofmonth(post_date)"); |