From 7b4019191b7845605ddb3268be0fc085885fdce0 Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Sat, 11 May 2013 19:56:29 -0500 Subject: [PATCH] Remove another unnecessary use of `$wpdb->prepare()` for the same reasons as in 8369dc6. --- date-based-taxonomy-archives.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/date-based-taxonomy-archives.php b/date-based-taxonomy-archives.php index a3f802d..6f9ee25 100644 --- a/date-based-taxonomy-archives.php +++ b/date-based-taxonomy-archives.php @@ -77,7 +77,7 @@ class Date_Based_Taxonomy_Archives { if ( is_numeric( $limit ) ) $limit = ' LIMIT ' . absint( $limit ); - $query = $wpdb->prepare( "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 DESC $limit" ); + $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 DESC $limit"; //Generate cache key, check cache, query DB if necessary and cache results $cache_key = $this->get_incrementor() . md5( $query ); -- GitLab