The init action is the wrong place to do it. A better place would be at template_redirect, so that you only affect the front end view of the site and not the admin areas.
The init action is the wrong place to do it. A better place would be at template_redirect, so that you only affect the front end view of the site and not the admin areas.