=== DevLab Comment Shutoff ===
Contributors: devlab33
Tags: comments, disable comments, pingbacks, trackbacks, post types
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Closes comments and pingbacks on your whole site or chosen post types and hides existing comments on public pages. Does not delete or edit comments.

== Description ==

**DevLab Comment Shutoff** closes comments and pingbacks, hides the comments you already have on your public pages, and removes the comment items from the dashboard. It does not delete or edit comments, and if you deactivate it, comments work as before.

**Two ways to use it**

* **On the whole site** (the default): every post type is closed to comments and pingbacks.
* **Only on some post types**: tick the public post types you want closed, for example Pages and Media, and keep comments on Posts.

**What it does**

* Closes comments, trackbacks and pingbacks on the chosen content. The comment form, the REST API and XML-RPC refuse new ones.
* Hides the comments you already have on your public pages: in your theme, in comment counts (they show 0), in comment feeds and in the Recent Comments widget and block. They stay in your database. The REST API and the Comments screen still show them.
* Removes comment and trackback support from the chosen post types, so the Discussion options disappear from the editors and from Quick Edit, and the comments column disappears from the post lists. Posts you edit keep the comment status they had.
* Removes the Comments item from the admin menu, the Comments item from the admin bar and the comment sections of the dashboard widgets. In "only on some post types" mode this happens once no public post type supports comments; until then you keep them, so you can still moderate the rest.

**What it does not block**

* Replies an administrator writes on the Comments screen.
* Notes in the block editor.
* Code that adds comments directly, for example an importer or WP-CLI.

**Storage**

The plugin stores one option with your choice, plus one small flag per user who closed the notice on its settings screen. It does not write to the comments table, touch `.htaccess`, create files, schedule tasks or send requests of its own. It adds no scripts, stylesheets or images to your public pages.

**Privacy**

This plugin collects no data, sends no data to anyone, contacts no external service and needs no account or API key. It does not set cookies. It does not provide legal advice and does not make your site compliant with privacy laws; it closes one feature.

**About DevLab**

DevLab builds plugins and themes for WordPress. The plugin adds a DevLab menu with its settings screen. That screen has a small box with a link to the DevLab Store (devlab.ia.br/store) and one dismissible notice. It adds no promotional content to other dashboard screens or to your public pages, and it does not add a credit link to your site.

== Installation ==

1. Upload the `devlab-comment-shutoff` folder to the `/wp-content/plugins/` directory, or install the plugin from the Plugins screen in WordPress.
2. Activate the plugin through the Plugins screen. Comments are now closed on your whole site.
3. To keep comments on some content, go to **DevLab > Comment Shutoff**, choose **Only on some post types**, tick the post types to close and click **Save Changes**.

== Frequently Asked Questions ==

= Where do I find the settings? =

In the WordPress dashboard, under **DevLab > Comment Shutoff**. There is also a **Settings** link on the Plugins screen.

= Does it delete my comments? =

No. The plugin does not delete or edit comments. It hides them on your public pages and refuses new ones.

= How do I bring comments back? =

Deactivate the plugin, or choose "Only on some post types" and untick the post types you want back. Hidden comments show again, and posts that were open accept comments again.

= What does it not block? =

Replies an administrator writes on the Comments screen, Notes in the block editor, and code that adds comments directly, such as an importer or WP-CLI. Those are tools for people with access to your site, not ways for visitors to comment.

= I chose "Only on some post types" but the Comments menu is still there. =

That is on purpose. While at least one public post type still supports comments, you need the Comments screen to moderate them. The menu item, the admin bar item and the dashboard comment sections go away once no public post type supports comments. Media (attachments) is a post type too: if you want the Comments menu gone, tick it as well.

= Can I still open the Comments screen when the menu item is gone? =

Yes. The menu item is removed, but the screen still opens at its own address (`wp-admin/edit-comments.php`), so you can review or delete old comments if you want to.

= Does it stop comment spam? =

Where comments are closed, the comment form, the REST API and XML-RPC refuse new comments, trackbacks and pingbacks, so spam sent through them has nowhere to land. Where you keep comments, the plugin does not filter spam.

= Does it change what the REST API returns for existing comments? =

No. It refuses new comments, but the REST API still returns the comments that already exist.

= Does the plugin turn off the pingbacks my site sends to other sites? =

No. It closes the incoming ones. The option that notifies sites you link to is in **Settings > Discussion** and stays under your control.

= A theme or another plugin still shows a comment form. =

Clear your cache first. If the form is still there, it is drawn by something that does not ask WordPress whether comments are open; the theme or plugin author can fix that.

= What happens when I delete the plugin? =

It removes its own option and the "notice dismissed" flag. Comments, posts and your other settings are not touched.

= Does the plugin make my site compliant with privacy laws? =

No. It closes a feature. Please check the rules that apply to you for the rest of what your site does.

== Screenshots ==

1. The settings screen with comments closed on the whole site.
2. The "Only on some post types" choice with the list of post types.
3. The "Meet DevLab" box with a link to the DevLab Store.

== Changelog ==

= 0.1.0 =
* First public release.

== Upgrade Notice ==

= 0.1.0 =
First public release.
