Support » Plugin: 301 Redirects - Easy Redirect Manager » For WPML compatible

  • Resolved winterpsv

    (@winterpsv)


    For compatibility with WPML, change your private function format_from_url:
    Instead of home_url () use

    $mass_home_url = explode("/", home_url());
    $cur_url = $mass_home_url[0]."//".$mass_home_url[2];

    Your private function should look like this:

    private function format_from_url( $string ) {
    $mass_home_url = explode("/", home_url());
    $cur_url = $mass_home_url[0]."//".$mass_home_url[2];

    $complete = $cur_url . '/' . $string;
    list($uprotocol,$uempty,$uhost,$from) = explode( '/', $complete, 4);
    $from = '/' . $from;
    return strtolower( rtrim( $from, '/') );
    }

  • The topic ‘For WPML compatible’ is closed to new replies.