承接 brew-bytes/acorn-disable-comments 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

brew-bytes/acorn-disable-comments

Composer 安装命令:

composer require brew-bytes/acorn-disable-comments

包简介

An Acorn package to fully disable WordPress comments site-wide.

README 文档

README

A theme-agnostic Acorn package that fully disables WordPress comments. Drop it into any Sage theme (or any Acorn-aware project) and stop re-implementing the same dozen comment- disabling hooks on every build.

Modeled on roots/acorn-prettify: each concern lives in its own module, every module is independently toggleable from config/disable-comments.php.

What it disables

Module What it does
close-comments Closes comments and pingbacks on every post type.
hide-existing-comments Returns an empty comment array; reports zero comments.
admin-ui Removes the Comments admin menu, admin-bar item, dashboard widget, list-table columns, and the Discussion settings page. Redirects direct visits.
front-end Short-circuits comments_template, empties comment links, dequeues comment-reply.js.
rest-api Strips /wp/v2/comments routes and rejects comment writes.
feeds Disables the global comments feed and per-post comment feeds.
xml-rpc Removes the X-Pingback header and pingback / comment XML-RPC methods.

Installation

composer require brew-bytes/acorn-disable-comments

The provider auto-registers via extra.acorn.providers. No further wiring needed — defaults disable everything.

Customizing

Publish the config to your app:

wp acorn vendor:publish --tag=disable-comments-config

Then edit config/disable-comments.php to toggle individual modules or sub-features:

return [
    'close-comments' => ['enabled' => true],
    'xml-rpc' => [
        'enabled' => true,
        'disable-fully' => false, // keep XML-RPC available for app passwords
    ],
    // ...
];

Setting any module's enabled to false removes its hooks entirely.

Requirements

  • PHP 8.1+
  • Acorn 4.x or 5.x
  • WordPress 6.0+

License

MIT © Brew & Bytes

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固