I'm working on another plugin, which needs to output direct headers to the browser (for the purpose of redirecting). To do this it needs to be called before anything is sent, and I'm currently using the
init action hook to do this.
However, this also affects the admin area too - meaning when redirecting is enabled it can lock the admin user out.
Is there a function check the plugin can use to find out where it's being called from? Or is there an alternate hook that is early enough to send headers, but specific to content pages?