| 开发者 | helpstring |
|---|---|
| 更新时间 | 2026年11月25日 03:45 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
save_post hooks used by WPML, Polylang or Yoast SEO.delete-disable-comments.
Open Tools → Delete & Disable Comments. Keep Public comments and pingbacks selected, add other types if you want them removed as well, click Delete Selected Comments and confirm. The plugin deletes in batches and shows a running count until the selected comments are gone.
Click Delete Spam Comments and confirm. Only comments, pingbacks and trackbacks marked as spam are removed. Approved and pending comments, product reviews and editor Notes stay.
Switch on the Disable Comments toggle. Comment forms and existing comments disappear from the front end, and new comments and pings are refused. If the screen then shows Close all comments now, you can also close the comment status on existing posts.
Yes. Each request processes a batch of 100 comments, so memory use and request time stay small. If you close the browser tab during a cleanup, start it again; it continues with the comments that are left.
Only if you select Product reviews. The default cleanup and the spam button keep them. Disabling comments site-wide does close product reviews for new submissions.
No. Export all comments as CSV creates a CSV file of the comment table and sends it to an authenticated administrator. It omits comment metadata and cannot be restored by this plugin. Make a full database backup before permanent deletion.
No. The CSV is for inspection or manual import workflows. Use your database backup to restore deleted comments and their metadata.
Comment fields that look like spreadsheet formulas are prefixed with an apostrophe in the CSV. This keeps untrusted comment text visible while preventing common spreadsheet applications from evaluating it as a formula. Remove that protective prefix only in a trusted import workflow.
No. The toggle prevents and hides public comment functionality, but existing records stay in the database until you explicitly delete them. Editor Notes stay available in the block editor through the comment REST route. Product reviews are closed by the site-wide toggle.
Yes, if you want comments again. Switching the toggle off restores your earlier Discussion defaults. If you deactivate the plugin while comments are disabled, the hiding and blocking stop, but new content keeps the closed Discussion defaults until you change them under Settings → Discussion. Your toggle setting is kept for a later reactivation.
When disable mode is active, some existing posts may still have comment_status or ping_status set to open. The button permanently closes those fields in one SQL update. Switching the toggle off does not reopen them.
The close action does not call wp_update_post() for every post and does not trigger save_post hooks. That keeps it suitable for sites using WPML, Yoast SEO, Polylang, and other plugins that react to post saves.
Only users with the manage_options capability, usually administrators. AJAX actions are protected with WordPress nonces and capability checks.
No. This plugin is designed for single-site WordPress installations.
No. Cleanup actions run only when an administrator clicks the relevant button.
CSV files are sent as a protected administrator download. The plugin does not leave them in the public uploads directory.
wp-content/uploads/..mo files for the admin UI.de_AT, de_DE) for admin UI, AJAX messages, and maintenance notices..pot) and fixed the hardcoded “Error loading status” JavaScript message.Tested up to 7.0, sanitized toggle AJAX input, documented intentional bulk SQL queries.wp_posts during AJAX.tests/php/.ddwpc_init() so it no longer iterates over every post on every page request.$wpdb update without triggering save_post, transition_post_status, or wp_after_insert_post.ddwpc_is_disable_comments_enabled(), ddwpc_apply_disable_comments_defaults(), ddwpc_close_all_post_comments_in_db(), and ddwpc_count_posts_with_open_comments().ddc_ to ddwpc_ across PHP and JavaScript.load_plugin_textdomain() call because WordPress 4.6+ auto-loads plugin translations.wp-content/uploads/delete-disable-comments/.