Support » Fixing WordPress » Broken redirect on wp_login_form()

Viewing 5 replies - 1 through 5 (of 5 total)
  • I thought this had been fixed:

    looking at the trac i think that is set for fixing in version 3.3 so either i have to start using the beta in production or still need some other stopgap for version 3.2.1

    additionally, i just moved to the 3.3 beta 3 on my local setup and that doesn’t solve it, so perhaps it isn’t fixed after all.

    looked at the diff in the trac ticket you linked me to. i took their new, changed value and filtered it in via the wp_login_form() args instead. seems to work for now. thanks!

    'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']

    edit to add:
    redirection works for me now in the 3.3beta if i don’t define any redirect value

    so my full solution is to pass the correct argument for older versions of WP and nothing on 3.3

    if ( !version_compare( $wp_version, '3.3-beta3', '>=' ) ) {
    	$args = array ( 'echo'=>false,
    	'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']
    } else {
    	$args = array ( 'echo'=>false );

    thanks for pointing me in the right direction!

    can’t seem to edit my post, but i should have removed the echo=>false for this example. i needed to return the value in my own theme, but if anyone tries to copy what i have above it won’t print out anything.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Broken redirect on wp_login_form()’ is closed to new replies.