[wp-hackers] introductions and putting the wrong foot forward..
wordpress at santosj.name
Mon Aug 23 07:58:09 UTC 2010
The reason the wp_redirect() function does not return exit() after
setting the headers it so custom HTML may be entered. Actually, the
auth_redirect() function does exit() after calling wp_redirect(). It
appears the use case for wp_redirect() is to set the header but not to
finish the execution. This allows for you to call wp_redirect() with its
fancy filtering and checks and also allows you to print HTML for
applications that can't or won't follow the redirect automatically.
The inline documentation for wp_redirect() should be updated to reflect
On 8/22/2010 9:00 PM, Vid Luther wrote:
> Thanks Mark,
> I should've tried the mightly google site prior to the post.
> Judging by that query, and a different query where i searched for wp_redirect exit the specific issue of exit has not been handled in the threads,
> I'd like to propose that this change be made into the core, the patch is simple, I can send it in, unless there is a good reason not to have it in the core.
> quite a few of the issues from your first google query wouldn't even have happened, if we used exit() right after header().
> I'll make a plugin for now, test it out on our site, and then submit the patch if we decide it needs to be submitted, it's a simple one liner though :).
> On Aug 22, 2010, at 8:47 PM, Mark E wrote:
>> On 08/22/2010 07:26 PM, Vid Luther wrote:
>>> I don't want to make changes to our core functionality, if it'll just
>>> get overridden with the next update, if I need to do it as a plugin,
>>> I'll do that :).
>> It's usually best to not make any assumptions about any sort of future changes in core code. Instead, make your site work the way you want with plugins. Then later if core functionality makes a plugin obsolete, disable it.
>>> PS: I scanned through the hackers archives, but since there's no
>>> simple way of searching all the years
>> Try this:
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers