Social Media Feather | social media sharing - Version 1.7.3

Version Description

  • Strip HTML from titles in sharing links
  • Fix for certain Fancybox plugins loading lightboxes on sharing images
Download this release

Release Info

Developer Synved
Plugin Icon 128x128 Social Media Feather | social media sharing
Version 1.7.3
Comparing to
See all releases

Code changes from version 1.6.15 to 1.7.3

readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === Social Media Feather ===
2
  Contributors: Synved
3
  Donate link: http://synved.com/wordpress-social-media-feather/
4
  Tags: shortcode, shortcodes, link, links, url, permalink, permalinks, time, icons, button, buttons, free, content, plugin, Share, sharing, social share, social sharing, page, pages, widget, CSS, list, media, profile, shortlinks, social, social media, Like, twitter, google, Facebook, Reddit, youtube, vimeo, tumblr, instagram, flickr, foursquare, bookmark, bookmarks, bookmarking, pinterest, linkedin, image, edit, manage, mail, Post, posts, Style, seo, title, filter, follow, following, social follow, social following, high resolution, retina, ipad
@@ -14,6 +14,8 @@ Super lightweight, simple, nice, modern looking and effective social media shari
14
 
15
  [WordPress Social Media Feather](http://synved.com/wordpress-social-media-feather/ "Lightweight WordPress social sharing and following") is a super lightweight free social media WordPress plugin that allows you to quickly and painlessly add **social sharing and following** features to all your posts, pages and custom post types.
16
 
 
 
17
  Check out this introductory tutorial on [how to install and get started with Social Media for WordPress](http://youtu.be/iJAq2nJi6BM) by a helpful user of Social Media Feather!
18
 
19
  https://www.youtube.com/watch?v=iJAq2nJi6BM
@@ -41,7 +43,7 @@ The plugin also offers widgets for sharing and following buttons that you can pl
41
  You can disable automatic rendering of social icons for specific posts by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_share` to "yes" (without quotes) to disable rendering of sharing buttons on the post/page or `synved_social_exclude_follow` to "yes" (without quotes) to remove following buttons from the post or alternatively `synved_social_exclude` to disable both.
42
 
43
  = Features =
44
- * Integrated WordPress social sharing
45
  * Full support for **Retina** and high resolution displays
46
  * WordPress social sharing and following widgets
47
  * Supports all major providers of social features
@@ -71,7 +73,7 @@ You can change the order of displayed buttons by changing the order of keywords:
71
  This shortcode will create a list of social sharing buttons to share content on your site using the "Wheel" icons skin:
72
  `[feather_share skin="wheel"]`
73
 
74
- This shortcode will create a list of social sharing buttons to share content on your site using the "Wheel" icons skin with a size of 64 pixels:
75
  `[feather_share skin="wheel" size="64"]`
76
 
77
  The next shortcode will create a list of social following buttons that allow visitors to follow you:
@@ -80,7 +82,7 @@ The next shortcode will create a list of social following buttons that allow vis
80
  The next shortcode will create a list of social following buttons that allow visitors to follow you, using the "Balloon" icons skin:
81
  `[feather_follow skin="balloon"]`
82
 
83
- The next shortcode will create a list of social following buttons that allow visitors to follow you, using the "Balloon" icons skin with a size of 64 pixels:
84
  `[feather_follow skin="balloon" size="64"]`
85
 
86
  = Template Tags =
@@ -106,7 +108,7 @@ For following buttons you can use:
106
 
107
  == Installation ==
108
 
109
- 1. Download the plugin
110
  2. Simply go under the Plugins page, then click on Add new and select the plugin's .zip file
111
  3. Alternatively you can extract the contents of the zip file directly to your *wp-content/plugins/* folder
112
  4. Finally, just go under Plugins and activate the plugin
@@ -121,7 +123,7 @@ Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio them
121
 
122
  You can achieve this by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_share` to "yes" (without quotes) to disable share buttons on the post or page. Alternatively set `synved_social_exclude` to "yes" (without quotes) to disable both sharing and following.
123
 
124
- = How do I disable rendering of follow buttons on a specific post/page? =
125
 
126
  You can achieve this by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_follow` to "yes" (without quotes) to remove following buttons from the post or page. Alternatively set `synved_social_exclude` to "yes" (without quotes) to disable both sharing and following.
127
 
@@ -137,6 +139,21 @@ You can achieve this by using *Custom Fields*. Simply set a custom field of `syn
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  = 1.6.15 =
141
  * Fix for PHP notice in rare cases
142
  * Prevent certain fancybox plugins from trying to open fancybox on share/follow icons
1
+ === Social Media Feather - lightweight social media sharing and follow buttons ===
2
  Contributors: Synved
3
  Donate link: http://synved.com/wordpress-social-media-feather/
4
  Tags: shortcode, shortcodes, link, links, url, permalink, permalinks, time, icons, button, buttons, free, content, plugin, Share, sharing, social share, social sharing, page, pages, widget, CSS, list, media, profile, shortlinks, social, social media, Like, twitter, google, Facebook, Reddit, youtube, vimeo, tumblr, instagram, flickr, foursquare, bookmark, bookmarks, bookmarking, pinterest, linkedin, image, edit, manage, mail, Post, posts, Style, seo, title, filter, follow, following, social follow, social following, high resolution, retina, ipad
14
 
15
  [WordPress Social Media Feather](http://synved.com/wordpress-social-media-feather/ "Lightweight WordPress social sharing and following") is a super lightweight free social media WordPress plugin that allows you to quickly and painlessly add **social sharing and following** features to all your posts, pages and custom post types.
16
 
17
+ The plugin supports adding of social buttons for sharing or following (that is, social buttons that link to your social network profiles pages). The social media buttons can be easily and automatically be added to all your posts, pages or any other **custom post types**.
18
+
19
  Check out this introductory tutorial on [how to install and get started with Social Media for WordPress](http://youtu.be/iJAq2nJi6BM) by a helpful user of Social Media Feather!
20
 
21
  https://www.youtube.com/watch?v=iJAq2nJi6BM
43
  You can disable automatic rendering of social icons for specific posts by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_share` to "yes" (without quotes) to disable rendering of sharing buttons on the post/page or `synved_social_exclude_follow` to "yes" (without quotes) to remove following buttons from the post or alternatively `synved_social_exclude` to disable both.
44
 
45
  = Features =
46
+ * Integrated WordPress social sharing for all your posts
47
  * Full support for **Retina** and high resolution displays
48
  * WordPress social sharing and following widgets
49
  * Supports all major providers of social features
73
  This shortcode will create a list of social sharing buttons to share content on your site using the "Wheel" icons skin:
74
  `[feather_share skin="wheel"]`
75
 
76
+ This shortcode will create a list of social media sharing buttons to share content on your site using the "Wheel" icons skin with a size of 64 pixels:
77
  `[feather_share skin="wheel" size="64"]`
78
 
79
  The next shortcode will create a list of social following buttons that allow visitors to follow you:
82
  The next shortcode will create a list of social following buttons that allow visitors to follow you, using the "Balloon" icons skin:
83
  `[feather_follow skin="balloon"]`
84
 
85
+ The next shortcode will create a list of social media following buttons that allow visitors to follow you, using the "Balloon" icons skin with a size of 64 pixels:
86
  `[feather_follow skin="balloon" size="64"]`
87
 
88
  = Template Tags =
108
 
109
  == Installation ==
110
 
111
+ 1. Download the Social Media Feather plugin
112
  2. Simply go under the Plugins page, then click on Add new and select the plugin's .zip file
113
  3. Alternatively you can extract the contents of the zip file directly to your *wp-content/plugins/* folder
114
  4. Finally, just go under Plugins and activate the plugin
123
 
124
  You can achieve this by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_share` to "yes" (without quotes) to disable share buttons on the post or page. Alternatively set `synved_social_exclude` to "yes" (without quotes) to disable both sharing and following.
125
 
126
+ = How do I disable rendering of social profiles follow buttons on a specific post/page? =
127
 
128
  You can achieve this by using *Custom Fields*. Simply set a custom field of `synved_social_exclude_follow` to "yes" (without quotes) to remove following buttons from the post or page. Alternatively set `synved_social_exclude` to "yes" (without quotes) to disable both sharing and following.
129
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.7.3 =
143
+ * Strip HTML from titles in sharing links
144
+ * Fix for certain Fancybox plugins loading lightboxes on sharing images
145
+
146
+ = 1.7.2 =
147
+ * Added `image` attribute for shortcodes
148
+ * Minor adjustments
149
+
150
+ = 1.7.1 =
151
+ * Fix for Easy Digital Downloads adding HTML tags to titles that were then posted to social sharing
152
+ * Fix for certain quote characters not being properly converted on share
153
+
154
+ = 1.7 =
155
+ * Performance improvements
156
+
157
  = 1.6.15 =
158
  * Fix for PHP notice in rare cases
159
  * Prevent certain fancybox plugins from trying to open fancybox on share/follow icons
social-media-feather.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Social Media Feather
4
  Plugin URI: http://synved.com/wordpress-social-media-feather/
5
  Description: Super lightweight social media plugin to add nice and effective social media sharing and following buttons and icons anywhere on your site quickly and easily
6
  Author: Synved
7
- Version: 1.6.15
8
  Author URI: http://synved.com/
9
 
10
  LEGAL STATEMENTS
4
  Plugin URI: http://synved.com/wordpress-social-media-feather/
5
  Description: Super lightweight social media plugin to add nice and effective social media sharing and following buttons and icons anywhere on your site quickly and easily
6
  Author: Synved
7
+ Version: 1.7.3
8
  Author URI: http://synved.com/
9
 
10
  LEGAL STATEMENTS
synved-social/synved-social-setup.php CHANGED
@@ -232,7 +232,7 @@ $synved_social_options = array(
232
  'settings' => array(
233
  'icon_skin' => array(
234
  'default' => 'regular',
235
- 'set' => synved_option_callback('synved_social_icon_skin_set', 'regular=Regular'),
236
  'label' => __('Icon Skin', 'synved-social'),
237
  'tip' => synved_option_callback('synved_social_setting_icon_skin_tip',__('Select the default skin to use for the icons', 'synved-social')),
238
  'render' => 'synved_social_icon_skin_render'
@@ -367,7 +367,7 @@ function synved_social_section_customize_look_tip($tip, $item)
367
  return $tip;
368
  }
369
 
370
- function synved_social_icon_skin_set($set, $item)
371
  {
372
  if ($set != null && !is_array($set))
373
  {
232
  'settings' => array(
233
  'icon_skin' => array(
234
  'default' => 'regular',
235
+ 'set' => synved_option_callback('synved_social_cb_icon_skin_set', 'regular=Regular'),
236
  'label' => __('Icon Skin', 'synved-social'),
237
  'tip' => synved_option_callback('synved_social_setting_icon_skin_tip',__('Select the default skin to use for the icons', 'synved-social')),
238
  'render' => 'synved_social_icon_skin_render'
367
  return $tip;
368
  }
369
 
370
+ function synved_social_cb_icon_skin_set($set, $item)
371
  {
372
  if ($set != null && !is_array($set))
373
  {
synved-social/synved-social.php CHANGED
@@ -3,7 +3,7 @@
3
  Module Name: Synved Social
4
  Description: Social sharing and following tools
5
  Author: Synved
6
- Version: 1.6.15
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
@@ -18,8 +18,8 @@ In no event shall Synved Ltd. be liable to you or any third party for any direct
18
 
19
 
20
  define('SYNVED_SOCIAL_LOADED', true);
21
- define('SYNVED_SOCIAL_VERSION', 100060015);
22
- define('SYNVED_SOCIAL_VERSION_STRING', '1.6.15');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
@@ -346,28 +346,42 @@ function synved_social_service_provider_list($context, $raw = false)
346
 
347
  function synved_social_icon_skin_list()
348
  {
349
- $path = synved_social_path();
350
- $uri = synved_social_path_uri();
351
 
352
- $icons = array(
353
- 'regular' => array(
354
- 'label' => __('Regular'),
355
- 'image' => $uri . '/image/social/regular/preview.png',
356
- 'folder' => '/image/social/regular/',
357
- 'path' => $path . '/image/social/regular/',
358
- 'uri' => $uri . '/image/social/regular/'
359
- )
360
- );
361
 
362
- $icons_extra = null;
 
 
 
 
 
 
 
 
363
 
364
- if (function_exists('synved_social_addon_extra_icons_get'))
365
- {
366
- $icons_extra = synved_social_addon_extra_icons_get();
367
- $icons = array_merge($icons, $icons_extra);
 
 
 
 
 
 
 
 
 
 
 
 
368
  }
369
 
370
- return apply_filters('synved_social_icon_skin_list', $icons);
371
  }
372
 
373
  function synved_social_icon_skin_get($name = null)
@@ -412,8 +426,48 @@ function synved_social_icon_skin_current()
412
  return synved_social_icon_skin_get();
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  function synved_social_icon_skin_get_size_list($skin)
416
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  $path = synved_social_path();
418
  $skin_path = isset($skin['path']) ? $skin['path'] : ($path . '/image/social/regular/');
419
 
@@ -434,6 +488,11 @@ function synved_social_icon_skin_get_size_list($skin)
434
 
435
  sort($size_list, SORT_NUMERIC);
436
 
 
 
 
 
 
437
  return $size_list;
438
  }
439
 
@@ -536,10 +595,10 @@ function synved_social_icon_skin_get_image_list($skin, $name_list, $forced_size
536
 
537
  function synved_social_button_list_shortcode($atts, $content = null, $code = '', $context = null)
538
  {
539
- $vars_def = array('url' => null, 'title' => null);
540
  $params_def = array('skin' => null, 'size' => null, 'spacing' => null, 'container' => null, 'container_type' => null, 'class' => null, 'show' => null, 'hide' => null, 'prompt' => null, 'custom1' => null, 'custom2' => null, 'custom3' => null);
541
- $vars = shortcode_atts($vars_def, $atts);
542
- $params = shortcode_atts($params_def, $atts);
543
  $vars = array_filter($vars);
544
  $params = array_filter($params);
545
 
@@ -766,7 +825,10 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
766
 
767
  if (!isset($vars['title']))
768
  {
769
- $vars['title'] = html_entity_decode(get_the_title());
 
 
 
770
  }
771
 
772
  if (!isset($vars['message']))
@@ -878,6 +940,8 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
878
  $vars['title'] = str_ireplace('+', '%20', $vars['title']);
879
 
880
  // urlencode_deep tries to be smart and apostrophes (') to %19 not %27 and double quotes (") to their equivalent open/closed counterparts which doesn't work on most social networks sharings
 
 
881
  $vars['message'] = str_ireplace('%19', '%27', $vars['message']);
882
  $vars['title'] = str_ireplace('%19', '%27', $vars['title']);
883
  $vars['message'] = str_ireplace('%1c', '%22', $vars['message']);
@@ -1107,7 +1171,8 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
1107
  $class_extra = ' ' . implode(' ', $class);
1108
  }
1109
 
1110
- $class_extra .= ' nofancybox';
 
1111
 
1112
  $out_button = array(
1113
  'tag' => 'a',
3
  Module Name: Synved Social
4
  Description: Social sharing and following tools
5
  Author: Synved
6
+ Version: 1.7.3
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
18
 
19
 
20
  define('SYNVED_SOCIAL_LOADED', true);
21
+ define('SYNVED_SOCIAL_VERSION', 100070003);
22
+ define('SYNVED_SOCIAL_VERSION_STRING', '1.7.3');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
346
 
347
  function synved_social_icon_skin_list()
348
  {
349
+ global $synved_social;
 
350
 
351
+ if (!isset($synved_social['skin_list']) || $synved_social['skin_list'] == null)
352
+ {
353
+ $path = synved_social_path();
354
+ $uri = synved_social_path_uri();
 
 
 
 
 
355
 
356
+ $icons = array(
357
+ 'regular' => array(
358
+ 'label' => __('Regular'),
359
+ 'image' => $uri . '/image/social/regular/preview.png',
360
+ 'folder' => '/image/social/regular/',
361
+ 'path' => $path . '/image/social/regular/',
362
+ 'uri' => $uri . '/image/social/regular/'
363
+ )
364
+ );
365
 
366
+ $icons_extra = null;
367
+
368
+ if (function_exists('synved_social_addon_extra_icons_get'))
369
+ {
370
+ $icons_extra = synved_social_addon_extra_icons_get();
371
+ $icons = array_merge($icons, $icons_extra);
372
+ }
373
+
374
+ $icons = apply_filters('synved_social_icon_skin_list', $icons);
375
+
376
+ foreach ($icons as $skin_name => $skin)
377
+ {
378
+ $icons[$skin_name]['name'] = $skin_name;
379
+ }
380
+
381
+ $synved_social['skin_list'] = $icons;
382
  }
383
 
384
+ return $synved_social['skin_list'];
385
  }
386
 
387
  function synved_social_icon_skin_get($name = null)
426
  return synved_social_icon_skin_get();
427
  }
428
 
429
+ // XXX internal, don't use
430
+ function synved_social_icon_skin_set($name, $skin)
431
+ {
432
+ global $synved_social;
433
+
434
+ // ensure the global is set
435
+ synved_social_icon_skin_list();
436
+
437
+ if (isset($synved_social['skin_list']) && $synved_social['skin_list'] != null)
438
+ {
439
+ if (!isset($synved_social['skin_list'][$name]))
440
+ {
441
+ $synved_social['skin_list'][$name] = array();
442
+ }
443
+
444
+ foreach ($skin as $key => $value)
445
+ {
446
+ $synved_social['skin_list'][$name][$key] = $value;
447
+ }
448
+ }
449
+ }
450
+
451
  function synved_social_icon_skin_get_size_list($skin)
452
  {
453
+ if (isset($skin['size-list']))
454
+ {
455
+ return $skin['size-list'];
456
+ }
457
+
458
+ if (isset($skin['name']))
459
+ {
460
+ $skin_fresh = synved_social_icon_skin_get($skin['name']);
461
+
462
+ if (isset($skin['path']) && isset($skin_fresh['path']) && $skin['path'] == $skin_fresh['path'])
463
+ {
464
+ if (isset($skin_fresh['size-list']))
465
+ {
466
+ return $skin_fresh['size-list'];
467
+ }
468
+ }
469
+ }
470
+
471
  $path = synved_social_path();
472
  $skin_path = isset($skin['path']) ? $skin['path'] : ($path . '/image/social/regular/');
473
 
488
 
489
  sort($size_list, SORT_NUMERIC);
490
 
491
+ if (isset($skin['name']))
492
+ {
493
+ synved_social_icon_skin_set($skin['name'], array('size-list' => $size_list));
494
+ }
495
+
496
  return $size_list;
497
  }
498
 
595
 
596
  function synved_social_button_list_shortcode($atts, $content = null, $code = '', $context = null)
597
  {
598
+ $vars_def = array('url' => null, 'image' => null, 'title' => null);
599
  $params_def = array('skin' => null, 'size' => null, 'spacing' => null, 'container' => null, 'container_type' => null, 'class' => null, 'show' => null, 'hide' => null, 'prompt' => null, 'custom1' => null, 'custom2' => null, 'custom3' => null);
600
+ $vars = shortcode_atts($vars_def, $atts, 'feather_' . $context);
601
+ $params = shortcode_atts($params_def, $atts, 'feather_' . $context);
602
  $vars = array_filter($vars);
603
  $params = array_filter($params);
604
 
825
 
826
  if (!isset($vars['title']))
827
  {
828
+ $title = get_the_title();
829
+ // do this encoding to prevent non-tags things, like emoticons, from being stripped, i.e. <8
830
+ $title = preg_replace('/\\<\\s*([^[:alpha:]\\/])/', '&lt;$1', $title);
831
+ $vars['title'] = html_entity_decode(wp_strip_all_tags($title));
832
  }
833
 
834
  if (!isset($vars['message']))
940
  $vars['title'] = str_ireplace('+', '%20', $vars['title']);
941
 
942
  // urlencode_deep tries to be smart and apostrophes (') to %19 not %27 and double quotes (") to their equivalent open/closed counterparts which doesn't work on most social networks sharings
943
+ $vars['message'] = str_ireplace('%18', '%27', $vars['message']);
944
+ $vars['title'] = str_ireplace('%18', '%27', $vars['title']);
945
  $vars['message'] = str_ireplace('%19', '%27', $vars['message']);
946
  $vars['title'] = str_ireplace('%19', '%27', $vars['title']);
947
  $vars['message'] = str_ireplace('%1c', '%22', $vars['message']);
1171
  $class_extra = ' ' . implode(' ', $class);
1172
  }
1173
 
1174
+ // don't use "nofancybox" because some plugins/themes interpret it as enabling fancybox
1175
+ $class_extra .= ' nolightbox';
1176
 
1177
  $out_button = array(
1178
  'tag' => 'a',