SayHello Suppress Comments
WordPress plugin. Completely suppress all commenting functions.
by Say Hello GmbH · github.com/sayhellogmbh/shp-suppress-comments · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/sayhellogmbh/shp-suppress-comments/archive/refs/heads/main.zipReadme
SayHello Suppress Comments
A WordPress plugin that completely suppresses all commenting functionality across your WordPress site.
Description
This plugin provides comprehensive comment suppression for WordPress, including:
- Complete Comment Blocking: Disables comment support for all post types
- API Protection: Blocks comment submissions via REST API, XML-RPC, and all programmatic methods
- Admin Area Cleanup: Removes all comment-related menus, links, and UI elements from WordPress admin
- Frontend Suppression: Disables comment forms, existing comment display, and comment feeds
- Dashboard Cleanup: Removes comment widgets and counts from the WordPress dashboard
Features
Comment Functionality Suppression
- Disables comments and trackbacks for all post types
- Blocks programmatic comment insertion via
wp_insert_comment()andwp_new_comment() - Prevents comment submissions through forms
- Disables comment and ping status for all content
API Protection
- Disables WordPress REST API comment endpoints (
/wp/v2/comments) - Removes XML-RPC comment methods (
wp.newComment,wp.getComments, etc.) - Blocks comment feeds (RSS and Atom)
Admin Area Cleanup
- Removes "Comments" menu from admin sidebar
- Removes "Discussion Settings" from Settings menu
- Hides comment-related meta boxes from post edit screens
- Removes comments from admin bar
- Removes comment dashboard widgets
- Hides comment counts throughout the admin interface
Widget Management
- Unregisters the "Recent Comments" widget
Installation
- Upload the
shp-suppress-commentsdirectory to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Comments are now completely suppressed - no configuration needed!
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
Usage
Simply activate the plugin. There are no settings to configure - all comment functionality is automatically suppressed site-wide.
To re-enable comments, simply deactivate the plugin.
Technical Details
Hooks and Filters Used
The plugin uses multiple WordPress hooks to ensure comprehensive comment suppression:
init- Removes comment support from post typesadmin_menu- Removes comment-related admin menuscomments_open- Forces comments closedpings_open- Forces pings closedcomments_array- Returns empty array for existing commentsadmin_init- Additional comment support removalwidgets_init- Disables comment widgetsadmin_bar_menu- Removes comments from admin barwp_dashboard_setup- Removes comment dashboard widgetsrest_endpoints- Disables REST API comment endpointspre_comment_approved- Prevents comment approvalpre_comment_on_post- Blocks comment submissionsxmlrpc_methods- Disables XML-RPC comment methods
Security
This plugin provides multiple layers of protection to ensure comments cannot be submitted through any method:
- Filter Layer: Uses WordPress filters to disable comment functionality
- Action Layer: Intercepts comment submissions and blocks them
- API Layer: Removes comment endpoints from REST API and XML-RPC
- UI Layer: Removes all comment-related interfaces
Support
For issues, questions, or contributions, please visit: https://github.com/SayHelloGmbH/shp-suppress-comments
License
GPL-3.0-or-later
Author
Say Hello GmbH https://sayhello.ch
Changelog
1.0.0
- Initial release
- Complete comment suppression functionality
- Admin area cleanup
- API endpoint protection