Closed szepeviktor closed 1 month ago
- There is no need to declare the hook name in the docblock
- The first @param is the third parameter of apply_filters, the first one is the hook name, the second one is the initial value
- Current docblock is a JSDoc block, not PHPDoc
All of these are expected as we use the wp-hookdoc
tool to automatically create a documentation site (see https://10up.github.io/safe-redirect-manager/).
wp-hookdoc
utilizes JSDoc to process these comments, which is why these docblocks are different from what we use on functions or methods.
We are exploring a new tool to automate this documentation but there's no timeline on when that will happen, so going to close this out.
I see. That project is abandoned 6 years ago.
Describe the bug
Hook docblocks are not standard (compared to WordPress core, PHPStan)
https://github.com/10up/safe-redirect-manager/blob/fb74c570c1d33c1b60bdef327c90100414c8daee/inc/functions.php#L112-L119
Steps to Reproduce
@param
is the third parameter of apply_filters, the first one is the hook name, the second one is the initial valueWould you merge a PR fixing all those?
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct