WordPress.org

Ready to get started?Download WordPress

Forums

Social Media Widget
Small request for multi-site installs and proper site name resolution (4 posts)

  1. ccolotti
    Member
    Posted 1 year ago #

    Can these lines be edited to pull the proper current blog site not just the site URL? When I use this on a network install the images and such are always directed back to the network site, and therefore CDN re-writes with W3TotalCache don't work. I'm sure it's a simple change of the use of site_url to something else. I was messing with it but I cannot figure out which to change it to. Usually to contend for the blogs.dir you need something with get_bloginfo()

    Cheers!

    /* Check to see if locations are changed in wp-config */
    if ( !defined('WP_CONTENT_URL') ) {
            define('SMW_PLUGINPATH', site_url('/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/'));
            define('SMW_PLUGINDIR', ABSPATH.'/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/');
    } else {
            define('SMW_PLUGINPATH',WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/');
            define('SMW_PLUGINDIR',WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__)).'/');
    }

    http://wordpress.org/extend/plugins/social-media-widget/

  2. ccolotti
    Member
    Posted 1 year ago #

    you can see on my site http://www.v-fit.us the social media icons are pulling from:

    http://www.stitchtek.com/vfit/wp-content/plugins/social-media-widget/images/default/32/facebook.png

    where http://www.stitchtek.com/vfit/ is the network install directory of the site.

  3. Blink Web Effects
    Member
    Plugin Author

    Posted 1 year ago #

    I will look into this, thanks for bringing it to my attention.

  4. ccolotti
    Member
    Posted 1 year ago #

    Awesome! If I was good at code I would have figured out the change and just sent it to you. I tried for an hour or two and I suspect you will figure it out in about 10 minutes! :)

    Cheers! I wish more plugin authors were open to the small fixes like this especially this type of issue. So many plugins are not coded to see the blogs.dir setup and return the blog_URL properly. it does mess with the CDN and other things when you try to tune stuff :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.