I'm looking for a documentation page where wordpress action lifecycle is explained. Does it exist?
I can't understand if init is called before admin_head or viceversa (even if the name is auto-explenatory in this case)
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
The order and appearance of actions depend on the page and the loaded files.
get_search_form() for example fires an action
'get_search_form' and (oddly enough) also a filter
'get_search_form'. But if no search form is loaded the action will not be available.
The only way to really know which actions are available is to look at them on different pages. There is a magic action
'all' to hook into … well … all actions.
My plugin All Actions List does exactly this. It prints all actions found into the footer on the last action named
'shutdown' which is always available.
On the front page of a simple blog, there are ~2300 actions – including filters which may be used as actions too.
Here you can find a list (in order) of the actions that get run during a typical page request in WordPress: http://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_a_Typical_Request
Note that many actions are called multiple times at various times in the code. There is no such thing as a “one true linear action chain”.