phpdoc-parser icon indicating copy to clipboard operation
phpdoc-parser copied to clipboard

Only store a single post for each hook

Open JDGrimes opened this issue 11 years ago • 4 comments

At present we store an entry for a hook each time it appears in the source. But hooks are only documented once, with duplicate entries marked with a comment. We should ideally only store a single entry for each hook. The entry would then have metadata/something storing the specific data for each place the hook is used (file/function/method and line numbers).

The main issue is that right now post associations are done in a parent/child manner. Since a post can only have one parent, this will have to change. Posts 2 posts has been mentioned before.

JDGrimes avatar Apr 08 '14 16:04 JDGrimes

Related: #42, #43

JDGrimes avatar Apr 08 '14 16:04 JDGrimes

I'm new to posts 2 posts, but it looks like it would be a good solution to this. Post associations could also be used for #79. Any thoughts on adding that as a dependency, or alternative approaches that might be better?

JDGrimes avatar Apr 14 '14 21:04 JDGrimes

The problem with Posts to Posts is that's it's kind of a heavy-handed solution just for this. Might be better off just doing a poor-man's post relationship with a taxonomy mirroring a CPT.

DrewAPicture avatar Apr 14 '14 22:04 DrewAPicture

If we need anything at all that doesn't work with basic WP inheritance (parent/child) we are looking into Posts2Posts (I would say "relationships libraries" but there aren't... many of them).

I am not making this into decision and my brain is stretched too thin right now, but I consider relationships definitely on the table as option.

Rarst avatar Apr 15 '14 10:04 Rarst