Skip to content

Commit

Permalink
Merge pull request #1 from inpsyde/fix-typos
Browse files Browse the repository at this point in the history
Fix typos, improve wording
  • Loading branch information
gmazzap authored May 12, 2023
2 parents 91d7ecb + 32cf11a commit 403dc62
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
63 changes: 32 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,83 @@
# Inpsyde Disable Comments

A WordPress plugin that completely ditches comments as a WordPress feature.
A WordPress plugin that completely disables comments as a WordPress feature.

[![PHP Quality Assurance](https://github.com/inpsyde/disable-comments/actions/workflows/php-qa.yml/badge.svg)](https://github.com/inpsyde/disable-comments/actions/workflows/php-qa.yml)

---

## Table Of Contents

* [Features](#features)
* [A note about themes](#a-note-about-themes)
* [Requirements](#requirements)
* [Installation](#installation)
* [Crafted by Inpsyde](#crafted-by-inpsyde)
* [Credits](#credits)
* [License](#license)
* [Contributing](#contributing)

## Features

This is a simple no-configuration plugin. Install, activate and forget.
This package is a simple no-configuration plugin. Install, activate, and forget.

It does not distinguish between type of comments or post types, it makes look like comments are not
a WordPress feature.
It does not distinguish between types of comments or post types; it makes it look like comments are not a WordPress
feature.

Among other things:

- Forces comments-related configuration to be disabled
- Prevents comments to be added
- Prevents comment queries to run
- Removes from dashboard any reference to comments
- Makes sure all post have comments disabled
- Removes comment-related editor blocks and "Discussion" editor sidebar panel
- Prevents comments from being added
- Prevents comment queries from running
- Removes any reference to comments from the dashboard
- Makes sure all posts have comments disabled
- Removes comment-related editor blocks and the "Discussion" editor sidebar panel
- Removes comment-related REST API endpoints


## A note about themes

A theme might hardcode comments-related output even if comments are disabled.

That might be the case for FSE themes, but for those it should be possible to use the site editor to
remove the undesired parts of templates.
"Traditional" themes should not output anything comments-related if comments are closed (and that
is ensured by this plugin).
If you see any comments-related output in theme, please reach out to the theme developer or use a
child theme to replace the offending templates/template parts.


## Support and contributions

Bug reports and contributions are welcome, but please don't ask adding features or configurations.
For less "radical" approaches to the topic there are several other options available.

That might be the case for FSE themes, but for those, it should be possible to use the site editor to remove the
undesired parts of templates.
"Traditional" themes should not output anything comments-related if comments are closed (and this plugin ensures that).
If you see any comments-related output in the theme, please contact the developer or use a child theme to replace the
offending templates/template parts.

## Requirements

- PHP 8.0+
- WP 6.0+

The plugin has no production dependencies.
When installed for development via Composer, the package requires:
The plugin has no production dependencies. When installed for development via Composer, the package requires:

* [inpsyde/php-coding-standards](https://github.com/inpsyde/php-coding-standards/blob/master/LICENSE)
* [inpsyde/wp-stubs](https://github.com/inpsyde/wp-stubs/blob/main/LICENSE)
* [vimeo/psalm](https://github.com/vimeo/psalm/blob/master/LICENSE)



## Installation

Best served via Composer:
The best way to install this package is with Composer:

```bash
$ composer require inpsyde/disable-comments
```


## Crafted by Inpsyde

The team at [Inpsyde](https://inpsyde.com) is engineering the Web since 2006.

## Credits

Originally born as a fork of https://github.com/bueltge/remove-comments-absolutely

Originally born as a fork of https://github.com/bueltge/remove-comments-absolutely.

## License

Copyright (c) 2023, Inpsyde GmbH

This software is released under the ["GNU General Public License v2.0 or later"](LICENSE) license.

## Contributing

Bug reports and contributions are welcome, but please don't ask to add features or configurations. For less "radical"
approaches to the topic, several other options are available.
2 changes: 1 addition & 1 deletion src/CommentsDisabler.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function init(): void
$addFilter('the_posts', 'closeCommentsForQueries', 2);
$addFilter('wp_insert_post_data', 'forceCommentsClosedOnSave', 2);
$addFilter('rest_endpoints', 'removeFromRest');
$addFilter('comments_template', 'commentsTemplate', PHP_INT_MAX);
$addFilter('comments_template', 'commentsTemplate');
$addFilter('wp_headers', 'removePingbackHeader');
$addFilter('xmlrpc_methods', 'replaceXmlrpcMethods');
$addFilter('rewrite_rules_array', 'filterRewriteRules');
Expand Down

0 comments on commit 403dc62

Please sign in to comment.