Support » Plugin: Subscribe / Connect / Follow Widget » Patch to Work with MU Domain Mapping

  • Resolved John Peden


    Hi folks,

    As the plugin pics up the imageurl in the backend, when the image is loaded into the front-end it is fixed and as such doesn’t work with MU domain mapping. I patched line 18 with the following code to get it working:

    //Rewrite for mapped domains
    		if( isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" ) {
    			$siteUrl = site_url();
    			$mappedUrl = str_replace('http://', 'https://', $siteUrl);
    		} else {
    			$mappedUrl = str_replace('https://', 'http://', $mappedUrl);
    		$startPos = strrpos($imageurl, 'http://');
    		$endPos = strrpos($imageurl, '/files');
    		$urlLength = $endPos - $startPos;
    		//End rewrite for mapped domains

    Please feel free to re-write if you don’t think it is quite as slick as it could be! Hopefully this will find its way into the next release 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Patch to Work with MU Domain Mapping’ is closed to new replies.