Social Media Feather | social media sharing - Version 1.6.3

Version Description

  • Additional fix for "ghost" prefixes appearing in odd cases for non-single pages
Download this release

Release Info

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

Code changes from version 1.3.1 to 1.6.3

Files changed (56) hide show
  1. readme.txt +112 -7
  2. social-media-feather.php +1 -1
  3. synved-connect/synved-connect-support.php +2 -2
  4. synved-connect/synved-connect.php +3 -3
  5. synved-option/addons/option-type-addon/option-type-addon.php +7 -2
  6. synved-option/addons/option-type-addon/script/custom.js +1 -1
  7. synved-option/synved-option-item.php +5 -0
  8. synved-option/synved-option-page.php +32 -4
  9. synved-option/synved-option.php +52 -18
  10. synved-plugout/synved-plugout-core.php +4 -4
  11. synved-plugout/synved-plugout.php +1 -1
  12. synved-social/image/social/regular/128x128/facebook.png +0 -0
  13. synved-social/image/social/regular/128x128/flickr.png +0 -0
  14. synved-social/image/social/regular/128x128/foursquare.png +0 -0
  15. synved-social/image/social/regular/128x128/instagram.png +0 -0
  16. synved-social/image/social/regular/128x128/tumblr.png +0 -0
  17. synved-social/image/social/regular/128x128/vimeo.png +0 -0
  18. synved-social/image/social/regular/16x16/facebook.png +0 -0
  19. synved-social/image/social/regular/16x16/flickr.png +0 -0
  20. synved-social/image/social/regular/16x16/foursquare.png +0 -0
  21. synved-social/image/social/regular/16x16/instagram.png +0 -0
  22. synved-social/image/social/regular/16x16/tumblr.png +0 -0
  23. synved-social/image/social/regular/16x16/vimeo.png +0 -0
  24. synved-social/image/social/regular/24x24/facebook.png +0 -0
  25. synved-social/image/social/regular/24x24/flickr.png +0 -0
  26. synved-social/image/social/regular/24x24/foursquare.png +0 -0
  27. synved-social/image/social/regular/24x24/instagram.png +0 -0
  28. synved-social/image/social/regular/24x24/tumblr.png +0 -0
  29. synved-social/image/social/regular/24x24/vimeo.png +0 -0
  30. synved-social/image/social/regular/32x32/facebook.png +0 -0
  31. synved-social/image/social/regular/32x32/flickr.png +0 -0
  32. synved-social/image/social/regular/32x32/foursquare.png +0 -0
  33. synved-social/image/social/regular/32x32/instagram.png +0 -0
  34. synved-social/image/social/regular/32x32/tumblr.png +0 -0
  35. synved-social/image/social/regular/32x32/vimeo.png +0 -0
  36. synved-social/image/social/regular/48x48/facebook.png +0 -0
  37. synved-social/image/social/regular/48x48/flickr.png +0 -0
  38. synved-social/image/social/regular/48x48/foursquare.png +0 -0
  39. synved-social/image/social/regular/48x48/instagram.png +0 -0
  40. synved-social/image/social/regular/48x48/tumblr.png +0 -0
  41. synved-social/image/social/regular/48x48/vimeo.png +0 -0
  42. synved-social/image/social/regular/64x64/facebook.png +0 -0
  43. synved-social/image/social/regular/64x64/flickr.png +0 -0
  44. synved-social/image/social/regular/64x64/foursquare.png +0 -0
  45. synved-social/image/social/regular/64x64/instagram.png +0 -0
  46. synved-social/image/social/regular/64x64/tumblr.png +0 -0
  47. synved-social/image/social/regular/64x64/vimeo.png +0 -0
  48. synved-social/image/social/regular/96x96/facebook.png +0 -0
  49. synved-social/image/social/regular/96x96/flickr.png +0 -0
  50. synved-social/image/social/regular/96x96/foursquare.png +0 -0
  51. synved-social/image/social/regular/96x96/instagram.png +0 -0
  52. synved-social/image/social/regular/96x96/tumblr.png +0 -0
  53. synved-social/image/social/regular/96x96/vimeo.png +0 -0
  54. synved-social/image/social/regular/preview.png +0 -0
  55. synved-social/synved-social-setup.php +166 -20
  56. synved-social/synved-social.php +223 -28
readme.txt CHANGED
@@ -1,9 +1,9 @@
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, page, pages, widget, CSS, list, media, profile, shortlinks, social, social media, Like, twitter, google, Facebook, Reddit, youtube, bookmark, bookmarks, bookmarking, pinterest, linkedin, image, edit, manage, mail, Post, posts, Style, seo, title, filter, follow, following, high resolution, retina, ipad
5
  Requires at least: 3.1
6
- Tested up to: 3.5.2
7
  Stable tag: trunk
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -26,17 +26,23 @@ By keeping load times at a minimum, you ensure that all the social sharing aspec
26
 
27
  On the other hand, given the widespread focus on WordPress social media integration, your site will still provide social bookmarks to improve visibility of your posts and content and improve your overall global reach.
28
 
29
- The WordPress social media sharing offered by the plugin includes all major social sharing providers like Facebook, Twitter, Google+, reddit, Pinterest, Linkedin and even e-mail.
 
 
 
 
30
 
31
  The plugin also offers widgets for sharing and following buttons that you can place in any widgetized area in your site. Widgets also expose some settings to tweak appearance.
32
 
 
 
33
  = Features =
34
  * Integrated WordPress social sharing
35
  * Full support for **Retina** and high resolution displays
36
  * WordPress social sharing and following widgets
37
  * Supports all major providers of social features
38
- * Sharing with Facebook, Twitter, Google+, reddit, Pinterest, Linkedin and e-mail
39
- * Following on Facebook, Twitter, Google+, Pinterest, Linkedin, YouTube or RSS Feed
40
  * Each social provider can be enabled or disabled
41
  * Ability to select what services each provider will be exposed for
42
  * Full customization for titles and URLs for each provider
@@ -45,6 +51,7 @@ The plugin also offers widgets for sharing and following buttons that you can pl
45
  * Comes with a default modern icon set
46
  * For further customization more [social icons skins](http://synved.com/product/feather-extra-social-icons/ "Add 8 extra social icon skins to the Social Media Feather plugin!") are available
47
  * Available skins can be customized with cool effects like [fading and greying out](http://synved.com/product/feather-grey-fade/ "Customize any of the available social icon skins with 2 cool effects!") social icons
 
48
 
49
  = Example Shortcodes =
50
 
@@ -71,10 +78,10 @@ The next shortcode will create a list of social following buttons that allow vis
71
  If you don't want to use shortcodes but instead prefer to use PHP directly, there are 2 PHP functions/template tags you can use.
72
 
73
  For sharing buttons you can use:
74
- `if (function_exists('synved_social_share_markup')) synved_social_share_markup();`
75
 
76
  For following buttons you can use:
77
- `if (function_exists('synved_social_follow_markup')) synved_social_follow_markup();`
78
 
79
 
80
  = Related Links: =
@@ -99,6 +106,14 @@ For following buttons you can use:
99
 
100
  Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio theme demo](http://wpdemo.synved.com/stripefolio/) where you can see the social sharing and following features in action
101
 
 
 
 
 
 
 
 
 
102
  == Screenshots ==
103
 
104
  1. An example of how the sharing or following buttons appear in the front-end at 64 pixel resolution
@@ -111,6 +126,96 @@ Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio them
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  = 1.3.1 =
115
  * Tweak the new Retina display code to work more accurately
116
  * Fix for share URL being incorrect in certain cases
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
5
  Requires at least: 3.1
6
+ Tested up to: 3.9.1
7
  Stable tag: trunk
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
26
 
27
  On the other hand, given the widespread focus on WordPress social media integration, your site will still provide social bookmarks to improve visibility of your posts and content and improve your overall global reach.
28
 
29
+ The **WordPress social media sharing** offered by the plugin includes all major social sharing providers like Facebook, Twitter, Google+, reddit, Pinterest, tumblr, Linkedin and even e-mail.
30
+
31
+ It will show social buttons that your users can click to share to facebook or tweet your posts and pages on your site or submit it to reddit and google plus and all other social sharing networks.
32
+
33
+ The **WordPress social media following** offered by the plugin includes all major social network providers and tools like Facebook, Twitter, Google+, Pinterest, Linkedin, YouTube, tumblr, instagram, flickr, foursquare, vimeo or RSS.
34
 
35
  The plugin also offers widgets for sharing and following buttons that you can place in any widgetized area in your site. Widgets also expose some settings to tweak appearance.
36
 
37
+ 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.
38
+
39
  = Features =
40
  * Integrated WordPress social sharing
41
  * Full support for **Retina** and high resolution displays
42
  * WordPress social sharing and following widgets
43
  * Supports all major providers of social features
44
+ * Sharing with Facebook, Twitter, Google+, reddit, Pinterest, tumblr, Linkedin and e-mail
45
+ * Following on Facebook, Twitter, Google+, Pinterest, Linkedin, YouTube, tumblr, instagram, flickr, foursquare, vimeo or RSS Feed
46
  * Each social provider can be enabled or disabled
47
  * Ability to select what services each provider will be exposed for
48
  * Full customization for titles and URLs for each provider
51
  * Comes with a default modern icon set
52
  * For further customization more [social icons skins](http://synved.com/product/feather-extra-social-icons/ "Add 8 extra social icon skins to the Social Media Feather plugin!") are available
53
  * Available skins can be customized with cool effects like [fading and greying out](http://synved.com/product/feather-grey-fade/ "Customize any of the available social icon skins with 2 cool effects!") social icons
54
+ * If you like them you can get [social sharing counters](http://synved.com/product/feather-light-prompt/ "Nice lightweight social sharing counters using the Light Prompt addon") that load dynamically, only when necessary, thus not weighing in on visitors who don't use them
55
 
56
  = Example Shortcodes =
57
 
78
  If you don't want to use shortcodes but instead prefer to use PHP directly, there are 2 PHP functions/template tags you can use.
79
 
80
  For sharing buttons you can use:
81
+ `if (function_exists('synved_social_share_markup')) echo synved_social_share_markup();`
82
 
83
  For following buttons you can use:
84
+ `if (function_exists('synved_social_follow_markup')) echo synved_social_follow_markup();`
85
 
86
 
87
  = Related Links: =
106
 
107
  Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio theme demo](http://wpdemo.synved.com/stripefolio/) where you can see the social sharing and following features in action
108
 
109
+ = How do I disable rendering of sharing / bookmarking buttons on a specific post/page? =
110
+
111
+ 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.
112
+
113
+ = How do I disable rendering of follow buttons on a specific post/page? =
114
+
115
+ 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.
116
+
117
  == Screenshots ==
118
 
119
  1. An example of how the sharing or following buttons appear in the front-end at 64 pixel resolution
126
 
127
  == Changelog ==
128
 
129
+ = 1.6.3 =
130
+ * Additional fix for "ghost" prefixes appearing in odd cases for non-single pages
131
+
132
+ = 1.6.2 =
133
+ * Fix for "ghost" prefixes appearing in certain cases for non-single pages
134
+
135
+ = 1.6.1 =
136
+ * Adjusted some descriptions
137
+
138
+ = 1.6 =
139
+ * Added alignment options for both sharing and following buttons
140
+ * Minor adjustments
141
+
142
+ = 1.5.10 =
143
+ * Added date variable
144
+ * Minor adjustments
145
+
146
+ = 1.5.9 =
147
+ * Fix for RSS feeds displaying double resolution images
148
+ * Minor adjustments
149
+
150
+ = 1.5.8 =
151
+ * Attempt suggesting meta values to Facebook (it seems to ignore them at this time though)
152
+ * Fix for esc_url strictness
153
+ * Minor adjustments
154
+
155
+ = 1.5.7 =
156
+ * Fixed escaping of quote and double quote characters
157
+ * Added mail as follow provider for "contact us" buttons
158
+ * Minor adjustments
159
+
160
+ = 1.5.6 =
161
+ * Added %%author%% template variable for URL substitution
162
+ * Minor tweaks
163
+
164
+ = 1.5.5 =
165
+ * For automatic display, allow positioning of buttons both before and after post content
166
+ * Minor adjustments
167
+
168
+ = 1.5.4 =
169
+ * Pick first image in the post when featured image is not set
170
+ * Minor adjustments
171
+
172
+ = 1.5.3 =
173
+ * Added buttons container options
174
+ * Misc adjustments
175
+
176
+ = 1.5.2 =
177
+ * Small fix to default URL
178
+ * Appearance fix in admin settings page
179
+ * Fixed typo
180
+
181
+ = 1.5.1 =
182
+ * Updated Facebook icons according to newest branding changes
183
+
184
+ = 1.5 =
185
+ * Added social providers instagram, flickr and foursquare
186
+
187
+ = 1.4.4 =
188
+ * Fixed titles not displaying certain special characters properly
189
+ * Misc adjustments
190
+
191
+ = 1.4.3 =
192
+ * Fixed share URL being incorrect in some instances like subdir installs
193
+ * Misc adjustments
194
+
195
+ = 1.4.2 =
196
+ * Fixed some issues on certain windows hosting
197
+ * Fixed installation of addons in certain peculiar environments
198
+ * Added option for RTL layouts sites
199
+
200
+ = 1.4.1 =
201
+ * Minor fixes and adjustments
202
+
203
+ = 1.4.0 =
204
+ * Added social providers tumblr and vimeo
205
+ * Assorted minor fixes and tweaks
206
+
207
+ = 1.3.4 =
208
+ * Fix for potential conflicts with some other plugins
209
+
210
+ = 1.3.3 =
211
+ * Fixed validation error for e-mail link
212
+ * Fixed invalid index notices
213
+
214
+ = 1.3.2 =
215
+ * Added ability to specify position for both share and follow buttons
216
+ * Added options for prefix and postfix markup for individual buttons sets
217
+ * Fixed warning when in debug mode
218
+
219
  = 1.3.1 =
220
  * Tweak the new Retina display code to work more accurately
221
  * Fix for share URL being incorrect in certain cases
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.3.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.6.3
8
  Author URI: http://synved.com/
9
 
10
  LEGAL STATEMENTS
synved-connect/synved-connect-support.php CHANGED
@@ -6,7 +6,7 @@ function synved_connect_support_social_follow_render()
6
 
7
  $out = null;
8
 
9
- $out .= '<div class="synved-connect-notice" style="position:fixed; right:30px; top:60px; width:220px; background:#f2f2f2; font-size:110%; color:#444; padding:16px 18px 16px 18px;">';
10
 
11
  $out .= '<a href="#" style="font-size:8px; position:absolute; top:0px; right:0px; margin-right: 5px;" onclick="' . esc_attr('jQuery(this).parents(\'.synved-connect-notice\').find(\'.notice-extra\').slideToggle(\'slow\'); return false;') . '">' . __('toggle', 'synved-connect') . '</a>';
12
 
@@ -15,7 +15,7 @@ function synved_connect_support_social_follow_render()
15
  $out .= '</div>';
16
 
17
  $out .= '<div class="notice-extra" style="margin:8px 0 0 0; padding:8px 10px; border:dotted 1px #bbb;">';
18
- $out .= '<a style="display:block; line-height:32px; height:32px;" target="_blank" href="http://synved.com/about/contact/?subject=Quote%20Request" title="' . __('Hire Us!', 'synved-connect') . '"><img style="vertical-align:middle;" alt="hire_us" src="' . esc_url($uri . '/image/hire.png') . '" /><span style="line-height:normal; vertical-align:middle; margin-left:8px;">' . __('Request a FREE quote!', 'synved-connect') . '</span></a><div style="font-size:75%; color:#888; line-height:normal; text-align:center; margin-top:5px;">' . __('For any WordPress development', 'synved-connect') . '</div>';
19
  $out .= '</div>';
20
 
21
  $out .= '<div class="notice-extra notice-secondary">';
6
 
7
  $out = null;
8
 
9
+ $out .= '<div class="synved-connect-notice" style="position:fixed; right:30px; top:60px; width:220px; background:#ececec; font-size:110%; color:#444; padding:16px 18px 16px 18px;">';
10
 
11
  $out .= '<a href="#" style="font-size:8px; position:absolute; top:0px; right:0px; margin-right: 5px;" onclick="' . esc_attr('jQuery(this).parents(\'.synved-connect-notice\').find(\'.notice-extra\').slideToggle(\'slow\'); return false;') . '">' . __('toggle', 'synved-connect') . '</a>';
12
 
15
  $out .= '</div>';
16
 
17
  $out .= '<div class="notice-extra" style="margin:8px 0 0 0; padding:8px 10px; border:dotted 1px #bbb;">';
18
+ $out .= '<a style="display:block; line-height:32px; height:32px;" target="_blank" href="http://synved.com/about/contact/?subject=Quote%20Request" title="' . __('Hire Us!', 'synved-connect') . '"><img style="vertical-align:middle;" alt="hire_us" src="' . esc_url($uri . '/image/hire.png') . '" /><span style="line-height:normal; vertical-align:middle; margin-left:8px;">' . __('Hire Us!', 'synved-connect') . '</span></a><div style="font-size:75%; color:#888; line-height:normal; text-align:center; margin-top:5px;">' . __('For any WordPress development', 'synved-connect') . '</div>';
19
  $out .= '</div>';
20
 
21
  $out .= '<div class="notice-extra notice-secondary">';
synved-connect/synved-connect.php CHANGED
@@ -3,7 +3,7 @@
3
  Module Name: Synved Connect
4
  Description: Connect and sync components in a WordPress installation with a remote server
5
  Author: Synved
6
- Version: 1.0
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
@@ -24,8 +24,8 @@ include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'synved-connect-sponsor.p
24
 
25
 
26
  define('SYNVED_CONNECT_LOADED', true);
27
- define('SYNVED_CONNECT_VERSION', 100000000);
28
- define('SYNVED_CONNECT_VERSION_STRING', '1.0');
29
 
30
 
31
  $synved_connect = array();
3
  Module Name: Synved Connect
4
  Description: Connect and sync components in a WordPress installation with a remote server
5
  Author: Synved
6
+ Version: 1.0.1
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
24
 
25
 
26
  define('SYNVED_CONNECT_LOADED', true);
27
+ define('SYNVED_CONNECT_VERSION', 100000001);
28
+ define('SYNVED_CONNECT_VERSION_STRING', '1.0.1');
29
 
30
 
31
  $synved_connect = array();
synved-option/addons/option-type-addon/option-type-addon.php CHANGED
@@ -2,7 +2,11 @@
2
 
3
  if (!function_exists('synved_option_render_type_addon'))
4
  {
5
-
 
 
 
 
6
  function synved_option_render_type_addon($id, $name, $item, $out_name, $extra = null)
7
  {
8
  $type = synved_option_item_type($item);
@@ -62,7 +66,8 @@ function synved_option_item_addon_install($id, $name, $item)
62
 
63
  $dirs = glob($path . '*', GLOB_ONLYDIR);
64
 
65
- $return = unzip_file($tmpfname, $path);
 
66
 
67
  if ($wp_filesystem != null)
68
  {
2
 
3
  if (!function_exists('synved_option_render_type_addon'))
4
  {
5
+ function synved_option_addon_type_addon_version()
6
+ {
7
+ return 100000002;
8
+ }
9
+
10
  function synved_option_render_type_addon($id, $name, $item, $out_name, $extra = null)
11
  {
12
  $type = synved_option_item_type($item);
66
 
67
  $dirs = glob($path . '*', GLOB_ONLYDIR);
68
 
69
+ wp_mkdir_p(realpath($path));
70
+ $return = unzip_file($tmpfname, realpath($path));
71
 
72
  if ($wp_filesystem != null)
73
  {
synved-option/addons/option-type-addon/script/custom.js CHANGED
@@ -8,7 +8,7 @@
8
  jQuery(document).ready(function() {
9
 
10
  jQuery('.synved-option-overlay-button').click(function() {
11
- tb_show(this.value, SynvedOptionVars.ajaxurl);
12
  var tb = jQuery("#TB_window");
13
 
14
  if (tb)
8
  jQuery(document).ready(function() {
9
 
10
  jQuery('.synved-option-overlay-button').click(function() {
11
+ tb_show(this.value, '#TB_inline');
12
  var tb = jQuery("#TB_window");
13
 
14
  if (tb)
synved-option/synved-option-item.php CHANGED
@@ -551,6 +551,11 @@ function synved_option_item_render(array $item)
551
  return synved_option_item_callback($item, 'render', '$value, $params, $name, $id, $item');
552
  }
553
 
 
 
 
 
 
554
  function synved_option_item_sanitize(array $item)
555
  {
556
  return synved_option_item_callback($item, 'sanitize', '$value, $name, $id, $item');
551
  return synved_option_item_callback($item, 'render', '$value, $params, $name, $id, $item');
552
  }
553
 
554
+ function synved_option_item_render_fragment(array $item)
555
+ {
556
+ return synved_option_item_callback($item, 'render-fragment', '$fragment, $output, $params, $name, $id, $item');
557
+ }
558
+
559
  function synved_option_item_sanitize(array $item)
560
  {
561
  return synved_option_item_callback($item, 'sanitize', '$value, $name, $id, $item');
synved-option/synved-option-page.php CHANGED
@@ -26,7 +26,7 @@ function synved_option_page_slug($id, $name, $item = null)
26
  {
27
  global $synved_option_list;
28
 
29
- if (isset($synved_option_list[$id]['pages'][$name]))
30
  {
31
  return $synved_option_list[$id]['pages'][$name]['wp-page-slug'];
32
  }
@@ -73,8 +73,7 @@ function synved_option_page_cb($id, $name, $item)
73
  if ($title === null)
74
  {
75
  $title = $label;
76
- }
77
-
78
  ?>
79
  <div class="wrap">
80
  <div class="icon32" id="icon-options-general"><br/></div>
@@ -84,10 +83,39 @@ function synved_option_page_cb($id, $name, $item)
84
  <?php settings_fields($group); ?>
85
  <?php
86
  $page_slug = synved_option_page_slug($id, $name, $item);
87
- synved_option_render_page($page_slug);
88
  ?>
89
  <p class="submit">
90
  <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  </p>
92
  </form>
93
  </div>
26
  {
27
  global $synved_option_list;
28
 
29
+ if (isset($synved_option_list[$id]['pages'][$name]['wp-page-slug']))
30
  {
31
  return $synved_option_list[$id]['pages'][$name]['wp-page-slug'];
32
  }
73
  if ($title === null)
74
  {
75
  $title = $label;
76
+ }
 
77
  ?>
78
  <div class="wrap">
79
  <div class="icon32" id="icon-options-general"><br/></div>
83
  <?php settings_fields($group); ?>
84
  <?php
85
  $page_slug = synved_option_page_slug($id, $name, $item);
86
+ synved_option_render_page($page_slug);
87
  ?>
88
  <p class="submit">
89
  <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
90
+ <?php
91
+ $render_fragment = synved_option_item_render_fragment($item);
92
+ $out = null;
93
+
94
+ if ($render_fragment != null)
95
+ {
96
+ $error = null;
97
+ $new_out = null;
98
+
99
+ try
100
+ {
101
+ $params = array();
102
+ $new_out = $render_fragment->Invoke(array('page-submit-tail', '', $params, $name, $id, $item));
103
+ }
104
+ catch (Exception $ex)
105
+ {
106
+ $new_out = null;
107
+
108
+ $error = $ex->getMessage();
109
+ }
110
+
111
+ if ($new_out !== null)
112
+ {
113
+ $out = $new_out;
114
+ }
115
+ }
116
+
117
+ echo $out;
118
+ ?>
119
  </p>
120
  </form>
121
  </div>
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.4.2
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
@@ -25,8 +25,8 @@ include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'synved-option-setting.ph
25
 
26
 
27
  define('SYNVED_OPTION_LOADED', true);
28
- define('SYNVED_OPTION_VERSION', 100040002);
29
- define('SYNVED_OPTION_VERSION_STRING', '1.4.2');
30
 
31
 
32
  $synved_option = array();
@@ -854,6 +854,11 @@ function synved_option_wp_upgrader_source_selection($source, $remote_source, $ob
854
 
855
  function synved_option_wp_upgrader_pre_install($perform, $extra)
856
  {
 
 
 
 
 
857
  $upgrade_transfer = get_option('synved_option_wp_upgrade_addon_transfer');
858
 
859
  if ($upgrade_transfer != null)
@@ -889,7 +894,7 @@ function synved_option_wp_upgrader_pre_install($perform, $extra)
889
 
890
  $dir = get_temp_dir();
891
  $name = time();
892
- $dir = $dir . wp_unique_filename($dir, $name) . DIRECTORY_SEPARATOR;
893
  $list = array();
894
 
895
  foreach ($module_list as $module_id)
@@ -983,7 +988,7 @@ function synved_option_wp_plugin_action_links($links, $file)
983
  {
984
  $link_label = synved_option_item_property($page, 'link-label');
985
  $link_target = synved_option_item_property($page, 'link-target');
986
- $link_url = synved_option_page_link_url($id, $name, $item);
987
 
988
  if ($link_label == null)
989
  {
@@ -1006,23 +1011,52 @@ function synved_option_admin_enqueue_scripts()
1006
  $uri = synved_option_path_uri();
1007
 
1008
  wp_register_style('synved-option-jquery-ui', $uri . '/jqueryUI/css/snvdopt/jquery-ui-1.9.2.custom.min.css', false, '1.9.2');
1009
- wp_register_style('synved-option-admin', $uri . '/style/admin.css', array('wp-jquery-ui-dialog'), '1.0');
1010
 
1011
  wp_register_script('synved-option-script-custom', $uri . '/script/custom.js', array('jquery', 'suggest', 'media-upload', 'thickbox', 'jquery-ui-core', 'jquery-ui-progressbar', 'jquery-ui-dialog'), '1.0.0');
1012
  wp_localize_script('synved-option-script-custom', 'SynvedOptionVars', array('flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'ajaxurl' => admin_url('admin-ajax.php'), 'synvedSecurity' => wp_create_nonce('synved-option-submit-nonce')));
1013
 
1014
- wp_enqueue_style('thickbox');
1015
- wp_enqueue_style('farbtastic');
1016
- wp_enqueue_style('wp-pointer');
1017
- wp_enqueue_style('synved-option-jquery-ui');
1018
- wp_enqueue_style('synved-option-admin');
1019
-
1020
- wp_enqueue_script('plupload-all');
1021
- wp_enqueue_script('media-upload');
1022
- wp_enqueue_script('suggest');
1023
- wp_enqueue_script('thickbox');
1024
- wp_enqueue_script('farbtastic');
1025
- wp_enqueue_script('synved-option-script-custom');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1026
  }
1027
 
1028
  function synved_option_ajax()
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.7
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
25
 
26
 
27
  define('SYNVED_OPTION_LOADED', true);
28
+ define('SYNVED_OPTION_VERSION', 100040007);
29
+ define('SYNVED_OPTION_VERSION_STRING', '1.4.7');
30
 
31
 
32
  $synved_option = array();
854
 
855
  function synved_option_wp_upgrader_pre_install($perform, $extra)
856
  {
857
+ if (!isset($extra['plugin']))
858
+ {
859
+ return $perform;
860
+ }
861
+
862
  $upgrade_transfer = get_option('synved_option_wp_upgrade_addon_transfer');
863
 
864
  if ($upgrade_transfer != null)
894
 
895
  $dir = get_temp_dir();
896
  $name = time();
897
+ $dir = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . wp_unique_filename($dir, $name) . DIRECTORY_SEPARATOR;
898
  $list = array();
899
 
900
  foreach ($module_list as $module_id)
988
  {
989
  $link_label = synved_option_item_property($page, 'link-label');
990
  $link_target = synved_option_item_property($page, 'link-target');
991
+ $link_url = synved_option_page_link_url($id, $name, $page);
992
 
993
  if ($link_label == null)
994
  {
1011
  $uri = synved_option_path_uri();
1012
 
1013
  wp_register_style('synved-option-jquery-ui', $uri . '/jqueryUI/css/snvdopt/jquery-ui-1.9.2.custom.min.css', false, '1.9.2');
1014
+ wp_register_style('synved-option-admin', $uri . '/style/admin.css', array('wp-jquery-ui-dialog', 'synved-option-jquery-ui'), '1.0');
1015
 
1016
  wp_register_script('synved-option-script-custom', $uri . '/script/custom.js', array('jquery', 'suggest', 'media-upload', 'thickbox', 'jquery-ui-core', 'jquery-ui-progressbar', 'jquery-ui-dialog'), '1.0.0');
1017
  wp_localize_script('synved-option-script-custom', 'SynvedOptionVars', array('flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'ajaxurl' => admin_url('admin-ajax.php'), 'synvedSecurity' => wp_create_nonce('synved-option-submit-nonce')));
1018
 
1019
+ $page = isset($_GET['page']) ? $_GET['page'] : null;
1020
+ $enqueue = false;
1021
+
1022
+ global $synved_option_list;
1023
+
1024
+ if ($synved_option_list != null)
1025
+ {
1026
+ foreach ($synved_option_list as $id => $list)
1027
+ {
1028
+ if (isset($list['pages']) && $list['pages'] != null)
1029
+ {
1030
+ $page_list = $list['pages'];
1031
+
1032
+ foreach ($page_list as $name => $page_object)
1033
+ {
1034
+ if ($page == synved_option_page_slug($id, $name))
1035
+ {
1036
+ $enqueue = true;
1037
+
1038
+ break;
1039
+ }
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+
1045
+ if ($enqueue)
1046
+ {
1047
+ wp_enqueue_style('thickbox');
1048
+ wp_enqueue_style('farbtastic');
1049
+ wp_enqueue_style('wp-pointer');
1050
+ wp_enqueue_style('synved-option-jquery-ui');
1051
+ wp_enqueue_style('synved-option-admin');
1052
+
1053
+ wp_enqueue_script('plupload-all');
1054
+ wp_enqueue_script('media-upload');
1055
+ wp_enqueue_script('suggest');
1056
+ wp_enqueue_script('thickbox');
1057
+ wp_enqueue_script('farbtastic');
1058
+ wp_enqueue_script('synved-option-script-custom');
1059
+ }
1060
  }
1061
 
1062
  function synved_option_ajax()
synved-plugout/synved-plugout-core.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
  define('SYNVED_PLUGOUT_LOADED', true);
4
- define('SYNVED_PLUGOUT_VERSION', 100000001);
5
- define('SYNVED_PLUGOUT_VERSION_STRING', '1.0.1');
6
 
7
 
8
  $synved_plugout = array();
@@ -224,8 +224,8 @@ function synved_plugout_module_uri_get($module_id)
224
 
225
  if ($directory != null)
226
  {
227
- $directory = strtolower($directory);
228
- $content_dir = strtolower(WP_CONTENT_DIR);
229
  $base_len = strlen($content_dir);
230
 
231
  if (substr($directory, 0, $base_len) == $content_dir)
1
  <?php
2
 
3
  define('SYNVED_PLUGOUT_LOADED', true);
4
+ define('SYNVED_PLUGOUT_VERSION', 100000002);
5
+ define('SYNVED_PLUGOUT_VERSION_STRING', '1.0.2');
6
 
7
 
8
  $synved_plugout = array();
224
 
225
  if ($directory != null)
226
  {
227
+ $directory = strtolower(str_replace(array('\\', '/'), '/', $directory));
228
+ $content_dir = strtolower(str_replace(array('\\', '/'), '/', WP_CONTENT_DIR));
229
  $base_len = strlen($content_dir);
230
 
231
  if (substr($directory, 0, $base_len) == $content_dir)
synved-plugout/synved-plugout.php CHANGED
@@ -3,7 +3,7 @@
3
  Module Name: Synved PlugOut
4
  Description: Allows to embed modules/plugins transparently into themes or other plugins without creating conflicts with externally installed plugins
5
  Author: Synved Ltd.
6
- Version: 1.0
7
  Author URI: http://www.synved.com/
8
 
9
  LEGAL STATEMENTS
3
  Module Name: Synved PlugOut
4
  Description: Allows to embed modules/plugins transparently into themes or other plugins without creating conflicts with externally installed plugins
5
  Author: Synved Ltd.
6
+ Version: 1.0.2
7
  Author URI: http://www.synved.com/
8
 
9
  LEGAL STATEMENTS
synved-social/image/social/regular/128x128/facebook.png CHANGED
Binary file
synved-social/image/social/regular/128x128/flickr.png ADDED
Binary file
synved-social/image/social/regular/128x128/foursquare.png ADDED
Binary file
synved-social/image/social/regular/128x128/instagram.png ADDED
Binary file
synved-social/image/social/regular/128x128/tumblr.png ADDED
Binary file
synved-social/image/social/regular/128x128/vimeo.png ADDED
Binary file
synved-social/image/social/regular/16x16/facebook.png CHANGED
Binary file
synved-social/image/social/regular/16x16/flickr.png ADDED
Binary file
synved-social/image/social/regular/16x16/foursquare.png ADDED
Binary file
synved-social/image/social/regular/16x16/instagram.png ADDED
Binary file
synved-social/image/social/regular/16x16/tumblr.png ADDED
Binary file
synved-social/image/social/regular/16x16/vimeo.png ADDED
Binary file
synved-social/image/social/regular/24x24/facebook.png CHANGED
Binary file
synved-social/image/social/regular/24x24/flickr.png ADDED
Binary file
synved-social/image/social/regular/24x24/foursquare.png ADDED
Binary file
synved-social/image/social/regular/24x24/instagram.png ADDED
Binary file
synved-social/image/social/regular/24x24/tumblr.png ADDED
Binary file
synved-social/image/social/regular/24x24/vimeo.png ADDED
Binary file
synved-social/image/social/regular/32x32/facebook.png CHANGED
Binary file
synved-social/image/social/regular/32x32/flickr.png ADDED
Binary file
synved-social/image/social/regular/32x32/foursquare.png ADDED
Binary file
synved-social/image/social/regular/32x32/instagram.png ADDED
Binary file
synved-social/image/social/regular/32x32/tumblr.png ADDED
Binary file
synved-social/image/social/regular/32x32/vimeo.png ADDED
Binary file
synved-social/image/social/regular/48x48/facebook.png CHANGED
Binary file
synved-social/image/social/regular/48x48/flickr.png ADDED
Binary file
synved-social/image/social/regular/48x48/foursquare.png ADDED
Binary file
synved-social/image/social/regular/48x48/instagram.png ADDED
Binary file
synved-social/image/social/regular/48x48/tumblr.png ADDED
Binary file
synved-social/image/social/regular/48x48/vimeo.png ADDED
Binary file
synved-social/image/social/regular/64x64/facebook.png CHANGED
Binary file
synved-social/image/social/regular/64x64/flickr.png ADDED
Binary file
synved-social/image/social/regular/64x64/foursquare.png ADDED
Binary file
synved-social/image/social/regular/64x64/instagram.png ADDED
Binary file
synved-social/image/social/regular/64x64/tumblr.png ADDED
Binary file
synved-social/image/social/regular/64x64/vimeo.png ADDED
Binary file
synved-social/image/social/regular/96x96/facebook.png CHANGED
Binary file
synved-social/image/social/regular/96x96/flickr.png ADDED
Binary file
synved-social/image/social/regular/96x96/foursquare.png ADDED
Binary file
synved-social/image/social/regular/96x96/instagram.png ADDED
Binary file
synved-social/image/social/regular/96x96/tumblr.png ADDED
Binary file
synved-social/image/social/regular/96x96/vimeo.png ADDED
Binary file
synved-social/image/social/regular/preview.png CHANGED
Binary file
synved-social/synved-social-setup.php CHANGED
@@ -112,6 +112,7 @@ $synved_social_options = array(
112
  'title' => 'Social Media Feather',
113
  'tip' => synved_option_callback('synved_social_page_settings_tip'),
114
  'link-target' => plugin_basename(synved_plugout_module_path_get('synved-social', 'provider')),
 
115
  'sections' => array(
116
  'section_general' => array(
117
  'label' => __('General Settings', 'synved-social'),
@@ -123,7 +124,11 @@ $synved_social_options = array(
123
  ),
124
  'share_full_url' => array(
125
  'default' => false, 'label' => __('Share Full URL', 'synved-social'),
126
- 'tip' => __('Determines whether to always share the full URL or just the post permalink. You can override this for individual posts by setting the "synved_social_share_full_url" custom field to either "yes" or "no"', 'synved-social')
 
 
 
 
127
  ),
128
  'shortcode_widgets' => array(
129
  'default' => true, 'label' => __('Shortcodes In Widgets', 'synved-social'),
@@ -145,7 +150,13 @@ $synved_social_options = array(
145
  'settings' => array(
146
  'automatic_share' => array(
147
  'default' => false, 'label' => __('Display Sharing Buttons', 'synved-social'),
148
- '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')
 
 
 
 
 
 
149
  ),
150
  'automatic_share_single' => array(
151
  'default' => false, 'label' => __('Sharing Single Posts', 'synved-social'),
@@ -159,9 +170,23 @@ $synved_social_options = array(
159
  'tip' => __('Post types for which automatic appending for share buttons should be attempted (CTRL + click to select multiple ones)', 'synved-social'),
160
  'render' => 'synved_social_automatic_append_post_types_render'
161
  ),
 
 
 
 
 
 
 
 
162
  'automatic_follow' => array(
163
  'default' => false, 'label' => __('Display Follow Buttons', 'synved-social'),
164
- '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')
 
 
 
 
 
 
165
  ),
166
  'automatic_follow_single' => array(
167
  'default' => false, 'label' => __('Follow Single Posts', 'synved-social'),
@@ -177,7 +202,15 @@ $synved_social_options = array(
177
  ),
178
  'automatic_follow_before_share' => array(
179
  'default' => false, 'label' => __('Follow Before Share', 'synved-social'),
180
- 'tip' => __('When automatically appending, place follow buttons before share buttons', 'synved-social')
 
 
 
 
 
 
 
 
181
  ),
182
  'automatic_append_prefix' => array(
183
  'default' => '', 'label' => __('Prefix Markup', 'synved-social'),
@@ -185,7 +218,7 @@ $synved_social_options = array(
185
  ),
186
  'automatic_append_separator' => array(
187
  'default' => '<br/>', 'label' => __('Separator Markup', 'synved-social'),
188
- 'tip' => __('When automatically appending both, use this markup as separator between the set of share buttons and the set of follow buttons', 'synved-social')
189
  ),
190
  'automatic_append_postfix' => array(
191
  'default' => '', 'label' => __('Postfix Markup', 'synved-social'),
@@ -248,6 +281,30 @@ $synved_social_options = array(
248
  'label' => __('Icon Spacing', 'synved-social'),
249
  'tip' => __('Select the spacing in pixels between the icons', 'synved-social')
250
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  'custom_style' => array(
252
  'type' => 'style',
253
  'label' => __('Extra Styles', 'synved-social'),
@@ -295,6 +352,16 @@ function synved_social_page_settings_tip($tip, $item)
295
  return $tip;
296
  }
297
 
 
 
 
 
 
 
 
 
 
 
298
  function synved_social_section_customize_look_tip($tip, $item)
299
  {
300
  return $tip;
@@ -352,7 +419,7 @@ function synved_social_icon_skin_render($value, $params, $id, $name, $item)
352
  $img_src = $icons[$set_it_keys[0]]['image'];
353
  }
354
 
355
- $out .= '<div style="text-align:center; width:260px; float:left; margin-right:20px;"><label title="Use skin=&quot;' . esc_attr($set_it_keys[0]) . '&quot; in shortcodes"><img src="' . esc_url($img_src) . '" style="border:solid 1px #bbb" /><p><input type="radio" name="' . esc_attr($out_name) . '" value="' . esc_attr($set_it_keys[0]) . '"' . $selected . '/> ' . $set_it[$set_it_keys[0]] . '</p></label></div>';
356
  }
357
 
358
  $out .= '</div>';
@@ -672,8 +739,10 @@ function synved_social_wp_the_content($content, $id = null)
672
  $exclude_share = false;
673
  $exclude_follow = false;
674
 
675
- $extra = null;
676
- $separator = null;
 
 
677
 
678
  if ($id == null)
679
  {
@@ -713,13 +782,48 @@ function synved_social_wp_the_content($content, $id = null)
713
 
714
  if (in_array($post_type, $type_list))
715
  {
716
- $extra .= synved_social_share_markup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
717
  }
718
  }
 
 
719
 
720
- if ($extra != null)
721
  {
722
- $separator = synved_option_get('synved_social', 'automatic_append_separator');
 
 
 
 
 
723
  }
724
 
725
  if ($exclude_follow == false && synved_option_get('synved_social', 'automatic_follow'))
@@ -729,23 +833,63 @@ function synved_social_wp_the_content($content, $id = null)
729
 
730
  if (in_array($post_type, $type_list))
731
  {
732
- if (synved_option_get('synved_social', 'automatic_follow_before_share'))
 
 
 
 
 
 
733
  {
734
- $extra = synved_social_follow_markup() . $separator . $extra;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  }
736
- else
 
737
  {
738
- $extra .= $separator . synved_social_follow_markup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  }
740
  }
741
  }
742
 
743
- if ($extra != null)
744
- {
745
- $prefix = synved_option_get('synved_social', 'automatic_append_prefix');
746
- $postfix = synved_option_get('synved_social', 'automatic_append_postfix');
747
 
748
- $content .= $prefix . $extra . $postfix;
 
 
 
 
 
 
 
749
  }
750
  }
751
 
@@ -810,6 +954,8 @@ function synved_social_init()
810
  'skin' => __('Specify which skin to use for the icons', 'synved-social'),
811
  'size' => sprintf(__('Specify the size for the icons, possible values are %s', 'synved-social'), $size_set),
812
  'spacing' => __('Determines how much blank space there will be between the buttons, in pixels', 'synved-social'),
 
 
813
  'class' => __('Select additional CSS classes for the buttons, separated by spaces', 'synved-social'),
814
  );
815
 
112
  'title' => 'Social Media Feather',
113
  'tip' => synved_option_callback('synved_social_page_settings_tip'),
114
  'link-target' => plugin_basename(synved_plugout_module_path_get('synved-social', 'provider')),
115
+ 'render-fragment' => 'synved_social_page_render_fragment',
116
  'sections' => array(
117
  'section_general' => array(
118
  'label' => __('General Settings', 'synved-social'),
124
  ),
125
  'share_full_url' => array(
126
  'default' => false, 'label' => __('Share Full URL', 'synved-social'),
127
+ 'tip' => __('Determines whether to always share the full URL or just the post permalink. You can override this for individual posts by setting the "synved_social_share_full_url" custom field to either "yes" or "no", case sensitive', 'synved-social')
128
+ ),
129
+ 'layout_rtl' => array(
130
+ 'default' => false, 'label' => __('Right To Left Layout', 'synved-social'),
131
+ 'tip' => __('Check this option if you have a right-to-left site layout and icons show spacing issues', 'synved-social')
132
  ),
133
  'shortcode_widgets' => array(
134
  'default' => true, 'label' => __('Shortcodes In Widgets', 'synved-social'),
150
  'settings' => array(
151
  'automatic_share' => array(
152
  'default' => false, 'label' => __('Display Sharing Buttons', 'synved-social'),
153
+ '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", case sensitive)', 'synved-social')
154
+ ),
155
+ 'automatic_share_position' => array(
156
+ 'default' => 'after_post',
157
+ 'set' => 'after_post=After Post,before_post=Before Post,after_before_post=After and Before Post',
158
+ 'label' => __('Share Buttons Position', 'synved-social'),
159
+ 'tip' => __('Select where the sharing buttons should be placed. Note: placing buttons Before Post might not work in all themes.', 'synved-social')
160
  ),
161
  'automatic_share_single' => array(
162
  'default' => false, 'label' => __('Sharing Single Posts', 'synved-social'),
170
  'tip' => __('Post types for which automatic appending for share buttons should be attempted (CTRL + click to select multiple ones)', 'synved-social'),
171
  'render' => 'synved_social_automatic_append_post_types_render'
172
  ),
173
+ 'automatic_share_prefix' => array(
174
+ 'default' => '', 'label' => __('Share Prefix Markup', 'synved-social'),
175
+ 'tip' => __('When automatically appending, place this markup before the share buttons markup', 'synved-social')
176
+ ),
177
+ 'automatic_share_postfix' => array(
178
+ 'default' => '', 'label' => __('Share Postfix Markup', 'synved-social'),
179
+ 'tip' => __('When automatically appending, place this markup after all of the share buttons markup', 'synved-social')
180
+ ),
181
  'automatic_follow' => array(
182
  'default' => false, 'label' => __('Display Follow Buttons', 'synved-social'),
183
+ '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", case sensitive)', 'synved-social')
184
+ ),
185
+ 'automatic_follow_position' => array(
186
+ 'default' => 'after_post',
187
+ 'set' => 'after_post=After Post,before_post=Before Post,after_before_post=After and Before Post',
188
+ 'label' => __('Follow Buttons Position', 'synved-social'),
189
+ 'tip' => __('Select where the follow buttons should be placed. Note: placing buttons Before Post might not work in all themes.', 'synved-social')
190
  ),
191
  'automatic_follow_single' => array(
192
  'default' => false, 'label' => __('Follow Single Posts', 'synved-social'),
202
  ),
203
  'automatic_follow_before_share' => array(
204
  'default' => false, 'label' => __('Follow Before Share', 'synved-social'),
205
+ 'tip' => __('When automatically appending, place follow buttons before share buttons. Only valid when share and follow buttons positions are the same.', 'synved-social')
206
+ ),
207
+ 'automatic_follow_prefix' => array(
208
+ 'default' => '', 'label' => __('Follow Prefix Markup', 'synved-social'),
209
+ 'tip' => __('When automatically appending, place this markup before the follow buttons markup', 'synved-social')
210
+ ),
211
+ 'automatic_follow_postfix' => array(
212
+ 'default' => '', 'label' => __('Follow Postfix Markup', 'synved-social'),
213
+ 'tip' => __('When automatically appending, place this markup after all of the follow buttons markup', 'synved-social')
214
  ),
215
  'automatic_append_prefix' => array(
216
  'default' => '', 'label' => __('Prefix Markup', 'synved-social'),
218
  ),
219
  'automatic_append_separator' => array(
220
  'default' => '<br/>', 'label' => __('Separator Markup', 'synved-social'),
221
+ 'tip' => __('When automatically appending both, use this markup as separator between the set of share buttons and the set of follow buttons. Only valid when share and follow buttons positions are the same.', 'synved-social')
222
  ),
223
  'automatic_append_postfix' => array(
224
  'default' => '', 'label' => __('Postfix Markup', 'synved-social'),
281
  'label' => __('Icon Spacing', 'synved-social'),
282
  'tip' => __('Select the spacing in pixels between the icons', 'synved-social')
283
  ),
284
+ 'buttons_container' => array(
285
+ 'default' => 'none',
286
+ 'set' => 'none=None,share=Sharing Buttons,follow=Following Buttons,both=Both',
287
+ 'label' => __('Buttons in Container', 'synved-social'),
288
+ 'tip' => __('Determines whether or not to wrap the buttons in a container, which will affect how the buttons are rendered, based on the "Buttons Container Type" setting.', 'synved-social')
289
+ ),
290
+ 'buttons_container_type' => array(
291
+ 'default' => 'basic',
292
+ 'set' => 'basic=Basic,block=Block',
293
+ 'label' => __('Buttons Container Type', 'synved-social'),
294
+ 'tip' => __('"Basic" should not affect rendering, while "Block" should display the buttons in their own row. <b>Note</b>: selecting "Block" might not look the way you want if you\'re using Prefix or Postfix markup.', 'synved-social')
295
+ ),
296
+ 'buttons_alignment_share' => array(
297
+ 'default' => 'none',
298
+ 'set' => 'none=Theme Default,left=Align Left,right=Align Right,center=Align Center',
299
+ 'label' => __('Share Buttons Alignment', 'synved-social'),
300
+ 'tip' => __('Will attempt at aligning the share buttons accordingly. <strong>Note:</strong> this will enforce "Buttons Container Type" of "Block" and might not work reliably on all themes', 'synved-social')
301
+ ),
302
+ 'buttons_alignment_follow' => array(
303
+ 'default' => 'none',
304
+ 'set' => 'none=Theme Default,left=Align Left,right=Align Right,center=Align Center',
305
+ 'label' => __('Follow Buttons Alignment', 'synved-social'),
306
+ 'tip' => __('Will attempt at aligning the follow buttons accordingly. <strong>Note:</strong> this will enforce "Buttons Container Type" of "Block" and might not work reliably on all themes', 'synved-social')
307
+ ),
308
  'custom_style' => array(
309
  'type' => 'style',
310
  'label' => __('Extra Styles', 'synved-social'),
352
  return $tip;
353
  }
354
 
355
+ function synved_social_page_render_fragment($fragment, $out, $params)
356
+ {
357
+ if ($fragment == 'page-submit-tail')
358
+ {
359
+ $out .= '<div style="clear:both; margin-top: -12px;"><a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/social-media-feather?rate=5#postform">If you like the plugin, you can help us by leaving a 5 stars review!</a></div>';
360
+ }
361
+
362
+ return $out;
363
+ }
364
+
365
  function synved_social_section_customize_look_tip($tip, $item)
366
  {
367
  return $tip;
419
  $img_src = $icons[$set_it_keys[0]]['image'];
420
  }
421
 
422
+ $out .= '<div style="text-align:center; width:260px; float:left; margin-right:20px; margin-bottom: 15px;"><label title="Use skin=&quot;' . esc_attr($set_it_keys[0]) . '&quot; in shortcodes"><img src="' . esc_url($img_src) . '" style="border:solid 1px #bbb" /><p><input type="radio" name="' . esc_attr($out_name) . '" value="' . esc_attr($set_it_keys[0]) . '"' . $selected . '/> ' . $set_it[$set_it_keys[0]] . '</p></label></div>';
423
  }
424
 
425
  $out .= '</div>';
739
  $exclude_share = false;
740
  $exclude_follow = false;
741
 
742
+ $extra_after = null;
743
+ $extra_before = null;
744
+ $separator_after = null;
745
+ $separator_before = null;
746
 
747
  if ($id == null)
748
  {
782
 
783
  if (in_array($post_type, $type_list))
784
  {
785
+ $position = synved_option_get('synved_social', 'automatic_share_position');
786
+ $position_before = in_array($position, array('before_post', 'after_before_post'));
787
+ $position_after = in_array($position, array('after_post', 'after_before_post'));
788
+ $prefix = synved_option_get('synved_social', 'automatic_share_prefix');
789
+ $postfix = synved_option_get('synved_social', 'automatic_share_postfix');
790
+
791
+ if ($position_after)
792
+ {
793
+ $markup = synved_social_share_markup();
794
+
795
+ if (trim($markup) != null)
796
+ {
797
+ $markup = $prefix . $markup . $postfix;
798
+
799
+ $extra_after .= $markup;
800
+ }
801
+ }
802
+
803
+ if ($position_before)
804
+ {
805
+ $markup = synved_social_share_markup();
806
+
807
+ if (trim($markup) != null)
808
+ {
809
+ $markup = $prefix . $markup . $postfix;
810
+
811
+ $extra_before .= $markup;
812
+ }
813
+ }
814
  }
815
  }
816
+
817
+ $separator = synved_option_get('synved_social', 'automatic_append_separator');
818
 
819
+ if ($extra_after != null)
820
  {
821
+ $separator_after = $separator;
822
+ }
823
+
824
+ if ($extra_before != null)
825
+ {
826
+ $separator_before = $separator;
827
  }
828
 
829
  if ($exclude_follow == false && synved_option_get('synved_social', 'automatic_follow'))
833
 
834
  if (in_array($post_type, $type_list))
835
  {
836
+ $position = synved_option_get('synved_social', 'automatic_follow_position');
837
+ $position_before = in_array($position, array('before_post', 'after_before_post'));
838
+ $position_after = in_array($position, array('after_post', 'after_before_post'));
839
+ $prefix = synved_option_get('synved_social', 'automatic_follow_prefix');
840
+ $postfix = synved_option_get('synved_social', 'automatic_follow_postfix');
841
+
842
+ if ($position_after)
843
  {
844
+ $markup = synved_social_follow_markup();
845
+
846
+ if (trim($markup) != null)
847
+ {
848
+ $markup = $prefix . $markup . $postfix;
849
+
850
+ if (synved_option_get('synved_social', 'automatic_follow_before_share'))
851
+ {
852
+ $extra_after = $markup . $separator_after . $extra_after;
853
+ }
854
+ else
855
+ {
856
+ $extra_after .= $separator_after . $markup;
857
+ }
858
+ }
859
  }
860
+
861
+ if ($position_before)
862
  {
863
+ $markup = synved_social_follow_markup();
864
+
865
+ if (trim($markup) != null)
866
+ {
867
+ $markup = $prefix . $markup . $postfix;
868
+
869
+ if (synved_option_get('synved_social', 'automatic_follow_before_share'))
870
+ {
871
+ $extra_before = $markup . $separator_before . $extra_before;
872
+ }
873
+ else
874
+ {
875
+ $extra_before .= $separator_before . $markup;
876
+ }
877
+ }
878
  }
879
  }
880
  }
881
 
882
+ $prefix = synved_option_get('synved_social', 'automatic_append_prefix');
883
+ $postfix = synved_option_get('synved_social', 'automatic_append_postfix');
 
 
884
 
885
+ if ($extra_after != null)
886
+ {
887
+ $content .= $prefix . $extra_after . $postfix;
888
+ }
889
+
890
+ if ($extra_before != null)
891
+ {
892
+ $content = $prefix . $extra_before . $postfix . $content;
893
  }
894
  }
895
 
954
  'skin' => __('Specify which skin to use for the icons', 'synved-social'),
955
  'size' => sprintf(__('Specify the size for the icons, possible values are %s', 'synved-social'), $size_set),
956
  'spacing' => __('Determines how much blank space there will be between the buttons, in pixels', 'synved-social'),
957
+ 'container' => __('Determines whether to wrap the buttons in a container', 'synved-social'),
958
+ 'container_type' => sprintf(__('Determines what type of container to use, possible values are %1$s', 'synved-social'), 'basic, block'),
959
  'class' => __('Select additional CSS classes for the buttons, separated by spaces', 'synved-social'),
960
  );
961
 
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.3.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', 100030001);
22
- define('SYNVED_SOCIAL_VERSION_STRING', '1.3.1');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
@@ -66,6 +66,7 @@ class SynvedSocialWidget extends WP_Widget
66
  echo '<div>';
67
 
68
  $params = array();
 
69
 
70
  if ($icon_skin != 'default')
71
  {
@@ -211,7 +212,7 @@ function synved_social_service_provider_list($context, $raw = false)
211
  {
212
  $provider_list = array(
213
  'facebook' => array(
214
- 'link' => 'http://www.facebook.com/sharer.php?u=%%url%%&t=%%title%%',
215
  'title' => __('Share on Facebook')
216
  ),
217
  'twitter' => array(
@@ -234,6 +235,11 @@ function synved_social_service_provider_list($context, $raw = false)
234
  'link' => 'http://www.linkedin.com/shareArticle?mini=true&url=%%url%%&title=%%title%%',
235
  'title' => __('Share on Linkedin'),
236
  ),
 
 
 
 
 
237
  'mail' => array(
238
  'link' => 'mailto:?subject=%%title%%&body=%%message%%:%20%%url%%',
239
  'title' => __('Share by email'),
@@ -258,7 +264,7 @@ function synved_social_service_provider_list($context, $raw = false)
258
  'pinterest' => array(
259
  'link' => 'http://pinterest.com/MyUserName/',
260
  'title' => __('Our board on Pinterest'),
261
- 'default-display' => false
262
  ),
263
  'linkedin' => array(
264
  'link' => 'http://www.linkedin.com/in/yourid',
@@ -273,6 +279,36 @@ function synved_social_service_provider_list($context, $raw = false)
273
  'link' => 'http://www.youtube.com/MyYouTubeName',
274
  'title' => __('Find us on YouTube'),
275
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  );
277
  }
278
 
@@ -331,7 +367,7 @@ function synved_social_icon_skin_list()
331
  $icons = array_merge($icons, $icons_extra);
332
  }
333
 
334
- return apply_filters('synved_social_icon_skin_list', $icons);;
335
  }
336
 
337
  function synved_social_icon_skin_get($name = null)
@@ -501,7 +537,7 @@ function synved_social_icon_skin_get_image_list($skin, $name_list, $forced_size
501
  function synved_social_button_list_shortcode($atts, $content = null, $code = '', $context = null)
502
  {
503
  $vars_def = array('url' => null, 'title' => null);
504
- $params_def = array('skin' => null, 'size' => null, 'spacing' => null, 'class' => null, 'show' => null, 'hide' => null, 'prompt' => null, 'custom1' => null, 'custom2' => null, 'custom3' => null);
505
  $vars = shortcode_atts($vars_def, $atts);
506
  $params = shortcode_atts($params_def, $atts);
507
  $vars = array_filter($vars);
@@ -546,16 +582,20 @@ function synved_social_button_list_markup_item_out($out_item)
546
 
547
  foreach ($out_item as $attr_name => $attr_value)
548
  {
549
- if (in_array($attr_name, array('href', 'src')))
550
- {
551
- $attr_value = esc_url($attr_value);
552
- }
553
- else
554
  {
555
- $attr_value = esc_attr($attr_value);
556
- }
 
 
 
 
 
 
 
557
 
558
- $out .= ' ' . $attr_name . '="' . $attr_value . '"';
 
559
  }
560
 
561
  if ($list != null || $content != null)
@@ -622,7 +662,18 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
622
  if (!isset($vars['url']))
623
  {
624
  $full_url = synved_option_get('synved_social', 'share_full_url');
625
- $url = home_url($_SERVER['REQUEST_URI']);
 
 
 
 
 
 
 
 
 
 
 
626
 
627
  if ($id != null && in_the_loop())
628
  {
@@ -641,16 +692,16 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
641
  }
642
  }
643
 
644
- if (!$full_url)
645
  {
646
  if ($id != null && in_the_loop())
647
  {
648
  $use_shortlinks = synved_option_get('synved_social', 'use_shortlinks');
649
- $url = get_permalink();
650
 
651
  if ($use_shortlinks && function_exists('wp_get_shortlink'))
652
  {
653
- $short = wp_get_shortlink(null, null, 'query');
654
 
655
  if ($short != null)
656
  {
@@ -658,6 +709,10 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
658
  }
659
  }
660
  }
 
 
 
 
661
  }
662
 
663
  $vars['url'] = $url;
@@ -669,8 +724,23 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
669
 
670
  if ($id != null)
671
  {
672
- $src = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'full');
673
- $image_src = $src[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
674
  }
675
 
676
  $vars['image'] = $image_src;
@@ -678,7 +748,7 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
678
 
679
  if (!isset($vars['title']))
680
  {
681
- $vars['title'] = get_the_title();
682
  }
683
 
684
  if (!isset($vars['message']))
@@ -693,6 +763,42 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
693
  $vars['message'] = $message;
694
  }
695
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
696
  if (isset($params['class']) && !is_array($params['class']))
697
  {
698
  $class = explode(' ', $params['class']);
@@ -716,11 +822,20 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
716
 
717
  if ($vars != null)
718
  {
 
719
  $vars = urlencode_deep($vars);
720
 
721
- // urlencode converts space characters to + rather than %20 which messes things up
722
- $vars['message'] = str_replace('+', '%20', $vars['message']);
723
- $vars['title'] = str_replace('+', '%20', $vars['title']);
 
 
 
 
 
 
 
 
724
  }
725
 
726
  $path = synved_social_path();
@@ -756,7 +871,14 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
756
  }
757
 
758
  $icon_spacing = synved_option_get('synved_social', 'icon_spacing');
 
 
 
 
759
  $spacing = 5;
 
 
 
760
 
761
  if ($icon_spacing != null)
762
  {
@@ -768,6 +890,55 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
768
  $spacing = $params['spacing'];
769
  }
770
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
  $class = isset($params['class']) ? $params['class'] : null;
772
  $show = isset($params['show']) ? $params['show'] : null;
773
  $hide = isset($params['hide']) ? $params['hide'] : null;
@@ -811,6 +982,11 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
811
  $icon_resolution = synved_option_get('synved_social', 'icon_resolution');
812
  $resolutions = array('normal' => $size, 'hidef' => $size * 2);
813
 
 
 
 
 
 
814
  if ($icon_resolution == 'single')
815
  {
816
  $resolutions = array('single' => $size * 2);
@@ -871,7 +1047,7 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
871
  $style .= 'margin-bottom:' . $spacing . 'px;';
872
  }
873
 
874
- if ($index < $count - 1)
875
  {
876
  $style .= 'margin-right:' . $spacing . 'px;';
877
  }
@@ -882,12 +1058,12 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
882
  {
883
  $class_extra = ' ' . implode(' ', $class);
884
  }
885
-
886
  $out_button = array(
887
  'tag' => 'a',
888
  'class' => 'synved-social-button synved-social-button-' . $context . ' synved-social-size-' . $size . ' synved-social-resolution-' . $icon_def . ' synved-social-provider-' . $button_key . $class_extra,
889
  'data-provider' => $button_key,
890
- 'target' => $button_key != 'mail' ? '_blank' : '',
891
  'rel' => 'nofollow',
892
  'title' => $title,
893
  'href' => $href,
@@ -925,6 +1101,20 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
925
 
926
  if ($out_list != null)
927
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
928
  foreach ($out_list as $def_key => $def_list)
929
  {
930
  foreach ($def_list as $button_key => $out_item)
@@ -937,6 +1127,11 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
937
  {
938
  $out .= '<a class="synved-social-credit" 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="display: inline;margin:0;padding:0;width:16px;height:16px;" width="16" height="16" alt="feather" src="' . $uri . '/image/icon.png" /></a>';
939
  }
 
 
 
 
 
940
  }
941
 
942
  return $out;
3
  Module Name: Synved Social
4
  Description: Social sharing and following tools
5
  Author: Synved
6
+ Version: 1.6.3
7
  Author URI: http://synved.com/
8
  License: GPLv2
9
 
18
 
19
 
20
  define('SYNVED_SOCIAL_LOADED', true);
21
+ define('SYNVED_SOCIAL_VERSION', 100060003);
22
+ define('SYNVED_SOCIAL_VERSION_STRING', '1.6.3');
23
 
24
  define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
25
 
66
  echo '<div>';
67
 
68
  $params = array();
69
+ $params['alignment'] = 'none';
70
 
71
  if ($icon_skin != 'default')
72
  {
212
  {
213
  $provider_list = array(
214
  'facebook' => array(
215
+ 'link' => 'http://www.facebook.com/sharer.php?u=%%url%%&t=%%title%%&s=100&p[url]=%%url%%&p[images][0]=%%image%%&p[title]=%%title%%',
216
  'title' => __('Share on Facebook')
217
  ),
218
  'twitter' => array(
235
  'link' => 'http://www.linkedin.com/shareArticle?mini=true&url=%%url%%&title=%%title%%',
236
  'title' => __('Share on Linkedin'),
237
  ),
238
+ 'tumblr' => array(
239
+ 'link' => 'http://tumblr.com/share?s=&v=3&t=%%title%%&u=%%url%%',
240
+ 'title' => __('Share on tumblr'),
241
+ 'default-display' => false,
242
+ ),
243
  'mail' => array(
244
  'link' => 'mailto:?subject=%%title%%&body=%%message%%:%20%%url%%',
245
  'title' => __('Share by email'),
264
  'pinterest' => array(
265
  'link' => 'http://pinterest.com/MyUserName/',
266
  'title' => __('Our board on Pinterest'),
267
+ 'default-display' => false,
268
  ),
269
  'linkedin' => array(
270
  'link' => 'http://www.linkedin.com/in/yourid',
279
  'link' => 'http://www.youtube.com/MyYouTubeName',
280
  'title' => __('Find us on YouTube'),
281
  ),
282
+ 'vimeo' => array(
283
+ 'link' => 'http://vimeo.com/MyVimeoName',
284
+ 'title' => __('Find us on vimeo'),
285
+ 'default-display' => false,
286
+ ),
287
+ 'tumblr' => array(
288
+ 'link' => 'http://myname.tumblr.com',
289
+ 'title' => __('Find us on tumblr'),
290
+ 'default-display' => false,
291
+ ),
292
+ 'instagram' => array(
293
+ 'link' => 'http://instagram.com/myusername',
294
+ 'title' => __('Check out our instagram feed'),
295
+ 'default-display' => false,
296
+ ),
297
+ 'flickr' => array(
298
+ 'link' => 'http://www.flickr.com/photos/myusername/',
299
+ 'title' => __('Check out our flickr feed'),
300
+ 'default-display' => false,
301
+ ),
302
+ 'foursquare' => array(
303
+ 'link' => 'https://foursquare.com/myusername',
304
+ 'title' => __('Check out our foursquare feed'),
305
+ 'default-display' => false,
306
+ ),
307
+ 'mail' => array(
308
+ 'link' => 'mailto:mail@example.com?subject=Contact%20Request',
309
+ 'title' => __('Contact Us'),
310
+ 'default-display' => false,
311
+ ),
312
  );
313
  }
314
 
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)
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);
582
 
583
  foreach ($out_item as $attr_name => $attr_value)
584
  {
585
+ if ($attr_name != null && $attr_value !== null)
 
 
 
 
586
  {
587
+ if (in_array($attr_name, array('href', 'src')))
588
+ {
589
+ $attr_value = str_ireplace(array('[', ']'), array('&#91;', '&#93;'), $attr_value);
590
+ $attr_value = esc_url($attr_value);
591
+ }
592
+ else
593
+ {
594
+ $attr_value = esc_attr($attr_value);
595
+ }
596
 
597
+ $out .= ' ' . $attr_name . '="' . $attr_value . '"';
598
+ }
599
  }
600
 
601
  if ($list != null || $content != null)
662
  if (!isset($vars['url']))
663
  {
664
  $full_url = synved_option_get('synved_social', 'share_full_url');
665
+ $home_url = home_url();
666
+ $req_uri = $_SERVER['REQUEST_URI'];
667
+
668
+ $path = parse_url($home_url, PHP_URL_PATH);
669
+ $path_len = strlen($path);
670
+
671
+ if (strtolower(substr($req_uri, 0, $path_len)) == strtolower($path))
672
+ {
673
+ $req_uri = substr($req_uri, $path_len);
674
+ }
675
+
676
+ $url = home_url($req_uri);
677
 
678
  if ($id != null && in_the_loop())
679
  {
692
  }
693
  }
694
 
695
+ //if (!$full_url)
696
  {
697
  if ($id != null && in_the_loop())
698
  {
699
  $use_shortlinks = synved_option_get('synved_social', 'use_shortlinks');
700
+ $url = get_permalink($id);
701
 
702
  if ($use_shortlinks && function_exists('wp_get_shortlink'))
703
  {
704
+ $short = wp_get_shortlink($id);
705
 
706
  if ($short != null)
707
  {
709
  }
710
  }
711
  }
712
+ else if (is_home())
713
+ {
714
+ $url = $home_url;
715
+ }
716
  }
717
 
718
  $vars['url'] = $url;
724
 
725
  if ($id != null)
726
  {
727
+ $image_id = get_post_thumbnail_id($id);
728
+
729
+ if ($image_id != null)
730
+ {
731
+ $src = wp_get_attachment_image_src($image_id, 'full');
732
+ $image_src = $src[0];
733
+ }
734
+ else
735
+ {
736
+ $post = get_post($id);
737
+ $match = null;
738
+
739
+ if (preg_match('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $match) > 0)
740
+ {
741
+ $image_src = $match[1];
742
+ }
743
+ }
744
  }
745
 
746
  $vars['image'] = $image_src;
748
 
749
  if (!isset($vars['title']))
750
  {
751
+ $vars['title'] = html_entity_decode(get_the_title());
752
  }
753
 
754
  if (!isset($vars['message']))
763
  $vars['message'] = $message;
764
  }
765
 
766
+ if (!isset($vars['author']))
767
+ {
768
+ if ($id != null && in_the_loop())
769
+ {
770
+ $author = get_the_author_meta('_synved_twitter_handle');
771
+
772
+ if ($author == null)
773
+ {
774
+ $author = get_the_author_meta('twitter');
775
+ }
776
+
777
+ if ($author == null)
778
+ {
779
+ $author = get_the_author();
780
+ }
781
+
782
+ if ($author != null)
783
+ {
784
+ $vars['author'] = $author;
785
+ }
786
+ }
787
+ }
788
+
789
+ if (!isset($vars['date']))
790
+ {
791
+ if ($id != null && in_the_loop())
792
+ {
793
+ $date = get_the_date('', $id);
794
+
795
+ if ($date != null)
796
+ {
797
+ $vars['date'] = $date;
798
+ }
799
+ }
800
+ }
801
+
802
  if (isset($params['class']) && !is_array($params['class']))
803
  {
804
  $class = explode(' ', $params['class']);
822
 
823
  if ($vars != null)
824
  {
825
+ $vars = array_map('wp_kses_decode_entities', $vars);
826
  $vars = urlencode_deep($vars);
827
 
828
+ // urlencode_deep converts space characters to + rather than %20 which messes things up
829
+ $vars['message'] = str_ireplace('+', '%20', $vars['message']);
830
+ $vars['title'] = str_ireplace('+', '%20', $vars['title']);
831
+
832
+ // 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
833
+ $vars['message'] = str_ireplace('%19', '%27', $vars['message']);
834
+ $vars['title'] = str_ireplace('%19', '%27', $vars['title']);
835
+ $vars['message'] = str_ireplace('%1c', '%22', $vars['message']);
836
+ $vars['title'] = str_ireplace('%1c', '%22', $vars['title']);
837
+ $vars['message'] = str_ireplace('%1d', '%22', $vars['message']);
838
+ $vars['title'] = str_ireplace('%1d', '%22', $vars['title']);
839
  }
840
 
841
  $path = synved_social_path();
871
  }
872
 
873
  $icon_spacing = synved_option_get('synved_social', 'icon_spacing');
874
+ $buttons_container = synved_option_get('synved_social', 'buttons_container');
875
+ $buttons_container_type = synved_option_get('synved_social', 'buttons_container_type');
876
+ $buttons_alignment = synved_option_get('synved_social', 'buttons_alignment_' . $context);
877
+ $layout_rtl = synved_option_get('synved_social', 'layout_rtl');
878
  $spacing = 5;
879
+ $container = 'none';
880
+ $container_type = 'basic';
881
+ $alignment = 'none';
882
 
883
  if ($icon_spacing != null)
884
  {
890
  $spacing = $params['spacing'];
891
  }
892
 
893
+ if ($buttons_container != null)
894
+ {
895
+ $container = $buttons_container;
896
+ }
897
+
898
+ if ($buttons_container_type != null)
899
+ {
900
+ $container_type = $buttons_container_type;
901
+ }
902
+
903
+ if ($buttons_alignment != null)
904
+ {
905
+ $alignment = $buttons_alignment;
906
+ }
907
+
908
+ if (isset($params['alignment']))
909
+ {
910
+ $alignment = $params['alignment'];
911
+ }
912
+
913
+ if ($alignment != 'none')
914
+ {
915
+ if ($container == 'none')
916
+ {
917
+ $container = $context;
918
+ }
919
+ else if ($container != 'both' && $container != $context)
920
+ {
921
+ $container = 'both';
922
+ }
923
+ }
924
+
925
+ // Allow parameters to override container after we decide a default based on selected alignment
926
+ if (isset($params['container']))
927
+ {
928
+ $container = $params['container'];
929
+ }
930
+
931
+ if ($alignment != 'none')
932
+ {
933
+ $container_type = 'block';
934
+ }
935
+
936
+ // Allow parameters to override container after we decide a default based on selected alignment
937
+ if (isset($params['container_type']))
938
+ {
939
+ $container_type = $params['container_type'];
940
+ }
941
+
942
  $class = isset($params['class']) ? $params['class'] : null;
943
  $show = isset($params['show']) ? $params['show'] : null;
944
  $hide = isset($params['hide']) ? $params['hide'] : null;
982
  $icon_resolution = synved_option_get('synved_social', 'icon_resolution');
983
  $resolutions = array('normal' => $size, 'hidef' => $size * 2);
984
 
985
+ if (is_feed())
986
+ {
987
+ $icon_resolution = 'single';
988
+ }
989
+
990
  if ($icon_resolution == 'single')
991
  {
992
  $resolutions = array('single' => $size * 2);
1047
  $style .= 'margin-bottom:' . $spacing . 'px;';
1048
  }
1049
 
1050
+ if ($index < $count - 1 || $layout_rtl)
1051
  {
1052
  $style .= 'margin-right:' . $spacing . 'px;';
1053
  }
1058
  {
1059
  $class_extra = ' ' . implode(' ', $class);
1060
  }
1061
+
1062
  $out_button = array(
1063
  'tag' => 'a',
1064
  'class' => 'synved-social-button synved-social-button-' . $context . ' synved-social-size-' . $size . ' synved-social-resolution-' . $icon_def . ' synved-social-provider-' . $button_key . $class_extra,
1065
  'data-provider' => $button_key,
1066
+ 'target' => $button_key != 'mail' ? '_blank' : null,
1067
  'rel' => 'nofollow',
1068
  'title' => $title,
1069
  'href' => $href,
1101
 
1102
  if ($out_list != null)
1103
  {
1104
+ $container_tag = 'span';
1105
+
1106
+ if ($container_type == 'block')
1107
+ {
1108
+ $container_tag = 'div';
1109
+ }
1110
+
1111
+ if ($container != 'none' && ($container == 'both' || $container == $context))
1112
+ {
1113
+ $container_style = $alignment != 'none' ? ' style="text-align: ' . $alignment . '"' : null;
1114
+
1115
+ $out .= '<' . $container_tag . ' class="synved-social-container synved-social-container-' . $context . '"' . $container_style . '>';
1116
+ }
1117
+
1118
  foreach ($out_list as $def_key => $def_list)
1119
  {
1120
  foreach ($def_list as $button_key => $out_item)
1127
  {
1128
  $out .= '<a class="synved-social-credit" 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="display: inline;margin:0;padding:0;width:16px;height:16px;" width="16" height="16" alt="feather" src="' . $uri . '/image/icon.png" /></a>';
1129
  }
1130
+
1131
+ if ($container != 'none' && ($container == 'both' || $container == $context))
1132
+ {
1133
+ $out .= '</' . $container_tag . '>';
1134
+ }
1135
  }
1136
 
1137
  return $out;