=== Yakura Commenti – Disable & Remove Comments === Contributors: yakuradev Tags: disable comments, remove comments, hide comments, delete comments, stop spam Requires at least: 5.9 Tested up to: 6.9 Stable tag: 1.0.0 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Disable and remove comments site-wide or per post type. Control REST API, feeds, XML-RPC, admin UI, and avatars. Multisite ready == Description == **Yakura Commenti** lets you disable comments across your entire WordPress site with one click, or selectively remove comments on specific post types. Hide comment forms, delete existing comments in bulk, stop spam, and clean up your admin — with full multisite network support and WP-CLI commands. = Why Yakura Commenti? = WordPress's built-in Discussion settings only scratch the surface. They let you close comments on future posts, but existing posts stay open, comment menus clutter the admin, REST API endpoints remain exposed, and pingback headers keep broadcasting. Yakura Commenti closes every door — front end, back end, feeds, APIs — while giving you fine-grained control over what stays open. * **One click vs. granular** — Disable everything at once, or choose exactly which post types to affect * **Per-post overrides** — Keep comments open on specific posts even when disabled globally * **Safe by default** — Disabling comments never deletes anything. Deletion is a separate, intentional action * **Developer-friendly** — 16+ filters, 7+ actions, 8 WP-CLI commands, and a REST API for full programmatic control = Features = * **Disable All or Per Post Type** — One toggle to disable comments everywhere, or select specific post types * **Per-Post Override** — Enable or disable comments on individual posts via a meta box * **Show Existing Comments** — Optionally keep displaying previously posted comments while blocking new ones * **Admin Cleanup** — Remove the Comments menu, admin bar item, dashboard widgets, and block editor comment blocks * **REST API Blocking** — Remove `/wp/v2/comments` endpoints and block comment requests * **XML-RPC Blocking** — Remove all comment-related XML-RPC methods * **Feed & Pingback Removal** — Remove comment RSS feeds, X-Pingback headers, and pingback XML-RPC methods * **Avatar & Gravatar Control** — Disable avatar display and block external Gravatar requests for privacy * **Comment Type Whitelisting** — Allow specific comment types like WooCommerce order notes or WP 6.9 Notes to bypass disabling * **User Role Exclusions** — Exempt specific user roles from comment restrictions * **Scheduled Disable** — Automatically close comments on posts older than a set number of days via WP-Cron * **Bulk Comment Deletion** — Delete comments by post type, comment type, or status with a statistics preview before you commit * **Import/Export Settings** — Transfer your configuration between sites via JSON files * **Activity Log** — Full audit trail of every settings change, import, and bulk deletion * **Setup Wizard** — Three-step first-run wizard to configure your site in under a minute * **Multisite Support** — Network activation with network-wide settings and per-subsite management * **WP-CLI Commands** — 8 commands for status, settings, deletion, stats, export, import, log, and reset * **Custom REST API** — `yakura-commenti/v1/` endpoints for reading and updating settings programmatically = For Developers = Yakura Commenti exposes 16+ filters and 7+ actions at every decision point — override whether a post type is disabled, modify settings before save, react after bulk deletions, filter REST endpoints, and more. All hooks are prefixed with `yakura_commenti_`. WP-CLI: `wp yakura-commenti status|settings|delete|stats|export|import|log|reset`. REST API: `GET/POST /yakura-commenti/v1/settings`, `GET /yakura-commenti/v1/status` (requires `manage_options`). = Requirements = * WordPress 5.9 or later * PHP 7.4 or later == Installation == 1. Upload the `yakura-commenti` folder to `/wp-content/plugins/` 2. Activate the plugin through the Plugins menu 3. Complete the setup wizard that appears on first activation, or go to **Yakura Commenti** in the admin sidebar to configure manually == Frequently Asked Questions == = Does this delete existing comments? = No. Disabling comments only prevents new comments from being posted. Your existing comments remain in the database untouched. You can optionally keep displaying them on the front end by enabling the "Show Existing Comments" setting. If you do want to delete comments, use the Tools page for bulk deletion with a preview of exactly what will be removed. = How do I remove the "comments are closed" message? = Yakura Commenti replaces the default comment template with a blank one, so the "comments are closed" message should not appear. If your theme uses a custom template that hard-codes this message, you may need to edit your theme template or use a CSS rule to hide it. = Can I disable comments on specific post types only? = Yes. Instead of disabling everywhere, select individual post types (posts, pages, custom post types) from the Post Types tab in settings. Only the selected types will have comments disabled. = Can I keep comments open on a specific post? = Yes. Every post, page, and custom post type has a "Yakura Commenti" meta box in the editor. Set it to "Enable" to override the global setting and keep comments open on that particular post. = Does this work with WooCommerce? = Yes. WooCommerce order notes use a special comment type. You can whitelist "Order Note" in the Comment Types setting so order notes continue to work normally even when comments are disabled. = Does this stop spam comments? = Yes. Yakura Commenti blocks comment submissions at multiple levels: it closes the comment form, blocks the REST API comment endpoints, removes XML-RPC comment methods, and returns an error on direct form submissions. Spam bots cannot post comments through any channel. = Does this disable pingbacks and trackbacks? = Yes. When feed and pingback removal is enabled, the plugin removes the X-Pingback header, closes pings on all posts, and removes the `pingback.ping` and `pingback.extensions.getPingbacks` XML-RPC methods. = Will this break my theme or other plugins? = No. Yakura Commenti uses standard WordPress filters and actions. It does not modify your database schema, alter theme files, or override other plugins. If you deactivate it, everything returns to its previous state. = Can I re-enable comments after disabling them? = Yes. All changes are reversible. Toggle the settings back, deactivate the plugin, or use the per-post override to re-enable comments on individual posts. Nothing is permanently altered. = Does this slow down my site? = No. The plugin is lightweight and only runs the hooks it needs. There are no external API calls, no additional database tables, and no front-end JavaScript. Blocking Gravatar requests can actually improve page load times by preventing external HTTP requests. = Are my settings preserved when I update the plugin? = Yes. Settings are stored in the WordPress options table and are not affected by plugin updates. You can also export your settings as a JSON backup at any time. = Is this compatible with multisite? = Yes. Network activate the plugin and use the Network Settings page to apply configuration across all sites. You can also manage settings per subsite. = Does this work with the block editor (Gutenberg)? = Yes. The plugin removes comment-related blocks (Post Comments, Comments Query Loop) from the block editor inserter so they cannot be added to new posts. = Can I manage this from the command line? = Yes. Yakura Commenti includes 8 WP-CLI commands: `wp yakura-commenti status`, `settings`, `delete`, `stats`, `export`, `import`, `log`, and `reset`. Run `wp help yakura-commenti` for full documentation. == Screenshots == 1. Dashboard with comment statistics and quick status overview 2. Settings page with per-post-type comment controls 3. Setup wizard — configure your site in three steps 4. Tools page with bulk comment deletion and statistics preview 5. Per-post meta box for overriding global comment settings 6. Activity log showing an audit trail of all changes == Changelog == = 1.0.0 = * Added core comment disabling with site-wide and per-post-type control * Added per-post override meta box for individual comment control * Added option to show existing comments while blocking new ones * Added admin cleanup: menu, admin bar, dashboard widgets, block editor blocks * Added REST API comment endpoint blocking * Added XML-RPC comment method blocking * Added comment feed and pingback removal * Added avatar disabling and Gravatar request blocking * Added comment type whitelisting for WooCommerce order notes and WP 6.9 Notes * Added user role exclusions from comment disabling * Added scheduled comment disable via WP-Cron * Added bulk comment deletion tools with statistics preview * Added settings import and export as JSON * Added activity log for settings changes and bulk actions * Added three-step setup wizard * Added multisite support with network settings * Added 8 WP-CLI commands for full command-line management * Added custom REST API endpoints for programmatic settings access * Added 16+ developer filters and 7+ actions for extensibility == Upgrade Notice == = 1.0.0 = Initial release. Disable and remove comments across your entire site with granular control over every aspect of WordPress comments.