• This adds qTranslate support to all redirections by Theme My Login and any other plugins that use wp_redirect. Easiest way to use this is to paste this inside your theme’s functions.php file.

    // QTranslate and Events Manager / Theme My Login / etc. redirection fix
    add_filter( 'wp_redirect', 'ml_redirect_fix', 1, 2 );
    if ( ! function_exists( 'ml_redirect_fix' ) ):
    function ml_redirect_fix( $location, $status ) {
    	if ( function_exists( 'qtrans_convertURL' ) ) {
    		$location = qtrans_convertURL( $location );
    	}
    	return( $location );
    }
    endif;

    http://wordpress.org/plugins/theme-my-login/

Viewing 2 replies - 1 through 2 (of 2 total)
  • hello dear, i used your code in my function
    its working great, but my problem the links now look like this

    websitename.comcom/your-profile/?updated=true&lang=en

    how can i remove amp; ?

    Thread Starter Daedalon

    (@daedalon)

    I’ve ran into similar issue with the qtransconvertURL function on occasion when trying certain things. I think right now we don’t have settled on any resolution, as the code where this issue arose was purely experimental. I’ll keep this in mind and get back to the issue if we notice a similar problem and come up with the solution.

    As a guess, perhaps the solution would be run $location through the opposite of esc_url. Unfortunately that page doesn’t mention what that function might be, but hopefully this helps in looking for that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Compatibility fix for redirections with qTranslate’ is closed to new replies.