WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe / Connect / Follow Widget
[resolved] Patch to Work with MU Domain Mapping (4 posts)

  1. John Peden
    Member
    Posted 1 year ago #

    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 :)

    http://wordpress.org/extend/plugins/subscribe-connect-follow-widget/

  2. SriniG
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks. Fixed in 0.5.7.

  3. John Peden
    Member
    Posted 1 year ago #

    Srini,

    I've rewritten a couple of lines of the plugin to improve its flexibility with different themes etc. Could I email you the updated code so that you can deploy as a new release?

    Thanks

  4. SriniG
    Member
    Plugin Author

    Posted 1 year ago #

    Hi John. Sure, send me over.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic