PHPackages                             next-press/wordpress-hook-generator - 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. next-press/wordpress-hook-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

next-press/wordpress-hook-generator
===================================

Parses the hooks and filters on our plugin and generate a markdown file with the contents.

0.0.2(4y ago)111GPL-2.0-onlyPHPPHP &gt;=7.2

Since Jan 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/next-press/wordpress-hook-generator)[ Packagist](https://packagist.org/packages/next-press/wordpress-hook-generator)[ Docs](https://nextpress.co)[ RSS](/packages/next-press-wordpress-hook-generator/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

WordPress Hooks &amp; Filters Parser
====================================

[](#wordpress-hooks--filters-parser)

This is a handy wrapper around [wordpress-hook-parser](https://github.com/bologer/WordPress-Hook-Parser) to fix some dependencies and make the code available as a CLI tool that we can use on projects.

It parses the folders passed to it and generates a markdown file containing all the hooks, filters, with the corresponding documentation.

To see an example of the generated markdown file, [click here](https://github.com/next-press/wordpress-hook-generator/blob/main/examples/actions.md).

Installation
------------

[](#installation)

Unfortunately, since Composer 2, the caching schedule for Composer 1 packages is not being updated as frequently. So if you are not able to install it via `composer global require next-press/wordpress-hook-generator`, try this first installation method instead.

```
# Clone the repo onto your home directory
cd && git clone https://github.com/next-press/wordpress-hook-generator
cd wordpress-hook-generator

# Install dependencies
composer install
npm install

# Link the binary to /usr/local/bin, so it becomes available
# system-wise via the command `wordpress-hook-generator`.
composer link
```

### How it should be

[](#how-it-should-be)

As a CLI tool, this should be installed globally using composer.

To install it, simply run:

```
composer global require next-press/wordpress-hook-generator

```

Usage
-----

[](#usage)

After installing it globally, the CLI command `wordpress-hook-generator` becomes available system-wide.

Then you simply run it passing the target folder as the first argument.

```
wordpress-hook-generator path/to/folder

```

Options
-------

[](#options)

In addition to the path to be scanned, there are additional options that can be passed to the command.

### Output file `-o`

[](#output-file--o)

By default, the output is written to a file called `actions.md` inside the directory where the command was ran.

You can override the output file name by passing a file path with the option `-o`.

```
wordpress-hook-generator path/to/folder -o custom-output-file-name.md

```

### Ignore folders `-i`

[](#ignore-folders--i)

By default, the vendor folder is ignored when scanning the target directory. If you wish to pass additional folder names to ignore, you can do so by using the `-i` option.

The `-i` option takes a comma-separated list of directory names.

```
wordpress-hook-generator path/to/folder -i dependencies,release

```

### Enable debugging `-d`

[](#enable-debugging--d)

By default, PHP warnings thrown while generating the documentation are suppressed and not shown on the terminal window. Adding the `-d` flag will display the warning messages.

Updating the Tool
-----------------

[](#updating-the-tool)

You can update the tool by running the command below:

```
wordpress-hook-generator --update

```

Development
-----------

[](#development)

To develop, test, or debug this tool, clone this repository and then be sure to first install both the PHP and node.js dependencies.

Clone the repository:

```
git clone https://github.com/next-press/wordpress-hook-generator
cd wordpress-hook-generator

```

Then for PHP, install the composer dependencies.

```
composer install

```

Do the same for node.js with npm.

```
npm install

```

### Important: Versioning

[](#important-versioning)

To bump the version number, run the command bellow on the root directory. This command is a shorthand for the `npm version` command and by default it bumps the version patch number (from 0.0.1 to 0.0.2, for example).

```
composer bump

```

If you need to bump the major or minor version numbers, use the full command below:

For a minor release:

```
npm --no-git-tag-version version minor

```

And for a major release:

```
npm --no-git-tag-version version major

```

There is no need to manually update the @version tags on the code, as a `pre-commit` is run by Husky to sync the version numbers, making sure they are always automatically up-to-date.

Changelog
---------

[](#changelog)

Version 0.0.7 - Released on 2021-01-11

- Fixed: The @ignore tag is now respected;
- Added: Auto-update via the --update flag.

Version 0.0.6 - Released on 2021-01-10

- Fixed: Works for filters and actions inside class methods;
- Fixed: Final adjustments to the template;

Version 0.0.5 - Released on 2021-01-09

- Added: New template with the additional data;

Version 0.0.4 - Released on 2021-01-08

- Docs: Add an installation method that works as a fallback to composer global require;

Version 0.0.3 - Released on 2021-01-08

- Added: Link script - to be used while the package is not available on Packagist for composer v1;
- Added: Better error and warning message handling when the --debug flag is present;

Version 0.0.2 - Released on 2021-01-08

- Improvement: Add composer.json to the sync-version-number file list;

Version 0.0.1 - Initial Release - Released on 2021-01-08

- Initial Release;

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

2

Last Release

1591d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84072ba4a87777c88a8a546f88551db7a9260d13b76ad8418ddfe507d9f985ae?d=identicon)[aanduque](/maintainers/aanduque)

---

Top Contributors

[![aanduque](https://avatars.githubusercontent.com/u/4679684?v=4)](https://github.com/aanduque "aanduque (20 commits)")

### Embed Badge

![Health badge](/badges/next-press-wordpress-hook-generator/health.svg)

```
[![Health](https://phpackages.com/badges/next-press-wordpress-hook-generator/health.svg)](https://phpackages.com/packages/next-press-wordpress-hook-generator)
```

###  Alternatives

[wpbp/generator

Generator of Wordpress Plugin Boilerplate Powered

832.3k](/packages/wpbp-generator)[simple-updates/phpwhois

This package contains a Whois (RFC954) library for PHP. It allows a PHP program to create a Whois object, and obtain the output of a whois query with the Lookup function.

251.4k](/packages/simple-updates-phpwhois)

PHPackages © 2026

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