Skip to content

Commit

Permalink
读者墙页面顶部显示读者列表时增添了评论是否通过审核的条件,这样可以过滤未通过审核的评论者出现在此列表中
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyueerhao committed Mar 27, 2023
1 parent e08ae4d commit 7984468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/template-reads.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

$year = 2;
$sql = "SELECT count(comment_ID) as num, comment_author_email as mail,comment_author as `name`,comment_author_url as url
FROM $wpdb->comments WHERE user_id !=1 AND TO_DAYS(now()) - TO_DAYS(comment_date) < (".($year*365).")
FROM $wpdb->comments WHERE user_id !=1 AND comment_approved !=0 AND TO_DAYS(now()) - TO_DAYS(comment_date) < (".($year*365).")
group by comment_author_email order by num desc limit 0, 100";
$reads = $wpdb->get_results($sql);
get_header();
Expand Down

0 comments on commit 7984468

Please sign in to comment.