wppack/disable-comments-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wppack/disable-comments-plugin

Composer 安装命令:

composer require wppack/disable-comments-plugin

包简介

Completely disable comments: closes discussion everywhere, hides existing comments, and removes every comment surface from wp-admin, feeds, REST and XML-RPC.

README 文档

README

Completely disable comments in WordPress. Activate it and the comment system is gone; deactivate it and everything comes back. No settings screen, no options in the database.

What it does

Discussion

  • Closes comments and pingbacks on every post type, at a priority no theme or plugin can override.
  • Existing comments never render: templates receive an empty thread and a zero count, so themes show neither comment lists nor "N Comments" links.
  • Comment queries for discussion types short-circuit before reaching the database — the Latest Comments block, the classic Recent Comments widget and direct WP_Comment_Query calls all come back empty.

wp-admin

  • Removes the Comments menu, Settings › Discussion, the toolbar comments bubble and the classic Recent Comments widget; the dashboard's "At a Glance" and Activity widgets show no comments. Comment and trackback support is dropped from every post type, which also removes the Discussion metaboxes, the block editor's discussion panel and the comment columns on list tables.
  • Direct hits on edit-comments.php, comment.php or options-discussion.php bounce to the dashboard.

Feeds and machine surfaces

  • Comment feed URLs return 404 and their <link> tags disappear from the document head.
  • The X-Pingback header, RSD link and pingback URL are gone; the /wp/v2/comments REST routes and every comment/pingback XML-RPC method are unregistered, and post/page REST responses stop advertising a replies link.

What it deliberately leaves alone

  • Existing comments stay in the database. Nothing is deleted or rewritten; deactivating the plugin restores them exactly as they were.
  • Non-discussion comment types keep working. Plugins that store their own records as comments (WooCommerce order notes, action logs, …) query them by their own type and pass through untouched.

Requirements

PHP 8.2+, WordPress 6.7+.

License

MIT

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固