[wp-hackers] internal redirects

scribu scribu at gmail.com
Tue Apr 27 17:25:34 UTC 2010


You should hook your validation code before headers are sent, like this:

function my_form_validation() {
    // etc.

    if ( $_POST[..] ... )
        wp_redirect( ... );

    // etc.
}
add_action('template_redirect', 'my_form_validation');


-- 
http://scribu.net


More information about the wp-hackers mailing list