title: Front end only version of Init hook?
body: <p>I'm trying to build a feature into my theme that relies on doing things before the headers are sent. So naturally I hooked into the Init hook like so:</p>
  
  <pre><code>add_action('init', 'my_function');
  </code></pre>
  
  <p>But the problem is that I only want my_function to run if the user is not looking at the admin section or the login page.</p>
  
  <p>So what hook can I use that is front-end only but is run before the headers are sent. <a href="http://codex.wordpress.org/Plugin_API/Action_Reference" rel="noreferrer">Looking at the API reference</a>, there doesn't appear to be any, and obviously conditionals don't work that early in the runtime.</p>
  
  <p>So other than searching the URL for /wp-admin/ and /wp-login/ (which seems clunky to me) I can't figure it out.</p>