Version Description
- Add Mastodon share button
- Update admin interface
- Remove the LinkedIn share count option because LinkedIn no longer provides share counts
- Remove Oknotizie
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.7.26 |
Comparing to | |
See all releases |
Code changes from version 1.7.25 to 1.7.26
- README.txt +9 -3
- add-to-any.php +2 -2
- addtoany.admin.php +91 -69
- addtoany.services.php +5 -5
- icons/mastodon.svg +1 -0
- icons/oknotizie.svg +0 -1
README.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: micropat, addtoany
|
3 |
Tags: AddToAny, share, sharing, social, share buttons, share button, social media, media, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed, icons
|
4 |
Requires at least: 3.7
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.7.
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
@@ -135,7 +135,7 @@ Share a specific image or video to certain services that accept arbitrary media
|
|
135 |
|
136 |
= For Facebook sharing, how can I set the thumbnail image and description Facebook uses? =
|
137 |
|
138 |
-
Facebook expects the Title, Description, and
|
139 |
|
140 |
Use Facebook's <a href="https://developers.facebook.com/tools/debug/sharing/" target="_blank">Sharing Debugger</a> on your pages to see how Facebook reads your site. "Scrape Again" to test site changes and clear Facebook's cache of a page, or use the <a href="https://developers.facebook.com/tools/debug/sharing/batch/" target="_blank">Batch Invalidator</a> to purge Facebook's cache of multiple URLs.
|
141 |
|
@@ -351,6 +351,12 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
|
|
351 |
|
352 |
== Changelog ==
|
353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
= 1.7.25 =
|
355 |
* Fix service count options in settings
|
356 |
* Load JS for the customizer only when the customizer is used (thanks Neil)
|
2 |
Contributors: micropat, addtoany
|
3 |
Tags: AddToAny, share, sharing, social, share buttons, share button, social media, media, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, like, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed, icons
|
4 |
Requires at least: 3.7
|
5 |
+
Tested up to: 5.0
|
6 |
+
Stable tag: 1.7.26
|
7 |
|
8 |
Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too.
|
9 |
|
135 |
|
136 |
= For Facebook sharing, how can I set the thumbnail image and description Facebook uses? =
|
137 |
|
138 |
+
Facebook expects the Title, Description, and preview image of a shared page to be defined in the Open Graph <a href="https://www.addtoany.com/ext/meta-tags/" target="_blank">meta tags</a> of a shared page.
|
139 |
|
140 |
Use Facebook's <a href="https://developers.facebook.com/tools/debug/sharing/" target="_blank">Sharing Debugger</a> on your pages to see how Facebook reads your site. "Scrape Again" to test site changes and clear Facebook's cache of a page, or use the <a href="https://developers.facebook.com/tools/debug/sharing/batch/" target="_blank">Batch Invalidator</a> to purge Facebook's cache of multiple URLs.
|
141 |
|
351 |
|
352 |
== Changelog ==
|
353 |
|
354 |
+
= 1.7.26 =
|
355 |
+
* Add Mastodon share button
|
356 |
+
* Update admin interface
|
357 |
+
* Remove the LinkedIn share count option because LinkedIn no longer provides share counts
|
358 |
+
* Remove Oknotizie
|
359 |
+
|
360 |
= 1.7.25 =
|
361 |
* Fix service count options in settings
|
362 |
* Load JS for the customizer only when the customizer is used (thanks Neil)
|
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.
|
6 |
-
Version: 1.7.
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
@@ -315,7 +315,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
315 |
|
316 |
// AddToAny counter enabled?
|
317 |
$counter_enabled = ( ! $is_follow // Disable counters on Follow Kits
|
318 |
-
&& in_array( $active_service, array( 'facebook', 'pinterest', '
|
319 |
&& isset( $options['special_' . $active_service . '_options'] )
|
320 |
&& isset( $options['special_' . $active_service . '_options']['show_count'] )
|
321 |
&& $options['special_' . $active_service . '_options']['show_count'] == '1'
|
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.
|
6 |
+
Version: 1.7.26
|
7 |
Author: AddToAny
|
8 |
Author URI: https://www.addtoany.com/
|
9 |
Text Domain: add-to-any
|
315 |
|
316 |
// AddToAny counter enabled?
|
317 |
$counter_enabled = ( ! $is_follow // Disable counters on Follow Kits
|
318 |
+
&& in_array( $active_service, array( 'facebook', 'pinterest', 'reddit' ) )
|
319 |
&& isset( $options['special_' . $active_service . '_options'] )
|
320 |
&& isset( $options['special_' . $active_service . '_options']['show_count'] )
|
321 |
&& $options['special_' . $active_service . '_options']['show_count'] == '1'
|
addtoany.admin.php
CHANGED
@@ -338,7 +338,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
338 |
$active_services[] = $service;
|
339 |
|
340 |
// AddToAny counter enabled?
|
341 |
-
if ( in_array( $service, array( 'facebook', 'pinterest', '
|
342 |
$new_options['special_' . $service . '_options'] = array(
|
343 |
'show_count' => ( ( isset( $_POST['addtoany_' . $service . '_show_count'] ) && $_POST['addtoany_' . $service . '_show_count'] == '1') ? '1' : '-1' )
|
344 |
);
|
@@ -453,7 +453,7 @@ function A2A_SHARE_SAVE_options_page() {
|
|
453 |
if ( ! isset( $site['icon'] ) )
|
454 |
$site['icon'] = 'default';
|
455 |
|
456 |
-
$special_service = ( in_array( $service_safe_name, array( 'facebook', 'pinterest', '
|
457 |
? ' class="addtoany_special_service"' : '';
|
458 |
?>
|
459 |
<li data-addtoany-icon-name="<?php echo $site['icon']; ?>"<?php echo $special_service; ?> id="a2a_wp_<?php echo $service_safe_name; ?>" title="<?php echo $site['name']; ?>">
|
@@ -490,37 +490,41 @@ function A2A_SHARE_SAVE_options_page() {
|
|
490 |
|
491 |
<tr valign="top">
|
492 |
<th scope="row"><?php _e("Universal Button", 'add-to-any'); ?></th>
|
493 |
-
<td><fieldset>
|
494 |
-
<div class="addtoany_icon_size_large">
|
495 |
<label class="addtoany_override a2a_kit_size_32">
|
496 |
<input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if ( ! isset( $options['button'] ) || 'A2A_SVG_32' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
497 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/a2a.svg'; ?>" width="32" height="32" alt="AddToAny" onclick="this.parentNode.firstChild.checked=true" />
|
498 |
</label>
|
499 |
<br>
|
500 |
</div>
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
<
|
509 |
-
<
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
<
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
<
|
523 |
-
|
|
|
|
|
|
|
|
|
524 |
|
525 |
</fieldset></td>
|
526 |
</tr>
|
@@ -643,29 +647,34 @@ function A2A_SHARE_SAVE_options_page() {
|
|
643 |
<tr valign="top">
|
644 |
<th scope="row"><?php _e('Advanced Options', 'add-to-any'); ?></th>
|
645 |
<td><fieldset id="addtoany_extra_section_advanced_options" class="addtoany_extra_section" role="region">
|
646 |
-
<
|
647 |
-
<
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
<?php _e(
|
668 |
-
|
|
|
|
|
|
|
|
|
|
|
669 |
</fieldset></td>
|
670 |
</tr>
|
671 |
<?php endif; ?>
|
@@ -822,7 +831,7 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
822 |
$options = get_option( 'addtoany_options', array() );
|
823 |
|
824 |
?>
|
825 |
-
<script
|
826 |
jQuery(document).ready(function(){
|
827 |
|
828 |
// Add color picker
|
@@ -889,7 +898,7 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
889 |
jQuery('#addtoany_admin_form').append('<input class="addtoany_hidden_options" name="addtoany_' + service_name + '_verb" type="hidden" value="' + fb_verb_value + '"/>');
|
890 |
}
|
891 |
// AddToAny counters
|
892 |
-
} else if ( jQuery.inArray( service_name, ['facebook', 'pinterest', '
|
893 |
show_count_value = (jQuery('#' + services_array[i] + '_show_count').is(':checked')) ? '1' : '-1' ;
|
894 |
jQuery('#addtoany_admin_form').append('<input class="addtoany_hidden_options" name="addtoany_' + service_name + '_show_count" type="hidden" value="' + show_count_value + '"/>');
|
895 |
}
|
@@ -1008,7 +1017,7 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
1008 |
$active_services_quoted .= ',';
|
1009 |
|
1010 |
// AddToAny counter enabled?
|
1011 |
-
if ( in_array( $service, array( 'facebook', 'pinterest', '
|
1012 |
if ( isset( $_POST['addtoany_' . $service . '_show_count'] ) && $_POST['addtoany_' . $service . '_show_count'] == '1'
|
1013 |
|| ! isset( $_POST['addtoany_' . $service . '_show_count'] )
|
1014 |
&& isset( $options['special_' . $service . '_options'] )
|
@@ -1050,24 +1059,37 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
1050 |
jQuery(this).fadeOut('fast');
|
1051 |
});
|
1052 |
|
1053 |
-
//
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
.
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1062 |
// Handle click on 'show section' button
|
1063 |
-
jQuery('.addtoany_extra_section').next('fieldset').find('
|
1064 |
-
jQuery(this)
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
|
|
1068 |
});
|
|
|
|
|
1069 |
});
|
1070 |
-
|
1071 |
|
1072 |
<style>
|
1073 |
.color-field-container,
|
@@ -1107,7 +1129,7 @@ function A2A_SHARE_SAVE_admin_head() {
|
|
1107 |
.addtoany_extra_section {
|
1108 |
outline: 0;
|
1109 |
}
|
1110 |
-
/* Adjust position of arrow icon on show more button */
|
1111 |
.addtoany_show_more_button .dashicons {
|
1112 |
position: relative;
|
1113 |
right: 1px;
|
338 |
$active_services[] = $service;
|
339 |
|
340 |
// AddToAny counter enabled?
|
341 |
+
if ( in_array( $service, array( 'facebook', 'pinterest', 'reddit' ) ) ) {
|
342 |
$new_options['special_' . $service . '_options'] = array(
|
343 |
'show_count' => ( ( isset( $_POST['addtoany_' . $service . '_show_count'] ) && $_POST['addtoany_' . $service . '_show_count'] == '1') ? '1' : '-1' )
|
344 |
);
|
453 |
if ( ! isset( $site['icon'] ) )
|
454 |
$site['icon'] = 'default';
|
455 |
|
456 |
+
$special_service = ( in_array( $service_safe_name, array( 'facebook', 'pinterest', 'reddit' ) ) )
|
457 |
? ' class="addtoany_special_service"' : '';
|
458 |
?>
|
459 |
<li data-addtoany-icon-name="<?php echo $site['icon']; ?>"<?php echo $special_service; ?> id="a2a_wp_<?php echo $service_safe_name; ?>" title="<?php echo $site['name']; ?>">
|
490 |
|
491 |
<tr valign="top">
|
492 |
<th scope="row"><?php _e("Universal Button", 'add-to-any'); ?></th>
|
493 |
+
<td><fieldset id="addtoany_extra_section_universal_button" class="addtoany_extra_section">
|
494 |
+
<div class="addtoany_extra_element addtoany_icon_size_large">
|
495 |
<label class="addtoany_override a2a_kit_size_32">
|
496 |
<input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if ( ! isset( $options['button'] ) || 'A2A_SVG_32' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
497 |
<img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/a2a.svg'; ?>" width="32" height="32" alt="AddToAny" onclick="this.parentNode.firstChild.checked=true" />
|
498 |
</label>
|
499 |
<br>
|
500 |
</div>
|
501 |
+
<div class="addtoany_extra_element">
|
502 |
+
<label>
|
503 |
+
<input name="A2A_SHARE_SAVE_button" value="CUSTOM" id="A2A_SHARE_SAVE_button_is_custom" type="radio"<?php if ( isset( $options['button'] ) && 'CUSTOM' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
504 |
+
<span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
|
505 |
+
</label>
|
506 |
+
<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_custom').checked=true" style="vertical-align:middle" value="<?php if ( isset( $options['button_custom'] ) ) esc_attr_e( $options['button_custom'] ); ?>" />
|
507 |
+
</div>
|
508 |
+
<div class="addtoany_extra_element">
|
509 |
+
<label>
|
510 |
+
<input name="A2A_SHARE_SAVE_button" value="TEXT" id="A2A_SHARE_SAVE_button_is_text" type="radio"<?php if ( isset( $options['button'] ) && 'TEXT' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle">
|
511 |
+
<span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?>:</span>
|
512 |
+
</label>
|
513 |
+
<input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_text').checked=true" style="vertical-align:middle;width:150px" value="<?php echo ( isset( $options['button_text'] ) && trim( '' != $options['button_text'] ) ) ? esc_attr( $options['button_text'] ) : __('Share','add-to-any'); ?>" />
|
514 |
+
</div>
|
515 |
+
<div class="addtoany_extra_element">
|
516 |
+
<label>
|
517 |
+
<input name="A2A_SHARE_SAVE_button" value="NONE" type="radio"<?php if ( isset( $options['button'] ) && 'NONE' == $options['button'] ) echo ' checked="checked"'; ?> onclick="return confirm('<?php _e('This option will disable universal sharing. Are you sure you want to disable universal sharing?', 'add-to-any' ) ?>')" style="margin:9px 0;vertical-align:middle">
|
518 |
+
<span style="margin:0 9px;vertical-align:middle"><?php _e("None"); ?></span>
|
519 |
+
</label>
|
520 |
+
</div>
|
521 |
+
<div class="addtoany_extra_element">
|
522 |
+
<label>
|
523 |
+
<input id="A2A_SHARE_SAVE_button_show_count" name="A2A_SHARE_SAVE_button_show_count" type="checkbox"<?php
|
524 |
+
if ( isset( $options['button_show_count'] ) && $options['button_show_count'] == '1' ) echo ' checked="checked"'; ?> value="1">
|
525 |
+
<span style="margin-left:5px">Show count</span>
|
526 |
+
</label>
|
527 |
+
</div>
|
528 |
|
529 |
</fieldset></td>
|
530 |
</tr>
|
647 |
<tr valign="top">
|
648 |
<th scope="row"><?php _e('Advanced Options', 'add-to-any'); ?></th>
|
649 |
<td><fieldset id="addtoany_extra_section_advanced_options" class="addtoany_extra_section" role="region">
|
650 |
+
<div class="addtoany_extra_element">
|
651 |
+
<label for="A2A_SHARE_SAVE_custom_icons">
|
652 |
+
<input name="A2A_SHARE_SAVE_custom_icons" id="A2A_SHARE_SAVE_custom_icons" type="checkbox"<?php if ( isset( $options['custom_icons'] ) && $options['custom_icons'] == 'url' ) echo ' checked="checked"'; ?> value="url"/>
|
653 |
+
<?php _e('Use custom icons. URL:', 'add-to-any'); ?>
|
654 |
+
</label>
|
655 |
+
<input name="A2A_SHARE_SAVE_custom_icons_url" type="text" class="code" size="50" style="vertical-align:middle" placeholder="//example.com/blog/uploads/addtoany/icons/custom/" value="<?php if ( isset( $options['custom_icons_url'] ) ) esc_attr_e( $options['custom_icons_url'] ); ?>" />
|
656 |
+
<br/>
|
657 |
+
<label for="A2A_SHARE_SAVE_custom_icons_type"><?php _e('Filename extension', 'add-to-any'); ?></label>
|
658 |
+
<input name="A2A_SHARE_SAVE_custom_icons_type" type="text" class="code" size="5" maxlength="4" placeholder="png" value="<?php if ( isset( $options['custom_icons_type'] ) ) esc_attr_e( $options['custom_icons_type'] ); else echo 'png'; ?>" />
|
659 |
+
<label for="A2A_SHARE_SAVE_custom_icons_width"><?php _e('Width'); ?></label>
|
660 |
+
<input name="A2A_SHARE_SAVE_custom_icons_width" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_width" value="<?php if ( isset( $options['custom_icons_width'] ) ) esc_attr_e( $options['custom_icons_width'] ); ?>" class="small-text" />
|
661 |
+
<label for="A2A_SHARE_SAVE_custom_icons_height"><?php _e('Height'); ?></label>
|
662 |
+
<input name="A2A_SHARE_SAVE_custom_icons_height" type="number" max="300" min="10" maxlength="3" step="2" oninput="if(this.value.length > 3) this.value=this.value.slice(0, 3)" id="A2A_SHARE_SAVE_custom_icons_height" value="<?php if ( isset( $options['custom_icons_height'] ) ) esc_attr_e( $options['custom_icons_height'] ); ?>" class="small-text" />
|
663 |
+
<p class="description">
|
664 |
+
<?php _e("Specify the URL of the directory containing your custom icons. For example, a URL of <code>//example.com/blog/uploads/addtoany/icons/custom/</code> containing <code>facebook.png</code> and <code>twitter.png</code>. Be sure that custom icon filenames match the icon filenames in <code>plugins/add-to-any/icons</code>. For AddToAny's Universal Button, select Image URL and specify the URL of your AddToAny universal share icon (<a href=\"#\" onclick=\"document.getElementsByName('A2A_SHARE_SAVE_button_custom')[0].focus();return false\">above</a>).", 'add-to-any'); ?>
|
665 |
+
</p>
|
666 |
+
<br>
|
667 |
+
</div>
|
668 |
+
<div class="addtoany_extra_element">
|
669 |
+
<label for="A2A_SHARE_SAVE_cache">
|
670 |
+
<input name="A2A_SHARE_SAVE_cache" id="A2A_SHARE_SAVE_cache" type="checkbox"<?php if ( isset( $options['cache'] ) && $options['cache'] == '1' ) echo ' checked="checked"'; ?> value="1"/>
|
671 |
+
<?php _e('Cache AddToAny locally with daily cache updates', 'add-to-any'); ?>
|
672 |
+
</label>
|
673 |
+
<p class="description">
|
674 |
+
<?php _e("Most sites should not use this option. By default, AddToAny loads asynchronously and most efficiently. Since many visitors will have AddToAny cached in their browser already, serving AddToAny locally from your site will be slower for those visitors. If local caching is enabled, be sure to set far future cache/expires headers for image files in your <code>uploads/addtoany</code> directory.", 'add-to-any'); ?>
|
675 |
+
</p>
|
676 |
+
<br>
|
677 |
+
</div>
|
678 |
</fieldset></td>
|
679 |
</tr>
|
680 |
<?php endif; ?>
|
831 |
$options = get_option( 'addtoany_options', array() );
|
832 |
|
833 |
?>
|
834 |
+
<script>
|
835 |
jQuery(document).ready(function(){
|
836 |
|
837 |
// Add color picker
|
898 |
jQuery('#addtoany_admin_form').append('<input class="addtoany_hidden_options" name="addtoany_' + service_name + '_verb" type="hidden" value="' + fb_verb_value + '"/>');
|
899 |
}
|
900 |
// AddToAny counters
|
901 |
+
} else if ( jQuery.inArray( service_name, ['facebook', 'pinterest', 'reddit'] ) > -1 ) {
|
902 |
show_count_value = (jQuery('#' + services_array[i] + '_show_count').is(':checked')) ? '1' : '-1' ;
|
903 |
jQuery('#addtoany_admin_form').append('<input class="addtoany_hidden_options" name="addtoany_' + service_name + '_show_count" type="hidden" value="' + show_count_value + '"/>');
|
904 |
}
|
1017 |
$active_services_quoted .= ',';
|
1018 |
|
1019 |
// AddToAny counter enabled?
|
1020 |
+
if ( in_array( $service, array( 'facebook', 'pinterest', 'reddit' ) ) ) {
|
1021 |
if ( isset( $_POST['addtoany_' . $service . '_show_count'] ) && $_POST['addtoany_' . $service . '_show_count'] == '1'
|
1022 |
|| ! isset( $_POST['addtoany_' . $service . '_show_count'] )
|
1023 |
&& isset( $options['special_' . $service . '_options'] )
|
1059 |
jQuery(this).fadeOut('fast');
|
1060 |
});
|
1061 |
|
1062 |
+
// Inserts an accessible 'show section/elements' button
|
1063 |
+
function addtoany_insert_show_button(index) {
|
1064 |
+
var section = jQuery(this);
|
1065 |
+
// If not already inserted
|
1066 |
+
if ( ! section.next('fieldset').has('.addtoany_show_more_button').length ) {
|
1067 |
+
section.attr('aria-expanded', 'false').attr('tabindex', '-1')
|
1068 |
+
.after('<fieldset><button class="addtoany_show_more_button button" type="button" aria-controls="' + section.attr('id') + '"><span class="dashicons dashicons-arrow-down"></span></button></fieldset>');
|
1069 |
+
}
|
1070 |
+
}
|
1071 |
+
// Hide each 'extra' element that does not contain a checked/selected input
|
1072 |
+
jQuery('.addtoany_extra_element:not(:has(input:checked))').hide().parents('fieldset')
|
1073 |
+
// Insert 'show' button into section
|
1074 |
+
.each(addtoany_insert_show_button);
|
1075 |
+
// Hide each 'extra' section if it is not .addtoany_show_extra,
|
1076 |
+
// does not contain visible .addtoany_extra_element elements,
|
1077 |
+
// and does not contain a textarea with a value
|
1078 |
+
jQuery('.addtoany_extra_section:not(.addtoany_show_extra, :has(.addtoany_extra_element:visible), :has(textarea:not(:empty)))').hide()
|
1079 |
+
// Insert 'show' button into each section
|
1080 |
+
.each(addtoany_insert_show_button);
|
1081 |
// Handle click on 'show section' button
|
1082 |
+
jQuery('.addtoany_extra_section').next('fieldset').find('.addtoany_show_more_button').click(function(e) {
|
1083 |
+
var button = jQuery(this);
|
1084 |
+
var section = button.parent().prev('fieldset');
|
1085 |
+
button.hide('fast');
|
1086 |
+
section.children('.addtoany_extra_element').slideDown('fast');
|
1087 |
+
section.slideDown('fast').attr('aria-expanded', 'true').focus();
|
1088 |
});
|
1089 |
+
// Add margin-top to 'show section' buttons if section is visible
|
1090 |
+
jQuery('.addtoany_extra_section:visible').next('fieldset').find('.addtoany_show_more_button').css('margin-top', '10px');
|
1091 |
});
|
1092 |
+
</script>
|
1093 |
|
1094 |
<style>
|
1095 |
.color-field-container,
|
1129 |
.addtoany_extra_section {
|
1130 |
outline: 0;
|
1131 |
}
|
1132 |
+
/* Adjust position of arrow icon on 'show more' button */
|
1133 |
.addtoany_show_more_button .dashicons {
|
1134 |
position: relative;
|
1135 |
right: 1px;
|
addtoany.services.php
CHANGED
@@ -257,6 +257,11 @@ $A2A_SHARE_SAVE_services = array(
|
|
257 |
"icon" => "mail_ru",
|
258 |
"color" => "356FAC",
|
259 |
),
|
|
|
|
|
|
|
|
|
|
|
260 |
"mendeley" => array(
|
261 |
"name" => "Mendeley",
|
262 |
"icon" => "mendeley",
|
@@ -287,11 +292,6 @@ $A2A_SHARE_SAVE_services = array(
|
|
287 |
"icon" => "odnoklassniki",
|
288 |
"color" => "F2720C",
|
289 |
),
|
290 |
-
"oknotizie" => array(
|
291 |
-
"name" => "Oknotizie",
|
292 |
-
"icon" => "oknotizie",
|
293 |
-
"color" => "88D32D",
|
294 |
-
),
|
295 |
"outlook_com" => array(
|
296 |
"name" => "Outlook.com",
|
297 |
"icon" => "outlook_com",
|
257 |
"icon" => "mail_ru",
|
258 |
"color" => "356FAC",
|
259 |
),
|
260 |
+
"mastodon" => array(
|
261 |
+
"name" => "Mastodon",
|
262 |
+
"icon" => "mastodon",
|
263 |
+
"color" => "2b90d9",
|
264 |
+
),
|
265 |
"mendeley" => array(
|
266 |
"name" => "Mendeley",
|
267 |
"icon" => "mendeley",
|
292 |
"icon" => "odnoklassniki",
|
293 |
"color" => "F2720C",
|
294 |
),
|
|
|
|
|
|
|
|
|
|
|
295 |
"outlook_com" => array(
|
296 |
"name" => "Outlook.com",
|
297 |
"icon" => "outlook_com",
|
icons/mastodon.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M27 12c0-5.12-3.35-6.62-3.35-6.62C22 4.56 19.05 4.23 16 4.21c-3 0-5.92.35-7.61 1.12C8.36 5.33 5 6.83 5 12v4c.12 5 .92 9.93 5.54 11.16a17.67 17.67 0 0 0 5.44.6 10.88 10.88 0 0 0 4.18-.95l-.09-1.95a13.36 13.36 0 0 1-4.07.54c-2.12-.07-4.37-.23-4.71-2.84a5.58 5.58 0 0 1-.05-.73 27.46 27.46 0 0 0 4.73.63 26.76 26.76 0 0 0 4.68-.28c3-.35 5.53-2.17 5.85-3.83A39.25 39.25 0 0 0 27 12zm-3.95 6.59h-2.46v-6c0-1.27-.53-1.91-1.6-1.91s-1.77.76-1.77 2.27v3.29h-2.44v-3.35c0-1.51-.59-2.27-1.77-2.27s-1.6.64-1.6 1.91v6H9v-6.18a4.49 4.49 0 0 1 1-3 3.39 3.39 0 0 1 2.63-1.12 3.17 3.17 0 0 1 2.84 1.44l.61 1 .61-1a3.17 3.17 0 0 1 2.84-1.44 3.39 3.39 0 0 1 2.63 1.12 4.49 4.49 0 0 1 1 3z" fill="#fff"/></svg>
|
icons/oknotizie.svg
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M13.333 24.975l-4.605-7.01H7.3v9.502h1.4V20.46l4.603 7.007h1.435v-9.5h-1.405m10.534 1.193c-.837-.896-1.927-1.352-3.24-1.352-1.315 0-2.41.455-3.25 1.352-.84.896-1.265 2.092-1.265 3.557 0 1.46.426 2.655 1.265 3.552.84.9 1.935 1.352 3.25 1.352 1.313 0 2.403-.455 3.24-1.353.835-.895 1.258-2.09 1.258-3.556s-.423-2.66-1.258-3.555zm-.248 3.557c0 1.14-.288 2.04-.85 2.67-.557.624-1.283.94-2.158.94-.866 0-1.59-.317-2.148-.945-.564-.632-.85-1.528-.85-2.665 0-1.142.287-2.04.852-2.67.56-.624 1.29-.94 2.17-.94.862 0 1.58.316 2.136.94.56.63.843 1.528.843 2.67zM11.39 4.375c-1.315 0-2.41.455-3.25 1.352-.84.895-1.265 2.09-1.265 3.556 0 1.46.426 2.656 1.265 3.554.84.9 1.934 1.354 3.25 1.354 1.313 0 2.403-.45 3.24-1.35.835-.893 1.258-2.09 1.258-3.554s-.423-2.66-1.258-3.556c-.837-.898-1.927-1.353-3.24-1.353zm2.992 4.908c0 1.142-.284 2.04-.846 2.67-.557.624-1.283.94-2.158.94-.865 0-1.59-.317-2.148-.944-.563-.636-.85-1.53-.85-2.67s.287-2.038.852-2.668c.562-.626 1.293-.943 2.172-.943.862 0 1.58.317 2.136.942.56.63.842 1.53.842 2.67zm4.14 2.015l.59-.59 2.11 3.326h1.705l-2.838-4.31 2.65-2.636H20.9l-2.377 2.5V4.534h-1.43v9.5h1.43" fill="#FFF"/></svg>
|
|