Social Media Feather | social media sharing - Version 1.2.2

Version Description

  • Added option to limit automatic appending to single post/pages
Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

readme.txt CHANGED
@@ -107,6 +107,9 @@ Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio them
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 1.2.1 =
111
  * Added Pinterest as sharing and following network
112
  * Added ability to automatically append following buttons as well
107
 
108
  == Changelog ==
109
 
110
+ = 1.2.2 =
111
+ * Added option to limit automatic appending to single post/pages
112
+
113
  = 1.2.1 =
114
  * Added Pinterest as sharing and following network
115
  * Added ability to automatically append following buttons as well
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 sharing and following buttons and icons anywhere on your site without the extra burden
6
  Author: Synved
7
- Version: 1.2.1
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 sharing and following buttons and icons anywhere on your site without the extra burden
6
  Author: Synved
7
+ Version: 1.2.2
8
  Author URI: http://synved.com/
9
 
10
  LEGAL STATEMENTS
synved-option/synved-option.php CHANGED
@@ -3,7 +3,7 @@
3
  Module Name: Synved Option
4
  Description: Easily add options to your themes or plugins with as little or as much coding as you want. Just create an array of your options, the rest is automated. If you need extra flexibility you can then use the powerful API provided to achieve any level of customization.
5
  Author: Synved
6
- Version: 1.3.9
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
3
  Module Name: Synved Option
4
  Description: Easily add options to your themes or plugins with as little or as much coding as you want. Just create an array of your options, the rest is automated. If you need extra flexibility you can then use the powerful API provided to achieve any level of customization.
5
  Author: Synved
6
+ Version: 1.4.1
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
synved-social/synved-social-setup.php CHANGED
@@ -142,6 +142,10 @@ $synved_social_options = array(
142
  'default' => false, 'label' => __('Display Sharing Buttons', 'synved-social'),
143
  'tip' => __('Tries to automatically append sharing buttons to your posts (disable for specific posts by setting custom field synved_social_exclude or synved_social_exclude_share to yes)', 'synved-social')
144
  ),
 
 
 
 
145
  'automatic_share_post_types' => array(
146
  'type' => 'custom',
147
  'default' => 'post',
@@ -154,6 +158,10 @@ $synved_social_options = array(
154
  'default' => false, 'label' => __('Display Follow Buttons', 'synved-social'),
155
  'tip' => __('Tries to automatically append follow buttons to your posts (disable for specific posts by setting custom field synved_social_exclude or synved_social_exclude_follow to yes)', 'synved-social')
156
  ),
 
 
 
 
157
  'automatic_follow_post_types' => array(
158
  'type' => 'custom',
159
  'default' => 'post',
@@ -637,6 +645,16 @@ function synved_social_wp_the_content($content, $id = null)
637
  $exclude = get_post_meta($id, 'synved_social_exclude', true) == 'yes' ? true : false;
638
  $exclude_share = get_post_meta($id, 'synved_social_exclude_share', true) == 'yes' ? true : false;
639
  $exclude_follow = get_post_meta($id, 'synved_social_exclude_follow', true) == 'yes' ? true : false;
 
 
 
 
 
 
 
 
 
 
640
  }
641
 
642
  if ($exclude == false)
142
  'default' => false, 'label' => __('Display Sharing Buttons', 'synved-social'),
143
  'tip' => __('Tries to automatically append sharing buttons to your posts (disable for specific posts by setting custom field synved_social_exclude or synved_social_exclude_share to yes)', 'synved-social')
144
  ),
145
+ 'automatic_share_single' => array(
146
+ 'default' => false, 'label' => __('Sharing Single Posts', 'synved-social'),
147
+ 'tip' => __('Sharing buttons are only displayed on single posts/pages and not on archive pages like blog/category/tag/author pages', 'synved-social')
148
+ ),
149
  'automatic_share_post_types' => array(
150
  'type' => 'custom',
151
  'default' => 'post',
158
  'default' => false, 'label' => __('Display Follow Buttons', 'synved-social'),
159
  'tip' => __('Tries to automatically append follow buttons to your posts (disable for specific posts by setting custom field synved_social_exclude or synved_social_exclude_follow to yes)', 'synved-social')
160
  ),
161
+ 'automatic_follow_single' => array(
162
+ 'default' => false, 'label' => __('Follow Single Posts', 'synved-social'),
163
+ 'tip' => __('Follow buttons are only displayed on single posts/pages and not on archive pages like blog/category/tag/author pages', 'synved-social')
164
+ ),
165
  'automatic_follow_post_types' => array(
166
  'type' => 'custom',
167
  'default' => 'post',
645
  $exclude = get_post_meta($id, 'synved_social_exclude', true) == 'yes' ? true : false;
646
  $exclude_share = get_post_meta($id, 'synved_social_exclude_share', true) == 'yes' ? true : false;
647
  $exclude_follow = get_post_meta($id, 'synved_social_exclude_follow', true) == 'yes' ? true : false;
648
+
649
+ if (!$exclude_share && synved_option_get('synved_social', 'automatic_share_single'))
650
+ {
651
+ $exclude_share = !is_single($id);
652
+ }
653
+
654
+ if (!$exclude_follow && synved_option_get('synved_social', 'automatic_follow_single'))
655
+ {
656
+ $exclude_follow = !is_single($id);
657
+ }
658
  }
659
 
660
  if ($exclude == false)
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.2.1
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', 100020001);
22
- define('SYNVED_SOCIAL_VERSION_STRING', '1.2.1');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
@@ -851,6 +851,7 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
851
  array(
852
  'tag' => 'img',
853
  'alt' => $button_key,
 
854
  'class' => 'synved-share-image',
855
  'width' => $size,
856
  'style' => 'width:' . $size . 'px;' . $style,
@@ -867,14 +868,17 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
867
 
868
  $out_list = apply_filters('synved_social_button_list_markup', $out_list, $out_params, $context, $vars, $params);
869
 
870
- foreach ($out_list as $button_key => $out_item)
871
  {
872
- $out .= synved_social_button_list_markup_item_out($out_item);
873
- }
 
 
874
 
875
- if (synved_option_get('synved_social', 'show_credit'))
876
- {
877
- $out .= '<a target="_blank" title="' . __('WordPress Social Media Feather', 'synved-social') . '" href="http://synved.com/wordpress-social-media-feather/" style="color:#444; text-decoration:none; font-size:8px; margin-left:5px;vertical-align:10px;white-space:nowrap;"><span>' . __('by ', 'synved-social') . '</span><img style="margin:0;padding:0;" alt="feather" src="' . $uri . '/image/icon.png" /></a>';
 
878
  }
879
 
880
  return $out;
3
  Module Name: Synved Social
4
  Description: Social sharing and following tools
5
  Author: Synved
6
+ Version: 1.2.2
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
18
 
19
 
20
  define('SYNVED_SOCIAL_LOADED', true);
21
+ define('SYNVED_SOCIAL_VERSION', 100020002);
22
+ define('SYNVED_SOCIAL_VERSION_STRING', '1.2.2');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
851
  array(
852
  'tag' => 'img',
853
  'alt' => $button_key,
854
+ 'title' => $title,
855
  'class' => 'synved-share-image',
856
  'width' => $size,
857
  'style' => 'width:' . $size . 'px;' . $style,
868
 
869
  $out_list = apply_filters('synved_social_button_list_markup', $out_list, $out_params, $context, $vars, $params);
870
 
871
+ if ($out_list != null)
872
  {
873
+ foreach ($out_list as $button_key => $out_item)
874
+ {
875
+ $out .= synved_social_button_list_markup_item_out($out_item);
876
+ }
877
 
878
+ if (synved_option_get('synved_social', 'show_credit'))
879
+ {
880
+ $out .= '<a target="_blank" rel="nofollow" title="' . __('WordPress Social Media Feather', 'synved-social') . '" href="http://synved.com/wordpress-social-media-feather/" style="color:#444; text-decoration:none; font-size:8px; margin-left:5px;vertical-align:10px;white-space:nowrap;"><span>' . __('by ', 'synved-social') . '</span><img style="margin:0;padding:0;" alt="feather" src="' . $uri . '/image/icon.png" /></a>';
881
+ }
882
  }
883
 
884
  return $out;