From c84413e68af65de2a501b243762f041020e17e92 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 21 Apr 2024 20:51:33 +0100 Subject: [PATCH] All: Disable comments on wpdocs sites There were some 14,000 spam comments and pingbacks on api.jquery.com pending approval from from last year alone. This given that API pages are of type "post", and bots presumably submit these directly via POST parameters despite no form being rendered. Rather than setting this via wp-admin by hand, set this explicitly here. --- sites.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sites.php b/sites.php index 02344e2c..a4c25f70 100644 --- a/sites.php +++ b/sites.php @@ -391,6 +391,14 @@ function jquery_default_site_options() { 'permalink_structure' => '/%postname%/', 'use_smilies' => 0, + 'close_comments_days_old' => 14, + 'close_comments_for_old_posts' => 1, + 'comment_moderation' => 1, + 'comments_notify' => 0, + 'default_comment_status' => 'closed', + 'default_ping_status' => 'closed', + 'show_comments_cookies_opt_in' => 0, + // The one site where comments are sometimes enabled (blog.jquery.com) // has always had thread_comments turned off. //