Plugin Directory

Changeset 1088465


Ignore:
Timestamp:
02/12/2015 08:47:14 PM (11 years ago)
Author:
osdwebdev
Message:

3.2 Release

Location:
osd-social-media-sharing
Files:
17 added
4 edited

Legend:

Unmodified
Added
Removed
  • osd-social-media-sharing/trunk/includes/OSDSocialShare.php

    r1085555 r1088465  
    77class OSDSocialShare {
    88    private $args = null;
    9     private $user_settings = array();
     9    private $user_settings = array("services" => array());
    1010
    1111    function __construct($args = NULL) {
     
    6868                break;
    6969        }
    70         return "<a class='osd-sms-link' data-platform='{$platform}' target='{$target}' title='{$button_title}' href='{$url}' rel='nofollow'>";
     70        // Put the url in an attribute to prevent Pinterest's official pinit script from hijacking the image
     71        return "<a class='osd-sms-link' data-platform='{$platform}' target='{$target}' title='{$button_title}' href='#' data-url='{$url}' rel='nofollow'>";
    7172    }
    7273
  • osd-social-media-sharing/trunk/includes/js.php

    r1028042 r1088465  
    99                "twitter": [520, 400],
    1010                "linkedIn": [520, 475],
     11                "pinterest": [850, 700],
    1112                "default": [520, 300],
    1213            }
     
    1415            // Initialize OSD SMS
    1516            init();
    16 
    1717
    1818            // Initialize OSD Social Media Sharing
     
    2323                    var platform = osd_shares[i].getAttribute('data-platform');
    2424                    var width = (sizes[platform] !== undefined) ? sizes[platform][0] : sizes["default"][0];
    25                     var height = (sizes[platform] !== undefined) ? sizes[platform][0] : sizes["default"][0];
     25                    var height = (sizes[platform] !== undefined) ? sizes[platform][1] : sizes["default"][1];
    2626                    osd_shares[i].setAttribute("data-width", width);
    2727                    osd_shares[i].setAttribute("data-height", height);
     
    3030
    3131                // Set up pinterest modal
    32                 if (document.querySelector('.osd-sms-link[data-platform=pinterest]') !== null) {
     32                if (document.querySelector(".osd-sms-link[data-platform=pinterest]") !== null) {
    3333                    set_up_image_picker();
    3434                }
     
    5959                }
    6060                if (link.getAttribute("target") !== "_self") {
    61                     window.open(link.getAttribute("href"), link.getAttribute("data-platform"), "menubar=1,width="+link.getAttribute("data-width")+",height="+link.getAttribute("data-height")+",status=1,resizable=1");
     61                    window.open(link.getAttribute("data-url"), link.getAttribute("data-platform"), "menubar=1,width="+link.getAttribute("data-width")+",height="+link.getAttribute("data-height")+",status=1,resizable=1");
    6262                } else {
    63                     window.location = link.getAttribute("href");
     63                    window.location = link.getAttribute("data-url");
    6464                }
    6565            }
     
    132132            function attachPinterestMedia() {
    133133                var link = document.querySelector('.osd-sms-link[data-platform=pinterest]');
    134                 link.href = link.href.replace(/&media=.*/, "&media=" + this.getAttribute("data-media"));
     134                link.setAttribute("data-url", link.getAttribute("data-url").replace(/&media=.*/, "&media=" + this.getAttribute("data-media")));
    135135                closeModal();
    136136                open_link(link);
  • osd-social-media-sharing/trunk/osd_social_media_sharing.php

    r1085555 r1088465  
    44Plugin URI: http://outsidesource.com
    55Description: Add buttons to share any of your content on facebook, twitter, google plus, pinterest, email and more.
    6 Version: 3.1
     6Version: 3.2
    77Author: OSD Web Development Team
    88Author URI: http://outsidesource.com
  • osd-social-media-sharing/trunk/readme.txt

    r1085555 r1088465  
    44Requires at least: 3.4
    55Tested up to: 4.1
    6 Stable tag: 3.1
     6Stable tag: 3.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 3.2 =
     44* OSD Social Media Sharing now prevents the offical Pinterest JS from hijacking the link/picture
     45* Fixed bug where opened windows were all the same size
     46* General bug fixes
    4247
    4348= 3.1 =
Note: See TracChangeset for help on using the changeset viewer.