Skip to content

Commit

Permalink
All: Disable comments on wpdocs sites
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Krinkle committed Apr 21, 2024
1 parent fff52b7 commit c84413e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down

0 comments on commit c84413e

Please sign in to comment.