Auto-Close v3.1.0: Term Exclusions, Comment Reopening, Email Notifications and more
Closing comments on old posts is one of the most effective ways to reduce spam on a WordPress site. I built Auto-Close in 2008 (my first and still-living plugin) to handle that automatically, and v3.0.0 brought a full rewrite with a modern architecture. But I felt that users needed more granular control over which posts get closed and better visibility into what the cron job actually does.
v3.1.0 addresses both. This release adds taxonomy-based exclusions, automatic comment reopening when you update a post, and email notifications after each scheduled run.
Exclude posts by category, tag or custom taxonomy
Until now, the only way to prevent Auto-Close from closing comments on a specific post was to enter its ID in the settings. That works, but it doesn’t scale.
This is where taxonomy term exclusions come in.
You can now exclude entire categories, tags, or any custom taxonomy term from comment and pingback/trackback closure. If you have a “Discussion” category where you want comments to stay open indefinitely, you just select that term in the settings. Every post in that category is then excluded from auto-closing.
The best part is that comments and pingbacks/trackbacks have separate exclusion lists. You might want to keep comments open on posts tagged “community” while still closing pingbacks on those same posts. That’s now possible without writing any custom code.
Reopen comments when a post is updated
Several users requested this feature, and I can see why. You update an old post with new information, but the comments are already closed. Readers can’t ask questions or share feedback on the updated content.
Auto-Close v3.1.0 can now automatically reopen comments when you save or update a published post. You configure how many days comments should stay open after the update (the default is 30 days). Once that window expires, the next scheduled cron run closes them again.
This keeps discussions relevant to the content. Update a tutorial with new steps, and your readers can discuss those changes. After the configured period, comments close again without you having to remember to do it manually.
Email summary after each cron run
Before this release, Auto-Close operated silently. The cron job ran, comments were closed, and revisions were deleted, and you had no record of what happened unless you dug into the database. I wanted to fix that.
Now you can opt in to an email summary after each scheduled run. The email includes the number of comments closed, pingbacks/trackbacks closed, and revisions deleted. I’ve built it with a clean HTML template, so the information is easy to scan.
Emails go to your site admin address by default. You can also set a custom recipient in the settings if you prefer notifications to go to a different inbox.
Smarter settings fields
I’ve replaced the manual term ID entry with Tom Select, an autocomplete search component. Instead of looking up term IDs and typing them in manually, you start typing a term name and pick from matching results. The dropdown shows the term name, its taxonomy, and its ID, so there’s no ambiguity.
I’ve also updated the Settings API and other reusable classes to match the latest versions used across my other WebberZone plugins. This keeps the codebase consistent and makes maintenance easier going forward.
Bug fixes
I’ve fixed undefined variable warnings that could appear when processing taxonomy term exclusions. There was also an issue with the Settings API repeater fields, where form submission, hidden input names, and sanitisation weren’t working correctly with row ID lookup. That’s sorted now.
Upgrade notes
v3.1.0 is a smooth upgrade from v3.0.0. Update through your WordPress dashboard as usual. The new features are all opt-in, so your existing settings continue to work without changes.
After updating, head to Settings > AutoClose to configure the new options:
- Term exclusions are on the Comments and Pingbacks/Trackbacks tabs
- Comment reopening is on the Comments tab
- Email notifications are on the General tab
If you’re running a version older than 3.0.0, I’d recommend reading the v3.0.0 release post first, as that was a complete rewrite.
Get Auto-Close
You can download Auto-Close from the WordPress plugin repositoryOpens in a new window or update directly from your WordPress dashboard. The source code is on GitHubOpens in a new window.
If you find a bug or have a feature request, open an issue on GitHub or use the support forumOpens in a new window. And if Auto-Close saves you time, consider leaving a review on the plugin page. It helps other site owners find the plugin.
