Version Description
- AMP (Accelerated Mobile Pages) support for share buttons in posts
- PHP template code now accepts the
icon_size
argument
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.6.14 |
Comparing to | |
See all releases |
Code changes from version 1.6.13 to 1.6.14
- README.txt +8 -3
- add-to-any.php +54 -28
- addtoany.compat.php +17 -0
README.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== AddToAny Share Buttons ===
|
2 |
Contributors: micropat, addtoany
|
3 |
-
Tags: AddToAny, sharing, share, social, share button, share buttons, share links, social icons, social media, media, marketing, bookmark, bookmarks, save, post, posts, page, pages, images, image, admin, analytics, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, woocommerce, ecommerce, e-commerce, amazon, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, google plus, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, instagram, behance, flickr, foursquare, vimeo, youtube, feed, rss, lockerz, addthis, sociable, share this, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpml, wpmu, Add to Any
|
4 |
Requires at least: 2.8
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.6.
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
@@ -50,6 +50,7 @@ AddToAny is the universal sharing platform, and AddToAny's plugin is the most po
|
|
50 |
* AddToAny gives users the choice in sharing from a service's native app or from a web app. For example, choose between Twitter's native app or Twitter's mobile web app
|
51 |
* Responsive Floating Share Buttons are mobile ready by default, and configurable breakpoints make floating buttons work with any theme
|
52 |
* AddToAny's SVG icons are super-lightweight and pixel-perfect at any size, and AddToAny's responsive share menu fits on all displays
|
|
|
53 |
|
54 |
= Customizable & Extensible =
|
55 |
|
@@ -299,6 +300,10 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
299 |
|
300 |
== Changelog ==
|
301 |
|
|
|
|
|
|
|
|
|
302 |
= 1.6.13 =
|
303 |
* Fix automatic placement in post excerpts for certain themes & plugins that display post content on a page (thanks Agis)
|
304 |
|
1 |
=== AddToAny Share Buttons ===
|
2 |
Contributors: micropat, addtoany
|
3 |
+
Tags: AddToAny, sharing, share, social, share button, share buttons, share links, social icons, social media, media, marketing, bookmark, bookmarks, save, post, posts, page, pages, images, image, admin, analytics, statistics, stats, links, plugin, shortcode, sidebar, widget, responsive, email, e-mail, print, seo, button, amp, woocommerce, ecommerce, e-commerce, amazon, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, tweet button, google plus, pinterest, pin, pin it, pinit, wanelo, buffer, stumbleupon, bitly, whatsapp, instagram, behance, flickr, foursquare, vimeo, youtube, feed, rss, lockerz, addthis, sociable, share this, sharethis, shareaholic, icon, icons, vector, SVG, floating, floating buttons, wpml, wpmu, Add to Any
|
4 |
Requires at least: 2.8
|
5 |
+
Tested up to: 4.5
|
6 |
+
Stable tag: 1.6.14
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
50 |
* AddToAny gives users the choice in sharing from a service's native app or from a web app. For example, choose between Twitter's native app or Twitter's mobile web app
|
51 |
* Responsive Floating Share Buttons are mobile ready by default, and configurable breakpoints make floating buttons work with any theme
|
52 |
* AddToAny's SVG icons are super-lightweight and pixel-perfect at any size, and AddToAny's responsive share menu fits on all displays
|
53 |
+
* Automatic <a href="https://wordpress.org/plugins/amp/">AMP</a> (Accelerated Mobile Pages) support for social share buttons on AMP pages
|
54 |
|
55 |
= Customizable & Extensible =
|
56 |
|
300 |
|
301 |
== Changelog ==
|
302 |
|
303 |
+
= 1.6.14 =
|
304 |
+
* [AMP](https://wordpress.org/plugins/amp/) (Accelerated Mobile Pages) support for share buttons in posts
|
305 |
+
* PHP template code now accepts the `icon_size` argument
|
306 |
+
|
307 |
= 1.6.13 =
|
308 |
* Fix automatic placement in post excerpts for certain themes & plugins that display post content on a page (thanks Agis)
|
309 |
|
add-to-any.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: AddToAny Share Buttons
|
4 |
Plugin URI: https://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. [<a href="options-general.php?page=addtoany">Settings</a>]
|
6 |
-
Version: 1.6.
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
@@ -73,13 +73,21 @@ function A2A_SHARE_SAVE_link_vars( $linkname = false, $linkurl = false ) {
|
|
73 |
}
|
74 |
|
75 |
// Combine ADDTOANY_SHARE_SAVE_ICONS and ADDTOANY_SHARE_SAVE_BUTTON
|
76 |
-
function ADDTOANY_SHARE_SAVE_KIT( $args =
|
77 |
global $_addtoany_counter;
|
78 |
|
79 |
$_addtoany_counter++;
|
80 |
|
81 |
$options = get_option( 'addtoany_options' );
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
// If universal button disabled, and not manually disabled through args
|
84 |
if ( isset( $options['button'] ) && $options['button'] == 'NONE' && ! isset( $args['no_universal_button'] ) ) {
|
85 |
// Pass this setting on to ADDTOANY_SHARE_SAVE_BUTTON
|
@@ -104,20 +112,20 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
104 |
// If vertical style (.a2a_vertical_style)
|
105 |
if ( strpos( $kit_additional_classes, 'a2a_vertical_style' ) !== false ) {
|
106 |
// Use width (if specified) for .a2a_kit_size_## class name to size default service counters
|
107 |
-
$
|
108 |
} else {
|
109 |
// Use height (if specified) for .a2a_kit_size_## class name to size default service counters
|
110 |
-
$
|
111 |
}
|
112 |
// a2a_kit_size_32 if no icon size, or no_small_icons arg is true
|
113 |
-
} elseif ( ! isset( $
|
114 |
-
$
|
115 |
// a2a_kit_size_16
|
116 |
-
} elseif ( isset( $
|
117 |
-
$
|
118 |
// a2a_kit_size_## custom icon size
|
119 |
-
} elseif ( isset( $
|
120 |
-
$
|
121 |
}
|
122 |
|
123 |
// Add addtoany_list className unless disabled (for floating buttons)
|
@@ -131,7 +139,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
131 |
}
|
132 |
|
133 |
if ( ! isset( $args['html_container_open'] ) ) {
|
134 |
-
$args['html_container_open'] = '<div class="a2a_kit' . $
|
135 |
$args['html_container_open'] .= ' id="wpa2a_' . $_addtoany_counter . '"'; // ID is later removed by JS (for AJAX)
|
136 |
$args['html_container_open'] .= $kit_style;
|
137 |
$args['html_container_open'] .= '>';
|
@@ -155,7 +163,7 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
|
|
155 |
|
156 |
$kit_html .= ADDTOANY_SHARE_SAVE_BUTTON( $args );
|
157 |
|
158 |
-
if (
|
159 |
return $kit_html;
|
160 |
else
|
161 |
echo $kit_html;
|
@@ -168,6 +176,8 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
168 |
$A2A_SHARE_SAVE_services,
|
169 |
$A2A_FOLLOW_services;
|
170 |
|
|
|
|
|
171 |
$linkname = ( isset( $args['linkname'] ) ) ? $args['linkname'] : FALSE;
|
172 |
$linkurl = ( isset( $args['linkurl'] ) ) ? $args['linkurl'] : FALSE;
|
173 |
|
@@ -183,6 +193,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
183 |
'html_container_close' => '',
|
184 |
'html_wrap_open' => '',
|
185 |
'html_wrap_close' => '',
|
|
|
186 |
'is_follow' => false,
|
187 |
'no_universal_button' => false,
|
188 |
'buttons' => array(),
|
@@ -191,12 +202,14 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
191 |
$args = wp_parse_args( $args, $defaults );
|
192 |
extract( $args );
|
193 |
|
194 |
-
$
|
195 |
|
196 |
-
// False if "icon_size" is set to '16' or no_small_icons arg is true
|
197 |
-
$large_icons = ( isset( $
|
198 |
-
( ! isset( $no_small_icons ) || false == $no_small_icons )
|
199 |
) ? false : true;
|
|
|
|
|
200 |
|
201 |
// Directory of either custom icons or the packaged icons
|
202 |
if ( isset( $options['custom_icons'] ) && $options['custom_icons'] == 'url' && isset( $options['custom_icons_url'] ) ) {
|
@@ -294,11 +307,14 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
294 |
&& isset( $options['special_' . $active_service . '_options']['show_count'] )
|
295 |
&& $options['special_' . $active_service . '_options']['show_count'] == '1'
|
296 |
) ? true : false;
|
297 |
-
|
298 |
-
$
|
299 |
-
$
|
300 |
-
$
|
301 |
-
$
|
|
|
|
|
|
|
302 |
|
303 |
$url = ( isset( $href ) ) ? $href : "http://www.addtoany.com/add_to/" . $safe_name . "?linkurl=" . $linkurl_enc . "&linkname=" . $linkname_enc;
|
304 |
$src = ( $icon_url ) ? $icon_url : $icons_dir . $icon . '.' . $icons_type;
|
@@ -306,7 +322,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
306 |
$class_attr = ( $custom_service ) ? '' : ' class="a2a_button_' . $safe_name . $counter . '"';
|
307 |
$rel_nofollow = $is_follow ? '' : ' rel="nofollow"'; // ($is_follow indicates a Follow Kit. 'nofollow' is for search crawlers. Different things)
|
308 |
|
309 |
-
//
|
310 |
if ( isset( $custom_icons ) ) {
|
311 |
$width_attr = ! empty( $icons_width ) ? ' width="' . $icons_width . '"' : '';
|
312 |
$height_attr = ! empty( $icons_height ) ? ' height="' . $icons_height . '"' : '';
|
@@ -322,7 +338,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
322 |
|
323 |
$ind_html .= $html_container_close;
|
324 |
|
325 |
-
if (
|
326 |
return $ind_html;
|
327 |
else
|
328 |
echo $ind_html;
|
@@ -334,6 +350,8 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
334 |
|
335 |
global $A2A_SHARE_SAVE_plugin_url_path, $_addtoany_targets, $_addtoany_counter, $_addtoany_init;
|
336 |
|
|
|
|
|
337 |
$linkname = (isset($args['linkname'])) ? $args['linkname'] : false;
|
338 |
$linkurl = (isset($args['linkurl'])) ? $args['linkurl'] : false;
|
339 |
$_addtoany_targets = ( isset( $_addtoany_targets ) ) ? $_addtoany_targets : array();
|
@@ -352,6 +370,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
352 |
'html_container_close' => '',
|
353 |
'html_wrap_open' => '',
|
354 |
'html_wrap_close' => '',
|
|
|
355 |
'no_small_icons' => false,
|
356 |
'no_universal_button' => false,
|
357 |
);
|
@@ -372,9 +391,9 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
372 |
/* AddToAny button */
|
373 |
|
374 |
$is_feed = is_feed();
|
375 |
-
$
|
376 |
-
$
|
377 |
-
$
|
378 |
|
379 |
// If universal button is enabled
|
380 |
if ( ! $args['no_universal_button'] ) {
|
@@ -383,8 +402,15 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
383 |
// Or, no_small_icons is true and a custom universal icon is not enabled (permitting a custom universal button in floating bar)
|
384 |
|| isset( $no_small_icons ) && true == $no_small_icons && ( ! isset( $options['button'] ) || 'CUSTOM' != $options['button'] )
|
385 |
) {
|
386 |
-
//
|
387 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
} else if ( isset( $options['button'] ) && 'CUSTOM' == $options['button'] ) {
|
389 |
$button_src = $options['button_custom'];
|
390 |
$button_width = '';
|
3 |
Plugin Name: AddToAny Share Buttons
|
4 |
Plugin URI: https://www.addtoany.com/
|
5 |
Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. [<a href="options-general.php?page=addtoany">Settings</a>]
|
6 |
+
Version: 1.6.14
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
73 |
}
|
74 |
|
75 |
// Combine ADDTOANY_SHARE_SAVE_ICONS and ADDTOANY_SHARE_SAVE_BUTTON
|
76 |
+
function ADDTOANY_SHARE_SAVE_KIT( $args = array() ) {
|
77 |
global $_addtoany_counter;
|
78 |
|
79 |
$_addtoany_counter++;
|
80 |
|
81 |
$options = get_option( 'addtoany_options' );
|
82 |
|
83 |
+
$defaults = array(
|
84 |
+
'output_later' => false,
|
85 |
+
'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
|
86 |
+
);
|
87 |
+
|
88 |
+
$args = wp_parse_args( $args, $defaults );
|
89 |
+
extract( $args );
|
90 |
+
|
91 |
// If universal button disabled, and not manually disabled through args
|
92 |
if ( isset( $options['button'] ) && $options['button'] == 'NONE' && ! isset( $args['no_universal_button'] ) ) {
|
93 |
// Pass this setting on to ADDTOANY_SHARE_SAVE_BUTTON
|
112 |
// If vertical style (.a2a_vertical_style)
|
113 |
if ( strpos( $kit_additional_classes, 'a2a_vertical_style' ) !== false ) {
|
114 |
// Use width (if specified) for .a2a_kit_size_## class name to size default service counters
|
115 |
+
$icon_size_classname = isset( $options['custom_icons_width'] ) ? ' a2a_kit_size_' . $options['custom_icons_width'] : '';
|
116 |
} else {
|
117 |
// Use height (if specified) for .a2a_kit_size_## class name to size default service counters
|
118 |
+
$icon_size_classname = isset( $options['custom_icons_height'] ) ? ' a2a_kit_size_' . $options['custom_icons_height'] : '';
|
119 |
}
|
120 |
// a2a_kit_size_32 if no icon size, or no_small_icons arg is true
|
121 |
+
} elseif ( ! isset( $icon_size ) || isset( $args['no_small_icons'] ) && true == $args['no_small_icons'] ) {
|
122 |
+
$icon_size_classname = ' a2a_kit_size_32';
|
123 |
// a2a_kit_size_16
|
124 |
+
} elseif ( isset( $icon_size ) && $icon_size == '16' ) {
|
125 |
+
$icon_size_classname = '';
|
126 |
// a2a_kit_size_## custom icon size
|
127 |
+
} elseif ( isset( $icon_size ) ) {
|
128 |
+
$icon_size_classname = ' a2a_kit_size_' . $icon_size;
|
129 |
}
|
130 |
|
131 |
// Add addtoany_list className unless disabled (for floating buttons)
|
139 |
}
|
140 |
|
141 |
if ( ! isset( $args['html_container_open'] ) ) {
|
142 |
+
$args['html_container_open'] = '<div class="a2a_kit' . $icon_size_classname . $kit_additional_classes . ' a2a_target"';
|
143 |
$args['html_container_open'] .= ' id="wpa2a_' . $_addtoany_counter . '"'; // ID is later removed by JS (for AJAX)
|
144 |
$args['html_container_open'] .= $kit_style;
|
145 |
$args['html_container_open'] .= '>';
|
163 |
|
164 |
$kit_html .= ADDTOANY_SHARE_SAVE_BUTTON( $args );
|
165 |
|
166 |
+
if ( true == $output_later )
|
167 |
return $kit_html;
|
168 |
else
|
169 |
echo $kit_html;
|
176 |
$A2A_SHARE_SAVE_services,
|
177 |
$A2A_FOLLOW_services;
|
178 |
|
179 |
+
$options = get_option( 'addtoany_options' );
|
180 |
+
|
181 |
$linkname = ( isset( $args['linkname'] ) ) ? $args['linkname'] : FALSE;
|
182 |
$linkurl = ( isset( $args['linkurl'] ) ) ? $args['linkurl'] : FALSE;
|
183 |
|
193 |
'html_container_close' => '',
|
194 |
'html_wrap_open' => '',
|
195 |
'html_wrap_close' => '',
|
196 |
+
'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
|
197 |
'is_follow' => false,
|
198 |
'no_universal_button' => false,
|
199 |
'buttons' => array(),
|
202 |
$args = wp_parse_args( $args, $defaults );
|
203 |
extract( $args );
|
204 |
|
205 |
+
$is_amp = function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ? true : false;
|
206 |
|
207 |
+
// False if "icon_size" is set to '16', or no_small_icons arg is true
|
208 |
+
$large_icons = ( isset( $icon_size ) && $icon_size == '16'
|
209 |
+
&& ( ! isset( $no_small_icons ) || false == $no_small_icons )
|
210 |
) ? false : true;
|
211 |
+
// False if AMP endpoint
|
212 |
+
$large_icons = $is_amp ? false : $large_icons;
|
213 |
|
214 |
// Directory of either custom icons or the packaged icons
|
215 |
if ( isset( $options['custom_icons'] ) && $options['custom_icons'] == 'url' && isset( $options['custom_icons_url'] ) ) {
|
307 |
&& isset( $options['special_' . $active_service . '_options']['show_count'] )
|
308 |
&& $options['special_' . $active_service . '_options']['show_count'] == '1'
|
309 |
) ? true : false;
|
310 |
+
|
311 |
+
$icon = isset( $service['icon'] ) ? $service['icon'] : 'default'; // Just the icon filename
|
312 |
+
$icon_url = isset( $service['icon_url'] ) ? $service['icon_url'] : false;
|
313 |
+
$icon_url = $is_amp && ! $icon_url ? 'https://static.addtoany.com/buttons/' . $icon . '.svg' : $icon_url;
|
314 |
+
$width_attr = isset( $service['icon_width'] ) ? ' width="' . $service['icon_width'] . '"' : ' width="16"';
|
315 |
+
$width_attr = $is_amp && isset( $icon_size ) ? ' width="' . $icon_size . '"' : $width_attr;
|
316 |
+
$height_attr = isset( $service['icon_height'] ) ? ' height="' . $service['icon_height'] . '"' : ' height="16"';
|
317 |
+
$height_attr = $is_amp && isset( $icon_size ) ? ' height="' . $icon_size . '"' : $height_attr;
|
318 |
|
319 |
$url = ( isset( $href ) ) ? $href : "http://www.addtoany.com/add_to/" . $safe_name . "?linkurl=" . $linkurl_enc . "&linkname=" . $linkname_enc;
|
320 |
$src = ( $icon_url ) ? $icon_url : $icons_dir . $icon . '.' . $icons_type;
|
322 |
$class_attr = ( $custom_service ) ? '' : ' class="a2a_button_' . $safe_name . $counter . '"';
|
323 |
$rel_nofollow = $is_follow ? '' : ' rel="nofollow"'; // ($is_follow indicates a Follow Kit. 'nofollow' is for search crawlers. Different things)
|
324 |
|
325 |
+
// Set dimension attributes if using custom icons and dimension is specified
|
326 |
if ( isset( $custom_icons ) ) {
|
327 |
$width_attr = ! empty( $icons_width ) ? ' width="' . $icons_width . '"' : '';
|
328 |
$height_attr = ! empty( $icons_height ) ? ' height="' . $icons_height . '"' : '';
|
338 |
|
339 |
$ind_html .= $html_container_close;
|
340 |
|
341 |
+
if ( true == $output_later )
|
342 |
return $ind_html;
|
343 |
else
|
344 |
echo $ind_html;
|
350 |
|
351 |
global $A2A_SHARE_SAVE_plugin_url_path, $_addtoany_targets, $_addtoany_counter, $_addtoany_init;
|
352 |
|
353 |
+
$options = get_option( 'addtoany_options' );
|
354 |
+
|
355 |
$linkname = (isset($args['linkname'])) ? $args['linkname'] : false;
|
356 |
$linkurl = (isset($args['linkurl'])) ? $args['linkurl'] : false;
|
357 |
$_addtoany_targets = ( isset( $_addtoany_targets ) ) ? $_addtoany_targets : array();
|
370 |
'html_container_close' => '',
|
371 |
'html_wrap_open' => '',
|
372 |
'html_wrap_close' => '',
|
373 |
+
'icon_size' => isset( $options['icon_size'] ) ? $options['icon_size'] : '',
|
374 |
'no_small_icons' => false,
|
375 |
'no_universal_button' => false,
|
376 |
);
|
391 |
/* AddToAny button */
|
392 |
|
393 |
$is_feed = is_feed();
|
394 |
+
$is_amp = function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ? true : false;
|
395 |
+
$button_target = $is_amp ? ' target="_blank"' : '';
|
396 |
+
$button_href_querystring = ($is_feed || $is_amp) ? '#url=' . $linkurl_enc . '&title=' . $linkname_enc : '';
|
397 |
|
398 |
// If universal button is enabled
|
399 |
if ( ! $args['no_universal_button'] ) {
|
402 |
// Or, no_small_icons is true and a custom universal icon is not enabled (permitting a custom universal button in floating bar)
|
403 |
|| isset( $no_small_icons ) && true == $no_small_icons && ( ! isset( $options['button'] ) || 'CUSTOM' != $options['button'] )
|
404 |
) {
|
405 |
+
// If AMP (Accelerated Mobile Page)
|
406 |
+
if ( $is_amp ) {
|
407 |
+
$button_src = 'https://static.addtoany.com/buttons/a2a.svg';
|
408 |
+
$button_width = isset( $icon_size ) ? ' width="' . $icon_size .'"' : ' width="32"';
|
409 |
+
$button_height = isset( $icon_size ) ? ' height="' . $icon_size .'"' : ' height="32"';
|
410 |
+
} else {
|
411 |
+
// Skip button IMG for A2A icon insertion
|
412 |
+
$button_text = '';
|
413 |
+
}
|
414 |
} else if ( isset( $options['button'] ) && 'CUSTOM' == $options['button'] ) {
|
415 |
$button_src = $options['button_custom'];
|
416 |
$button_width = '';
|
addtoany.compat.php
CHANGED
@@ -20,4 +20,21 @@ function addtoany_excerpt_remove() {
|
|
20 |
remove_filter( 'the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
21 |
}
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
20 |
remove_filter( 'the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98 );
|
21 |
}
|
22 |
}
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Load AMP (Accelerated Mobile Pages) compatibility functions
|
27 |
+
*/
|
28 |
+
add_action( 'amp_post_template_css', 'addtoany_amp_additional_css_styles' );
|
29 |
+
|
30 |
+
function addtoany_amp_additional_css_styles( $amp_template ) {
|
31 |
+
// only CSS here please...
|
32 |
+
?>
|
33 |
+
.addtoany_list a {
|
34 |
+
padding: 0 4px;
|
35 |
+
}
|
36 |
+
.addtoany_list a amp-img {
|
37 |
+
display: inline-block;
|
38 |
+
}
|
39 |
+
<?php
|
40 |
}
|