wp-hooks / generator

Generates a JSON representation of the WordPress actions and filters in your code
https://packagist.org/packages/wp-hooks/generator
78 stars 6 forks source link

Support for aliases #15

Closed johnbillion closed 2 years ago

johnbillion commented 2 years ago

Fixes https://github.com/johnbillion/wp-hooks/issues/6.

Unfortunately a specific PHPDoc tag never got implemented to document the common values for dynamic hook names, but we have now got a mostly standardised use of "Possible hook names include:" followed by an unordered list (example: https://developer.wordpress.org/reference/hooks/type_template_hierarchy/), so we can parse that list if it exists and store the result in a new property.

I've hooked up the resulting aliases to the autocomplete and hover provision in WordPress Hooks Intellisense for VS Code: