Changeset 1088465
- Timestamp:
- 02/12/2015 08:47:14 PM (11 years ago)
- Location:
- osd-social-media-sharing
- Files:
-
- 17 added
- 4 edited
-
tags/3.2 (added)
-
tags/3.2/images (added)
-
tags/3.2/images/icon.png (added)
-
tags/3.2/images/icons.png (added)
-
tags/3.2/images/icons.svg (added)
-
tags/3.2/includes (added)
-
tags/3.2/includes/OSDSocialShare.php (added)
-
tags/3.2/includes/admin_js.js (added)
-
tags/3.2/includes/admin_style.css (added)
-
tags/3.2/includes/global_settings.php (added)
-
tags/3.2/includes/installation_actions.php (added)
-
tags/3.2/includes/js.php (added)
-
tags/3.2/includes/post_settings.php (added)
-
tags/3.2/includes/style.css (added)
-
tags/3.2/osd_social_media_sharing.php (added)
-
tags/3.2/readme.txt (added)
-
tags/3.2/uninstall.php (added)
-
trunk/includes/OSDSocialShare.php (modified) (2 diffs)
-
trunk/includes/js.php (modified) (6 diffs)
-
trunk/osd_social_media_sharing.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
osd-social-media-sharing/trunk/includes/OSDSocialShare.php
r1085555 r1088465 7 7 class OSDSocialShare { 8 8 private $args = null; 9 private $user_settings = array( );9 private $user_settings = array("services" => array()); 10 10 11 11 function __construct($args = NULL) { … … 68 68 break; 69 69 } 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'>"; 71 72 } 72 73 -
osd-social-media-sharing/trunk/includes/js.php
r1028042 r1088465 9 9 "twitter": [520, 400], 10 10 "linkedIn": [520, 475], 11 "pinterest": [850, 700], 11 12 "default": [520, 300], 12 13 } … … 14 15 // Initialize OSD SMS 15 16 init(); 16 17 17 18 18 // Initialize OSD Social Media Sharing … … 23 23 var platform = osd_shares[i].getAttribute('data-platform'); 24 24 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]; 26 26 osd_shares[i].setAttribute("data-width", width); 27 27 osd_shares[i].setAttribute("data-height", height); … … 30 30 31 31 // 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) { 33 33 set_up_image_picker(); 34 34 } … … 59 59 } 60 60 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"); 62 62 } else { 63 window.location = link.getAttribute(" href");63 window.location = link.getAttribute("data-url"); 64 64 } 65 65 } … … 132 132 function attachPinterestMedia() { 133 133 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"))); 135 135 closeModal(); 136 136 open_link(link); -
osd-social-media-sharing/trunk/osd_social_media_sharing.php
r1085555 r1088465 4 4 Plugin URI: http://outsidesource.com 5 5 Description: Add buttons to share any of your content on facebook, twitter, google plus, pinterest, email and more. 6 Version: 3. 16 Version: 3.2 7 7 Author: OSD Web Development Team 8 8 Author URI: http://outsidesource.com -
osd-social-media-sharing/trunk/readme.txt
r1085555 r1088465 4 4 Requires at least: 3.4 5 5 Tested up to: 4.1 6 Stable tag: 3. 16 Stable tag: 3.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 41 41 == 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 42 47 43 48 = 3.1 =
Note: See TracChangeset
for help on using the changeset viewer.