PHPackages                             solaris/disable-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. solaris/disable-comments

AbandonedWordpress-plugin[Utility &amp; Helpers](/categories/utility)

solaris/disable-comments
========================

Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. Multisite friendly.

v2.2.2(4y ago)1326.6k32[2 issues](https://github.com/solarissmoke/disable-comments/issues)[3 PRs](https://github.com/solarissmoke/disable-comments/pulls)GPL-2.0-or-laterPHPPHP &gt;=5.2.4

Since Apr 30Pushed 1mo ago10 watchersCompare

[ Source](https://github.com/solarissmoke/disable-comments)[ Packagist](https://packagist.org/packages/solaris/disable-comments)[ Docs](https://wordpress.org/plugins/disable-comments)[ RSS](/packages/solaris-disable-comments/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (2)Versions (22)Used By (0)

Disable Comments for WordPress
==============================

[](#disable-comments-for-wordpress)

This is the development respository for the [Disable Comments](https://wordpress.org/plugins/disable-comments/) WordPress plugin. Send pull requests here, download the latest stable version there!

Version and compatibility information can be found in the plugin [readme](https://github.com/WPDevelopers/disable-comments/blob/master/readme.txt) file.

License: [GPLv3+](https://www.gnu.org/licenses/gpl-3.0.html)

Comment Status Functions
------------------------

[](#comment-status-functions)

The plugin provides two methods to programmatically check the current comment disable configuration:

### `get_current_comment_status()`

[](#get_current_comment_status)

Returns a simple string indicating the current comment disable status.

**Return Values:**

- `'all'` - Comments disabled site-wide for all content types
- `'posts'` - Comments disabled only for blog posts
- `'pages'` - Comments disabled only for pages
- `'posts,pages'` - Comments disabled for both posts and pages
- `'multiple'` - Comments disabled for multiple specific content types
- `'none'` - Comments enabled everywhere
- Custom post type name (e.g., `'product'`) - Comments disabled for that specific post type

### `get_detailed_comment_status()`

[](#get_detailed_comment_status)

Returns a comprehensive array with complete plugin configuration details including disabled post types, API restrictions, network settings, role exclusions, and comment counts.

**Key Array Elements:**

- `status` - Main status string (same as above method)
- `disabled_post_types` - Array of disabled post type slugs
- `total_comments` - Total number of comments in database
- `network_active` - Whether plugin is network activated
- `xmlrpc_disabled` / `rest_api_disabled` - API restriction status
- `role_exclusion_enabled` - Whether role-based exclusions are active

Usage Examples
--------------

[](#usage-examples)

```
// Get simple status
$instance = Disable_Comments::get_instance();
$status = $instance->get_current_comment_status();

if ($status === 'all') {
    echo 'Comments are disabled everywhere';
} elseif ($status === 'none') {
    echo 'Comments are enabled';
}

// Get detailed information
$details = $instance->get_detailed_comment_status();
echo 'Total comments: ' . $details['total_comments'];
echo 'Plugin configured: ' . ($details['is_configured'] ? 'Yes' : 'No');
```

**Note:** Call these methods on or after the `init` hook to ensure proper plugin initialization.

Site Health Integration
-----------------------

[](#site-health-integration)

Plugin status is automatically displayed in **Tools &gt; Site Health &gt; Info &gt; Disable Comments** section, providing administrators with a complete overview of all plugin settings including comment counts, disabled post types, API restrictions, and network configuration. No additional setup required.

Must-Use version
----------------

[](#must-use-version)

A [must-use version](https://github.com/WPDevelopers/disable-comments-mu) of the plugin is also available.

### This plugin is maintained by the [WPDeveloper](https://wpdeveloper.com/)

[](#this-plugin-is-maintained-by-the-wpdeveloper)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance59

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~124 days

Recently: every ~45 days

Total

17

Last Release

1730d ago

Major Versions

v1.11.0 → 2.0.02020-11-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64601519?v=4)[solaris](/maintainers/solaris)[@Solaris](https://github.com/Solaris)

---

Top Contributors

[![solarissmoke](https://avatars.githubusercontent.com/u/160227?v=4)](https://github.com/solarissmoke "solarissmoke (152 commits)")[![alimuzzaman](https://avatars.githubusercontent.com/u/6744156?v=4)](https://github.com/alimuzzaman "alimuzzaman (112 commits)")[![priyomukul](https://avatars.githubusercontent.com/u/17237437?v=4)](https://github.com/priyomukul "priyomukul (87 commits)")[![imrantushar](https://avatars.githubusercontent.com/u/17910878?v=4)](https://github.com/imrantushar "imrantushar (57 commits)")[![abid112](https://avatars.githubusercontent.com/u/23316546?v=4)](https://github.com/abid112 "abid112 (32 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (28 commits)")[![Asif2BD](https://avatars.githubusercontent.com/u/2099592?v=4)](https://github.com/Asif2BD "Asif2BD (16 commits)")[![irojabkhan](https://avatars.githubusercontent.com/u/20767719?v=4)](https://github.com/irojabkhan "irojabkhan (13 commits)")[![khmsourav](https://avatars.githubusercontent.com/u/32020708?v=4)](https://github.com/khmsourav "khmsourav (9 commits)")[![cfoellmann](https://avatars.githubusercontent.com/u/1256090?v=4)](https://github.com/cfoellmann "cfoellmann (8 commits)")[![PeterDaveHello](https://avatars.githubusercontent.com/u/3691490?v=4)](https://github.com/PeterDaveHello "PeterDaveHello (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![garretthyder](https://avatars.githubusercontent.com/u/8726005?v=4)](https://github.com/garretthyder "garretthyder (4 commits)")[![Dartui](https://avatars.githubusercontent.com/u/2657856?v=4)](https://github.com/Dartui "Dartui (3 commits)")[![adamziel](https://avatars.githubusercontent.com/u/205419?v=4)](https://github.com/adamziel "adamziel (2 commits)")[![odie2](https://avatars.githubusercontent.com/u/9401878?v=4)](https://github.com/odie2 "odie2 (2 commits)")[![fxbenard](https://avatars.githubusercontent.com/u/802114?v=4)](https://github.com/fxbenard "fxbenard (2 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![XhmikosR](https://avatars.githubusercontent.com/u/349621?v=4)](https://github.com/XhmikosR "XhmikosR (1 commits)")[![grappler](https://avatars.githubusercontent.com/u/1785641?v=4)](https://github.com/grappler "grappler (1 commits)")

---

Tags

wordpresscomments

### Embed Badge

![Health badge](/badges/solaris-disable-comments/health.svg)

```
[![Health](https://phpackages.com/badges/solaris-disable-comments/health.svg)](https://phpackages.com/packages/solaris-disable-comments)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k456.5k2](/packages/roots-bedrock)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[roots/wp-stage-switcher

WordPress plugin that allows you to switch between different environments from the admin bar

374458.3k3](/packages/roots-wp-stage-switcher)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.3k](/packages/vinkla-wordplate)[solarissmoke/disable-comments-mu

This is the must-use version of the Disable Comments WordPress plugin. Copy the contents of this directory into your mu-plugins directory in order to disable comments on the entire site/network, without any configuration. You should delete all existing comments from the WordPress database before activating this plugin. If you want to be able to configure the plugin's behaviour, then use the normal version.

6569.4k](/packages/solarissmoke-disable-comments-mu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
