Version Description
- Fix code styling
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.2.8.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.8.6 to 1.2.8.7
- README.txt +11 -6
- add-to-any.php +210 -202
- addtoany.admin.php +59 -59
- addtoany.services.php +112 -112
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat
|
|
3 |
Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, technorati, lockerz, addthis, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.9
|
6 |
-
Stable tag: 1.2.8.
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
@@ -11,18 +11,20 @@ Share buttons for WordPress including AddToAny's universal sharing button, Faceb
|
|
11 |
|
12 |
The WordPress sharing plugin to help people share, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, Tumblr, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
|
13 |
|
14 |
-
<a href="http://www.addtoany.com/" title="Sharing buttons">Share Buttons</a>
|
15 |
|
16 |
-
|
17 |
|
18 |
This sharing plugin lets you customize the AddToAny universal Smart Menu, which places the services visitors use at the top of the menu based on each visitor's usage. The Email tab makes it easy to share via Google Gmail, Yahoo! Mail, Outlook.com (Hotmail), AOL Mail, and any other web-based emailer or desktop program.
|
19 |
|
20 |
* **New**: Vector sharing buttons
|
21 |
-
* SVG sharing icons for the most popular services
|
22 |
-
*
|
|
|
23 |
* Choose exactly where you want AddToAny to appear
|
24 |
* Google Analytics integration (<a href="http://www.addtoany.com/ext/google_analytics/">access guide</a>)
|
25 |
* WordPress optimized with asynchronous script loading
|
|
|
26 |
* Localized in English, Chinese, Spanish, Arabic, French, Portuguese, Japanese, Italian, Dutch, Danish, Catalan, Persian, Russian, Turkish, Albanian, Romanian, Belarusian, Greek, Irish
|
27 |
* Easily <a href="http://www.addtoany.com/buttons/customize/wordpress">customizable</a> for beginners or advanced users, and <a href="/plugins/add-to-any/faq/" title="See 'How can I add both the universal button and the individual icons to another area of my theme?'">highly extensible</a> for developers and designers
|
28 |
* Supports theme features such as HTML5 & XHTML, widgets, infinite scroll, post formats
|
@@ -210,7 +212,7 @@ The Google+ Share Button width can be changed using CSS code, for instance: `.a2
|
|
210 |
|
211 |
= Does the plugin output W3C valid code? =
|
212 |
|
213 |
-
Yes, this plugin outputs 100% W3C valid
|
214 |
|
215 |
If you use the Facebook Like, Twitter Tweet or Google +1 buttons in an HTML5 theme, note that the button iframes use the `scrolling` attribute, which is valid XHTML but the attribute has been deprecated in HTML5. It's needed to prevent scrollbars from appearing over the Like, Tweet, and +1 buttons inside of the iframes.
|
216 |
|
@@ -239,6 +241,9 @@ Upload the plugin directory (including all files and directories within) to the
|
|
239 |
|
240 |
== Changelog ==
|
241 |
|
|
|
|
|
|
|
242 |
= 1.2.8.6 =
|
243 |
* Fix advanced caching option (most sites should not use this option)
|
244 |
|
3 |
Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, technorati, lockerz, addthis, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.9
|
6 |
+
Stable tag: 1.2.8.7
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
11 |
|
12 |
The WordPress sharing plugin to help people share, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, Tumblr, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
|
13 |
|
14 |
+
<a href="http://www.addtoany.com/" title="Sharing buttons">Share Buttons</a> demo
|
15 |
|
16 |
+
AddToAny's customizable social share icons let you optimize your blog posts & pages for specific social sites. Choose from over 100 individual services. Additional 3rd party buttons include the Facebook Like Button, Twitter Tweet Button, Pinterest Pin It Button, Google+ Share Button and Google +1 Button.
|
17 |
|
18 |
This sharing plugin lets you customize the AddToAny universal Smart Menu, which places the services visitors use at the top of the menu based on each visitor's usage. The Email tab makes it easy to share via Google Gmail, Yahoo! Mail, Outlook.com (Hotmail), AOL Mail, and any other web-based emailer or desktop program.
|
19 |
|
20 |
* **New**: Vector sharing buttons
|
21 |
+
* SVG sharing icons for the most popular services
|
22 |
+
* Universal Sharing Menu & Kit with individual share links
|
23 |
+
* Custom sharing icons
|
24 |
* Choose exactly where you want AddToAny to appear
|
25 |
* Google Analytics integration (<a href="http://www.addtoany.com/ext/google_analytics/">access guide</a>)
|
26 |
* WordPress optimized with asynchronous script loading
|
27 |
+
* Mobile optimized for sharing to native apps or to web apps per service
|
28 |
* Localized in English, Chinese, Spanish, Arabic, French, Portuguese, Japanese, Italian, Dutch, Danish, Catalan, Persian, Russian, Turkish, Albanian, Romanian, Belarusian, Greek, Irish
|
29 |
* Easily <a href="http://www.addtoany.com/buttons/customize/wordpress">customizable</a> for beginners or advanced users, and <a href="/plugins/add-to-any/faq/" title="See 'How can I add both the universal button and the individual icons to another area of my theme?'">highly extensible</a> for developers and designers
|
30 |
* Supports theme features such as HTML5 & XHTML, widgets, infinite scroll, post formats
|
212 |
|
213 |
= Does the plugin output W3C valid code? =
|
214 |
|
215 |
+
Yes, this plugin outputs 100% W3C valid HTML5 & XHTML and W3C valid CSS 3 by default.
|
216 |
|
217 |
If you use the Facebook Like, Twitter Tweet or Google +1 buttons in an HTML5 theme, note that the button iframes use the `scrolling` attribute, which is valid XHTML but the attribute has been deprecated in HTML5. It's needed to prevent scrollbars from appearing over the Like, Tweet, and +1 buttons inside of the iframes.
|
218 |
|
241 |
|
242 |
== Changelog ==
|
243 |
|
244 |
+
= 1.2.8.7 =
|
245 |
+
* Fix code styling
|
246 |
+
|
247 |
= 1.2.8.6 =
|
248 |
* Fix advanced caching option (most sites should not use this option)
|
249 |
|
add-to-any.php
CHANGED
@@ -3,24 +3,27 @@
|
|
3 |
Plugin Name: Share Buttons by AddToAny
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
-
Version: 1.2.8.
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
10 |
|
11 |
-
if( !isset($A2A_locale) )
|
12 |
$A2A_locale = '';
|
|
|
13 |
|
14 |
// Pre-2.6 compatibility
|
15 |
-
if ( ! defined('WP_CONTENT_URL') )
|
16 |
-
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
|
17 |
-
|
|
|
18 |
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
|
|
|
19 |
|
20 |
-
$A2A_SHARE_SAVE_plugin_basename = plugin_basename(dirname(__FILE__));
|
21 |
|
22 |
// WordPress Must-Use?
|
23 |
-
if ( basename(dirname(__FILE__)) ==
|
24 |
// __FILE__ expected in /wp-content/mu-plugins (parent directory for auto-execution)
|
25 |
// /wp-content/mu-plugins/add-to-any
|
26 |
$A2A_SHARE_SAVE_plugin_url_path = WPMU_PLUGIN_URL . '/add-to-any';
|
@@ -31,63 +34,68 @@ else {
|
|
31 |
$A2A_SHARE_SAVE_plugin_url_path = WP_PLUGIN_URL . '/' . $A2A_SHARE_SAVE_plugin_basename;
|
32 |
$A2A_SHARE_SAVE_plugin_dir = WP_PLUGIN_DIR . '/' . $A2A_SHARE_SAVE_plugin_basename;
|
33 |
}
|
34 |
-
|
35 |
|
36 |
// Fix SSL
|
37 |
-
if (is_ssl())
|
38 |
-
$A2A_SHARE_SAVE_plugin_url_path = str_replace('http:', 'https:', $A2A_SHARE_SAVE_plugin_url_path);
|
|
|
39 |
|
40 |
-
$A2A_SHARE_SAVE_options = get_option('addtoany_options');
|
41 |
|
42 |
function A2A_SHARE_SAVE_init() {
|
43 |
global $A2A_SHARE_SAVE_plugin_url_path,
|
44 |
$A2A_SHARE_SAVE_plugin_basename,
|
45 |
$A2A_SHARE_SAVE_options;
|
46 |
|
47 |
-
if (get_option('A2A_SHARE_SAVE_button')) {
|
48 |
A2A_SHARE_SAVE_migrate_options();
|
49 |
-
$A2A_SHARE_SAVE_options = get_option('addtoany_options');
|
50 |
}
|
51 |
|
52 |
-
load_plugin_textdomain('add-to-any',
|
53 |
-
$A2A_SHARE_SAVE_plugin_url_path.'/languages',
|
54 |
-
$A2A_SHARE_SAVE_plugin_basename.'/languages');
|
55 |
|
56 |
-
if ($A2A_SHARE_SAVE_options['display_in_excerpts'] != '-1') {
|
57 |
// Excerpts use strip_tags() for the_content, so cancel if Excerpt and append to the_excerpt instead
|
58 |
-
add_filter('get_the_excerpt', 'A2A_SHARE_SAVE_remove_from_content', 9);
|
59 |
-
add_filter('the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98);
|
60 |
}
|
61 |
}
|
62 |
-
add_filter('init', 'A2A_SHARE_SAVE_init');
|
63 |
|
64 |
-
function A2A_SHARE_SAVE_link_vars($linkname =
|
65 |
global $post;
|
66 |
|
67 |
// Set linkname
|
68 |
-
if (
|
69 |
-
if ( isset( $post ) )
|
70 |
-
$linkname = get_the_title($post->ID);
|
71 |
-
|
|
|
72 |
$linkname = '';
|
|
|
73 |
}
|
74 |
|
75 |
-
$linkname_enc
|
76 |
|
77 |
// Set linkurl
|
78 |
-
if (
|
79 |
-
if (isset( $post ))
|
80 |
-
$linkurl = get_permalink($post->ID);
|
81 |
-
|
|
|
82 |
$linkurl = '';
|
|
|
83 |
}
|
84 |
|
85 |
-
$linkurl_enc
|
86 |
|
87 |
return compact( 'linkname', 'linkname_enc', 'linkurl', 'linkurl_enc' );
|
88 |
}
|
89 |
|
90 |
-
include_once($A2A_SHARE_SAVE_plugin_dir . '/addtoany.services.php');
|
91 |
|
92 |
// Combine ADDTOANY_SHARE_SAVE_ICONS and ADDTOANY_SHARE_SAVE_BUTTON
|
93 |
function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
@@ -95,7 +103,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
95 |
|
96 |
$_addtoany_counter++;
|
97 |
|
98 |
-
$options = get_option('addtoany_options');
|
99 |
|
100 |
// If universal button disabled, and not manually disabled through args
|
101 |
if ( $options['button'] == 'NONE' && ! isset( $args['no_universal_button'] ) ) {
|
@@ -105,36 +113,36 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
105 |
}
|
106 |
|
107 |
// Set a2a_kit_size_## class name unless "icon_size" is set to '16'
|
108 |
-
if (
|
109 |
$icon_size = ' a2a_kit_size_32';
|
110 |
-
|
111 |
$icon_size = '';
|
112 |
else
|
113 |
$icon_size = ' a2a_kit_size_' . $options['icon_size'] . '';
|
114 |
|
115 |
-
if ( ! isset($args['html_container_open'])) {
|
116 |
$args['html_container_open'] = '<div class="a2a_kit' . $icon_size . ' a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">'; // ID is later removed by JS (for AJAX)
|
117 |
-
$args['is_kit'] =
|
118 |
}
|
119 |
-
if ( ! isset($args['html_container_close']))
|
120 |
$args['html_container_close'] = "</div>";
|
121 |
// Close container element in ADDTOANY_SHARE_SAVE_BUTTON, not prematurely in ADDTOANY_SHARE_SAVE_ICONS
|
122 |
$html_container_close = $args['html_container_close']; // Cache for _BUTTON
|
123 |
unset($args['html_container_close']); // Avoid passing to ADDTOANY_SHARE_SAVE_ICONS since set in _BUTTON
|
124 |
|
125 |
-
if ( ! isset($args['html_wrap_open']))
|
126 |
$args['html_wrap_open'] = "";
|
127 |
-
if ( ! isset($args['html_wrap_close']))
|
128 |
$args['html_wrap_close'] = "";
|
129 |
|
130 |
-
$kit_html = ADDTOANY_SHARE_SAVE_ICONS($args);
|
131 |
|
132 |
$args['html_container_close'] = $html_container_close; // Re-set because unset above for _ICONS
|
133 |
-
unset($args['html_container_open']); // Avoid passing to ADDTOANY_SHARE_SAVE_BUTTON since set in _ICONS
|
134 |
|
135 |
-
$kit_html .= ADDTOANY_SHARE_SAVE_BUTTON($args);
|
136 |
|
137 |
-
if (isset($args['output_later']) && $args['output_later'])
|
138 |
return $kit_html;
|
139 |
else
|
140 |
echo $kit_html;
|
@@ -146,38 +154,38 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
146 |
global $A2A_SHARE_SAVE_plugin_url_path,
|
147 |
$A2A_SHARE_SAVE_services;
|
148 |
|
149 |
-
$linkname = (isset($args['linkname'])) ? $args['linkname'] : FALSE;
|
150 |
-
$linkurl = (isset($args['linkurl'])) ? $args['linkurl'] : FALSE;
|
151 |
|
152 |
-
$args = array_merge($args, A2A_SHARE_SAVE_link_vars($linkname, $linkurl)); // linkname_enc, etc.
|
153 |
|
154 |
$defaults = array(
|
155 |
-
'linkname'
|
156 |
-
'linkurl'
|
157 |
-
'linkname_enc'
|
158 |
-
'linkurl_enc'
|
159 |
-
'output_later'
|
160 |
-
'html_container_open'
|
161 |
'html_container_close' => '',
|
162 |
-
'html_wrap_open'
|
163 |
-
'html_wrap_close'
|
164 |
);
|
165 |
|
166 |
$args = wp_parse_args( $args, $defaults );
|
167 |
extract( $args );
|
168 |
|
169 |
// Make available services extensible via plugins, themes (functions.php), etc.
|
170 |
-
$A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services);
|
171 |
|
172 |
-
$service_codes = (is_array($A2A_SHARE_SAVE_services)) ? array_keys($A2A_SHARE_SAVE_services) :
|
173 |
|
174 |
// Include Facebook Like and Twitter Tweet etc.
|
175 |
-
array_unshift($service_codes, 'facebook_like', 'twitter_tweet', 'google_plusone', 'google_plus_share', 'pinterest_pin');
|
176 |
|
177 |
-
$options = get_option('addtoany_options');
|
178 |
|
179 |
// False only if "icon_size" is set to '16'
|
180 |
-
$large_icons = ( isset($options['icon_size']) && $options['icon_size'] == '16' ) ?
|
181 |
|
182 |
$active_services = $options['active_services'];
|
183 |
|
@@ -189,51 +197,51 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
189 |
elseif ( empty( $active_services ) )
|
190 |
$active_services = array();
|
191 |
|
192 |
-
foreach($active_services as $active_service) {
|
193 |
|
194 |
-
if ( !in_array($active_service, $service_codes) )
|
195 |
continue;
|
196 |
|
197 |
-
if ($active_service == 'facebook_like' || $active_service == 'twitter_tweet' || $active_service == 'google_plusone' || $active_service == 'google_plus_share' || $active_service == 'pinterest_pin') {
|
198 |
$special_args = $args;
|
199 |
-
$special_args['output_later'] =
|
200 |
-
$link = ADDTOANY_SHARE_SAVE_SPECIAL($active_service, $special_args);
|
201 |
}
|
202 |
else {
|
203 |
-
$service = $A2A_SHARE_SAVE_services[$active_service];
|
204 |
$safe_name = $active_service;
|
205 |
$name = $service['name'];
|
206 |
|
207 |
// If HREF specified, presume custom service (except if it's "print")
|
208 |
if ( isset( $service['href'] ) && $safe_name != 'print' ) {
|
209 |
-
$custom_service =
|
210 |
$href = $service['href'];
|
211 |
-
if (isset($service['href_js_esc'])) {
|
212 |
-
$href_linkurl = str_replace("'", "\'", $linkurl);
|
213 |
-
$href_linkname = str_replace("'", "\'", $linkname);
|
214 |
} else {
|
215 |
$href_linkurl = $linkurl_enc;
|
216 |
$href_linkname = $linkname_enc;
|
217 |
}
|
218 |
-
$href = str_replace("A2A_LINKURL", $href_linkurl, $href);
|
219 |
-
$href = str_replace("A2A_LINKNAME", $href_linkname, $href);
|
220 |
-
$href = str_replace(" ", "%20", $href);
|
221 |
} else {
|
222 |
-
$custom_service =
|
223 |
}
|
224 |
|
225 |
-
$icon_url = (isset($service['icon_url'])) ? $service['icon_url'] :
|
226 |
-
$icon = (isset($service['icon'])) ? $service['icon'] : 'default'; // Just the icon filename
|
227 |
-
$width = (isset($service['icon_width'])) ? $service['icon_width'] : '16';
|
228 |
-
$height = (isset($service['icon_height'])) ? $service['icon_height'] : '16';
|
229 |
|
230 |
-
$url = ($custom_service) ? $href : "http://www.addtoany.com/add_to/" . $safe_name . "?linkurl=" . $linkurl_enc . "&linkname=" . $linkname_enc;
|
231 |
-
$src = ($icon_url) ? $icon_url : $A2A_SHARE_SAVE_plugin_url_path."/icons/"
|
232 |
-
$class_attr = ($custom_service) ? "" : " class=\"a2a_button_$safe_name\"";
|
233 |
|
234 |
-
$link = $html_wrap_open."<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
|
235 |
-
$link .= ($large_icons) ? "" : "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
|
236 |
-
$link .= "</a>"
|
237 |
}
|
238 |
|
239 |
$ind_html .= $link;
|
@@ -278,7 +286,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
278 |
extract( $args );
|
279 |
|
280 |
// If not enclosed in an AddToAny Kit, count & target this button (instead of Kit) for async loading
|
281 |
-
if ( ! $args['is_kit']) {
|
282 |
$_addtoany_counter++;
|
283 |
$button_class = ' a2a_target';
|
284 |
$button_id = ' id="wpa2a_' . $_addtoany_counter . '"'; // ID is later removed by JS (for AJAX)
|
@@ -292,7 +300,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
292 |
$is_feed = is_feed();
|
293 |
$button_target = '';
|
294 |
$button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&title=' . $linkname_enc : '';
|
295 |
-
$options = get_option('addtoany_options');
|
296 |
|
297 |
// If universal button is enabled
|
298 |
if ( ! $args['no_universal_button'] ) {
|
@@ -300,35 +308,35 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
300 |
if ( ! $options['button'] || $options['button'] == 'A2A_SVG_32' ) {
|
301 |
// Skip button IMG for A2A icon insertion
|
302 |
$button_text = '';
|
303 |
-
} else if( $options['button'] == 'CUSTOM' ) {
|
304 |
$button_src = $options['button_custom'];
|
305 |
$button_width = '';
|
306 |
$button_height = '';
|
307 |
-
} else if( $options['button'] == 'TEXT' ) {
|
308 |
-
$button_text = stripslashes($options['button_text']);
|
309 |
} else {
|
310 |
$button_attrs = explode( '|', $options['button'] );
|
311 |
$button_fname = $button_attrs[0];
|
312 |
-
$button_width = ' width="'
|
313 |
-
$button_height = ' height="'
|
314 |
-
$button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'
|
315 |
-
$button_text = stripslashes($options['button_text']);
|
316 |
}
|
317 |
|
318 |
$style = '';
|
319 |
|
320 |
-
if ( isset($button_fname) && ($button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
321 |
if ( ! $is_feed) {
|
322 |
-
$style_bg = 'background:url('
|
323 |
-
$style = ' style="'
|
324 |
}
|
325 |
}
|
326 |
|
327 |
-
if ( isset($button_text) && ( ! isset($button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
|
328 |
-
$button
|
329 |
} else {
|
330 |
$style = '';
|
331 |
-
$button
|
332 |
}
|
333 |
|
334 |
$button_html = $html_container_open . $html_wrap_open . '<a class="a2a_dd' . $button_class . ' addtoany_share_save" href="http://www.addtoany.com/share_save' .$button_href_querystring . '"' . $button_id
|
@@ -341,7 +349,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
341 |
}
|
342 |
|
343 |
// If not a feed
|
344 |
-
if( ! $is_feed ) {
|
345 |
if ($use_current_page) {
|
346 |
$button_config = "\n{title:document.title,"
|
347 |
. "url:location.href}";
|
@@ -382,7 +390,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
382 |
else $javascript_load_early = "";
|
383 |
|
384 |
$button_html .= $javascript_load_early . $javascript_button_config;
|
385 |
-
$_addtoany_init =
|
386 |
}
|
387 |
|
388 |
// Closing tags come after <script> to validate in case the container is a list element
|
@@ -394,49 +402,49 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
394 |
echo $button_html;
|
395 |
}
|
396 |
|
397 |
-
function ADDTOANY_SHARE_SAVE_SPECIAL($special_service_code, $args = array() ) {
|
398 |
// $args array = output_later, linkname, linkurl
|
399 |
|
400 |
-
$options = get_option('addtoany_options');
|
401 |
|
402 |
-
$linkname = (isset($args['linkname'])) ? $args['linkname'] : FALSE;
|
403 |
-
$linkurl = (isset($args['linkurl'])) ? $args['linkurl'] : FALSE;
|
404 |
|
405 |
-
$args = array_merge($args, A2A_SHARE_SAVE_link_vars($linkname, $linkurl)); // linkname_enc, etc.
|
406 |
extract( $args );
|
407 |
|
408 |
$special_anchor_template = '<a class="a2a_button_%1$s addtoany_special_service"%2$s></a>';
|
409 |
$custom_attributes = '';
|
410 |
|
411 |
-
if ($special_service_code == 'facebook_like') {
|
412 |
-
$custom_attributes .= ($options['special_facebook_like_options']['verb'] == 'recommend') ? ' data-action="recommend"' : '';
|
413 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
414 |
-
$special_html = sprintf($special_anchor_template, $special_service_code, $custom_attributes);
|
415 |
}
|
416 |
|
417 |
-
elseif ($special_service_code == 'twitter_tweet') {
|
418 |
-
$custom_attributes .= ($options['special_twitter_tweet_options']['show_count'] == '1') ? ' data-count="horizontal"' : ' data-count="none"';
|
419 |
$custom_attributes .= ' data-url="' . $linkurl . '"';
|
420 |
$custom_attributes .= ' data-text="' . $linkname . '"';
|
421 |
-
$special_html = sprintf($special_anchor_template, $special_service_code, $custom_attributes);
|
422 |
}
|
423 |
|
424 |
-
elseif ($special_service_code == 'google_plusone') {
|
425 |
-
$custom_attributes .= ($options['special_google_plusone_options']['show_count'] == '1') ? '' : ' data-annotation="none"';
|
426 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
427 |
-
$special_html = sprintf($special_anchor_template, $special_service_code, $custom_attributes);
|
428 |
}
|
429 |
|
430 |
-
elseif ($special_service_code == 'google_plus_share') {
|
431 |
-
$custom_attributes .= ($options['special_google_plus_share_options']['show_count'] == '1') ? '' : ' data-annotation="none"';
|
432 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
433 |
-
$special_html = sprintf($special_anchor_template, $special_service_code, $custom_attributes);
|
434 |
}
|
435 |
|
436 |
-
elseif ($special_service_code == 'pinterest_pin') {
|
437 |
-
$custom_attributes .= ($options['special_pinterest_pin_options']['show_count'] == '1') ? '' : ' data-pin-config="none"';
|
438 |
$custom_attributes .= ' data-url="' . $linkurl . '"';
|
439 |
-
$special_html = sprintf($special_anchor_template, $special_service_code, $custom_attributes);
|
440 |
}
|
441 |
|
442 |
if ( $output_later )
|
@@ -445,31 +453,31 @@ function ADDTOANY_SHARE_SAVE_SPECIAL($special_service_code, $args = array() ) {
|
|
445 |
echo $special_html;
|
446 |
}
|
447 |
|
448 |
-
if (!function_exists('A2A_menu_locale')) {
|
449 |
function A2A_menu_locale() {
|
450 |
global $A2A_locale;
|
451 |
$locale = get_locale();
|
452 |
-
if($locale == 'en_US' || $locale == 'en' || $A2A_locale != '' )
|
453 |
return false;
|
454 |
|
455 |
$A2A_locale = 'a2a_localize = {
|
456 |
-
Share: "' . __("Share", "add-to-any") . '",
|
457 |
-
Save: "' . __("Save", "add-to-any") . '",
|
458 |
-
Subscribe: "' . __("Subscribe", "add-to-any") . '",
|
459 |
-
Email: "' . __("Email", "add-to-any") . '",
|
460 |
-
Bookmark: "' . __("Bookmark", "add-to-any") . '",
|
461 |
-
ShowAll: "' . __("Show all", "add-to-any") . '",
|
462 |
-
ShowLess: "' . __("Show less", "add-to-any") . '",
|
463 |
-
FindServices: "' . __("Find service(s)", "add-to-any") . '",
|
464 |
-
FindAnyServiceToAddTo: "' . __("Instantly find any service to add to", "add-to-any") . '",
|
465 |
-
PoweredBy: "' . __("Powered by", "add-to-any") . '",
|
466 |
-
ShareViaEmail: "' . __("Share via email", "add-to-any") . '",
|
467 |
-
SubscribeViaEmail: "' . __("Subscribe via email", "add-to-any") . '",
|
468 |
-
BookmarkInYourBrowser: "' . __("Bookmark in your browser", "add-to-any") . '",
|
469 |
-
BookmarkInstructions: "' . __("Press Ctrl+D or \u2318+D to bookmark this page", "add-to-any") . '",
|
470 |
-
AddToYourFavorites: "' . __("Add to your favorites", "add-to-any") . '",
|
471 |
-
SendFromWebOrProgram: "' . __("Send from any email address or email program", "add-to-any") . '",
|
472 |
-
EmailProgram: "' . __("Email program", "add-to-any") . '"
|
473 |
};
|
474 |
';
|
475 |
return $A2A_locale;
|
@@ -478,26 +486,26 @@ if (!function_exists('A2A_menu_locale')) {
|
|
478 |
|
479 |
|
480 |
function A2A_SHARE_SAVE_head_script() {
|
481 |
-
if (is_admin())
|
482 |
return;
|
483 |
|
484 |
-
$options = get_option('addtoany_options');
|
485 |
|
486 |
-
$http_or_https = (is_ssl()) ? 'https' : 'http';
|
487 |
|
488 |
global $A2A_SHARE_SAVE_external_script_called;
|
489 |
if ( ! $A2A_SHARE_SAVE_external_script_called ) {
|
490 |
// Use local cache?
|
491 |
-
$cache = ($options['cache']=='1') ?
|
492 |
$upload_dir = wp_upload_dir();
|
493 |
-
$static_server = ($cache) ? $upload_dir['baseurl'] . '/addtoany' : $http_or_https . '://static.addtoany.com/menu';
|
494 |
|
495 |
// Enternal script call + initial JS + set-once variables
|
496 |
$additional_js = $options['additional_js_variables'];
|
497 |
-
$script_configs = (($cache) ? "\n" . 'a2a_config.static_server="' . $static_server . '";' : '' )
|
498 |
-
. (($options['onclick']=='1') ? "\n" . 'a2a_config.onclick=1;' : '')
|
499 |
-
. (($options['show_title']=='1') ? "\n" . 'a2a_config.show_title=1;' : '')
|
500 |
-
. (($additional_js) ? "\n" . stripslashes($additional_js) : '');
|
501 |
$A2A_SHARE_SAVE_external_script_called = true;
|
502 |
}
|
503 |
else {
|
@@ -549,19 +557,19 @@ function A2A_SHARE_SAVE_head_script() {
|
|
549 |
echo $javascript_header;
|
550 |
}
|
551 |
|
552 |
-
add_action('wp_head', 'A2A_SHARE_SAVE_head_script');
|
553 |
|
554 |
function A2A_SHARE_SAVE_footer_script() {
|
555 |
global $_addtoany_targets;
|
556 |
|
557 |
-
if (is_admin())
|
558 |
return;
|
559 |
|
560 |
-
$_addtoany_targets = (isset($_addtoany_targets)) ? $_addtoany_targets : array();
|
561 |
|
562 |
$javascript_footer = "\n" . '<script type="text/javascript">' . "<!--\n"
|
563 |
. "wpa2a.targets=["
|
564 |
-
. implode(",", $_addtoany_targets)
|
565 |
. "];\n"
|
566 |
. "wpa2a.html_done=true;"
|
567 |
. "if(wpa2a.script_ready&&!wpa2a.done)wpa2a.init();" // External script may load before html_done=true, but will only init if html_done=true. So call wpa2a.init() if external script is ready, and if wpa2a.init() hasn't been called already. Otherwise, wait for callback to call wpa2a.init()
|
@@ -571,7 +579,7 @@ function A2A_SHARE_SAVE_footer_script() {
|
|
571 |
echo $javascript_footer;
|
572 |
}
|
573 |
|
574 |
-
add_action('wp_footer', 'A2A_SHARE_SAVE_footer_script');
|
575 |
|
576 |
|
577 |
|
@@ -580,40 +588,40 @@ function A2A_SHARE_SAVE_theme_hooks_check() {
|
|
580 |
|
581 |
// If footer.php exists in the current theme, scan for "wp_footer"
|
582 |
$file = $template_directory . '/footer.php';
|
583 |
-
if (is_file($file)) {
|
584 |
$search_string = "wp_footer";
|
585 |
-
$file_lines = @file($file);
|
586 |
|
587 |
-
foreach ($file_lines as $line) {
|
588 |
-
$searchCount = substr_count($line, $search_string);
|
589 |
-
if ($searchCount > 0) {
|
590 |
return true;
|
591 |
}
|
592 |
}
|
593 |
|
594 |
// wp_footer() not found:
|
595 |
-
echo "<div class=\"update-nag\">" . __("Your theme needs to be fixed. To fix your theme, use the <a href=\"theme-editor.php\">Theme Editor</a> to insert <code><?php wp_footer(); ?></code> just before the <code></body></code> line of your theme's <code>footer.php</code> file.") . "</div>";
|
596 |
}
|
597 |
|
598 |
// If header.php exists in the current theme, scan for "wp_head"
|
599 |
$file = $template_directory . '/header.php';
|
600 |
-
if (is_file($file)) {
|
601 |
$search_string = "wp_head";
|
602 |
-
$file_lines = @file($file);
|
603 |
|
604 |
-
foreach ($file_lines as $line) {
|
605 |
-
$searchCount = substr_count($line, $search_string);
|
606 |
-
if ($searchCount > 0) {
|
607 |
return true;
|
608 |
}
|
609 |
}
|
610 |
|
611 |
// wp_footer() not found:
|
612 |
-
echo "<div class=\"update-nag\">" . __("Your theme needs to be fixed. To fix your theme, use the <a href=\"theme-editor.php\">Theme Editor</a> to insert <code><?php wp_head(); ?></code> just before the <code></head></code> line of your theme's <code>header.php</code> file.") . "</div>";
|
613 |
}
|
614 |
}
|
615 |
|
616 |
-
function A2A_SHARE_SAVE_auto_placement($title) {
|
617 |
global $A2A_SHARE_SAVE_auto_placement_ready;
|
618 |
$A2A_SHARE_SAVE_auto_placement_ready = true;
|
619 |
|
@@ -624,9 +632,9 @@ function A2A_SHARE_SAVE_auto_placement($title) {
|
|
624 |
/**
|
625 |
* Remove the_content filter and add it for next time
|
626 |
*/
|
627 |
-
function A2A_SHARE_SAVE_remove_from_content($content) {
|
628 |
-
remove_filter('the_content', 'A2A_SHARE_SAVE_add_to_content', 98);
|
629 |
-
add_filter('the_content', 'A2A_SHARE_SAVE_add_to_content_next_time', 98);
|
630 |
|
631 |
return $content;
|
632 |
}
|
@@ -634,24 +642,24 @@ function A2A_SHARE_SAVE_remove_from_content($content) {
|
|
634 |
/**
|
635 |
* Apply the_content filter "next time"
|
636 |
*/
|
637 |
-
function A2A_SHARE_SAVE_add_to_content_next_time($content) {
|
638 |
-
add_filter('the_content', 'A2A_SHARE_SAVE_add_to_content', 98);
|
639 |
|
640 |
return $content;
|
641 |
}
|
642 |
|
643 |
|
644 |
-
function A2A_SHARE_SAVE_add_to_content($content) {
|
645 |
global $A2A_SHARE_SAVE_auto_placement_ready;
|
646 |
|
647 |
$is_feed = is_feed();
|
648 |
-
$options = get_option('addtoany_options');
|
649 |
$sharing_disabled = get_post_meta( get_the_ID(), 'sharing_disabled', true );
|
650 |
|
651 |
-
if( ! $A2A_SHARE_SAVE_auto_placement_ready)
|
652 |
return $content;
|
653 |
|
654 |
-
if (get_post_status(get_the_ID()) == 'private')
|
655 |
return $content;
|
656 |
|
657 |
// Disabled for this post?
|
@@ -662,28 +670,28 @@ function A2A_SHARE_SAVE_add_to_content($content) {
|
|
662 |
(
|
663 |
// Legacy tags
|
664 |
// <!--sharesave--> tag
|
665 |
-
strpos($content, '<!--sharesave-->')===false ||
|
666 |
// <!--nosharesave--> tag
|
667 |
-
strpos($content, '<!--nosharesave-->')!==false
|
668 |
) &&
|
669 |
(
|
670 |
// Posts
|
671 |
// All posts
|
672 |
-
( ! is_page() && $options['display_in_posts']=='-1' ) ||
|
673 |
// Front page posts
|
674 |
-
( is_home() && $options['display_in_posts_on_front_page']=='-1' ) ||
|
675 |
// Archive page posts (Category, Tag, Author and Date pages)
|
676 |
-
( is_archive() && $options['display_in_posts_on_archive_pages']=='-1' ) ||
|
677 |
// Search results posts (same as Archive page posts option)
|
678 |
-
( is_search() && $options['display_in_posts_on_archive_pages']=='-1' ) ||
|
679 |
// Posts in feed
|
680 |
-
( $is_feed && ($options['display_in_feed']=='-1' ) ||
|
681 |
|
682 |
// Pages
|
683 |
// Individual pages
|
684 |
-
( is_page() && $options['display_in_pages']=='-1' ) ||
|
685 |
// <!--nosharesave--> legacy tag
|
686 |
-
( (strpos($content, '<!--nosharesave-->')!==false) )
|
687 |
)
|
688 |
)
|
689 |
)
|
@@ -691,7 +699,7 @@ function A2A_SHARE_SAVE_add_to_content($content) {
|
|
691 |
|
692 |
$kit_args = array(
|
693 |
"output_later" => true,
|
694 |
-
"is_kit" => ($is_feed) ?
|
695 |
);
|
696 |
|
697 |
if ( ! $is_feed ) {
|
@@ -706,7 +714,7 @@ function A2A_SHARE_SAVE_add_to_content($content) {
|
|
706 |
$kit_args['html_wrap_close'] = '';
|
707 |
}
|
708 |
|
709 |
-
$options['position'] = isset($options['position']) ? $options['position'] : 'bottom';
|
710 |
|
711 |
if ($options['position'] == 'both' || $options['position'] == 'top') {
|
712 |
// Prepend to content
|
@@ -721,8 +729,8 @@ function A2A_SHARE_SAVE_add_to_content($content) {
|
|
721 |
}
|
722 |
|
723 |
// Only automatically output button code after the_title has been called - to avoid premature calling from misc. the_content filters (especially meta description)
|
724 |
-
add_filter('the_title', 'A2A_SHARE_SAVE_auto_placement', 9);
|
725 |
-
add_filter('the_content', 'A2A_SHARE_SAVE_add_to_content', 98);
|
726 |
|
727 |
|
728 |
// [addtoany url="http://example.com/page.html" title="Some Example Page"]
|
@@ -731,12 +739,12 @@ function A2A_SHARE_SAVE_shortcode( $attributes ) {
|
|
731 |
'url' => 'something',
|
732 |
'title' => 'something else',
|
733 |
), $attributes ) );
|
734 |
-
$linkname = (isset($attributes['title'])) ? $attributes['title'] :
|
735 |
-
$linkurl = (isset($attributes['url'])) ? $attributes['url'] :
|
736 |
$output_later = TRUE;
|
737 |
|
738 |
return '<div class="addtoany_shortcode">'
|
739 |
-
. ADDTOANY_SHARE_SAVE_KIT( compact('linkname', 'linkurl', 'output_later') )
|
740 |
. '</div>';
|
741 |
}
|
742 |
|
@@ -747,12 +755,12 @@ function A2A_SHARE_SAVE_stylesheet() {
|
|
747 |
global $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_url_path;
|
748 |
|
749 |
// Use stylesheet?
|
750 |
-
if ($A2A_SHARE_SAVE_options['inline_css'] != '-1' && ! is_admin()) {
|
751 |
-
wp_enqueue_style('A2A_SHARE_SAVE', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.css', false, '1.6');
|
752 |
}
|
753 |
}
|
754 |
|
755 |
-
add_action('wp_print_styles', 'A2A_SHARE_SAVE_stylesheet');
|
756 |
|
757 |
|
758 |
|
@@ -774,7 +782,7 @@ function A2A_SHARE_SAVE_refresh_cache() {
|
|
774 |
if ( count( $file_urls ) > 0 ) {
|
775 |
for ( $i = 0; $i < count( $file_urls ); $i++ ) {
|
776 |
// Download files
|
777 |
-
$file_url = trim( $file_urls[$i] );
|
778 |
$file_name = substr( strrchr( $file_url, '/' ), 1, 99 );
|
779 |
|
780 |
// Place files in uploads/addtoany directory
|
@@ -810,10 +818,10 @@ if ( is_admin() ) {
|
|
810 |
function A2A_SHARE_SAVE_add_menu_link() {
|
811 |
if ( current_user_can( 'manage_options' ) ) {
|
812 |
$page = add_options_page(
|
813 |
-
'AddToAny: '. __("Share/Save", "add-to-any"). " " . __("Settings")
|
814 |
-
, __("AddToAny", "add-to-any")
|
815 |
, 'activate_plugins'
|
816 |
-
, basename(__FILE__)
|
817 |
, 'A2A_SHARE_SAVE_options_page'
|
818 |
);
|
819 |
|
@@ -834,16 +842,16 @@ function A2A_SHARE_SAVE_widget_init() {
|
|
834 |
add_action( 'widgets_init', 'A2A_SHARE_SAVE_widget_init' );
|
835 |
|
836 |
// Place in Option List on Settings > Plugins page
|
837 |
-
function A2A_SHARE_SAVE_actlinks( $links, $file ){
|
838 |
// Static so we don't call plugin_basename on every plugin row.
|
839 |
static $this_plugin;
|
840 |
|
841 |
if ( ! $this_plugin ) {
|
842 |
-
$this_plugin = plugin_basename(__FILE__);
|
843 |
}
|
844 |
|
845 |
if ( $file == $this_plugin ) {
|
846 |
-
$settings_link = '<a href="options-general.php?page=add-to-any.php">' . __('Settings') . '</a>';
|
847 |
array_unshift( $links, $settings_link ); // before other links
|
848 |
}
|
849 |
|
3 |
Plugin Name: Share Buttons by AddToAny
|
4 |
Plugin URI: http://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
|
6 |
+
Version: 1.2.8.7
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
10 |
|
11 |
+
if ( ! isset( $A2A_locale ) ) {
|
12 |
$A2A_locale = '';
|
13 |
+
}
|
14 |
|
15 |
// Pre-2.6 compatibility
|
16 |
+
if ( ! defined( 'WP_CONTENT_URL' ) ) {
|
17 |
+
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content');
|
18 |
+
}
|
19 |
+
if ( ! defined( 'WP_PLUGIN_URL' ) ) {
|
20 |
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
|
21 |
+
}
|
22 |
|
23 |
+
$A2A_SHARE_SAVE_plugin_basename = plugin_basename( dirname( __FILE__ ) );
|
24 |
|
25 |
// WordPress Must-Use?
|
26 |
+
if ( basename( dirname( __FILE__ ) ) == 'mu-plugins' ) {
|
27 |
// __FILE__ expected in /wp-content/mu-plugins (parent directory for auto-execution)
|
28 |
// /wp-content/mu-plugins/add-to-any
|
29 |
$A2A_SHARE_SAVE_plugin_url_path = WPMU_PLUGIN_URL . '/add-to-any';
|
34 |
$A2A_SHARE_SAVE_plugin_url_path = WP_PLUGIN_URL . '/' . $A2A_SHARE_SAVE_plugin_basename;
|
35 |
$A2A_SHARE_SAVE_plugin_dir = WP_PLUGIN_DIR . '/' . $A2A_SHARE_SAVE_plugin_basename;
|
36 |
}
|
37 |
+
|
38 |
|
39 |
// Fix SSL
|
40 |
+
if ( is_ssl() ) {
|
41 |
+
$A2A_SHARE_SAVE_plugin_url_path = str_replace( 'http:', 'https:', $A2A_SHARE_SAVE_plugin_url_path );
|
42 |
+
}
|
43 |
|
44 |
+
$A2A_SHARE_SAVE_options = get_option( 'addtoany_options' );
|
45 |
|
46 |
function A2A_SHARE_SAVE_init() {
|
47 |
global $A2A_SHARE_SAVE_plugin_url_path,
|
48 |
$A2A_SHARE_SAVE_plugin_basename,
|
49 |
$A2A_SHARE_SAVE_options;
|
50 |
|
51 |
+
if ( get_option( 'A2A_SHARE_SAVE_button' ) ) {
|
52 |
A2A_SHARE_SAVE_migrate_options();
|
53 |
+
$A2A_SHARE_SAVE_options = get_option( 'addtoany_options' );
|
54 |
}
|
55 |
|
56 |
+
load_plugin_textdomain( 'add-to-any',
|
57 |
+
$A2A_SHARE_SAVE_plugin_url_path . '/languages',
|
58 |
+
$A2A_SHARE_SAVE_plugin_basename . '/languages' );
|
59 |
|
60 |
+
if ( $A2A_SHARE_SAVE_options['display_in_excerpts'] != '-1' ) {
|
61 |
// Excerpts use strip_tags() for the_content, so cancel if Excerpt and append to the_excerpt instead
|
62 |
+
add_filter( 'get_the_excerpt', 'A2A_SHARE_SAVE_remove_from_content', 9 );
|
63 |
+
add_filter( 'the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
64 |
}
|
65 |
}
|
66 |
+
add_filter( 'init', 'A2A_SHARE_SAVE_init' );
|
67 |
|
68 |
+
function A2A_SHARE_SAVE_link_vars( $linkname = false, $linkurl = false ) {
|
69 |
global $post;
|
70 |
|
71 |
// Set linkname
|
72 |
+
if ( ! $linkname ) {
|
73 |
+
if ( isset( $post ) ) {
|
74 |
+
$linkname = get_the_title( $post->ID );
|
75 |
+
}
|
76 |
+
else {
|
77 |
$linkname = '';
|
78 |
+
}
|
79 |
}
|
80 |
|
81 |
+
$linkname_enc = rawurlencode( html_entity_decode( $linkname, ENT_QUOTES, 'UTF-8' ) );
|
82 |
|
83 |
// Set linkurl
|
84 |
+
if ( ! $linkurl ) {
|
85 |
+
if ( isset( $post ) ) {
|
86 |
+
$linkurl = get_permalink( $post->ID );
|
87 |
+
}
|
88 |
+
else {
|
89 |
$linkurl = '';
|
90 |
+
}
|
91 |
}
|
92 |
|
93 |
+
$linkurl_enc = rawurlencode( $linkurl );
|
94 |
|
95 |
return compact( 'linkname', 'linkname_enc', 'linkurl', 'linkurl_enc' );
|
96 |
}
|
97 |
|
98 |
+
include_once( $A2A_SHARE_SAVE_plugin_dir . '/addtoany.services.php' );
|
99 |
|
100 |
// Combine ADDTOANY_SHARE_SAVE_ICONS and ADDTOANY_SHARE_SAVE_BUTTON
|
101 |
function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
103 |
|
104 |
$_addtoany_counter++;
|
105 |
|
106 |
+
$options = get_option( 'addtoany_options' );
|
107 |
|
108 |
// If universal button disabled, and not manually disabled through args
|
109 |
if ( $options['button'] == 'NONE' && ! isset( $args['no_universal_button'] ) ) {
|
113 |
}
|
114 |
|
115 |
// Set a2a_kit_size_## class name unless "icon_size" is set to '16'
|
116 |
+
if ( ! $options['icon_size'] )
|
117 |
$icon_size = ' a2a_kit_size_32';
|
118 |
+
elseif ( $options['icon_size'] == '16' )
|
119 |
$icon_size = '';
|
120 |
else
|
121 |
$icon_size = ' a2a_kit_size_' . $options['icon_size'] . '';
|
122 |
|
123 |
+
if ( ! isset( $args['html_container_open'] ) ) {
|
124 |
$args['html_container_open'] = '<div class="a2a_kit' . $icon_size . ' a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">'; // ID is later removed by JS (for AJAX)
|
125 |
+
$args['is_kit'] = true;
|
126 |
}
|
127 |
+
if ( ! isset( $args['html_container_close'] ) )
|
128 |
$args['html_container_close'] = "</div>";
|
129 |
// Close container element in ADDTOANY_SHARE_SAVE_BUTTON, not prematurely in ADDTOANY_SHARE_SAVE_ICONS
|
130 |
$html_container_close = $args['html_container_close']; // Cache for _BUTTON
|
131 |
unset($args['html_container_close']); // Avoid passing to ADDTOANY_SHARE_SAVE_ICONS since set in _BUTTON
|
132 |
|
133 |
+
if ( ! isset( $args['html_wrap_open'] ) )
|
134 |
$args['html_wrap_open'] = "";
|
135 |
+
if ( ! isset( $args['html_wrap_close'] ) )
|
136 |
$args['html_wrap_close'] = "";
|
137 |
|
138 |
+
$kit_html = ADDTOANY_SHARE_SAVE_ICONS( $args );
|
139 |
|
140 |
$args['html_container_close'] = $html_container_close; // Re-set because unset above for _ICONS
|
141 |
+
unset( $args['html_container_open'] ); // Avoid passing to ADDTOANY_SHARE_SAVE_BUTTON since set in _ICONS
|
142 |
|
143 |
+
$kit_html .= ADDTOANY_SHARE_SAVE_BUTTON( $args );
|
144 |
|
145 |
+
if ( isset( $args['output_later'] ) && $args['output_later'] )
|
146 |
return $kit_html;
|
147 |
else
|
148 |
echo $kit_html;
|
154 |
global $A2A_SHARE_SAVE_plugin_url_path,
|
155 |
$A2A_SHARE_SAVE_services;
|
156 |
|
157 |
+
$linkname = ( isset( $args['linkname'] ) ) ? $args['linkname'] : FALSE;
|
158 |
+
$linkurl = ( isset( $args['linkurl'] ) ) ? $args['linkurl'] : FALSE;
|
159 |
|
160 |
+
$args = array_merge( $args, A2A_SHARE_SAVE_link_vars( $linkname, $linkurl ) ); // linkname_enc, etc.
|
161 |
|
162 |
$defaults = array(
|
163 |
+
'linkname' => '',
|
164 |
+
'linkurl' => '',
|
165 |
+
'linkname_enc' => '',
|
166 |
+
'linkurl_enc' => '',
|
167 |
+
'output_later' => false,
|
168 |
+
'html_container_open' => '',
|
169 |
'html_container_close' => '',
|
170 |
+
'html_wrap_open' => '',
|
171 |
+
'html_wrap_close' => '',
|
172 |
);
|
173 |
|
174 |
$args = wp_parse_args( $args, $defaults );
|
175 |
extract( $args );
|
176 |
|
177 |
// Make available services extensible via plugins, themes (functions.php), etc.
|
178 |
+
$A2A_SHARE_SAVE_services = apply_filters( 'A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services );
|
179 |
|
180 |
+
$service_codes = ( is_array( $A2A_SHARE_SAVE_services ) ) ? array_keys( $A2A_SHARE_SAVE_services ) : array();
|
181 |
|
182 |
// Include Facebook Like and Twitter Tweet etc.
|
183 |
+
array_unshift( $service_codes, 'facebook_like', 'twitter_tweet', 'google_plusone', 'google_plus_share', 'pinterest_pin' );
|
184 |
|
185 |
+
$options = get_option( 'addtoany_options' );
|
186 |
|
187 |
// False only if "icon_size" is set to '16'
|
188 |
+
$large_icons = ( isset( $options['icon_size'] ) && $options['icon_size'] == '16' ) ? false : true;
|
189 |
|
190 |
$active_services = $options['active_services'];
|
191 |
|
197 |
elseif ( empty( $active_services ) )
|
198 |
$active_services = array();
|
199 |
|
200 |
+
foreach( $active_services as $active_service ) {
|
201 |
|
202 |
+
if ( ! in_array( $active_service, $service_codes ) )
|
203 |
continue;
|
204 |
|
205 |
+
if ( $active_service == 'facebook_like' || $active_service == 'twitter_tweet' || $active_service == 'google_plusone' || $active_service == 'google_plus_share' || $active_service == 'pinterest_pin' ) {
|
206 |
$special_args = $args;
|
207 |
+
$special_args['output_later'] = true;
|
208 |
+
$link = ADDTOANY_SHARE_SAVE_SPECIAL( $active_service, $special_args );
|
209 |
}
|
210 |
else {
|
211 |
+
$service = $A2A_SHARE_SAVE_services[ $active_service ];
|
212 |
$safe_name = $active_service;
|
213 |
$name = $service['name'];
|
214 |
|
215 |
// If HREF specified, presume custom service (except if it's "print")
|
216 |
if ( isset( $service['href'] ) && $safe_name != 'print' ) {
|
217 |
+
$custom_service = true;
|
218 |
$href = $service['href'];
|
219 |
+
if ( isset( $service['href_js_esc'] ) ) {
|
220 |
+
$href_linkurl = str_replace( "'", "\'", $linkurl );
|
221 |
+
$href_linkname = str_replace( "'", "\'", $linkname );
|
222 |
} else {
|
223 |
$href_linkurl = $linkurl_enc;
|
224 |
$href_linkname = $linkname_enc;
|
225 |
}
|
226 |
+
$href = str_replace( "A2A_LINKURL", $href_linkurl, $href );
|
227 |
+
$href = str_replace( "A2A_LINKNAME", $href_linkname, $href );
|
228 |
+
$href = str_replace( " ", "%20", $href );
|
229 |
} else {
|
230 |
+
$custom_service = false;
|
231 |
}
|
232 |
|
233 |
+
$icon_url = ( isset( $service['icon_url'] ) ) ? $service['icon_url'] : false;
|
234 |
+
$icon = ( isset( $service['icon'] ) ) ? $service['icon'] : 'default'; // Just the icon filename
|
235 |
+
$width = ( isset( $service['icon_width'] ) ) ? $service['icon_width'] : '16';
|
236 |
+
$height = ( isset( $service['icon_height'] ) ) ? $service['icon_height'] : '16';
|
237 |
|
238 |
+
$url = ( $custom_service ) ? $href : "http://www.addtoany.com/add_to/" . $safe_name . "?linkurl=" . $linkurl_enc . "&linkname=" . $linkname_enc;
|
239 |
+
$src = ( $icon_url ) ? $icon_url : $A2A_SHARE_SAVE_plugin_url_path . "/icons/" . $icon . ".png";
|
240 |
+
$class_attr = ( $custom_service ) ? "" : " class=\"a2a_button_$safe_name\"";
|
241 |
|
242 |
+
$link = $html_wrap_open . "<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
|
243 |
+
$link .= ( $large_icons ) ? "" : "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
|
244 |
+
$link .= "</a>" . $html_wrap_close;
|
245 |
}
|
246 |
|
247 |
$ind_html .= $link;
|
286 |
extract( $args );
|
287 |
|
288 |
// If not enclosed in an AddToAny Kit, count & target this button (instead of Kit) for async loading
|
289 |
+
if ( ! $args['is_kit'] ) {
|
290 |
$_addtoany_counter++;
|
291 |
$button_class = ' a2a_target';
|
292 |
$button_id = ' id="wpa2a_' . $_addtoany_counter . '"'; // ID is later removed by JS (for AJAX)
|
300 |
$is_feed = is_feed();
|
301 |
$button_target = '';
|
302 |
$button_href_querystring = ($is_feed) ? '#url=' . $linkurl_enc . '&title=' . $linkname_enc : '';
|
303 |
+
$options = get_option( 'addtoany_options' );
|
304 |
|
305 |
// If universal button is enabled
|
306 |
if ( ! $args['no_universal_button'] ) {
|
308 |
if ( ! $options['button'] || $options['button'] == 'A2A_SVG_32' ) {
|
309 |
// Skip button IMG for A2A icon insertion
|
310 |
$button_text = '';
|
311 |
+
} else if ( $options['button'] == 'CUSTOM' ) {
|
312 |
$button_src = $options['button_custom'];
|
313 |
$button_width = '';
|
314 |
$button_height = '';
|
315 |
+
} else if ( $options['button'] == 'TEXT' ) {
|
316 |
+
$button_text = stripslashes( $options[ 'button_text'] );
|
317 |
} else {
|
318 |
$button_attrs = explode( '|', $options['button'] );
|
319 |
$button_fname = $button_attrs[0];
|
320 |
+
$button_width = ' width="' . $button_attrs[1] . '"';
|
321 |
+
$button_height = ' height="' . $button_attrs[2] . '"';
|
322 |
+
$button_src = $A2A_SHARE_SAVE_plugin_url_path . '/' . $button_fname;
|
323 |
+
$button_text = stripslashes( $options['button_text'] );
|
324 |
}
|
325 |
|
326 |
$style = '';
|
327 |
|
328 |
+
if ( isset( $button_fname ) && ( $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) ) {
|
329 |
if ( ! $is_feed) {
|
330 |
+
$style_bg = 'background:url(' . $A2A_SHARE_SAVE_plugin_url_path . '/' . $button_fname . ') no-repeat scroll 4px 0px !important;';
|
331 |
+
$style = ' style="' . $style_bg . 'padding:0 0 0 25px;display:inline-block;height:16px;vertical-align:middle"'; // padding-left:21+4 (4=other icons padding)
|
332 |
}
|
333 |
}
|
334 |
|
335 |
+
if ( isset( $button_text ) && ( ! isset( $button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) ) {
|
336 |
+
$button = $button_text;
|
337 |
} else {
|
338 |
$style = '';
|
339 |
+
$button = '<img src="' . $button_src . '"' . $button_width . $button_height . ' alt="Share"/>';
|
340 |
}
|
341 |
|
342 |
$button_html = $html_container_open . $html_wrap_open . '<a class="a2a_dd' . $button_class . ' addtoany_share_save" href="http://www.addtoany.com/share_save' .$button_href_querystring . '"' . $button_id
|
349 |
}
|
350 |
|
351 |
// If not a feed
|
352 |
+
if ( ! $is_feed ) {
|
353 |
if ($use_current_page) {
|
354 |
$button_config = "\n{title:document.title,"
|
355 |
. "url:location.href}";
|
390 |
else $javascript_load_early = "";
|
391 |
|
392 |
$button_html .= $javascript_load_early . $javascript_button_config;
|
393 |
+
$_addtoany_init = true;
|
394 |
}
|
395 |
|
396 |
// Closing tags come after <script> to validate in case the container is a list element
|
402 |
echo $button_html;
|
403 |
}
|
404 |
|
405 |
+
function ADDTOANY_SHARE_SAVE_SPECIAL( $special_service_code, $args = array() ) {
|
406 |
// $args array = output_later, linkname, linkurl
|
407 |
|
408 |
+
$options = get_option( 'addtoany_options' );
|
409 |
|
410 |
+
$linkname = ( isset( $args['linkname'] ) ) ? $args['linkname'] : FALSE;
|
411 |
+
$linkurl = ( isset( $args['linkurl'] ) ) ? $args['linkurl'] : FALSE;
|
412 |
|
413 |
+
$args = array_merge( $args, A2A_SHARE_SAVE_link_vars( $linkname, $linkurl ) ); // linkname_enc, etc.
|
414 |
extract( $args );
|
415 |
|
416 |
$special_anchor_template = '<a class="a2a_button_%1$s addtoany_special_service"%2$s></a>';
|
417 |
$custom_attributes = '';
|
418 |
|
419 |
+
if ( $special_service_code == 'facebook_like' ) {
|
420 |
+
$custom_attributes .= ( $options['special_facebook_like_options']['verb'] == 'recommend' ) ? ' data-action="recommend"' : '';
|
421 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
422 |
+
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
423 |
}
|
424 |
|
425 |
+
elseif ( $special_service_code == 'twitter_tweet' ) {
|
426 |
+
$custom_attributes .= ( $options['special_twitter_tweet_options']['show_count'] == '1' ) ? ' data-count="horizontal"' : ' data-count="none"';
|
427 |
$custom_attributes .= ' data-url="' . $linkurl . '"';
|
428 |
$custom_attributes .= ' data-text="' . $linkname . '"';
|
429 |
+
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
430 |
}
|
431 |
|
432 |
+
elseif ( $special_service_code == 'google_plusone' ) {
|
433 |
+
$custom_attributes .= ( $options['special_google_plusone_options']['show_count'] == '1' ) ? '' : ' data-annotation="none"';
|
434 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
435 |
+
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
436 |
}
|
437 |
|
438 |
+
elseif ( $special_service_code == 'google_plus_share' ) {
|
439 |
+
$custom_attributes .= ( $options['special_google_plus_share_options']['show_count'] == '1' ) ? '' : ' data-annotation="none"';
|
440 |
$custom_attributes .= ' data-href="' . $linkurl . '"';
|
441 |
+
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
442 |
}
|
443 |
|
444 |
+
elseif ( $special_service_code == 'pinterest_pin' ) {
|
445 |
+
$custom_attributes .= ( $options['special_pinterest_pin_options']['show_count'] == '1' ) ? '' : ' data-pin-config="none"';
|
446 |
$custom_attributes .= ' data-url="' . $linkurl . '"';
|
447 |
+
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
448 |
}
|
449 |
|
450 |
if ( $output_later )
|
453 |
echo $special_html;
|
454 |
}
|
455 |
|
456 |
+
if ( ! function_exists( 'A2A_menu_locale' ) ) {
|
457 |
function A2A_menu_locale() {
|
458 |
global $A2A_locale;
|
459 |
$locale = get_locale();
|
460 |
+
if ( $locale == 'en_US' || $locale == 'en' || $A2A_locale != '' )
|
461 |
return false;
|
462 |
|
463 |
$A2A_locale = 'a2a_localize = {
|
464 |
+
Share: "' . __( "Share", "add-to-any" ) . '",
|
465 |
+
Save: "' . __( "Save", "add-to-any" ) . '",
|
466 |
+
Subscribe: "' . __( "Subscribe", "add-to-any" ) . '",
|
467 |
+
Email: "' . __( "Email", "add-to-any" ) . '",
|
468 |
+
Bookmark: "' . __( "Bookmark", "add-to-any" ) . '",
|
469 |
+
ShowAll: "' . __( "Show all", "add-to-any" ) . '",
|
470 |
+
ShowLess: "' . __( "Show less", "add-to-any" ) . '",
|
471 |
+
FindServices: "' . __( "Find service(s)", "add-to-any" ) . '",
|
472 |
+
FindAnyServiceToAddTo: "' . __( "Instantly find any service to add to", "add-to-any" ) . '",
|
473 |
+
PoweredBy: "' . __( "Powered by", "add-to-any" ) . '",
|
474 |
+
ShareViaEmail: "' . __( "Share via email", "add-to-any" ) . '",
|
475 |
+
SubscribeViaEmail: "' . __( "Subscribe via email", "add-to-any" ) . '",
|
476 |
+
BookmarkInYourBrowser: "' . __( "Bookmark in your browser", "add-to-any" ) . '",
|
477 |
+
BookmarkInstructions: "' . __( "Press Ctrl+D or \u2318+D to bookmark this page", "add-to-any" ) . '",
|
478 |
+
AddToYourFavorites: "' . __( "Add to your favorites", "add-to-any" ) . '",
|
479 |
+
SendFromWebOrProgram: "' . __( "Send from any email address or email program", "add-to-any" ) . '",
|
480 |
+
EmailProgram: "' . __( "Email program", "add-to-any" ) . '"
|
481 |
};
|
482 |
';
|
483 |
return $A2A_locale;
|
486 |
|
487 |
|
488 |
function A2A_SHARE_SAVE_head_script() {
|
489 |
+
if ( is_admin() )
|
490 |
return;
|
491 |
|
492 |
+
$options = get_option( 'addtoany_options' );
|
493 |
|
494 |
+
$http_or_https = ( is_ssl() ) ? 'https' : 'http';
|
495 |
|
496 |
global $A2A_SHARE_SAVE_external_script_called;
|
497 |
if ( ! $A2A_SHARE_SAVE_external_script_called ) {
|
498 |
// Use local cache?
|
499 |
+
$cache = ( $options['cache'] == '1' ) ? true : false;
|
500 |
$upload_dir = wp_upload_dir();
|
501 |
+
$static_server = ( $cache ) ? $upload_dir['baseurl'] . '/addtoany' : $http_or_https . '://static.addtoany.com/menu';
|
502 |
|
503 |
// Enternal script call + initial JS + set-once variables
|
504 |
$additional_js = $options['additional_js_variables'];
|
505 |
+
$script_configs = ( ( $cache ) ? "\n" . 'a2a_config.static_server="' . $static_server . '";' : '' )
|
506 |
+
. ( ( $options['onclick'] == '1' ) ? "\n" . 'a2a_config.onclick=1;' : '' )
|
507 |
+
. ( ( $options['show_title'] == '1' ) ? "\n" . 'a2a_config.show_title=1;' : '' )
|
508 |
+
. ( ( $additional_js ) ? "\n" . stripslashes( $additional_js ) : '' );
|
509 |
$A2A_SHARE_SAVE_external_script_called = true;
|
510 |
}
|
511 |
else {
|
557 |
echo $javascript_header;
|
558 |
}
|
559 |
|
560 |
+
add_action( 'wp_head', 'A2A_SHARE_SAVE_head_script' );
|
561 |
|
562 |
function A2A_SHARE_SAVE_footer_script() {
|
563 |
global $_addtoany_targets;
|
564 |
|
565 |
+
if ( is_admin() )
|
566 |
return;
|
567 |
|
568 |
+
$_addtoany_targets = ( isset( $_addtoany_targets ) ) ? $_addtoany_targets : array();
|
569 |
|
570 |
$javascript_footer = "\n" . '<script type="text/javascript">' . "<!--\n"
|
571 |
. "wpa2a.targets=["
|
572 |
+
. implode( ",", $_addtoany_targets)
|
573 |
. "];\n"
|
574 |
. "wpa2a.html_done=true;"
|
575 |
. "if(wpa2a.script_ready&&!wpa2a.done)wpa2a.init();" // External script may load before html_done=true, but will only init if html_done=true. So call wpa2a.init() if external script is ready, and if wpa2a.init() hasn't been called already. Otherwise, wait for callback to call wpa2a.init()
|
579 |
echo $javascript_footer;
|
580 |
}
|
581 |
|
582 |
+
add_action( 'wp_footer', 'A2A_SHARE_SAVE_footer_script' );
|
583 |
|
584 |
|
585 |
|
588 |
|
589 |
// If footer.php exists in the current theme, scan for "wp_footer"
|
590 |
$file = $template_directory . '/footer.php';
|
591 |
+
if ( is_file( $file ) ) {
|
592 |
$search_string = "wp_footer";
|
593 |
+
$file_lines = @file( $file );
|
594 |
|
595 |
+
foreach ( $file_lines as $line ) {
|
596 |
+
$searchCount = substr_count( $line, $search_string );
|
597 |
+
if ( $searchCount > 0 ) {
|
598 |
return true;
|
599 |
}
|
600 |
}
|
601 |
|
602 |
// wp_footer() not found:
|
603 |
+
echo "<div class=\"update-nag\">" . __( "Your theme needs to be fixed. To fix your theme, use the <a href=\"theme-editor.php\">Theme Editor</a> to insert <code><?php wp_footer(); ?></code> just before the <code></body></code> line of your theme's <code>footer.php</code> file." ) . "</div>";
|
604 |
}
|
605 |
|
606 |
// If header.php exists in the current theme, scan for "wp_head"
|
607 |
$file = $template_directory . '/header.php';
|
608 |
+
if ( is_file( $file ) ) {
|
609 |
$search_string = "wp_head";
|
610 |
+
$file_lines = @file( $file );
|
611 |
|
612 |
+
foreach ( $file_lines as $line ) {
|
613 |
+
$searchCount = substr_count( $line, $search_string );
|
614 |
+
if ( $searchCount > 0 ) {
|
615 |
return true;
|
616 |
}
|
617 |
}
|
618 |
|
619 |
// wp_footer() not found:
|
620 |
+
echo "<div class=\"update-nag\">" . __( "Your theme needs to be fixed. To fix your theme, use the <a href=\"theme-editor.php\">Theme Editor</a> to insert <code><?php wp_head(); ?></code> just before the <code></head></code> line of your theme's <code>header.php</code> file." ) . "</div>";
|
621 |
}
|
622 |
}
|
623 |
|
624 |
+
function A2A_SHARE_SAVE_auto_placement( $title ) {
|
625 |
global $A2A_SHARE_SAVE_auto_placement_ready;
|
626 |
$A2A_SHARE_SAVE_auto_placement_ready = true;
|
627 |
|
632 |
/**
|
633 |
* Remove the_content filter and add it for next time
|
634 |
*/
|
635 |
+
function A2A_SHARE_SAVE_remove_from_content( $content ) {
|
636 |
+
remove_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
637 |
+
add_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content_next_time', 98 );
|
638 |
|
639 |
return $content;
|
640 |
}
|
642 |
/**
|
643 |
* Apply the_content filter "next time"
|
644 |
*/
|
645 |
+
function A2A_SHARE_SAVE_add_to_content_next_time( $content ) {
|
646 |
+
add_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
647 |
|
648 |
return $content;
|
649 |
}
|
650 |
|
651 |
|
652 |
+
function A2A_SHARE_SAVE_add_to_content( $content ) {
|
653 |
global $A2A_SHARE_SAVE_auto_placement_ready;
|
654 |
|
655 |
$is_feed = is_feed();
|
656 |
+
$options = get_option( 'addtoany_options' );
|
657 |
$sharing_disabled = get_post_meta( get_the_ID(), 'sharing_disabled', true );
|
658 |
|
659 |
+
if ( ! $A2A_SHARE_SAVE_auto_placement_ready )
|
660 |
return $content;
|
661 |
|
662 |
+
if ( get_post_status( get_the_ID() ) == 'private' )
|
663 |
return $content;
|
664 |
|
665 |
// Disabled for this post?
|
670 |
(
|
671 |
// Legacy tags
|
672 |
// <!--sharesave--> tag
|
673 |
+
strpos( $content, '<!--sharesave-->' ) === false ||
|
674 |
// <!--nosharesave--> tag
|
675 |
+
strpos( $content, '<!--nosharesave-->' ) !== false
|
676 |
) &&
|
677 |
(
|
678 |
// Posts
|
679 |
// All posts
|
680 |
+
( ! is_page() && $options['display_in_posts'] == '-1' ) ||
|
681 |
// Front page posts
|
682 |
+
( is_home() && $options['display_in_posts_on_front_page'] == '-1' ) ||
|
683 |
// Archive page posts (Category, Tag, Author and Date pages)
|
684 |
+
( is_archive() && $options['display_in_posts_on_archive_pages'] == '-1' ) ||
|
685 |
// Search results posts (same as Archive page posts option)
|
686 |
+
( is_search() && $options['display_in_posts_on_archive_pages'] == '-1' ) ||
|
687 |
// Posts in feed
|
688 |
+
( $is_feed && ( $options['display_in_feed'] == '-1' ) ||
|
689 |
|
690 |
// Pages
|
691 |
// Individual pages
|
692 |
+
( is_page() && $options['display_in_pages'] == '-1' ) ||
|
693 |
// <!--nosharesave--> legacy tag
|
694 |
+
( (strpos( $content, '<!--nosharesave-->') !== false ) )
|
695 |
)
|
696 |
)
|
697 |
)
|
699 |
|
700 |
$kit_args = array(
|
701 |
"output_later" => true,
|
702 |
+
"is_kit" => ( $is_feed ) ? false : true,
|
703 |
);
|
704 |
|
705 |
if ( ! $is_feed ) {
|
714 |
$kit_args['html_wrap_close'] = '';
|
715 |
}
|
716 |
|
717 |
+
$options['position'] = isset( $options['position'] ) ? $options['position'] : 'bottom';
|
718 |
|
719 |
if ($options['position'] == 'both' || $options['position'] == 'top') {
|
720 |
// Prepend to content
|
729 |
}
|
730 |
|
731 |
// Only automatically output button code after the_title has been called - to avoid premature calling from misc. the_content filters (especially meta description)
|
732 |
+
add_filter( 'the_title', 'A2A_SHARE_SAVE_auto_placement', 9 );
|
733 |
+
add_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
734 |
|
735 |
|
736 |
// [addtoany url="http://example.com/page.html" title="Some Example Page"]
|
739 |
'url' => 'something',
|
740 |
'title' => 'something else',
|
741 |
), $attributes ) );
|
742 |
+
$linkname = ( isset( $attributes['title'] ) ) ? $attributes['title'] : false;
|
743 |
+
$linkurl = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false;
|
744 |
$output_later = TRUE;
|
745 |
|
746 |
return '<div class="addtoany_shortcode">'
|
747 |
+
. ADDTOANY_SHARE_SAVE_KIT( compact( 'linkname', 'linkurl', 'output_later' ) )
|
748 |
. '</div>';
|
749 |
}
|
750 |
|
755 |
global $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_url_path;
|
756 |
|
757 |
// Use stylesheet?
|
758 |
+
if ( $A2A_SHARE_SAVE_options['inline_css'] != '-1' && ! is_admin() ) {
|
759 |
+
wp_enqueue_style( 'A2A_SHARE_SAVE', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.css', false, '1.6' );
|
760 |
}
|
761 |
}
|
762 |
|
763 |
+
add_action( 'wp_print_styles', 'A2A_SHARE_SAVE_stylesheet' );
|
764 |
|
765 |
|
766 |
|
782 |
if ( count( $file_urls ) > 0 ) {
|
783 |
for ( $i = 0; $i < count( $file_urls ); $i++ ) {
|
784 |
// Download files
|
785 |
+
$file_url = trim( $file_urls[ $i ] );
|
786 |
$file_name = substr( strrchr( $file_url, '/' ), 1, 99 );
|
787 |
|
788 |
// Place files in uploads/addtoany directory
|
818 |
function A2A_SHARE_SAVE_add_menu_link() {
|
819 |
if ( current_user_can( 'manage_options' ) ) {
|
820 |
$page = add_options_page(
|
821 |
+
'AddToAny: '. __( "Share/Save", "add-to-any" ) . " " . __( "Settings" )
|
822 |
+
, __( "AddToAny", "add-to-any" )
|
823 |
, 'activate_plugins'
|
824 |
+
, basename( __FILE__ )
|
825 |
, 'A2A_SHARE_SAVE_options_page'
|
826 |
);
|
827 |
|
842 |
add_action( 'widgets_init', 'A2A_SHARE_SAVE_widget_init' );
|
843 |
|
844 |
// Place in Option List on Settings > Plugins page
|
845 |
+
function A2A_SHARE_SAVE_actlinks( $links, $file ) {
|
846 |
// Static so we don't call plugin_basename on every plugin row.
|
847 |
static $this_plugin;
|
848 |
|
849 |
if ( ! $this_plugin ) {
|
850 |
+
$this_plugin = plugin_basename( __FILE__ );
|
851 |
}
|
852 |
|
853 |
if ( $file == $this_plugin ) {
|
854 |
+
$settings_link = '<a href="options-general.php?page=add-to-any.php">' . __( 'Settings' ) . '</a>';
|
855 |
array_unshift( $links, $settings_link ); // before other links
|
856 |
}
|
857 |
|
addtoany.admin.php
CHANGED
@@ -32,7 +32,7 @@ function A2A_SHARE_SAVE_meta_box_content( $post ) {
|
|
32 |
|
33 |
function A2A_SHARE_SAVE_meta_box_save( $post_id ) {
|
34 |
// If this is an autosave, this form has not been submitted, so we don't want to do anything.
|
35 |
-
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
|
36 |
return $post_id;
|
37 |
|
38 |
// Save sharing_disabled if "Show sharing buttons" checkbox is unchecked
|
@@ -79,30 +79,30 @@ function A2A_SHARE_SAVE_migrate_options() {
|
|
79 |
|
80 |
$namespace = 'A2A_SHARE_SAVE_';
|
81 |
|
82 |
-
foreach ($options as $option_name => $option_value) {
|
83 |
$old_option_name = $namespace . $option_name;
|
84 |
-
$old_option_value = get_option($old_option_name);
|
85 |
|
86 |
-
if($old_option_value ===
|
87 |
// Default value
|
88 |
-
$options[$option_name] = $option_value;
|
89 |
} else {
|
90 |
// Old value
|
91 |
-
$options[$option_name] = $old_option_value;
|
92 |
}
|
93 |
|
94 |
-
delete_option($old_option_name);
|
95 |
}
|
96 |
|
97 |
-
update_option('addtoany_options', $options);
|
98 |
|
99 |
$deprecated_options = array(
|
100 |
'button_opens_new_window',
|
101 |
'hide_embeds',
|
102 |
);
|
103 |
|
104 |
-
foreach ($deprecated_options as $option_name) {
|
105 |
-
delete_option($namespace . $option_name);
|
106 |
}
|
107 |
|
108 |
}
|
@@ -138,7 +138,7 @@ function A2A_SHARE_SAVE_enqueue_pointer_script_style( $hook_suffix ) {
|
|
138 |
}
|
139 |
|
140 |
}
|
141 |
-
if (
|
142 |
// Only show the pointer when no AddToAny options have been set
|
143 |
add_action( 'admin_enqueue_scripts', 'A2A_SHARE_SAVE_enqueue_pointer_script_style' );
|
144 |
}
|
@@ -179,7 +179,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
179 |
$A2A_SHARE_SAVE_services;
|
180 |
|
181 |
// Require admin privs
|
182 |
-
if ( ! current_user_can('manage_options') )
|
183 |
return false;
|
184 |
|
185 |
$new_options = array();
|
@@ -187,31 +187,31 @@ function A2A_SHARE_SAVE_options_page() {
|
|
187 |
$namespace = 'A2A_SHARE_SAVE_';
|
188 |
|
189 |
// Make available services extensible via plugins, themes (functions.php), etc.
|
190 |
-
$A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services);
|
191 |
|
192 |
-
if (isset($_POST['Submit'])) {
|
193 |
|
194 |
// Nonce verification
|
195 |
-
check_admin_referer('add-to-any-update-options');
|
196 |
|
197 |
$new_options['position'] = ($_POST['A2A_SHARE_SAVE_position']) ? @$_POST['A2A_SHARE_SAVE_position'] : 'bottom';
|
198 |
-
$new_options['display_in_posts_on_front_page'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']=='1') ? '1':'-1';
|
199 |
-
$new_options['display_in_posts_on_archive_pages'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts_on_archive_pages']=='1') ? '1':'-1';
|
200 |
-
$new_options['display_in_excerpts'] = (@$_POST['A2A_SHARE_SAVE_display_in_excerpts']=='1') ? '1':'-1';
|
201 |
-
$new_options['display_in_posts'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts']=='1') ? '1':'-1';
|
202 |
-
$new_options['display_in_pages'] = (@$_POST['A2A_SHARE_SAVE_display_in_pages']=='1') ? '1':'-1';
|
203 |
-
$new_options['display_in_feed'] = (@$_POST['A2A_SHARE_SAVE_display_in_feed']=='1') ? '1':'-1';
|
204 |
-
$new_options['show_title'] = (@$_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1':'-1';
|
205 |
-
$new_options['onclick'] = (@$_POST['A2A_SHARE_SAVE_onclick']=='1') ? '1':'-1';
|
206 |
$new_options['icon_size'] = @$_POST['A2A_SHARE_SAVE_icon_size'];
|
207 |
$new_options['button'] = @$_POST['A2A_SHARE_SAVE_button'];
|
208 |
$new_options['button_custom'] = @$_POST['A2A_SHARE_SAVE_button_custom'];
|
209 |
-
$new_options['additional_js_variables'] = trim(@$_POST['A2A_SHARE_SAVE_additional_js_variables']);
|
210 |
-
$new_options['inline_css'] = (@$_POST['A2A_SHARE_SAVE_inline_css']=='1') ? '1':'-1';
|
211 |
-
$new_options['cache'] = (@$_POST['A2A_SHARE_SAVE_cache']=='1') ? '1':'-1';
|
212 |
|
213 |
// Schedule cache refresh?
|
214 |
-
if (@$_POST['A2A_SHARE_SAVE_cache']=='1') {
|
215 |
A2A_SHARE_SAVE_schedule_cache();
|
216 |
A2A_SHARE_SAVE_refresh_cache();
|
217 |
} else {
|
@@ -219,75 +219,75 @@ function A2A_SHARE_SAVE_options_page() {
|
|
219 |
}
|
220 |
|
221 |
// Store desired text if 16 x 16px buttons or text-only is chosen:
|
222 |
-
if( $new_options['button'] == 'favicon.png|16|16' )
|
223 |
$new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_favicon_16_16_text'];
|
224 |
-
elseif( $new_options['button'] == 'share_16_16.png|16|16' )
|
225 |
$new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_share_16_16_text'];
|
226 |
else
|
227 |
-
$new_options['button_text'] = ( trim($_POST['A2A_SHARE_SAVE_button_text']) != '' ) ? $_POST['A2A_SHARE_SAVE_button_text'] : __('Share','add-to-any');
|
228 |
|
229 |
// Store chosen individual services to make active
|
230 |
$active_services = Array();
|
231 |
-
if ( ! isset($_POST['A2A_SHARE_SAVE_active_services']))
|
232 |
-
$_POST['A2A_SHARE_SAVE_active_services'] =
|
233 |
foreach ( $_POST['A2A_SHARE_SAVE_active_services'] as $dummy=>$sitename )
|
234 |
-
$active_services[] = substr($sitename, 7);
|
235 |
$new_options['active_services'] = $active_services;
|
236 |
|
237 |
// Store special service options
|
238 |
$new_options['special_facebook_like_options'] = array(
|
239 |
-
'verb' => ((@$_POST['addtoany_facebook_like_verb'] == 'recommend') ? 'recommend' : 'like')
|
240 |
);
|
241 |
$new_options['special_twitter_tweet_options'] = array(
|
242 |
-
'show_count' => ((@$_POST['addtoany_twitter_tweet_show_count'] == '1') ? '1' : '-1')
|
243 |
);
|
244 |
$new_options['special_google_plusone_options'] = array(
|
245 |
-
'show_count' => ((@$_POST['addtoany_google_plusone_show_count'] == '1') ? '1' : '-1')
|
246 |
);
|
247 |
$new_options['special_google_plus_share_options'] = array(
|
248 |
-
'show_count' => ((@$_POST['addtoany_google_plus_share_show_count'] == '1') ? '1' : '-1')
|
249 |
);
|
250 |
$new_options['special_pinterest_pin_options'] = array(
|
251 |
-
'show_count' => ((@$_POST['addtoany_pinterest_pin_show_count'] == '1') ? '1' : '-1')
|
252 |
);
|
253 |
|
254 |
-
update_option('addtoany_options', $new_options);
|
255 |
|
256 |
?>
|
257 |
-
<div class="updated fade"><p><strong><?php _e('Settings saved.'); ?></strong></p></div>
|
258 |
<?php
|
259 |
|
260 |
-
} else if (isset($_POST['Reset'])) {
|
261 |
// Nonce verification
|
262 |
-
check_admin_referer('add-to-any-update-options');
|
263 |
|
264 |
-
delete_option('addtoany_options');
|
265 |
}
|
266 |
|
267 |
-
$options = get_option('addtoany_options');
|
268 |
|
269 |
-
function position_in_content($options, $option_box =
|
270 |
|
271 |
-
if ( ! isset($options['position'])) {
|
272 |
$options['position'] = 'bottom';
|
273 |
}
|
274 |
|
275 |
$positions = array(
|
276 |
'bottom' => array(
|
277 |
-
'selected' => ('bottom' == $options['position']) ? ' selected="selected"' : '',
|
278 |
-
'string' => __('bottom', 'add-to-any')
|
279 |
),
|
280 |
'top' => array(
|
281 |
-
'selected' => ('top' == $options['position']) ? ' selected="selected"' : '',
|
282 |
-
'string' => __('top', 'add-to-any')
|
283 |
),
|
284 |
'both' => array(
|
285 |
-
'selected' => ('both' == $options['position']) ? ' selected="selected"' : '',
|
286 |
-
'string' => __('top & bottom', 'add-to-any')
|
287 |
)
|
288 |
);
|
289 |
|
290 |
-
if ($option_box) {
|
291 |
$html = '</label>';
|
292 |
$html .= '<label>'; // Label needed to prevent checkmark toggle on SELECT click
|
293 |
$html .= '<select name="A2A_SHARE_SAVE_position">';
|
@@ -358,9 +358,9 @@ function A2A_SHARE_SAVE_options_page() {
|
|
358 |
// Show all services
|
359 |
foreach ($A2A_SHARE_SAVE_services as $service_safe_name=>$site) {
|
360 |
if (isset($site['href']))
|
361 |
-
$custom_service =
|
362 |
else
|
363 |
-
$custom_service =
|
364 |
if ( ! isset($site['icon']))
|
365 |
$site['icon'] = 'default';
|
366 |
?>
|
@@ -575,9 +575,9 @@ function A2A_SHARE_SAVE_options_page() {
|
|
575 |
|
576 |
// Admin page header
|
577 |
function A2A_SHARE_SAVE_admin_head() {
|
578 |
-
if (isset($_GET['page']) && $_GET['page'] == 'add-to-any.php') {
|
579 |
|
580 |
-
$options = get_option('addtoany_options');
|
581 |
|
582 |
?>
|
583 |
<script type="text/javascript"><!--
|
@@ -897,10 +897,10 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
897 |
}
|
898 |
}
|
899 |
|
900 |
-
add_filter('admin_head', 'A2A_SHARE_SAVE_admin_head');
|
901 |
|
902 |
|
903 |
|
904 |
function A2A_SHARE_SAVE_scripts() {
|
905 |
-
wp_enqueue_script('jquery-ui-sortable');
|
906 |
}
|
32 |
|
33 |
function A2A_SHARE_SAVE_meta_box_save( $post_id ) {
|
34 |
// If this is an autosave, this form has not been submitted, so we don't want to do anything.
|
35 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
36 |
return $post_id;
|
37 |
|
38 |
// Save sharing_disabled if "Show sharing buttons" checkbox is unchecked
|
79 |
|
80 |
$namespace = 'A2A_SHARE_SAVE_';
|
81 |
|
82 |
+
foreach ( $options as $option_name => $option_value ) {
|
83 |
$old_option_name = $namespace . $option_name;
|
84 |
+
$old_option_value = get_option( $old_option_name );
|
85 |
|
86 |
+
if( $old_option_value === false ) {
|
87 |
// Default value
|
88 |
+
$options[ $option_name ] = $option_value;
|
89 |
} else {
|
90 |
// Old value
|
91 |
+
$options[ $option_name ] = $old_option_value;
|
92 |
}
|
93 |
|
94 |
+
delete_option( $old_option_name );
|
95 |
}
|
96 |
|
97 |
+
update_option( 'addtoany_options', $options );
|
98 |
|
99 |
$deprecated_options = array(
|
100 |
'button_opens_new_window',
|
101 |
'hide_embeds',
|
102 |
);
|
103 |
|
104 |
+
foreach ( $deprecated_options as $option_name ) {
|
105 |
+
delete_option( $namespace . $option_name );
|
106 |
}
|
107 |
|
108 |
}
|
138 |
}
|
139 |
|
140 |
}
|
141 |
+
if ( ! $A2A_SHARE_SAVE_options ) {
|
142 |
// Only show the pointer when no AddToAny options have been set
|
143 |
add_action( 'admin_enqueue_scripts', 'A2A_SHARE_SAVE_enqueue_pointer_script_style' );
|
144 |
}
|
179 |
$A2A_SHARE_SAVE_services;
|
180 |
|
181 |
// Require admin privs
|
182 |
+
if ( ! current_user_can( 'manage_options' ) )
|
183 |
return false;
|
184 |
|
185 |
$new_options = array();
|
187 |
$namespace = 'A2A_SHARE_SAVE_';
|
188 |
|
189 |
// Make available services extensible via plugins, themes (functions.php), etc.
|
190 |
+
$A2A_SHARE_SAVE_services = apply_filters( 'A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services );
|
191 |
|
192 |
+
if ( isset( $_POST['Submit'] ) ) {
|
193 |
|
194 |
// Nonce verification
|
195 |
+
check_admin_referer( 'add-to-any-update-options' );
|
196 |
|
197 |
$new_options['position'] = ($_POST['A2A_SHARE_SAVE_position']) ? @$_POST['A2A_SHARE_SAVE_position'] : 'bottom';
|
198 |
+
$new_options['display_in_posts_on_front_page'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page'] == '1') ? '1' : '-1';
|
199 |
+
$new_options['display_in_posts_on_archive_pages'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts_on_archive_pages'] == '1') ? '1' : '-1';
|
200 |
+
$new_options['display_in_excerpts'] = (@$_POST['A2A_SHARE_SAVE_display_in_excerpts']=='1') ? '1' : '-1';
|
201 |
+
$new_options['display_in_posts'] = (@$_POST['A2A_SHARE_SAVE_display_in_posts']=='1') ? '1' : '-1';
|
202 |
+
$new_options['display_in_pages'] = (@$_POST['A2A_SHARE_SAVE_display_in_pages']=='1') ? '1' : '-1';
|
203 |
+
$new_options['display_in_feed'] = (@$_POST['A2A_SHARE_SAVE_display_in_feed']=='1') ? '1' : '-1';
|
204 |
+
$new_options['show_title'] = (@$_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1' : '-1';
|
205 |
+
$new_options['onclick'] = (@$_POST['A2A_SHARE_SAVE_onclick'] == '1') ? '1' : '-1';
|
206 |
$new_options['icon_size'] = @$_POST['A2A_SHARE_SAVE_icon_size'];
|
207 |
$new_options['button'] = @$_POST['A2A_SHARE_SAVE_button'];
|
208 |
$new_options['button_custom'] = @$_POST['A2A_SHARE_SAVE_button_custom'];
|
209 |
+
$new_options['additional_js_variables'] = trim( @$_POST['A2A_SHARE_SAVE_additional_js_variables'] );
|
210 |
+
$new_options['inline_css'] = (@$_POST['A2A_SHARE_SAVE_inline_css']=='1') ? '1' : '-1';
|
211 |
+
$new_options['cache'] = (@$_POST['A2A_SHARE_SAVE_cache']=='1') ? '1' : '-1';
|
212 |
|
213 |
// Schedule cache refresh?
|
214 |
+
if ( @$_POST['A2A_SHARE_SAVE_cache'] == '1' ) {
|
215 |
A2A_SHARE_SAVE_schedule_cache();
|
216 |
A2A_SHARE_SAVE_refresh_cache();
|
217 |
} else {
|
219 |
}
|
220 |
|
221 |
// Store desired text if 16 x 16px buttons or text-only is chosen:
|
222 |
+
if ( $new_options['button'] == 'favicon.png|16|16' )
|
223 |
$new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_favicon_16_16_text'];
|
224 |
+
elseif ( $new_options['button'] == 'share_16_16.png|16|16' )
|
225 |
$new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_share_16_16_text'];
|
226 |
else
|
227 |
+
$new_options['button_text'] = ( trim( $_POST['A2A_SHARE_SAVE_button_text'] ) != '' ) ? $_POST['A2A_SHARE_SAVE_button_text'] : __('Share','add-to-any');
|
228 |
|
229 |
// Store chosen individual services to make active
|
230 |
$active_services = Array();
|
231 |
+
if ( ! isset( $_POST['A2A_SHARE_SAVE_active_services'] ) )
|
232 |
+
$_POST['A2A_SHARE_SAVE_active_services'] = array();
|
233 |
foreach ( $_POST['A2A_SHARE_SAVE_active_services'] as $dummy=>$sitename )
|
234 |
+
$active_services[] = substr( $sitename, 7 );
|
235 |
$new_options['active_services'] = $active_services;
|
236 |
|
237 |
// Store special service options
|
238 |
$new_options['special_facebook_like_options'] = array(
|
239 |
+
'verb' => ( (@$_POST['addtoany_facebook_like_verb'] == 'recommend') ? 'recommend' : 'like' )
|
240 |
);
|
241 |
$new_options['special_twitter_tweet_options'] = array(
|
242 |
+
'show_count' => ( ( @$_POST['addtoany_twitter_tweet_show_count'] == '1' ) ? '1' : '-1' )
|
243 |
);
|
244 |
$new_options['special_google_plusone_options'] = array(
|
245 |
+
'show_count' => ( ( @$_POST['addtoany_google_plusone_show_count'] == '1' ) ? '1' : '-1' )
|
246 |
);
|
247 |
$new_options['special_google_plus_share_options'] = array(
|
248 |
+
'show_count' => ( ( @$_POST['addtoany_google_plus_share_show_count'] == '1' ) ? '1' : '-1' )
|
249 |
);
|
250 |
$new_options['special_pinterest_pin_options'] = array(
|
251 |
+
'show_count' => ( ( @$_POST['addtoany_pinterest_pin_show_count'] == '1' ) ? '1' : '-1' )
|
252 |
);
|
253 |
|
254 |
+
update_option( 'addtoany_options', $new_options );
|
255 |
|
256 |
?>
|
257 |
+
<div class="updated fade"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
|
258 |
<?php
|
259 |
|
260 |
+
} else if ( isset( $_POST['Reset'] ) ) {
|
261 |
// Nonce verification
|
262 |
+
check_admin_referer( 'add-to-any-update-options' );
|
263 |
|
264 |
+
delete_option( 'addtoany_options' );
|
265 |
}
|
266 |
|
267 |
+
$options = get_option( 'addtoany_options' );
|
268 |
|
269 |
+
function position_in_content( $options, $option_box = false ) {
|
270 |
|
271 |
+
if ( ! isset( $options['position'] ) ) {
|
272 |
$options['position'] = 'bottom';
|
273 |
}
|
274 |
|
275 |
$positions = array(
|
276 |
'bottom' => array(
|
277 |
+
'selected' => ( 'bottom' == $options['position'] ) ? ' selected="selected"' : '',
|
278 |
+
'string' => __( 'bottom', 'add-to-any' )
|
279 |
),
|
280 |
'top' => array(
|
281 |
+
'selected' => ( 'top' == $options['position'] ) ? ' selected="selected"' : '',
|
282 |
+
'string' => __( 'top', 'add-to-any' )
|
283 |
),
|
284 |
'both' => array(
|
285 |
+
'selected' => ( 'both' == $options['position'] ) ? ' selected="selected"' : '',
|
286 |
+
'string' => __( 'top & bottom', 'add-to-any' )
|
287 |
)
|
288 |
);
|
289 |
|
290 |
+
if ( $option_box ) {
|
291 |
$html = '</label>';
|
292 |
$html .= '<label>'; // Label needed to prevent checkmark toggle on SELECT click
|
293 |
$html .= '<select name="A2A_SHARE_SAVE_position">';
|
358 |
// Show all services
|
359 |
foreach ($A2A_SHARE_SAVE_services as $service_safe_name=>$site) {
|
360 |
if (isset($site['href']))
|
361 |
+
$custom_service = true;
|
362 |
else
|
363 |
+
$custom_service = false;
|
364 |
if ( ! isset($site['icon']))
|
365 |
$site['icon'] = 'default';
|
366 |
?>
|
575 |
|
576 |
// Admin page header
|
577 |
function A2A_SHARE_SAVE_admin_head() {
|
578 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'add-to-any.php' ) {
|
579 |
|
580 |
+
$options = get_option( 'addtoany_options' );
|
581 |
|
582 |
?>
|
583 |
<script type="text/javascript"><!--
|
897 |
}
|
898 |
}
|
899 |
|
900 |
+
add_filter( 'admin_head', 'A2A_SHARE_SAVE_admin_head' );
|
901 |
|
902 |
|
903 |
|
904 |
function A2A_SHARE_SAVE_scripts() {
|
905 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
906 |
}
|
addtoany.services.php
CHANGED
@@ -1,451 +1,451 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$A2A_SHARE_SAVE_services =
|
4 |
|
5 |
-
"facebook" =>
|
6 |
"name" => "Facebook",
|
7 |
"icon" => "facebook",
|
8 |
),
|
9 |
-
"twitter" =>
|
10 |
"name" => "Twitter",
|
11 |
"icon" => "twitter",
|
12 |
),
|
13 |
-
"google_plus" =>
|
14 |
"name" => "Google+",
|
15 |
"icon" => "google_plus",
|
16 |
),
|
17 |
-
"pinterest" =>
|
18 |
"name" => "Pinterest",
|
19 |
"icon" => "pinterest",
|
20 |
),
|
21 |
-
"tumblr" =>
|
22 |
"name" => "Tumblr",
|
23 |
"icon" => "tumblr",
|
24 |
),
|
25 |
-
"stumbleupon" =>
|
26 |
"name" => "StumbleUpon",
|
27 |
"icon" => "stumbleupon",
|
28 |
),
|
29 |
-
"reddit" =>
|
30 |
"name" => "Reddit",
|
31 |
"icon" => "reddit",
|
32 |
),
|
33 |
-
"linkedin" =>
|
34 |
"name" => "LinkedIn",
|
35 |
"icon" => "linkedin",
|
36 |
),
|
37 |
-
"aim" =>
|
38 |
"name" => "AIM",
|
39 |
"icon" => "aim",
|
40 |
),
|
41 |
-
"aol_mail" =>
|
42 |
"name" => "AOL Mail",
|
43 |
"icon" => "aol",
|
44 |
),
|
45 |
-
"allvoices" =>
|
46 |
"name" => "Allvoices",
|
47 |
"icon" => "allvoices",
|
48 |
),
|
49 |
-
"amazon_wish_list" =>
|
50 |
"name" => "Amazon Wish List",
|
51 |
"icon" => "amazon",
|
52 |
),
|
53 |
-
"app_net" =>
|
54 |
"name" => "App.net",
|
55 |
"icon" => "app_net",
|
56 |
),
|
57 |
-
"arto" =>
|
58 |
"name" => "Arto",
|
59 |
"icon" => "arto",
|
60 |
),
|
61 |
-
"baidu" =>
|
62 |
"name" => "Baidu",
|
63 |
"icon" => "baidu",
|
64 |
),
|
65 |
-
"balatarin" =>
|
66 |
"name" => "Balatarin",
|
67 |
"icon" => "balatarin",
|
68 |
),
|
69 |
-
"bebo" =>
|
70 |
"name" => "Bebo",
|
71 |
"icon" => "bebo",
|
72 |
),
|
73 |
-
"bibsonomy" =>
|
74 |
"name" => "BibSonomy",
|
75 |
"icon" => "bibsonomy",
|
76 |
),
|
77 |
-
"bitty_browser" =>
|
78 |
"name" => "Bitty Browser",
|
79 |
"icon" => "bitty",
|
80 |
),
|
81 |
-
"blinklist" =>
|
82 |
"name" => "Blinklist",
|
83 |
"icon" => "blinklist",
|
84 |
),
|
85 |
-
"blip" =>
|
86 |
"name" => "Blip",
|
87 |
"icon" => "blip",
|
88 |
),
|
89 |
-
"blogmarks" =>
|
90 |
"name" => "BlogMarks",
|
91 |
"icon" => "blogmarks",
|
92 |
),
|
93 |
-
"blogger_post" =>
|
94 |
"name" => "Blogger Post",
|
95 |
"icon" => "blogger",
|
96 |
),
|
97 |
-
"browser" =>
|
98 |
"name" => "Bookmark/Favorites",
|
99 |
"icon" => "bookmark",
|
100 |
"href" => "javascript:if(document.all){window.external.AddFavorite('A2A_LINKURL','A2A_LINKNAME')}else{var b=a2a_config.localize.BookmarkInstructions || 'Press Ctrl+D to bookmark this page';alert(a2a_config.localize.BookmarkInstructions)}",
|
101 |
"href_js_esc" => "TRUE",
|
102 |
),
|
103 |
-
"bookmarks_fr" =>
|
104 |
"name" => "Bookmarks.fr",
|
105 |
"icon" => "bookmarks_fr",
|
106 |
),
|
107 |
-
"box_net" =>
|
108 |
"name" => "Box.net",
|
109 |
"icon" => "box",
|
110 |
),
|
111 |
-
"buddymarks" =>
|
112 |
"name" => "BuddyMarks",
|
113 |
"icon" => "buddymarks",
|
114 |
),
|
115 |
-
"buffer" =>
|
116 |
"name" => "Buffer",
|
117 |
"icon" => "buffer",
|
118 |
),
|
119 |
-
"care2_news" =>
|
120 |
"name" => "Care2 News",
|
121 |
"icon" => "care2",
|
122 |
),
|
123 |
-
"citeulike" =>
|
124 |
"name" => "CiteULike",
|
125 |
"icon" => "citeulike",
|
126 |
),
|
127 |
-
"dzone" =>
|
128 |
"name" => "DZone",
|
129 |
"icon" => "dzone",
|
130 |
),
|
131 |
-
"delicious" =>
|
132 |
"name" => "Delicious",
|
133 |
"icon" => "delicious",
|
134 |
),
|
135 |
-
"design_float" =>
|
136 |
"name" => "Design Float",
|
137 |
"icon" => "designfloat",
|
138 |
),
|
139 |
-
"diary_ru" =>
|
140 |
"name" => "Diary.Ru",
|
141 |
"icon" => "diary_ru",
|
142 |
),
|
143 |
-
"diaspora" =>
|
144 |
"name" => "Diaspora",
|
145 |
"icon" => "diaspora",
|
146 |
),
|
147 |
-
"digg" =>
|
148 |
"name" => "Digg",
|
149 |
"icon" => "digg",
|
150 |
),
|
151 |
-
"diigo" =>
|
152 |
"name" => "Diigo",
|
153 |
"icon" => "diigo",
|
154 |
),
|
155 |
-
"email" =>
|
156 |
"name" => "Email",
|
157 |
"icon" => "email",
|
158 |
),
|
159 |
-
"evernote" =>
|
160 |
"name" => "Evernote",
|
161 |
"icon" => "evernote",
|
162 |
),
|
163 |
-
"fark" =>
|
164 |
"name" => "Fark",
|
165 |
"icon" => "fark",
|
166 |
),
|
167 |
-
"flipboard" =>
|
168 |
"name" => "Flipboard",
|
169 |
"icon" => "flipboard",
|
170 |
),
|
171 |
-
"folkd" =>
|
172 |
"name" => "Folkd",
|
173 |
"icon" => "folkd",
|
174 |
),
|
175 |
-
"friendfeed" =>
|
176 |
"name" => "FriendFeed",
|
177 |
"icon" => "friendfeed",
|
178 |
),
|
179 |
-
"funp" =>
|
180 |
"name" => "FunP",
|
181 |
"icon" => "funp",
|
182 |
),
|
183 |
-
"google_bookmarks" =>
|
184 |
"name" => "Google Bookmarks",
|
185 |
"icon" => "google",
|
186 |
),
|
187 |
-
"google_gmail" =>
|
188 |
"name" => "Google Gmail",
|
189 |
"icon" => "gmail",
|
190 |
),
|
191 |
-
"hatena" =>
|
192 |
"name" => "Hatena",
|
193 |
"icon" => "hatena",
|
194 |
),
|
195 |
-
"iwiw" =>
|
196 |
"name" => "IWIW",
|
197 |
"icon" => "iwiw",
|
198 |
),
|
199 |
-
"instapaper" =>
|
200 |
"name" => "Instapaper",
|
201 |
"icon" => "instapaper",
|
202 |
),
|
203 |
-
"jamespot" =>
|
204 |
"name" => "Jamespot",
|
205 |
"icon" => "jamespot",
|
206 |
),
|
207 |
-
"jumptags" =>
|
208 |
"name" => "Jumptags",
|
209 |
"icon" => "jumptags",
|
210 |
),
|
211 |
-
"khabbr" =>
|
212 |
"name" => "Khabbr",
|
213 |
"icon" => "khabbr",
|
214 |
),
|
215 |
-
"kindle_it" =>
|
216 |
"name" => "Kindle It",
|
217 |
"icon" => "kindle",
|
218 |
),
|
219 |
-
"linkagogo" =>
|
220 |
"name" => "LinkaGoGo",
|
221 |
"icon" => "linkagogo",
|
222 |
),
|
223 |
-
"linkatopia" =>
|
224 |
"name" => "Linkatopia",
|
225 |
"icon" => "linkatopia",
|
226 |
),
|
227 |
-
"livejournal" =>
|
228 |
"name" => "LiveJournal",
|
229 |
"icon" => "livejournal",
|
230 |
),
|
231 |
-
"mail_ru" =>
|
232 |
"name" => "Mail.Ru",
|
233 |
"icon" => "mail_ru",
|
234 |
),
|
235 |
-
"mendeley" =>
|
236 |
"name" => "Mendeley",
|
237 |
"icon" => "mendeley",
|
238 |
),
|
239 |
-
"meneame" =>
|
240 |
"name" => "Meneame",
|
241 |
"icon" => "meneame",
|
242 |
),
|
243 |
-
"mister_wong" =>
|
244 |
"name" => "Mister-Wong",
|
245 |
"icon" => "mister-wong",
|
246 |
),
|
247 |
-
"myspace" =>
|
248 |
"name" => "MySpace",
|
249 |
"icon" => "myspace",
|
250 |
),
|
251 |
-
"nujij" =>
|
252 |
"name" => "NUjij",
|
253 |
"icon" => "nujij",
|
254 |
),
|
255 |
-
"netlog" =>
|
256 |
"name" => "Netlog",
|
257 |
"icon" => "netlog",
|
258 |
),
|
259 |
-
"netvouz" =>
|
260 |
"name" => "Netvouz",
|
261 |
"icon" => "netvouz",
|
262 |
),
|
263 |
-
"newstrust" =>
|
264 |
"name" => "NewsTrust",
|
265 |
"icon" => "newstrust",
|
266 |
),
|
267 |
-
"newsvine" =>
|
268 |
"name" => "NewsVine",
|
269 |
"icon" => "newsvine",
|
270 |
),
|
271 |
-
"nowpublic" =>
|
272 |
"name" => "NowPublic",
|
273 |
"icon" => "nowpublic",
|
274 |
),
|
275 |
-
"odnoklassniki" =>
|
276 |
"name" => "Odnoklassniki",
|
277 |
"icon" => "odnoklassniki",
|
278 |
),
|
279 |
-
"oknotizie" =>
|
280 |
"name" => "Oknotizie",
|
281 |
"icon" => "oknotizie",
|
282 |
),
|
283 |
-
"orkut" =>
|
284 |
"name" => "Orkut",
|
285 |
"icon" => "orkut",
|
286 |
),
|
287 |
-
"outlook_com" =>
|
288 |
"name" => "Outlook.com",
|
289 |
"icon" => "outlook_com",
|
290 |
),
|
291 |
-
"phonefavs" =>
|
292 |
"name" => "PhoneFavs",
|
293 |
"icon" => "phonefavs",
|
294 |
),
|
295 |
-
"pinboard" =>
|
296 |
"name" => "Pinboard",
|
297 |
"icon" => "pinboard",
|
298 |
),
|
299 |
-
"plurk" =>
|
300 |
"name" => "Plurk",
|
301 |
"icon" => "plurk",
|
302 |
),
|
303 |
-
"pocket" =>
|
304 |
"name" => "Pocket",
|
305 |
"icon" => "pocket",
|
306 |
),
|
307 |
-
"print" =>
|
308 |
"name" => "Print",
|
309 |
"icon" => "print",
|
310 |
"href" => "javascript:print()",
|
311 |
),
|
312 |
-
"printfriendly" =>
|
313 |
"name" => "PrintFriendly",
|
314 |
"icon" => "printfriendly",
|
315 |
),
|
316 |
-
"protopage_bookmarks" =>
|
317 |
"name" => "Protopage Bookmarks",
|
318 |
"icon" => "protopage",
|
319 |
),
|
320 |
-
"pusha" =>
|
321 |
"name" => "Pusha",
|
322 |
"icon" => "pusha",
|
323 |
),
|
324 |
-
"qq" =>
|
325 |
"name" => "QQ",
|
326 |
"icon" => "qq",
|
327 |
),
|
328 |
-
"rediff" =>
|
329 |
"name" => "Rediff MyPage",
|
330 |
"icon" => "rediff",
|
331 |
),
|
332 |
-
"segnalo" =>
|
333 |
"name" => "Segnalo",
|
334 |
"icon" => "segnalo",
|
335 |
),
|
336 |
-
"sina_weibo" =>
|
337 |
"name" => "Sina Weibo",
|
338 |
"icon" => "sina_weibo",
|
339 |
),
|
340 |
-
"sitejot" =>
|
341 |
"name" => "SiteJot",
|
342 |
"icon" => "sitejot",
|
343 |
),
|
344 |
-
"slashdot" =>
|
345 |
"name" => "Slashdot",
|
346 |
"icon" => "slashdot",
|
347 |
),
|
348 |
-
"springpad" =>
|
349 |
"name" => "Springpad",
|
350 |
"icon" => "springpad",
|
351 |
),
|
352 |
-
"startaid" =>
|
353 |
"name" => "StartAid",
|
354 |
"icon" => "startaid",
|
355 |
),
|
356 |
-
"stumpedia" =>
|
357 |
"name" => "Stumpedia",
|
358 |
"icon" => "stumpedia",
|
359 |
),
|
360 |
-
"svejo" =>
|
361 |
"name" => "Svejo",
|
362 |
"icon" => "svejo",
|
363 |
),
|
364 |
-
"symbaloo_feeds" =>
|
365 |
"name" => "Symbaloo Feeds",
|
366 |
"icon" => "symbaloo",
|
367 |
),
|
368 |
-
"technotizie" =>
|
369 |
"name" => "Technotizie",
|
370 |
"icon" => "technotizie",
|
371 |
),
|
372 |
-
"tuenti" =>
|
373 |
"name" => "Tuenti",
|
374 |
"icon" => "tuenti",
|
375 |
),
|
376 |
-
"twiddla" =>
|
377 |
"name" => "Twiddla",
|
378 |
"icon" => "twiddla",
|
379 |
),
|
380 |
-
"typepad_post" =>
|
381 |
"name" => "TypePad Post",
|
382 |
"icon" => "typepad",
|
383 |
),
|
384 |
-
"vk" =>
|
385 |
"name" => "VK",
|
386 |
"icon" => "vk",
|
387 |
),
|
388 |
-
"viadeo" =>
|
389 |
"name" => "Viadeo",
|
390 |
"icon" => "viadeo",
|
391 |
),
|
392 |
-
"wanelo" =>
|
393 |
"name" => "Wanelo",
|
394 |
"icon" => "wanelo",
|
395 |
),
|
396 |
-
"webnews" =>
|
397 |
"name" => "Webnews",
|
398 |
"icon" => "webnews",
|
399 |
),
|
400 |
-
"whatsapp" =>
|
401 |
"name" => "WhatsApp",
|
402 |
"icon" => "whatsapp",
|
403 |
),
|
404 |
-
"wists" =>
|
405 |
"name" => "Wists",
|
406 |
"icon" => "wists",
|
407 |
),
|
408 |
-
"wordpress" =>
|
409 |
"name" => "WordPress",
|
410 |
"icon" => "wordpress",
|
411 |
),
|
412 |
-
"wykop" =>
|
413 |
"name" => "Wykop",
|
414 |
"icon" => "wykop",
|
415 |
),
|
416 |
-
"xing" =>
|
417 |
"name" => "XING",
|
418 |
"icon" => "xing",
|
419 |
),
|
420 |
-
"xerpi" =>
|
421 |
"name" => "Xerpi",
|
422 |
"icon" => "xerpi",
|
423 |
),
|
424 |
-
"yahoo_bookmarks" =>
|
425 |
"name" => "Yahoo Bookmarks",
|
426 |
"icon" => "yahoo",
|
427 |
),
|
428 |
-
"yahoo_mail" =>
|
429 |
"name" => "Yahoo Mail",
|
430 |
"icon" => "yahoo",
|
431 |
),
|
432 |
-
"yahoo_messenger" =>
|
433 |
"name" => "Yahoo Messenger",
|
434 |
"icon" => "yim",
|
435 |
),
|
436 |
-
"yigg" =>
|
437 |
"name" => "YiGG",
|
438 |
"icon" => "yigg",
|
439 |
),
|
440 |
-
"yoolink" =>
|
441 |
"name" => "Yoolink",
|
442 |
"icon" => "yoolink",
|
443 |
),
|
444 |
-
"youmob" =>
|
445 |
"name" => "YouMob",
|
446 |
"icon" => "youmob",
|
447 |
),
|
448 |
-
"dihitt" =>
|
449 |
"name" => "diHITT",
|
450 |
"icon" => "dihitt",
|
451 |
),
|
1 |
<?php
|
2 |
|
3 |
+
$A2A_SHARE_SAVE_services = array(
|
4 |
|
5 |
+
"facebook" => array(
|
6 |
"name" => "Facebook",
|
7 |
"icon" => "facebook",
|
8 |
),
|
9 |
+
"twitter" => array(
|
10 |
"name" => "Twitter",
|
11 |
"icon" => "twitter",
|
12 |
),
|
13 |
+
"google_plus" => array(
|
14 |
"name" => "Google+",
|
15 |
"icon" => "google_plus",
|
16 |
),
|
17 |
+
"pinterest" => array(
|
18 |
"name" => "Pinterest",
|
19 |
"icon" => "pinterest",
|
20 |
),
|
21 |
+
"tumblr" => array(
|
22 |
"name" => "Tumblr",
|
23 |
"icon" => "tumblr",
|
24 |
),
|
25 |
+
"stumbleupon" => array(
|
26 |
"name" => "StumbleUpon",
|
27 |
"icon" => "stumbleupon",
|
28 |
),
|
29 |
+
"reddit" => array(
|
30 |
"name" => "Reddit",
|
31 |
"icon" => "reddit",
|
32 |
),
|
33 |
+
"linkedin" => array(
|
34 |
"name" => "LinkedIn",
|
35 |
"icon" => "linkedin",
|
36 |
),
|
37 |
+
"aim" => array(
|
38 |
"name" => "AIM",
|
39 |
"icon" => "aim",
|
40 |
),
|
41 |
+
"aol_mail" => array(
|
42 |
"name" => "AOL Mail",
|
43 |
"icon" => "aol",
|
44 |
),
|
45 |
+
"allvoices" => array(
|
46 |
"name" => "Allvoices",
|
47 |
"icon" => "allvoices",
|
48 |
),
|
49 |
+
"amazon_wish_list" => array(
|
50 |
"name" => "Amazon Wish List",
|
51 |
"icon" => "amazon",
|
52 |
),
|
53 |
+
"app_net" => array(
|
54 |
"name" => "App.net",
|
55 |
"icon" => "app_net",
|
56 |
),
|
57 |
+
"arto" => array(
|
58 |
"name" => "Arto",
|
59 |
"icon" => "arto",
|
60 |
),
|
61 |
+
"baidu" => array(
|
62 |
"name" => "Baidu",
|
63 |
"icon" => "baidu",
|
64 |
),
|
65 |
+
"balatarin" => array(
|
66 |
"name" => "Balatarin",
|
67 |
"icon" => "balatarin",
|
68 |
),
|
69 |
+
"bebo" => array(
|
70 |
"name" => "Bebo",
|
71 |
"icon" => "bebo",
|
72 |
),
|
73 |
+
"bibsonomy" => array(
|
74 |
"name" => "BibSonomy",
|
75 |
"icon" => "bibsonomy",
|
76 |
),
|
77 |
+
"bitty_browser" => array(
|
78 |
"name" => "Bitty Browser",
|
79 |
"icon" => "bitty",
|
80 |
),
|
81 |
+
"blinklist" => array(
|
82 |
"name" => "Blinklist",
|
83 |
"icon" => "blinklist",
|
84 |
),
|
85 |
+
"blip" => array(
|
86 |
"name" => "Blip",
|
87 |
"icon" => "blip",
|
88 |
),
|
89 |
+
"blogmarks" => array(
|
90 |
"name" => "BlogMarks",
|
91 |
"icon" => "blogmarks",
|
92 |
),
|
93 |
+
"blogger_post" => array(
|
94 |
"name" => "Blogger Post",
|
95 |
"icon" => "blogger",
|
96 |
),
|
97 |
+
"browser" => array(
|
98 |
"name" => "Bookmark/Favorites",
|
99 |
"icon" => "bookmark",
|
100 |
"href" => "javascript:if(document.all){window.external.AddFavorite('A2A_LINKURL','A2A_LINKNAME')}else{var b=a2a_config.localize.BookmarkInstructions || 'Press Ctrl+D to bookmark this page';alert(a2a_config.localize.BookmarkInstructions)}",
|
101 |
"href_js_esc" => "TRUE",
|
102 |
),
|
103 |
+
"bookmarks_fr" => array(
|
104 |
"name" => "Bookmarks.fr",
|
105 |
"icon" => "bookmarks_fr",
|
106 |
),
|
107 |
+
"box_net" => array(
|
108 |
"name" => "Box.net",
|
109 |
"icon" => "box",
|
110 |
),
|
111 |
+
"buddymarks" => array(
|
112 |
"name" => "BuddyMarks",
|
113 |
"icon" => "buddymarks",
|
114 |
),
|
115 |
+
"buffer" => array(
|
116 |
"name" => "Buffer",
|
117 |
"icon" => "buffer",
|
118 |
),
|
119 |
+
"care2_news" => array(
|
120 |
"name" => "Care2 News",
|
121 |
"icon" => "care2",
|
122 |
),
|
123 |
+
"citeulike" => array(
|
124 |
"name" => "CiteULike",
|
125 |
"icon" => "citeulike",
|
126 |
),
|
127 |
+
"dzone" => array(
|
128 |
"name" => "DZone",
|
129 |
"icon" => "dzone",
|
130 |
),
|
131 |
+
"delicious" => array(
|
132 |
"name" => "Delicious",
|
133 |
"icon" => "delicious",
|
134 |
),
|
135 |
+
"design_float" => array(
|
136 |
"name" => "Design Float",
|
137 |
"icon" => "designfloat",
|
138 |
),
|
139 |
+
"diary_ru" => array(
|
140 |
"name" => "Diary.Ru",
|
141 |
"icon" => "diary_ru",
|
142 |
),
|
143 |
+
"diaspora" => array(
|
144 |
"name" => "Diaspora",
|
145 |
"icon" => "diaspora",
|
146 |
),
|
147 |
+
"digg" => array(
|
148 |
"name" => "Digg",
|
149 |
"icon" => "digg",
|
150 |
),
|
151 |
+
"diigo" => array(
|
152 |
"name" => "Diigo",
|
153 |
"icon" => "diigo",
|
154 |
),
|
155 |
+
"email" => array(
|
156 |
"name" => "Email",
|
157 |
"icon" => "email",
|
158 |
),
|
159 |
+
"evernote" => array(
|
160 |
"name" => "Evernote",
|
161 |
"icon" => "evernote",
|
162 |
),
|
163 |
+
"fark" => array(
|
164 |
"name" => "Fark",
|
165 |
"icon" => "fark",
|
166 |
),
|
167 |
+
"flipboard" => array(
|
168 |
"name" => "Flipboard",
|
169 |
"icon" => "flipboard",
|
170 |
),
|
171 |
+
"folkd" => array(
|
172 |
"name" => "Folkd",
|
173 |
"icon" => "folkd",
|
174 |
),
|
175 |
+
"friendfeed" => array(
|
176 |
"name" => "FriendFeed",
|
177 |
"icon" => "friendfeed",
|
178 |
),
|
179 |
+
"funp" => array(
|
180 |
"name" => "FunP",
|
181 |
"icon" => "funp",
|
182 |
),
|
183 |
+
"google_bookmarks" => array(
|
184 |
"name" => "Google Bookmarks",
|
185 |
"icon" => "google",
|
186 |
),
|
187 |
+
"google_gmail" => array(
|
188 |
"name" => "Google Gmail",
|
189 |
"icon" => "gmail",
|
190 |
),
|
191 |
+
"hatena" => array(
|
192 |
"name" => "Hatena",
|
193 |
"icon" => "hatena",
|
194 |
),
|
195 |
+
"iwiw" => array(
|
196 |
"name" => "IWIW",
|
197 |
"icon" => "iwiw",
|
198 |
),
|
199 |
+
"instapaper" => array(
|
200 |
"name" => "Instapaper",
|
201 |
"icon" => "instapaper",
|
202 |
),
|
203 |
+
"jamespot" => array(
|
204 |
"name" => "Jamespot",
|
205 |
"icon" => "jamespot",
|
206 |
),
|
207 |
+
"jumptags" => array(
|
208 |
"name" => "Jumptags",
|
209 |
"icon" => "jumptags",
|
210 |
),
|
211 |
+
"khabbr" => array(
|
212 |
"name" => "Khabbr",
|
213 |
"icon" => "khabbr",
|
214 |
),
|
215 |
+
"kindle_it" => array(
|
216 |
"name" => "Kindle It",
|
217 |
"icon" => "kindle",
|
218 |
),
|
219 |
+
"linkagogo" => array(
|
220 |
"name" => "LinkaGoGo",
|
221 |
"icon" => "linkagogo",
|
222 |
),
|
223 |
+
"linkatopia" => array(
|
224 |
"name" => "Linkatopia",
|
225 |
"icon" => "linkatopia",
|
226 |
),
|
227 |
+
"livejournal" => array(
|
228 |
"name" => "LiveJournal",
|
229 |
"icon" => "livejournal",
|
230 |
),
|
231 |
+
"mail_ru" => array(
|
232 |
"name" => "Mail.Ru",
|
233 |
"icon" => "mail_ru",
|
234 |
),
|
235 |
+
"mendeley" => array(
|
236 |
"name" => "Mendeley",
|
237 |
"icon" => "mendeley",
|
238 |
),
|
239 |
+
"meneame" => array(
|
240 |
"name" => "Meneame",
|
241 |
"icon" => "meneame",
|
242 |
),
|
243 |
+
"mister_wong" => array(
|
244 |
"name" => "Mister-Wong",
|
245 |
"icon" => "mister-wong",
|
246 |
),
|
247 |
+
"myspace" => array(
|
248 |
"name" => "MySpace",
|
249 |
"icon" => "myspace",
|
250 |
),
|
251 |
+
"nujij" => array(
|
252 |
"name" => "NUjij",
|
253 |
"icon" => "nujij",
|
254 |
),
|
255 |
+
"netlog" => array(
|
256 |
"name" => "Netlog",
|
257 |
"icon" => "netlog",
|
258 |
),
|
259 |
+
"netvouz" => array(
|
260 |
"name" => "Netvouz",
|
261 |
"icon" => "netvouz",
|
262 |
),
|
263 |
+
"newstrust" => array(
|
264 |
"name" => "NewsTrust",
|
265 |
"icon" => "newstrust",
|
266 |
),
|
267 |
+
"newsvine" => array(
|
268 |
"name" => "NewsVine",
|
269 |
"icon" => "newsvine",
|
270 |
),
|
271 |
+
"nowpublic" => array(
|
272 |
"name" => "NowPublic",
|
273 |
"icon" => "nowpublic",
|
274 |
),
|
275 |
+
"odnoklassniki" => array(
|
276 |
"name" => "Odnoklassniki",
|
277 |
"icon" => "odnoklassniki",
|
278 |
),
|
279 |
+
"oknotizie" => array(
|
280 |
"name" => "Oknotizie",
|
281 |
"icon" => "oknotizie",
|
282 |
),
|
283 |
+
"orkut" => array(
|
284 |
"name" => "Orkut",
|
285 |
"icon" => "orkut",
|
286 |
),
|
287 |
+
"outlook_com" => array(
|
288 |
"name" => "Outlook.com",
|
289 |
"icon" => "outlook_com",
|
290 |
),
|
291 |
+
"phonefavs" => array(
|
292 |
"name" => "PhoneFavs",
|
293 |
"icon" => "phonefavs",
|
294 |
),
|
295 |
+
"pinboard" => array(
|
296 |
"name" => "Pinboard",
|
297 |
"icon" => "pinboard",
|
298 |
),
|
299 |
+
"plurk" => array(
|
300 |
"name" => "Plurk",
|
301 |
"icon" => "plurk",
|
302 |
),
|
303 |
+
"pocket" => array(
|
304 |
"name" => "Pocket",
|
305 |
"icon" => "pocket",
|
306 |
),
|
307 |
+
"print" => array(
|
308 |
"name" => "Print",
|
309 |
"icon" => "print",
|
310 |
"href" => "javascript:print()",
|
311 |
),
|
312 |
+
"printfriendly" => array(
|
313 |
"name" => "PrintFriendly",
|
314 |
"icon" => "printfriendly",
|
315 |
),
|
316 |
+
"protopage_bookmarks" => array(
|
317 |
"name" => "Protopage Bookmarks",
|
318 |
"icon" => "protopage",
|
319 |
),
|
320 |
+
"pusha" => array(
|
321 |
"name" => "Pusha",
|
322 |
"icon" => "pusha",
|
323 |
),
|
324 |
+
"qq" => array(
|
325 |
"name" => "QQ",
|
326 |
"icon" => "qq",
|
327 |
),
|
328 |
+
"rediff" => array(
|
329 |
"name" => "Rediff MyPage",
|
330 |
"icon" => "rediff",
|
331 |
),
|
332 |
+
"segnalo" => array(
|
333 |
"name" => "Segnalo",
|
334 |
"icon" => "segnalo",
|
335 |
),
|
336 |
+
"sina_weibo" => array(
|
337 |
"name" => "Sina Weibo",
|
338 |
"icon" => "sina_weibo",
|
339 |
),
|
340 |
+
"sitejot" => array(
|
341 |
"name" => "SiteJot",
|
342 |
"icon" => "sitejot",
|
343 |
),
|
344 |
+
"slashdot" => array(
|
345 |
"name" => "Slashdot",
|
346 |
"icon" => "slashdot",
|
347 |
),
|
348 |
+
"springpad" => array(
|
349 |
"name" => "Springpad",
|
350 |
"icon" => "springpad",
|
351 |
),
|
352 |
+
"startaid" => array(
|
353 |
"name" => "StartAid",
|
354 |
"icon" => "startaid",
|
355 |
),
|
356 |
+
"stumpedia" => array(
|
357 |
"name" => "Stumpedia",
|
358 |
"icon" => "stumpedia",
|
359 |
),
|
360 |
+
"svejo" => array(
|
361 |
"name" => "Svejo",
|
362 |
"icon" => "svejo",
|
363 |
),
|
364 |
+
"symbaloo_feeds" => array(
|
365 |
"name" => "Symbaloo Feeds",
|
366 |
"icon" => "symbaloo",
|
367 |
),
|
368 |
+
"technotizie" => array(
|
369 |
"name" => "Technotizie",
|
370 |
"icon" => "technotizie",
|
371 |
),
|
372 |
+
"tuenti" => array(
|
373 |
"name" => "Tuenti",
|
374 |
"icon" => "tuenti",
|
375 |
),
|
376 |
+
"twiddla" => array(
|
377 |
"name" => "Twiddla",
|
378 |
"icon" => "twiddla",
|
379 |
),
|
380 |
+
"typepad_post" => array(
|
381 |
"name" => "TypePad Post",
|
382 |
"icon" => "typepad",
|
383 |
),
|
384 |
+
"vk" => array(
|
385 |
"name" => "VK",
|
386 |
"icon" => "vk",
|
387 |
),
|
388 |
+
"viadeo" => array(
|
389 |
"name" => "Viadeo",
|
390 |
"icon" => "viadeo",
|
391 |
),
|
392 |
+
"wanelo" => array(
|
393 |
"name" => "Wanelo",
|
394 |
"icon" => "wanelo",
|
395 |
),
|
396 |
+
"webnews" => array(
|
397 |
"name" => "Webnews",
|
398 |
"icon" => "webnews",
|
399 |
),
|
400 |
+
"whatsapp" => array(
|
401 |
"name" => "WhatsApp",
|
402 |
"icon" => "whatsapp",
|
403 |
),
|
404 |
+
"wists" => array(
|
405 |
"name" => "Wists",
|
406 |
"icon" => "wists",
|
407 |
),
|
408 |
+
"wordpress" => array(
|
409 |
"name" => "WordPress",
|
410 |
"icon" => "wordpress",
|
411 |
),
|
412 |
+
"wykop" => array(
|
413 |
"name" => "Wykop",
|
414 |
"icon" => "wykop",
|
415 |
),
|
416 |
+
"xing" => array(
|
417 |
"name" => "XING",
|
418 |
"icon" => "xing",
|
419 |
),
|
420 |
+
"xerpi" => array(
|
421 |
"name" => "Xerpi",
|
422 |
"icon" => "xerpi",
|
423 |
),
|
424 |
+
"yahoo_bookmarks" => array(
|
425 |
"name" => "Yahoo Bookmarks",
|
426 |
"icon" => "yahoo",
|
427 |
),
|
428 |
+
"yahoo_mail" => array(
|
429 |
"name" => "Yahoo Mail",
|
430 |
"icon" => "yahoo",
|
431 |
),
|
432 |
+
"yahoo_messenger" => array(
|
433 |
"name" => "Yahoo Messenger",
|
434 |
"icon" => "yim",
|
435 |
),
|
436 |
+
"yigg" => array(
|
437 |
"name" => "YiGG",
|
438 |
"icon" => "yigg",
|
439 |
),
|
440 |
+
"yoolink" => array(
|
441 |
"name" => "Yoolink",
|
442 |
"icon" => "yoolink",
|
443 |
),
|
444 |
+
"youmob" => array(
|
445 |
"name" => "YouMob",
|
446 |
"icon" => "youmob",
|
447 |
),
|
448 |
+
"dihitt" => array(
|
449 |
"name" => "diHITT",
|
450 |
"icon" => "dihitt",
|
451 |
),
|