Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matzeeable/wp-hookdoc
:star: An API documentation generator for your WordPress actions and filters.
https://github.com/matzeeable/wp-hookdoc
docs documentation hooks jsdoc-plugin jsdoc-template wordpress
Last synced: about 10 hours ago
JSON representation
:star: An API documentation generator for your WordPress actions and filters.
- Host: GitHub
- URL: https://github.com/matzeeable/wp-hookdoc
- Owner: matzeeable
- License: mit
- Created: 2017-11-15T14:56:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T21:25:05.000Z (about 6 years ago)
- Last Synced: 2024-11-12T18:50:09.386Z (3 days ago)
- Topics: docs, documentation, hooks, jsdoc-plugin, jsdoc-template, wordpress
- Language: CSS
- Homepage: https://devowl.io
- Size: 374 KB
- Stars: 51
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress HookDoc
Automate documentation of [**Actions**](https://codex.wordpress.org/Plugin_API/Action_Reference) and [**Filters**](https://codex.wordpress.org/Plugin_API/Filter_Reference) in WordPress. This npm module needs the [**JSDoc3**](https://github.com/jsdoc3/jsdoc) module as dependency. It uses JSDoc3 as comment parser and generates a documentation with the power of JSDoc.## Getting started
Simply install via:
```sh
$ npm install jsdoc -g
$ npm install wp-hookdoc --save-dev
```In your JSDoc configuration file `hookdoc-conf.json` the following options are essential (create a seperate configuration file if you already use JSDoc):
```js
{
"opts": {
"template": "node_modules/wp-hookdoc/template"
},
"source": {
"includePattern": ".+\\.(php|inc)?$"
},
"plugins": [
"node_modules/wp-hookdoc/plugin"
]
}
```Run your `jsdoc` command with the input files and `-c hookdoc-conf.json`.
### Define Action Docblock
Define `@hook` attribute with the name of the action:
```php