WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With add_action, I want to intercept as early as I can in my plugin and send a 304 Not Modified header per some rules. Does anyone know what the order is of events? When I view this page, it seems to hint that the best place for this would be plugins_loaded, and that it comes before the init event. Is that correct? The page in that link doesn't describe what the event order is, but seems to imply it.

share|improve this question
up vote 6 down vote accepted

The page you referenced does have the correct order of events listed there. If you want to see which events were fired for a particular request you can install debug-bar and debug-bar-action-hooks.

If you are wanting to send a header either plugins_loaded or init will work. But it is recommended to use the send_headers action that is fired just after the request is parsed, also if your rules depend on data in WP_Query you will need to use send_headers.

share|improve this answer
Hikari Hooks Troubleshooting is another excellent plugin for this. – dunc May 3 '12 at 11:36
From what I can tell from this debug-bar plugin, the plugins_loaded event is the best place to run what I was trying to do -- it runs before init. – Volomike May 3 '12 at 11:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.