• The strpos() functions on lines 1054 and 1058 in purge_post() are back to front. The haystack and needle need to be flipped.

    // If the URL contains the filtered home_url, and is NOT equal to the domain we’re trying to replace, we will add it to the new urls
    if ( false !== strpos( $this->the_home_url(), $url ) && $this->the_home_url() !== $a_domain ) {
    $newurls[] = str_replace( $this->the_home_url(), $a_domain, $url );
    }

    // If the URL contains the raw home_url, and is NOT equal to the domain we’re trying to replace, we will add it to the new urls
    if ( false !== strpos( home_url(), $url ) && home_url() !== $a_domain ) {
    $newurls[] = str_replace( home_url(), $a_domain, $url );
    }

  • You must be logged in to reply to this topic.