Only add hooks that originate in the parsed source
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- documentation
Research direction
Start with the issue's example of do_action( 'wp_head' ) and compare the proposed @externalhook tag with the existing @internal behavior. Determine how hooks are identified in parsed source and define completion as excluding hooks marked as external, including hooks inherited from a parent theme.
Written by the indexing model from the issue text.
Description
This might be outside the intended scope of this plugin, but I hope it will be considered anyway.
Let's take a basic action of a theme calling do_action( 'wp_head' ). Parsing the theme, this makes it look like the hook originated in this theme, when really it is defined elsewhere (in WP itself).
For those generating docs specifically for a plugin or theme, it might make sense to be able to add a tag (@externalhook?) to the hooks documentation that identifies that a hook originates outside of the source being parsed (and so ignore those hooks like how @internal works).
A child theme might do the same with hooks that are originally defined in the parent theme.
Also ping @drewapicture - any thoughts on something like this being suitable for a wider recommendation via the Handbook?
/**
* @externalhook
*/
do_action( 'wp_head' );
- Dominant language
- PHP
- Stars
- 239
- Forks
- 81
- Avg merge
- 16h 29m
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/phpdoc-parser
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
WordPress/phpdoc-parser#269 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
WordPress/phpdoc-parser#268 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
WordPress/phpdoc-parser#254 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WordPress/phpdoc-parser#246 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
WordPress/phpdoc-parser#235 · 1 comment ·
All issues in WordPress/phpdoc-parser
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·