Social Sharing Toolkit - Version 2.4

Version Description

  • Added support for WhatsApp.
Download this release

Release Info

Developer linksalpha
Plugin Icon wp plugin Social Sharing Toolkit
Version 2.4
Comparing to
See all releases

Code changes from version 2.3 to 2.4

images/buttons/whatsapp.png ADDED
Binary file
images/icons_large/whatsapp.png ADDED
Binary file
images/icons_medium/whatsapp.png ADDED
Binary file
images/icons_small/whatsapp.png ADDED
Binary file
includes/buttons/button.delicious.js DELETED
@@ -1,26 +0,0 @@
1
- jQuery(document).ready(function($) {
2
- // Delicious:
3
- $.each($("span.delicious_hash"), function () {
4
- var elem = $(this);
5
- $.ajax({ type: "GET",
6
- dataType: "jsonp",
7
- url: "http://feeds.delicious.com/v2/json/urlinfo/"+$(this).html(),
8
- success: function(data){
9
- if (data.length > 0) {
10
- var posts = parseInt(data[0].total_posts);
11
- if (posts > 1000000) {
12
- var txt = parseInt(posts/1000000);
13
- elem.next().prepend(txt + 'M');
14
- } else if (posts > 1000) {
15
- var txt = parseInt(posts/1000);
16
- elem.next().prepend(txt + 'K');
17
- } else {
18
- elem.next().prepend(posts);
19
- }
20
- } else {
21
- elem.next().prepend('0');
22
- }
23
- }
24
- });
25
- });
26
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/buttons/button.delicious.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- class MR_Social_Sharing_Toolkit_Delicious extends MR_Social_Sharing_Toolkit_Button {
3
- function __construct() {
4
- $this->share_buttons[] = array('name' => 'dl_delicious', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
5
- $this->title = 'Delicious';
6
- $this->icon = 'delicious';
7
- }
8
-
9
- function dl_delicious($url, $title, $type, $id, $text = '', $icon = '') {
10
- switch ($type) {
11
- case 'horizontal':
12
- $hash = md5($url);
13
- $retval = '<div class="delicious_horizontal"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a></div>';
14
- $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
15
- $this->enqueue_script('Social_sharing_delicious', plugins_url('/button.delicious.js', __FILE__), $footer);
16
-
17
- break;
18
- case 'vertical':
19
- $hash = md5($url);
20
- $retval = '<div class="delicious_vertical"><span class="delicious_hash">'.$hash.'</span><a class="mr_social_sharing_popup_link" href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url='.urlencode($url).'&amp;title='.urlencode($title).'" target="_blank"></a></div>';
21
- $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false;
22
- $this->enqueue_script('Social_sharing_delicious', plugins_url('/button.delicious.js', __FILE__), $footer);
23
-
24
- break;
25
- default:
26
- $url = 'http://del.icio.us/post?url='.urlencode($url).'&amp;title='.urlencode($title);
27
- $text = ($text == '') ? __('Save on','mr_social_sharing_toolkit').' Delicious' : $text;
28
- $retval = $this->get_icon($type, $url, $text, $icon, true);
29
- break;
30
- }
31
- return $retval;
32
- }
33
- }
34
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/buttons/button.hyves.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- class MR_Social_Sharing_Toolkit_Hyves extends MR_Social_Sharing_Toolkit_Button {
3
- function __construct() {
4
- $this->share_buttons[] = array('name' => 'hv_respect', 'title' => 'Hyves Respect', 'types' => array('horizontal'));
5
- $this->follow_buttons[] = array('name' => 'follow_hyves', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
6
- $this->title = 'Hyves';
7
- $this->icon = 'hyves';
8
- }
9
-
10
- function hv_respect($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
11
- $retval = '<iframe src="http://www.hyves.nl/respect/button?url='.urlencode($url).'&amp;title='.urlencode($title).'" style="border: medium none; overflow:hidden; width:150px; height:21px;" scrolling="no" frameborder="0" allowTransparency="true" ></iframe>';
12
- return $retval;
13
- }
14
-
15
- function follow_hyves($type, $id, $text = '', $icon = '') {
16
- $url = 'http://'.$id.'.hyves.nl';
17
- $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Hyves' : $text;
18
- $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false;
19
- return $this->get_icon($type, $url, $text, $icon, false, $blank);
20
- }
21
- }
22
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/buttons/button.whatsapp.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MR_Social_Sharing_Toolkit_WhatsApp extends MR_Social_Sharing_Toolkit_Button {
3
+ function __construct() {
4
+ $this->share_buttons[] = array('name' => 'whatsapp_share', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
5
+ $this->title = 'WhatsApp';
6
+ $this->icon = 'whatsapp';
7
+ }
8
+
9
+ function whatsapp_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {
10
+ $url = 'whatsapp://send?text='.urlencode($title).'%20'.urlencode($url);
11
+ $text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' WhatsApp' : $text;
12
+ return $this->get_icon($type, $url, $text, $icon, true);
13
+ }
14
+ }
15
+ ?>
includes/class.button.php CHANGED
@@ -77,7 +77,7 @@ class MR_Social_Sharing_Toolkit_Button {
77
  $icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_small/'.$this->icon.'.png', __FILE__)) : $icon;
78
  break;
79
  }
80
- $retval = '<a href="'.$url.'"><img src="'.$icon.'" class="nopin" alt="'.$title.'" title="'.$title.'"/>'.$text.'</a>';
81
  return $retval;
82
  }
83
 
77
  $icon = ($icon == '') ? str_replace('includes/', '', plugins_url('/images/icons_small/'.$this->icon.'.png', __FILE__)) : $icon;
78
  break;
79
  }
80
+ $retval = '<a class="mr_social_share_'.$this->icon.'" href="'.$url.'"><img src="'.$icon.'" class="nopin" alt="'.$title.'" title="'.$title.'"/>'.$text.'</a>';
81
  return $retval;
82
  }
83
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Social Sharing Toolkit ===
2
  Contributors: linksalpha
3
- Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, App.net, mail, Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, Yammer, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
4
  Requires at least: 3.0
5
- Tested up to: 3.9.1
6
- Stable tag: 2.3
7
  License: GPLv2 or later
8
 
9
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
@@ -183,6 +183,10 @@ Upload the Social Sharing Toolkit plugin to the `/wp-content/plugins/` folder on
183
 
184
  == Upgrade Notice ==
185
 
 
 
 
 
186
  = 2.3 =
187
  * Bug fixes.
188
 
1
  === Social Sharing Toolkit ===
2
  Contributors: linksalpha
3
+ Tags: Facebook, Like, WhatsApp, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, App.net, mail, Gmail, AOL, Evernote, Hotmail, Instapaper, Mail.ru, Pocket, Sonico, vkontakte, Weibo, Yahoo Mail, Yammer, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph
4
  Requires at least: 3.0
5
+ Tested up to: 4.3
6
+ Stable tag: 2.4
7
  License: GPLv2 or later
8
 
9
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
183
 
184
  == Upgrade Notice ==
185
 
186
+ = 2.4 =
187
+ * Added support for WhatsApp.
188
+
189
+
190
  = 2.3 =
191
  * Bug fixes.
192
 
social_sharing_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://wordpress.org/plugins/social-sharing-toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
- Version: 2.3
7
  Author: linksalpha
8
  Author URI: http://www.linksalpha.com
9
  */
@@ -35,7 +35,7 @@ class MR_Social_Sharing_Toolkit {
35
  $this -> types['icon_large'] = __('Large icon', 'mr_social_sharing_toolkit');
36
  $buttons = glob(dirname(__FILE__) . '/includes/buttons/button.*.php');
37
  if (is_array($buttons) && count($buttons) > 0) {
38
- foreach ($buttons as $button) {
39
  $name = str_replace(dirname(__FILE__) . '/includes/buttons/button.', '', str_replace('.php', '', $button));
40
  $class_name = 'MR_Social_Sharing_Toolkit_' . ucfirst($name);
41
  if (class_exists($class_name)) {
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://wordpress.org/plugins/social-sharing-toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
+ Version: 2.4
7
  Author: linksalpha
8
  Author URI: http://www.linksalpha.com
9
  */
35
  $this -> types['icon_large'] = __('Large icon', 'mr_social_sharing_toolkit');
36
  $buttons = glob(dirname(__FILE__) . '/includes/buttons/button.*.php');
37
  if (is_array($buttons) && count($buttons) > 0) {
38
+ foreach ($buttons as $buttonKey => $button) {
39
  $name = str_replace(dirname(__FILE__) . '/includes/buttons/button.', '', str_replace('.php', '', $button));
40
  $class_name = 'MR_Social_Sharing_Toolkit_' . ucfirst($name);
41
  if (class_exists($class_name)) {
style_2.1.2.css CHANGED
@@ -7,6 +7,7 @@ div.mr_social_sharing_top div, span.mr_social_sharing_top div {vertical-align: t
7
  a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {display: inline-block; margin: 0; padding: 0; border: 0; vertical-align: bottom;}
8
  .mr_social_sharing img, .mr_social_sharing_top img {display: inline-block; margin: 0 !important; padding: 0 !important; border: 0 !important; vertical-align: bottom; max-width: 100%;}
9
  .mr_social_sharing a.mr_social_sharing_popup_link, .mr_social_sharing div, .mr_social_sharing span, .mr_social_sharing iframe, .mr_social_sharing img {line-height: 0; vertical-align: bottom;}
 
10
  .mr_social_sharing_top a.mr_social_sharing_popup_link, .mr_social_sharing_top div, .mr_social_sharing_top span, .mr_social_sharing_top iframe, .mr_social_sharing_top img {line-height: 0; vertical-align: top;}
11
  .mr_social_sharing span.mr_small_icon, .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_small_icon, .mr_social_sharing_top span.mr_medium_icon {display: inline-block; font-family: 'Droid Sans',arial,sans-serif; vertical-align: bottom; font-size:10px; font-weight: 200; line-height: 10px; margin: 0 0 0 4px; padding: 0;}
12
  .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_medium_icon {font-size:12px; line-height: 12px;}
@@ -29,4 +30,9 @@ span.fb_share_count_top, span.fb_share_count_inner {line-height: 34px;}
29
  .delicious_horizontal {display:inline-block; height:20px; width:120px; padding: 0px; margin: 0px;}
30
  .delicious_horizontal a, .delicious_horizontal a:hover {display: block; font-family: 'Droid Sans',arial,sans-serif; font-size: 12px; font-weight: 300; background: transparent url(images/delicious_counters.png) no-repeat scroll left bottom; height: 10px; width: 35px; padding: 10px 5px 0 80px; vertical-align: bottom; color: #7e7e7e; text-decoration: none; text-align:center; white-space:nowrap;}
31
  .delicious_horizontal a:hover {color: #0090ff; background: transparent url(images/delicious_counters_hover.png) no-repeat scroll left bottom;}
32
- .delicious_vertical span.delicious_hash, .delicious_horizontal span.delicious_hash {display: none;}
 
 
 
 
 
7
  a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {display: inline-block; margin: 0; padding: 0; border: 0; vertical-align: bottom;}
8
  .mr_social_sharing img, .mr_social_sharing_top img {display: inline-block; margin: 0 !important; padding: 0 !important; border: 0 !important; vertical-align: bottom; max-width: 100%;}
9
  .mr_social_sharing a.mr_social_sharing_popup_link, .mr_social_sharing div, .mr_social_sharing span, .mr_social_sharing iframe, .mr_social_sharing img {line-height: 0; vertical-align: bottom;}
10
+ .mr_social_sharing iframe {margin-bottom:0}
11
  .mr_social_sharing_top a.mr_social_sharing_popup_link, .mr_social_sharing_top div, .mr_social_sharing_top span, .mr_social_sharing_top iframe, .mr_social_sharing_top img {line-height: 0; vertical-align: top;}
12
  .mr_social_sharing span.mr_small_icon, .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_small_icon, .mr_social_sharing_top span.mr_medium_icon {display: inline-block; font-family: 'Droid Sans',arial,sans-serif; vertical-align: bottom; font-size:10px; font-weight: 200; line-height: 10px; margin: 0 0 0 4px; padding: 0;}
13
  .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_medium_icon {font-size:12px; line-height: 12px;}
30
  .delicious_horizontal {display:inline-block; height:20px; width:120px; padding: 0px; margin: 0px;}
31
  .delicious_horizontal a, .delicious_horizontal a:hover {display: block; font-family: 'Droid Sans',arial,sans-serif; font-size: 12px; font-weight: 300; background: transparent url(images/delicious_counters.png) no-repeat scroll left bottom; height: 10px; width: 35px; padding: 10px 5px 0 80px; vertical-align: bottom; color: #7e7e7e; text-decoration: none; text-align:center; white-space:nowrap;}
32
  .delicious_horizontal a:hover {color: #0090ff; background: transparent url(images/delicious_counters_hover.png) no-repeat scroll left bottom;}
33
+ .delicious_vertical span.delicious_hash, .delicious_horizontal span.delicious_hash {display: none;}
34
+
35
+ @media all and (min-width: 600px) {
36
+ .mr_social_share_sms {display:none}
37
+ .mr_social_share_whatsapp {display:none}
38
+ }