[theme-reviewers] Header Redirect: Any Good Reason For This?

Doug Stewart zamoose at gmail.com
Mon Sep 27 17:00:36 UTC 2010


On Mon, Sep 27, 2010 at 12:55 PM, Chip Bennett <chip at chipbennett.net> wrote:
> Checking the diff for an update to a Theme that I had previously approved, I
> found this:
>
> <?php  ( header('Location: http://allfreecms.com') );?>
>
> Any good reason for this to exist? My limited PHP knowledge tells me that
> it's some sort of header redirect. Does it have any business being called in
> a WordPress Theme? (Note: I can't actually find anywhere that the Theme is
> actually including the functions/index.php file in which the above code is
> found..)
> Chip
>

It is indeed a redirect. If it's called as the first element in a
page, it will redirect. If it's called further down, you're likely to
get the "Headers already sent..." PHP error.

In any event, there's precious little reason that I can think of to
include it in a theme.


-- 
-Doug
@zamoose
http://literalbarrage.org/blog/


More information about the theme-reviewers mailing list