2

Hei. Just thought the other day that it would be handy to have a real documentation repository for the Action and Filter hooks in WP. The Codex pages are obviously not steadily maintained...they are incomplete and i've found about double the amount of hooks (subjectively) in the past two weeks than documented there. Plus it would be good to state all contexts in which they are called for every hook.

Do you think creating a community wiki post provides the technical prerequisites to maintain such a repository? I'm thinking one could make each hook an answer and then people can just use comments to give more details on the hook.

The concerns i'm having are...(a) it would become huge, (b) it's not very well structured, (c) Answer's can't have their own titles, so that's impeding on structure and searchability.

2

Do you know how many hooks there are? 1176 filters and 709 actions! I got that by searching for do_action and apply_filters, so that will include anything in comments. Give each of them half a page, and, Bingo!, you've won the prize for creating the longest question.

More to the point, there is already a question that asks for a list. It has some good answers. Question:307

  • Plus some hooks are dynamic and depend on a variable(s). So they are not single hook but effectively number of hooks equal to number of values combination variable(s) can be. – Rarst Feb 19 '11 at 18:36
  • Thanks for the pointers. – wyrfel Feb 20 '11 at 0:56
  • 1
    Plus, there is already a list: adambrown.info/p/wp_hooks Although personally I find this not very helpful - I usually need extra help on how to use a hook, and not just the fact that it exists... – gillespieza Feb 25 '11 at 9:25
2

I don't think this is going to be practical. Simply way too many hooks and filters they will need descriptions of passed data for it to be useful. Too much stuff.

What might work is smaller format - qikia on hooks realated to specific topic, for example "What hooks I can use during post save process?".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .