Version Description
- Added support for Retina and other high resolution displays
- Fix exclusion checks for custom post types
- Added option to share full URL instead of single post/page URL
Download this release
Release Info
Developer | Synved |
Plugin | Social Media Feather | social media sharing |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.3.0
- readme.txt +12 -3
- social-media-feather.php +2 -1
- synved-option/addons/option-type-addon/script/custom.js +1 -1
- synved-option/synved-option.php +34 -0
- synved-social/image/social/regular/128x128/facebook.png +0 -0
- synved-social/image/social/regular/128x128/google_plus.png +0 -0
- synved-social/image/social/regular/128x128/linkedin.png +0 -0
- synved-social/image/social/regular/128x128/mail.png +0 -0
- synved-social/image/social/regular/128x128/pinterest.png +0 -0
- synved-social/image/social/regular/128x128/reddit.png +0 -0
- synved-social/image/social/regular/128x128/rss.png +0 -0
- synved-social/image/social/regular/128x128/twitter.png +0 -0
- synved-social/image/social/regular/128x128/youtube.png +0 -0
- synved-social/synved-social-setup.php +49 -5
- synved-social/synved-social.php +133 -72
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5.2
|
7 |
Stable tag: trunk
|
@@ -14,6 +14,8 @@ Super lightweight, simple, nice, modern looking and effective social sharing and
|
|
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 primary goal behind the plugin is to provide very lightweight WordPress social sharing and following that doesn’t add any unnecessary burden to your site and especially on your users.
|
18 |
|
19 |
What sets WordPress Social Media Feather aside from the plethora of other social sharing and following WordPress plugins is its focus on simplicity, performance and unobtrusive impact.
|
@@ -30,6 +32,7 @@ The plugin also offers widgets for sharing and following buttons that you can pl
|
|
30 |
|
31 |
= Features =
|
32 |
* Integrated WordPress social sharing
|
|
|
33 |
* WordPress social sharing and following widgets
|
34 |
* Supports all major providers of social features
|
35 |
* Sharing with Facebook, Twitter, Google+, reddit, Pinterest, Linkedin and e-mail
|
@@ -38,6 +41,7 @@ The plugin also offers widgets for sharing and following buttons that you can pl
|
|
38 |
* Ability to select what services each provider will be exposed for
|
39 |
* Full customization for titles and URLs for each provider
|
40 |
* Super lightweight social sharing and following
|
|
|
41 |
* Comes with a default modern icon set
|
42 |
* 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
|
43 |
* 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
|
@@ -67,10 +71,10 @@ The next shortcode will create a list of social following buttons that allow vis
|
|
67 |
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.
|
68 |
|
69 |
For sharing buttons you can use:
|
70 |
-
`synved_social_share_markup();`
|
71 |
|
72 |
For following buttons you can use:
|
73 |
-
`synved_social_follow_markup();`
|
74 |
|
75 |
|
76 |
= Related Links: =
|
@@ -107,6 +111,11 @@ Have a look at [our site](http://synved.com/) or the [Stripefolio portfolio them
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
110 |
= 1.2.3 =
|
111 |
* Fix check for single posts to include all singular pages
|
112 |
* Set image dimensions attributes to match icon size
|
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
|
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 |
+
Now the only social sharing and bookmarking plugin with full support for the **Retina and high resolution displays** as used in iPad 5 and other devices!
|
18 |
+
|
19 |
The primary goal behind the plugin is to provide very lightweight WordPress social sharing and following that doesn’t add any unnecessary burden to your site and especially on your users.
|
20 |
|
21 |
What sets WordPress Social Media Feather aside from the plethora of other social sharing and following WordPress plugins is its focus on simplicity, performance and unobtrusive impact.
|
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
|
41 |
* Ability to select what services each provider will be exposed for
|
42 |
* Full customization for titles and URLs for each provider
|
43 |
* Super lightweight social sharing and following
|
44 |
+
* Fast unobtrusive social bookmarks for your site
|
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
|
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: =
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 1.3.0 =
|
115 |
+
* Added support for Retina and other high resolution displays
|
116 |
+
* Fix exclusion checks for custom post types
|
117 |
+
* Added option to share full URL instead of single post/page URL
|
118 |
+
|
119 |
= 1.2.3 =
|
120 |
* Fix check for single posts to include all singular pages
|
121 |
* Set image dimensions attributes to match icon size
|
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.
|
8 |
Author URI: http://synved.com/
|
9 |
|
10 |
LEGAL STATEMENTS
|
@@ -53,6 +53,7 @@ if (!function_exists('synved_wp_social_load'))
|
|
53 |
synved_plugout_module_path_add('synved-option', 'core', $dir . 'synved-option');
|
54 |
synved_plugout_module_register('synved-social');
|
55 |
synved_plugout_module_path_add('synved-social', 'core', $dir . 'synved-social');
|
|
|
56 |
|
57 |
/* Import modules */
|
58 |
synved_plugout_module_import('synved-connect');
|
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.0
|
8 |
Author URI: http://synved.com/
|
9 |
|
10 |
LEGAL STATEMENTS
|
53 |
synved_plugout_module_path_add('synved-option', 'core', $dir . 'synved-option');
|
54 |
synved_plugout_module_register('synved-social');
|
55 |
synved_plugout_module_path_add('synved-social', 'core', $dir . 'synved-social');
|
56 |
+
synved_plugout_module_path_add('synved-social', 'provider', __FILE__);
|
57 |
|
58 |
/* Import modules */
|
59 |
synved_plugout_module_import('synved-connect');
|
synved-option/addons/option-type-addon/script/custom.js
CHANGED
@@ -109,7 +109,7 @@ jQuery(document).ready(function() {
|
|
109 |
container: containerId,
|
110 |
//drop_element: '',
|
111 |
file_data_name: fileField,
|
112 |
-
max_file_size: '
|
113 |
max_file_count: 1,
|
114 |
flash_swf_url: SynvedOptionVars.flash_swf_url,
|
115 |
silverlight_xap_url: SynvedOptionVars.silverlight_xap_url,
|
109 |
container: containerId,
|
110 |
//drop_element: '',
|
111 |
file_data_name: fileField,
|
112 |
+
max_file_size: '8mb',
|
113 |
max_file_count: 1,
|
114 |
flash_swf_url: SynvedOptionVars.flash_swf_url,
|
115 |
silverlight_xap_url: SynvedOptionVars.silverlight_xap_url,
|
synved-option/synved-option.php
CHANGED
@@ -852,6 +852,39 @@ function synved_option_wp_upgrader_source_selection($source, $remote_source, $ob
|
|
852 |
return $source;
|
853 |
}
|
854 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
855 |
function synved_option_admin_enqueue_scripts()
|
856 |
{
|
857 |
$uri = synved_option_path_uri();
|
@@ -941,6 +974,7 @@ function synved_option_ajax()
|
|
941 |
add_action('after_setup_theme', 'synved_option_wp_after_setup_theme');
|
942 |
add_action('init', 'synved_option_wp_init');
|
943 |
add_filter('upgrader_source_selection', 'synved_option_wp_upgrader_source_selection', 9, 3);
|
|
|
944 |
|
945 |
if (is_admin())
|
946 |
{
|
852 |
return $source;
|
853 |
}
|
854 |
|
855 |
+
function synved_option_wp_plugin_action_links($links, $file)
|
856 |
+
{
|
857 |
+
global $synved_option_list;
|
858 |
+
|
859 |
+
if ($synved_option_list != null)
|
860 |
+
{
|
861 |
+
foreach ($synved_option_list as $id => $list)
|
862 |
+
{
|
863 |
+
$items = synved_option_item_list($id);
|
864 |
+
$pages = $synved_option_list[$id]['pages'];
|
865 |
+
|
866 |
+
foreach ($pages as $name => $page)
|
867 |
+
{
|
868 |
+
$link_label = synved_option_item_property($page, 'link-label');
|
869 |
+
$link_target = synved_option_item_property($page, 'link-target');
|
870 |
+
$link_url = synved_option_page_link_url($id, $name, $item);
|
871 |
+
|
872 |
+
if ($link_label == null)
|
873 |
+
{
|
874 |
+
$link_label = __('Settings');
|
875 |
+
}
|
876 |
+
|
877 |
+
if ($file == $link_target)
|
878 |
+
{
|
879 |
+
$links[] = '<a href="' . $link_url . '">' . $link_label . '</a>';
|
880 |
+
}
|
881 |
+
}
|
882 |
+
}
|
883 |
+
}
|
884 |
+
|
885 |
+
return $links;
|
886 |
+
}
|
887 |
+
|
888 |
function synved_option_admin_enqueue_scripts()
|
889 |
{
|
890 |
$uri = synved_option_path_uri();
|
974 |
add_action('after_setup_theme', 'synved_option_wp_after_setup_theme');
|
975 |
add_action('init', 'synved_option_wp_init');
|
976 |
add_filter('upgrader_source_selection', 'synved_option_wp_upgrader_source_selection', 9, 3);
|
977 |
+
add_filter('plugin_action_links', 'synved_option_wp_plugin_action_links', 10, 2);
|
978 |
|
979 |
if (is_admin())
|
980 |
{
|
synved-social/image/social/regular/128x128/facebook.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/google_plus.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/linkedin.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/mail.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/pinterest.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/reddit.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/rss.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/twitter.png
ADDED
Binary file
|
synved-social/image/social/regular/128x128/youtube.png
ADDED
Binary file
|
synved-social/synved-social-setup.php
CHANGED
@@ -111,6 +111,7 @@ $synved_social_options = array(
|
|
111 |
'label' => 'Social Media',
|
112 |
'title' => 'Social Media Feather',
|
113 |
'tip' => synved_option_callback('synved_social_page_settings_tip'),
|
|
|
114 |
'sections' => array(
|
115 |
'section_general' => array(
|
116 |
'label' => __('General Settings', 'synved-social'),
|
@@ -120,6 +121,10 @@ $synved_social_options = array(
|
|
120 |
'default' => false, 'label' => __('Use Shortlinks', 'synved-social'),
|
121 |
'tip' => __('Allows for shortened URLs to be used when sharing content if a shortening plugin is installed', 'synved-social')
|
122 |
),
|
|
|
|
|
|
|
|
|
123 |
'shortcode_widgets' => array(
|
124 |
'default' => true, 'label' => __('Shortcodes In Widgets', 'synved-social'),
|
125 |
'tip' => __('Allow shortcodes in Text widgets', 'synved-social')
|
@@ -227,7 +232,13 @@ $synved_social_options = array(
|
|
227 |
'default' => 48,
|
228 |
'set' => '16=16x16,24=24x24,32=32x32,48=48x48,64=64x64,96=96x96',
|
229 |
'label' => __('Icon Size', 'synved-social'),
|
230 |
-
'tip' => __('Select the size in pixels for the icons', 'synved-social')
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
),
|
232 |
'icon_spacing' => array(
|
233 |
'default' => 5,
|
@@ -270,7 +281,7 @@ function synved_social_page_settings_tip($tip, $item)
|
|
270 |
{
|
271 |
if (!function_exists('synved_shortcode_version'))
|
272 |
{
|
273 |
-
$tip .= ' <div style="background:#f2f2f2;font-size:110%;color:#444;padding:10px 15px;"><b>' . __('Note', 'synved-social') . '</b>: ' . __('The Social Media Feather plugin is fully compatible with our <a target="_blank" href="http://synved.com/wordpress-shortcodes/">WordPress Shortcodes</a> plugin!</span>', 'synved-social') . '</div>';
|
274 |
}
|
275 |
|
276 |
if (function_exists('synved_connect_support_social_follow_render'))
|
@@ -500,6 +511,8 @@ function synved_social_path_uri($path = null)
|
|
500 |
function synved_social_wp_register_common_scripts()
|
501 |
{
|
502 |
$uri = synved_social_path_uri();
|
|
|
|
|
503 |
}
|
504 |
|
505 |
function synved_social_enqueue_scripts()
|
@@ -507,10 +520,41 @@ function synved_social_enqueue_scripts()
|
|
507 |
$uri = synved_social_path_uri();
|
508 |
|
509 |
synved_social_wp_register_common_scripts();
|
|
|
|
|
510 |
}
|
511 |
|
512 |
function synved_social_print_styles()
|
513 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
}
|
515 |
|
516 |
function synved_social_admin_enqueue_scripts()
|
@@ -648,12 +692,12 @@ function synved_social_wp_the_content($content, $id = null)
|
|
648 |
|
649 |
if (!$exclude_share && synved_option_get('synved_social', 'automatic_share_single'))
|
650 |
{
|
651 |
-
$exclude_share = !is_singular(
|
652 |
}
|
653 |
|
654 |
if (!$exclude_follow && synved_option_get('synved_social', 'automatic_follow_single'))
|
655 |
{
|
656 |
-
$exclude_follow = !is_singular(
|
657 |
}
|
658 |
}
|
659 |
|
@@ -806,7 +850,7 @@ function synved_social_init()
|
|
806 |
if (!is_admin())
|
807 |
{
|
808 |
add_action('wp_enqueue_scripts', 'synved_social_enqueue_scripts');
|
809 |
-
|
810 |
}
|
811 |
|
812 |
if (synved_option_get('synved_social', 'automatic_share') || synved_option_get('synved_social', 'automatic_follow'))
|
111 |
'label' => 'Social Media',
|
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'),
|
121 |
'default' => false, 'label' => __('Use Shortlinks', 'synved-social'),
|
122 |
'tip' => __('Allows for shortened URLs to be used when sharing content if a shortening plugin is installed', 'synved-social')
|
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'),
|
130 |
'tip' => __('Allow shortcodes in Text widgets', 'synved-social')
|
232 |
'default' => 48,
|
233 |
'set' => '16=16x16,24=24x24,32=32x32,48=48x48,64=64x64,96=96x96',
|
234 |
'label' => __('Icon Size', 'synved-social'),
|
235 |
+
'tip' => __('Select the size in pixels for the icons. Note: for high resolution displays like Retina the maximum size is 64x64.', 'synved-social')
|
236 |
+
),
|
237 |
+
'icon_resolution' => array(
|
238 |
+
'default' => 'single',
|
239 |
+
'set' => 'single=Single,double=Double',
|
240 |
+
'label' => __('Icon Resolution', 'synved-social'),
|
241 |
+
'tip' => __('Select what icon resolutions will be used. Single might make the icons slightly blurry on low resolution displays. Double will always look the best but will consume more bandwidth.', 'synved-social')
|
242 |
),
|
243 |
'icon_spacing' => array(
|
244 |
'default' => 5,
|
281 |
{
|
282 |
if (!function_exists('synved_shortcode_version'))
|
283 |
{
|
284 |
+
$tip .= ' <div style="background:#f2f2f2;font-size:110%;color:#444;padding:10px 15px;"><b>' . __('Note', 'synved-social') . '</b>: ' . __('The Social Media Feather plugin is fully compatible with our free <a target="_blank" href="http://synved.com/wordpress-shortcodes/">WordPress Shortcodes</a> plugin!</span>', 'synved-social') . '</div>';
|
285 |
}
|
286 |
|
287 |
if (function_exists('synved_connect_support_social_follow_render'))
|
511 |
function synved_social_wp_register_common_scripts()
|
512 |
{
|
513 |
$uri = synved_social_path_uri();
|
514 |
+
|
515 |
+
//wp_register_style('synved-social-style', $uri . '/style/style.css', false, '1.0');
|
516 |
}
|
517 |
|
518 |
function synved_social_enqueue_scripts()
|
520 |
$uri = synved_social_path_uri();
|
521 |
|
522 |
synved_social_wp_register_common_scripts();
|
523 |
+
|
524 |
+
//wp_enqueue_style('synved-social-style');
|
525 |
}
|
526 |
|
527 |
function synved_social_print_styles()
|
528 |
{
|
529 |
+
echo "\r\n" . '<style type="text/css">';
|
530 |
+
|
531 |
+
echo '
|
532 |
+
.synved-social-resolution-single {
|
533 |
+
display: inline-block;
|
534 |
+
}
|
535 |
+
.synved-social-resolution-normal {
|
536 |
+
display: inline-block;
|
537 |
+
}
|
538 |
+
.synved-social-resolution-hidef {
|
539 |
+
display: none !important;
|
540 |
+
}
|
541 |
+
|
542 |
+
@media only screen and (min--moz-device-pixel-ratio: 2),
|
543 |
+
only screen and (-o-min-device-pixel-ratio: 2/1),
|
544 |
+
only screen and (-webkit-min-device-pixel-ratio: 2),
|
545 |
+
only screen and (min-device-pixel-ratio: 2),
|
546 |
+
only screen and (min-resolution: 2dppx),
|
547 |
+
only screen and (min-resolution: 192dpi) {
|
548 |
+
.synved-social-resolution-normal {
|
549 |
+
display: none !important;
|
550 |
+
}
|
551 |
+
.synved-social-resolution-hidef {
|
552 |
+
display: inline-block;
|
553 |
+
}
|
554 |
+
}
|
555 |
+
';
|
556 |
+
|
557 |
+
echo '</style>' . "\r\n";
|
558 |
}
|
559 |
|
560 |
function synved_social_admin_enqueue_scripts()
|
692 |
|
693 |
if (!$exclude_share && synved_option_get('synved_social', 'automatic_share_single'))
|
694 |
{
|
695 |
+
$exclude_share = !is_singular(synved_option_get('synved_social', 'automatic_share_post_types'));
|
696 |
}
|
697 |
|
698 |
if (!$exclude_follow && synved_option_get('synved_social', 'automatic_follow_single'))
|
699 |
{
|
700 |
+
$exclude_follow = !is_singular(synved_option_get('synved_social', 'automatic_follow_post_types'));
|
701 |
}
|
702 |
}
|
703 |
|
850 |
if (!is_admin())
|
851 |
{
|
852 |
add_action('wp_enqueue_scripts', 'synved_social_enqueue_scripts');
|
853 |
+
add_action('wp_head', 'synved_social_print_styles');
|
854 |
}
|
855 |
|
856 |
if (synved_option_get('synved_social', 'automatic_share') || synved_option_get('synved_social', 'automatic_follow'))
|
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.
|
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',
|
22 |
-
define('SYNVED_SOCIAL_VERSION_STRING', '1.
|
23 |
|
24 |
define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
|
25 |
|
@@ -331,7 +331,7 @@ function synved_social_icon_skin_list()
|
|
331 |
$icons = array_merge($icons, $icons_extra);
|
332 |
}
|
333 |
|
334 |
-
return $icons
|
335 |
}
|
336 |
|
337 |
function synved_social_icon_skin_get($name = null)
|
@@ -610,18 +610,58 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
|
|
610 |
}
|
611 |
}
|
612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
if (!isset($vars['url']))
|
614 |
{
|
615 |
-
$
|
616 |
-
$url =
|
617 |
|
618 |
-
if ($
|
619 |
{
|
620 |
-
$
|
621 |
|
622 |
-
if ($
|
623 |
{
|
624 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
}
|
626 |
}
|
627 |
|
@@ -629,17 +669,9 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
|
|
629 |
}
|
630 |
|
631 |
if (!isset($vars['image']))
|
632 |
-
{
|
633 |
-
$id = get_the_ID();
|
634 |
$image_src = null;
|
635 |
|
636 |
-
if ($id == null)
|
637 |
-
{
|
638 |
-
global $post;
|
639 |
-
|
640 |
-
$id = $post->ID;
|
641 |
-
}
|
642 |
-
|
643 |
if ($id != null)
|
644 |
{
|
645 |
$src = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'full');
|
@@ -777,12 +809,24 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
|
|
777 |
}
|
778 |
}
|
779 |
|
780 |
-
$out = null;
|
781 |
$out_list = array();
|
782 |
$out_params = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
$index = 0;
|
784 |
$count = count($buttons);
|
785 |
-
$image_list = synved_social_icon_skin_get_image_list($skin, array_keys($buttons), $size);
|
786 |
|
787 |
foreach ($buttons as $button_key => $button_item)
|
788 |
{
|
@@ -807,78 +851,95 @@ function synved_social_button_list_markup($context, $vars = null, $buttons = nul
|
|
807 |
}
|
808 |
}
|
809 |
|
810 |
-
$
|
811 |
-
$image_size = $image[$size];
|
812 |
-
$image_sub = $image_size['sub'];
|
813 |
-
$image_path = $image_size['path'];
|
814 |
-
$image_uri = $image_size['uri'];
|
815 |
|
816 |
-
|
817 |
{
|
818 |
-
$
|
819 |
-
$
|
820 |
-
$
|
821 |
-
|
|
|
822 |
|
823 |
-
|
|
|
|
|
|
|
|
|
|
|
824 |
|
825 |
-
|
826 |
-
{
|
827 |
-
$style .= 'margin-bottom:' . $spacing . 'px;';
|
828 |
-
}
|
829 |
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
|
835 |
-
|
|
|
|
|
|
|
836 |
|
837 |
-
|
838 |
-
{
|
839 |
-
$class_extra = ' ' . implode(' ', $class);
|
840 |
-
}
|
841 |
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
'target' => $button_key != 'mail' ? '_blank' : '',
|
847 |
-
'rel' => 'nofollow',
|
848 |
-
'title' => $title,
|
849 |
-
'href' => $href,
|
850 |
-
'child-list' => array(
|
851 |
-
array(
|
852 |
-
'tag' => 'img',
|
853 |
-
'alt' => $button_key,
|
854 |
-
'title' => $title,
|
855 |
-
'class' => 'synved-share-image synved-social-image synved-social-image-' . $context,
|
856 |
-
'width' => $size,
|
857 |
-
'height' => $size,
|
858 |
-
'style' => 'display: inline;width:' . $size . 'px;' . 'height:' . $size . 'px;' . $style,
|
859 |
-
'src' => $image_uri,
|
860 |
-
)
|
861 |
-
)
|
862 |
-
);
|
863 |
|
864 |
-
|
865 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
|
867 |
$index++;
|
868 |
}
|
869 |
|
870 |
-
$
|
871 |
|
872 |
if ($out_list != null)
|
873 |
{
|
874 |
-
foreach ($out_list as $
|
875 |
{
|
876 |
-
$
|
877 |
}
|
|
|
878 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
879 |
if (synved_option_get('synved_social', 'show_credit'))
|
880 |
{
|
881 |
-
$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>';
|
882 |
}
|
883 |
}
|
884 |
|
3 |
Module Name: Synved Social
|
4 |
Description: Social sharing and following tools
|
5 |
Author: Synved
|
6 |
+
Version: 1.3.0
|
7 |
Author URI: http://synved.com/
|
8 |
License: GPLv2
|
9 |
|
18 |
|
19 |
|
20 |
define('SYNVED_SOCIAL_LOADED', true);
|
21 |
+
define('SYNVED_SOCIAL_VERSION', 100030000);
|
22 |
+
define('SYNVED_SOCIAL_VERSION_STRING', '1.3.0');
|
23 |
|
24 |
define('SYNVED_SOCIAL_ADDON_PATH', str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, dirname(__FILE__) . '/addons'));
|
25 |
|
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)
|
610 |
}
|
611 |
}
|
612 |
|
613 |
+
$id = get_the_ID();
|
614 |
+
|
615 |
+
if ($id == null)
|
616 |
+
{
|
617 |
+
global $post;
|
618 |
+
|
619 |
+
$id = $post->ID;
|
620 |
+
}
|
621 |
+
|
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)
|
628 |
{
|
629 |
+
$post_full_url = strtolower(get_post_meta($id, 'synved_social_share_full_url', true));
|
630 |
|
631 |
+
if ($post_full_url != null)
|
632 |
{
|
633 |
+
if ($post_full_url == 'yes')
|
634 |
+
{
|
635 |
+
$full_url = true;
|
636 |
+
}
|
637 |
+
else if ($post_full_url == 'no')
|
638 |
+
{
|
639 |
+
$full_url = false;
|
640 |
+
}
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
if (!$full_url)
|
645 |
+
{
|
646 |
+
$post_types = get_post_types();
|
647 |
+
|
648 |
+
unset($post_types['revision']);
|
649 |
+
unset($post_types['nav_menu_item']);
|
650 |
+
|
651 |
+
if (is_singular($post_types))
|
652 |
+
{
|
653 |
+
$use_shortlinks = synved_option_get('synved_social', 'use_shortlinks');
|
654 |
+
$url = get_permalink();
|
655 |
+
|
656 |
+
if ($use_shortlinks && function_exists('wp_get_shortlink'))
|
657 |
+
{
|
658 |
+
$short = wp_get_shortlink(null, null, 'query');
|
659 |
+
|
660 |
+
if ($short != null)
|
661 |
+
{
|
662 |
+
$url = $short;
|
663 |
+
}
|
664 |
+
}
|
665 |
}
|
666 |
}
|
667 |
|
669 |
}
|
670 |
|
671 |
if (!isset($vars['image']))
|
672 |
+
{
|
|
|
673 |
$image_src = null;
|
674 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
if ($id != null)
|
676 |
{
|
677 |
$src = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'full');
|
809 |
}
|
810 |
}
|
811 |
|
|
|
812 |
$out_list = array();
|
813 |
$out_params = array();
|
814 |
+
$image_list = array();
|
815 |
+
$icon_resolution = synved_option_get('synved_social', 'icon_resolution');
|
816 |
+
$resolutions = array('normal' => $size, 'hidef' => $size * 2);
|
817 |
+
|
818 |
+
if ($icon_resolution == 'single')
|
819 |
+
{
|
820 |
+
$resolutions = array('single' => $size * 2);
|
821 |
+
}
|
822 |
+
|
823 |
+
foreach ($resolutions as $resolution_name => $resolution_size)
|
824 |
+
{
|
825 |
+
$image_list[$resolution_name] = synved_social_icon_skin_get_image_list($skin, array_keys($buttons), $resolution_size);
|
826 |
+
}
|
827 |
+
|
828 |
$index = 0;
|
829 |
$count = count($buttons);
|
|
|
830 |
|
831 |
foreach ($buttons as $button_key => $button_item)
|
832 |
{
|
851 |
}
|
852 |
}
|
853 |
|
854 |
+
$icon_sizes = $resolutions;
|
|
|
|
|
|
|
|
|
855 |
|
856 |
+
foreach ($icon_sizes as $icon_def => $icon_size)
|
857 |
{
|
858 |
+
$image = $image_list[$icon_def][$button_key];
|
859 |
+
$image_size = $image[$icon_size];
|
860 |
+
$image_sub = $image_size['sub'];
|
861 |
+
$image_path = $image_size['path'];
|
862 |
+
$image_uri = $image_size['uri'];
|
863 |
|
864 |
+
if (!file_exists($image_path))
|
865 |
+
{
|
866 |
+
$size_list = array_keys($image);
|
867 |
+
$image_path = apply_filters('synved_social_button_image_path', $image_path, $image_uri, $icon_size, $image_sub, $skin_path, $skin_uri, $size_list);
|
868 |
+
$image_uri = apply_filters('synved_social_button_image_uri', $image_uri, $image_path, $icon_size, $image_sub, $skin_path, $skin_uri, $size_list);
|
869 |
+
}
|
870 |
|
871 |
+
$style = 'margin:0;';
|
|
|
|
|
|
|
872 |
|
873 |
+
if (true)
|
874 |
+
{
|
875 |
+
$style .= 'margin-bottom:' . $spacing . 'px;';
|
876 |
+
}
|
877 |
|
878 |
+
if ($index < $count - 1)
|
879 |
+
{
|
880 |
+
$style .= 'margin-right:' . $spacing . 'px;';
|
881 |
+
}
|
882 |
|
883 |
+
$class_extra = null;
|
|
|
|
|
|
|
884 |
|
885 |
+
if ($class != null)
|
886 |
+
{
|
887 |
+
$class_extra = ' ' . implode(' ', $class);
|
888 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
|
890 |
+
$out_button = array(
|
891 |
+
'tag' => 'a',
|
892 |
+
'class' => 'synved-social-button synved-social-button-' . $context . ' synved-social-resolution-' . $icon_def . ' synved-social-provider-' . $button_key . $class_extra,
|
893 |
+
'data-provider' => $button_key,
|
894 |
+
'target' => $button_key != 'mail' ? '_blank' : '',
|
895 |
+
'rel' => 'nofollow',
|
896 |
+
'title' => $title,
|
897 |
+
'href' => $href,
|
898 |
+
'style' => 'font-size: 0px; width:' . $size . 'px;' . 'height:' . $size . 'px;' . $style,
|
899 |
+
'child-list' => array(
|
900 |
+
array(
|
901 |
+
'tag' => 'img',
|
902 |
+
'alt' => $button_key,
|
903 |
+
'title' => $title,
|
904 |
+
'class' => 'synved-share-image synved-social-image synved-social-image-' . $context,
|
905 |
+
'width' => $size,
|
906 |
+
'height' => $size,
|
907 |
+
'style' => 'display: inline; margin: 0; padding: 0; border: none; box-shadow: none;',
|
908 |
+
'src' => $image_uri,
|
909 |
+
)
|
910 |
+
)
|
911 |
+
);
|
912 |
+
|
913 |
+
$out_list[$icon_def][$button_key] = $out_button;
|
914 |
+
$out_params[$icon_def][$button_key] = array('icon-resolution' => $icon_def);
|
915 |
+
}
|
916 |
|
917 |
$index++;
|
918 |
}
|
919 |
|
920 |
+
$out = null;
|
921 |
|
922 |
if ($out_list != null)
|
923 |
{
|
924 |
+
foreach ($out_list as $def_key => $def_list)
|
925 |
{
|
926 |
+
$out_list[$def_key] = apply_filters('synved_social_button_list_markup', $def_list, $out_params[$def_key], $context, $vars, $params);
|
927 |
}
|
928 |
+
}
|
929 |
|
930 |
+
if ($out_list != null)
|
931 |
+
{
|
932 |
+
foreach ($out_list as $def_key => $def_list)
|
933 |
+
{
|
934 |
+
foreach ($def_list as $button_key => $out_item)
|
935 |
+
{
|
936 |
+
$out .= synved_social_button_list_markup_item_out($out_item);
|
937 |
+
}
|
938 |
+
}
|
939 |
+
|
940 |
if (synved_option_get('synved_social', 'show_credit'))
|
941 |
{
|
942 |
+
$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>';
|
943 |
}
|
944 |
}
|
945 |
|