solvebeam/wp-hooks-documentor
Composer 安装命令:
composer require solvebeam/wp-hooks-documentor
包简介
Documentation Generator for WordPress.
README 文档
README
SolveBeam WordPress Hooks Documentor
SolveBeam WordPress Hooks Documentor is a tool to automatically extract data about the actions and filters of your WordPress theme or plugin.
Table of contents
Getting Started
Installation
To start documenting your WordPress filters and actions, require SolveBeam WordPress Hooks Documentor in Composer:
composer require solvebeam/wp-hooks-documentor --dev
First Run
To let SolveBeam WordPress Hooks Documentor analyse your codebase, you have to use the parse command and point it to the right directory:
vendor/bin/wphd parse src
Command Line Usage
--format=FORMAT
The format in which you want to export the hooks.
| Format | Description |
|---|---|
default |
Symfony console table. |
hookster |
Hookster JSON. |
markdown |
Markdown. |
phpdocumentor-rst |
RestructuredText for phpDocumentor. |
Example: --format=markdown
--template=FILE
Custom PHP template, see for examples the templates folder.
Example: --template=templates/markdown.php
--type=TYPE
Specify whether you want to export actions or filters.
Example: --type=actions or --type=filters
--output=FILE
Write output to file.
Example: --output=docs/hooks.md
--memory-limit=VALUE
Specifies the memory limit in the same format php.ini accepts.
Example: --memory-limit=-1
--exclude=GLOB
Exclude the specified folders/files.
Example: --exclude=vendor --exclude=wordpress
--ignore-vcs-ignored
If the search directory contains a .gitignore file, you can reuse those rules to exclude files and directories from the results with this option.
Example: --ignore-vcs-ignored
--prefix=PREFIX
Only parse hooks starting with the specified prefixes.
Example: --prefix=my_theme --prefix=my_plugin
Examples
vendor/bin/wphd parse ./tests/source
vendor/bin/wphd parse ./tests/source --format=hookster --type=actions --output=tests/docs/hookster-actions.json
vendor/bin/wphd parse ./tests/source --format=hookster --type=filters --output=tests/docs/hookster-filters.json
vendor/bin/wphd parse ./tests/source --format=markdown --output=tests/docs/hooks.md
vendor/bin/wphd parse ./tests/source --format=phpdocumentor-rst --type=actions --output=tests/docs/phpdocumentor-actions.rst
vendor/bin/wphd parse ./tests/source --format=phpdocumentor-rst --type=filters --output=tests/docs/phpdocumentor-filters.rst
Ouput Examples
- tests/docs/hooks.md
- tests/docs/hookster-actions.json
- tests/docs/hookster-filters.json
- https://github.com/wp-pay-gateways/omnikassa-2/blob/2.3.2/docs/hooks.md
- https://github.com/wp-pay-gateways/adyen/blob/1.3.1/docs/hooks.md
- https://github.com/wp-pay-gateways/mollie/blob/2.2.3/docs/hooks.md
- https://github.com/wp-pay-extensions/gravityforms/blob/2.6.0/docs/hooks.md
- https://github.com/wp-pay/core/blob/2.7.0/docs/hooks.md
Alternatives
Here is a list of alternatives that we found. However, none of these satisfied our requirements.
If you know other similar projects, feel free to edit this section!
- WP Parser by WordPress
- Hookster by Theme Blvd
- WordPress HookDoc by Matthias Günter
- GitHub Actions for WordPress by 10up
- Yoast Parser by Yoast
- WooCommerce Code Reference Generator by WooCommerce
- WordPress Hooks Reference by John Blackbourn / Human Made
- wp-hooks-generator by John Blackbourn / Human Made
Inspiration from https://github.com/TypistTech/imposter-plugin#alternatives
Links
- https://developer.wordpress.org/plugins/hooks/
- https://developer.wordpress.org/plugins/hooks/actions/
- https://developer.wordpress.org/reference/functions/do_action/
- https://developer.wordpress.org/reference/functions/add_action/
- https://developer.wordpress.org/plugins/hooks/filters/
- https://developer.wordpress.org/reference/functions/apply_filters/
- https://developer.wordpress.org/reference/functions/add_filter/
- https://developer.wordpress.org/reference/hooks/
- https://www.phpdoc.org/
- https://github.com/phpdocumentor/phpdocumentor
- https://symfony.com/doc/current/console.html
- https://symfony.com/doc/current/components/finder.html
- https://developer.wordpress.org/cli/commands/i18n/make-pot/
- https://developer.wordpress.org/cli/commands/i18n/make-json/
- https://github.com/solvebeam/deployer/blob/master/bin/solvebeam-deployer
- https://gitlab.com/solvebeam/wp-updates/-/blob/master/index.php
- pronamic/wp-pay-core#45
- phpDocumentor/phpDocumentor#2865
- https://github.com/themeblvd/hookster
solvebeam/wp-hooks-documentor 适用场景与选型建议
solvebeam/wp-hooks-documentor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 41 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 02 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「documentation」 「phpdoc」 「api」 「wordpress」 「application」 「dga」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 solvebeam/wp-hooks-documentor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 solvebeam/wp-hooks-documentor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 solvebeam/wp-hooks-documentor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple tool for checking that your PHP classes and methods use PHPDocs (PHP DocBlocks Checker fork).
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
Laravel package that generates RESTful API documentation in Markdown based on PHPDoc.
A PSR-7 compatible library for making CRUD API endpoints
Laravel API documentation generating tool
Validates PHPDoc @param and @return tags against method signatures
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 28
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-02-27