Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timnashcouk/disable-comments
MU Plugin to disable WordPress Comments
https://github.com/timnashcouk/disable-comments
wordpress wordpress-plugin
Last synced: about 10 hours ago
JSON representation
MU Plugin to disable WordPress Comments
- Host: GitHub
- URL: https://github.com/timnashcouk/disable-comments
- Owner: timnashcouk
- License: gpl-2.0
- Created: 2021-08-27T08:59:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-17T11:08:31.000Z (11 months ago)
- Last Synced: 2025-01-29T01:41:44.063Z (8 days ago)
- Topics: wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://timnash.co.uk
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Disable Comments Plugin
This is a simple WordPress Plugin designed to be an MU or basic utility plugin that disables comments throughout the site## Installation
Note this plugin is only available on github.com and not on WP.org so you should manually install into your mu-plugins folder## Advanced Usage
By default it removes all post types comments, some post types might use the comments for storing notes or similar, you might not want to remove these.
Instead you can filter the post types to be turned off for example:
```
function tn_example_enable_orders_comments($post_types){
// make sure order comments are still enabled.
return array_diff($post_types, ['orders']);
}
add_filter( 'tn_disabled_comment_post_types', 'tn_example_enable_orders_comments', 1 );
```
Would mean the *orders* post type comments would still be available.## Spotted a bug?
Feel free to open an issue, here on Github.