|
| 1 | +# Disable Comments |
| 2 | + |
| 3 | +A simple and lightweight WordPress plugin that completely disables comments functionality across your entire WordPress site. |
| 4 | + |
| 5 | +## Description |
| 6 | + |
| 7 | +This plugin disables all comments functionality in WordPress with no configuration needed. Simply activate the plugin and all comment features will be disabled. |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +### Core Functionality |
| 12 | +- Disables comments on all post types (posts, pages, attachments, custom post types) |
| 13 | +- Closes comments and trackbacks/pingbacks on the front-end |
| 14 | +- Hides existing comments from displaying |
| 15 | +- Automatically cleans up options from other comment disable plugins (one-time operation) |
| 16 | + |
| 17 | +### Admin Interface |
| 18 | +- Removes Comments menu from admin sidebar |
| 19 | +- Redirects users trying to access the comments page |
| 20 | +- Removes comments from admin bar (front-end and back-end) |
| 21 | +- Removes comments metabox from dashboard |
| 22 | +- Removes "At a Glance" dashboard widget with comment count |
| 23 | +- Removes comments column from posts list |
| 24 | + |
| 25 | +### Widgets & Scripts |
| 26 | +- Removes Recent Comments widget |
| 27 | +- Removes comment-reply script from front-end |
| 28 | + |
| 29 | +### RSS & Feeds |
| 30 | +- Disables comments feed (returns 403 error) |
| 31 | +- Removes X-Pingback header from HTTP responses |
| 32 | + |
| 33 | +### API & XML-RPC |
| 34 | +- Disables XML-RPC methods for comments and pingbacks |
| 35 | + - `pingback.ping` |
| 36 | + - `pingback.extensions.getPingbacks` |
| 37 | + - `wp.newComment` |
| 38 | +- Disables WordPress REST API comments endpoints |
| 39 | + - `/wp/v2/comments` |
| 40 | + - `/wp/v2/comments/{id}` |
| 41 | +- Prevents comment insertion via REST API |
| 42 | + |
| 43 | +### Gutenberg Block Editor |
| 44 | +- Disables all 15 comment-related Gutenberg blocks: |
| 45 | + - Comment Author Name |
| 46 | + - Comment Content |
| 47 | + - Comment Date |
| 48 | + - Comment Edit Link |
| 49 | + - Comment Reply Link |
| 50 | + - Comment Template |
| 51 | + - Comments |
| 52 | + - Comments Pagination |
| 53 | + - Comments Pagination Next |
| 54 | + - Comments Pagination Numbers |
| 55 | + - Comments Pagination Previous |
| 56 | + - Comments Title |
| 57 | + - Latest Comments |
| 58 | + - Post Comments |
| 59 | + - Post Comments Form |
| 60 | + |
| 61 | +### Multisite Support |
| 62 | +- Works on WordPress Multisite installations |
| 63 | +- Removes network comment links from admin bar |
| 64 | + |
| 65 | +## Installation |
| 66 | + |
| 67 | +1. Upload the `disable-comments` folder to the `/wp-content/plugins/` directory |
| 68 | +2. Activate the plugin through the 'Plugins' menu in WordPress |
| 69 | +3. That's it! Comments are now completely disabled |
| 70 | + |
| 71 | +## Requirements |
| 72 | + |
| 73 | +- WordPress 5.0 or higher |
| 74 | +- PHP 7.4 or higher |
| 75 | + |
| 76 | +## Usage |
| 77 | + |
| 78 | +This plugin works out of the box with no configuration needed. Once activated, all comment functionality will be disabled. |
| 79 | + |
| 80 | +To re-enable comments, simply deactivate the plugin. |
| 81 | + |
| 82 | +## Frequently Asked Questions |
| 83 | + |
| 84 | +### Will this plugin delete existing comments? |
| 85 | + |
| 86 | +No, this plugin does not delete any existing comments from your database. It simply hides them from displaying and prevents new comments from being submitted. |
| 87 | + |
| 88 | +### Can I configure which features to disable? |
| 89 | + |
| 90 | +This plugin is designed to be simple and lightweight with no configuration options. It disables all comment functionality when activated. |
| 91 | + |
| 92 | +### Does this work with custom post types? |
| 93 | + |
| 94 | +Yes, this plugin disables comments for all post types, including custom post types. |
| 95 | + |
| 96 | +### Does this work with WordPress Multisite? |
| 97 | + |
| 98 | +Yes, the plugin is fully compatible with WordPress Multisite installations and will work on individual sites or network-wide. |
| 99 | + |
| 100 | +### Does this disable Gutenberg comment blocks? |
| 101 | + |
| 102 | +Yes, the plugin disables all 15 comment-related Gutenberg blocks, preventing them from being inserted in the block editor. |
| 103 | + |
| 104 | +### Does this block comments via REST API? |
| 105 | + |
| 106 | +Yes, the plugin disables comment endpoints in the WordPress REST API and prevents comment insertion via API requests. |
| 107 | + |
| 108 | +## Changelog |
| 109 | + |
| 110 | +### 1.0.0 |
| 111 | +* Initial release |
| 112 | + |
| 113 | +## License |
| 114 | + |
| 115 | +GPL v2 or later |
| 116 | + |
| 117 | +## Credits |
| 118 | + |
| 119 | +Inspired by: |
| 120 | +- [Disable Comments plugin](https://wordpress.org/plugins/disable-comments/) - The original WordPress.org plugin |
| 121 | +- [WPBeginner Tutorial](https://www.wpbeginner.com/wp-tutorials/how-to-completely-disable-comments-in-wordpress/) - Comprehensive guide on disabling comments |
| 122 | + |
| 123 | +## Author |
| 124 | + |
| 125 | +BeAPI - [https://beapi.fr](https://beapi.fr) |
| 126 | + |
0 commit comments