matzeeable / wp-hookdoc

:star: An API documentation generator for your WordPress actions and filters.
https://devowl.io
MIT License
51 stars 4 forks source link

Missing support for apply_filters_ref_array() #5

Open zackkatz opened 3 years ago

zackkatz commented 3 years ago

First: I love what you've done with this repo. It's gotten us very close to a solution. This issue is one of the missing pieces.

The parser misses these functions for some reason: https://developer.wordpress.org/reference/functions/apply_filters_ref_array/

Any thoughts?

zackkatz commented 3 years ago

Sorry, this was user error. There's a small issue where the template doesn't have support for showing apply_filters_ref_array() and do_action_ref_array() in title, but that's minor.

matzeeable commented 3 years ago

Thanks for your notice. Yeah, currently the output only supports apply_filters instead of using the original callee (e.g. apply_filters_ref_array). Reopening, but I cannot promise any ETA. PRs welcome. 😊

remcotolsma commented 3 years ago

We at Pronamic were also looking for a way to document the WordPress filters and actions in our WordPress plugins, themes and libraries. In our search we came across a number of solutions, for our research see the following issue: https://github.com/wp-pay/core/issues/45. In the end we developed a solution ourselves: https://github.com/pronamic/wp-documentor. It can find all WordPress actions and filters in a codebase, including: apply_filters_ref_array filters. The result can be converted to a markdown file for in your Github repository or GitHub Pages. See for example: https://github.com/pronamic/wp-documentor/blob/main/tests/docs/hooks.md. Unfortunately there is not yet the possibility to generate a separate page for each hook like WordPress HookDoc does:

The advantages of https://github.com/pronamic/wp-documentor are that you do not have to add the @hook tag or put the types between curly brackets (for example:{int},{string}, etc.). But https://github.com/pronamic/wp-documentor will also have its limitations, maybe we can work together on a nice solution for generating hooks documentation. I will keep an eye on the developments of this project, thanks for the good work!