AddToAny Share Buttons - Version 1.2

Version Description

  • Large sharing buttons (major new feature!)
    • Scalable vector icons (SVG icons)
    • Mobile ready
    • Retina and high-DPI ready
    • Customizable through CSS code (effects, height & width, border-radius, and much more)
    • Support for older browsers (reverts gracefully to PNG)
    • Large icons are available for the most popular services right now. More services will roll out soon
  • Adjust CSS for large icons
  • Remove old Internet Explorer stylesheet for rollover opacity effect
  • Add Icon Size options to settings
  • Defaults and settings adjustments
  • Simplify labels in settings
Download this release

Release Info

Developer micropat
Plugin Icon 128x128 AddToAny Share Buttons
Version 1.2
Comparing to
See all releases

Code changes from version 1.1.6 to 1.2

README.txt CHANGED
@@ -1,26 +1,28 @@
1
  === Share Buttons by AddToAny ===
2
  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, sidebar, widget, email, e-mail, seo, button, delicious, google, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
- Stable tag: 1.1.6
7
 
8
- Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
10
  == Description ==
11
 
12
- The WordPress plugin to help people **share**, **bookmark**, and **email** your posts and pages using any service, such as Facebook, Twitter, Pinterest, Google, Reddit, StumbleUpon, LinkedIn, and well over 100 more sharing and social bookmarking sites.
13
 
14
  3rd party buttons include the **Facebook Like Button**, **Twitter Tweet Button**, **Google+ Share Button**, **Google+ Share Button** and **Google +1 Button**.
15
 
16
- 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 history.
17
 
18
- <a href="http://www.addtoany.com/" title="Sharing button widget">Share Button</a> (demo)
19
 
20
- The Email tab makes it easy to share via Google Gmail, Yahoo! Mail, Hotmail (Outlook.com), AOL Mail, and any other web-based emailer or desktop program.
21
 
22
  Standalone **share icons** let you optimize your blog posts & pages for specific social sites. Choose from over 100 individual services.
23
 
 
 
24
  * Smart Menu & Kit with individual share links
25
  * Choose exactly where you want AddToAny to appear
26
  * Google Analytics integration (<a href="http://www.addtoany.com/ext/google_analytics/">access guide</a>)
@@ -35,8 +37,8 @@ After **years of active development**, over **2.5 million downloads**, and **ong
35
 
36
  See also:
37
 
38
- * The standard <a href="http://www.addtoany.com/buttons/">Share button</a> widget
39
- * The <a href="/extend/plugins/add-to-any-subscribe/" title="WordPress RSS Subscribe widget plugin">Subscribe button</a> plugin
40
 
41
  <a href="http://www.addtoany.com/blog/">AddToAny Blog</a> | <a href="http://www.addtoany.com/privacy">Privacy Policy</a>
42
 
@@ -49,7 +51,7 @@ See also:
49
 
50
  = Where are the options? =
51
 
52
- In your Admin panel, go to `Settings` > `AddToAny`. Among other options, you can choose which button, individual icons and advanced sharing buttons (Facebook Like Button, Twitter Tweet Button, Google+ Share Button, Google +1 Button) to display, and where and how to display them.
53
 
54
  To place the buttons as a "widget" in your theme (if your theme supports WordPress Widgets), go to `Appearance` > `Widgets`, then drag AddToAny to an available Widget Area and click `Save`.
55
 
@@ -63,13 +65,13 @@ In `header.php` place the following line of code just before the `</head>` line:
63
  In `footer.php` place the following line of code just before the `</body>` line:
64
  `<?php wp_footer(); ?>`
65
 
66
- = How can I add both the button and the individual icons to another area of my theme? =
67
 
68
  In the Theme Editor, place this code block where you want the button and individual icons to appear in your theme:
69
 
70
  `<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>`
71
 
72
- If you want to customize the shared URL and title for the button and standalone services, use the following code as a template:
73
 
74
  `<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
75
  ADDTOANY_SHARE_SAVE_KIT( array("linkname" => "Example Page", "linkurl" => "http://example.com/page.html") );
@@ -85,7 +87,7 @@ If you want to hardcode the shared current URL and modify the title (server-side
85
  ADDTOANY_SHARE_SAVE_KIT( array("linkname" => (is_home() ? get_bloginfo('description') : wp_title('', FALSE)), "linkurl" => (is_ssl() ? 'https://' : 'http://') . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI']) );
86
  } ?>`
87
 
88
- = How can I add just the button to another area of my theme? =
89
 
90
  In the Theme Editor, you will place this line of code where you want the button to appear in your theme:
91
 
@@ -141,7 +143,7 @@ You can create a plugin or customize the following PHP sample code to add to you
141
  }
142
  add_filter('A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1);`
143
 
144
- = How can I align the button and/or icons to the center or to the right side of posts? =
145
  It depends on your theme, but you can try adding the following CSS code to your main stylesheet.
146
 
147
  To align right:
@@ -150,11 +152,11 @@ To align right:
150
  To align center:
151
  `.addtoany_share_save_container { text-align:center; }`
152
 
153
- = How can I remove a button from individual posts and pages? =
154
 
155
- Insert the following tag into the page or post (HTML tab) that you do not want the button to appear in: `<!--nosharesave-->`
156
 
157
- = How can I force the button to appear in individual posts and pages? =
158
 
159
  If your button isn't already set up to appear (it is by default), insert the following tag into the page or post (HTML tab) that you want the button to appear in: `<!--sharesave-->`
160
 
@@ -186,8 +188,6 @@ Yes, this plugin outputs 100% W3C valid XHTML & HTML5 and W3C valid CSS 3.0 by d
186
 
187
  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.
188
 
189
- If you move the plugin's CSS code to your theme's stylesheet, note that one proprietary vendor prefix (`filter`) is used. It's utilized for cross-browser compatibility with Internet Explorer. For more information about the W3C CSS Validator and the `filter` property, see <a href="http://www.websitedev.de/css/validator-faq#extensions">Why don't [sic] my scrollbar properties, filters, etc. validate?</a> If you feel compelled, you can move the line into an Internet Explorer-only stylesheet, or remove the line at the cost of the opacity hover effect in Internet Explorer.
190
-
191
  Regardless of circumstances for passing W3C tests, the plugin will always output semantically valid and robot-readable code, so publishers do not have to worry about search engine crawler errors due to invalid code. Both <a href="http://en.wikipedia.org/wiki/Web_standards">web standards</a> and <a href="http://en.wikipedia.org/wiki/Cross-browser">cross-browser</a> are taken very seriously.
192
 
193
  = Is there a shortcode for sharing? =
@@ -212,13 +212,29 @@ Upload the plugin directory (including all files and directories within) to the
212
 
213
  == Screenshots ==
214
 
215
- 1. Share/Save sharing button, with the Open Share Icon
216
- 2. Drop-down universal sharing menu that appears instantly when visitors use the share button
217
- 3. Email tab, with direct links to the most popular web-based emailers' auto-filled Compose page, a web-based sender for use with any email address, and a link for desktop email applications
218
- 4. Settings panel
219
- 5. Color chooser for your universal sharing menu
 
220
 
221
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  = 1.1.6 =
223
  * Add App.net
224
  * Add Outlook.com (formerly Hotmail)
1
  === Share Buttons by AddToAny ===
2
  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, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
+ Stable tag: 1.2
7
 
8
+ Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
10
  == Description ==
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
  3rd party buttons include the **Facebook Like Button**, **Twitter Tweet Button**, **Google+ Share Button**, **Google+ Share Button** and **Google +1 Button**.
15
 
16
+ 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.
17
 
18
+ <a href="http://www.addtoany.com/" title="Sharing buttons">Share Buttons</a> (demo)
19
 
20
+ 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.
21
 
22
  Standalone **share icons** let you optimize your blog posts & pages for specific social sites. Choose from over 100 individual services.
23
 
24
+ * **New**: Large vector sharing buttons!
25
+ * SVG sharing icons for the most popular services (and more to come)
26
  * Smart Menu & Kit with individual share links
27
  * Choose exactly where you want AddToAny to appear
28
  * Google Analytics integration (<a href="http://www.addtoany.com/ext/google_analytics/">access guide</a>)
37
 
38
  See also:
39
 
40
+ * The standard <a href="http://www.addtoany.com/buttons/">Share button</a> code
41
+ * The <a href="/extend/plugins/add-to-any-subscribe/" title="WordPress RSS Subscribe plugin">Subscribe button</a> plugin
42
 
43
  <a href="http://www.addtoany.com/blog/">AddToAny Blog</a> | <a href="http://www.addtoany.com/privacy">Privacy Policy</a>
44
 
51
 
52
  = Where are the options? =
53
 
54
+ In your Admin panel, go to `Settings` > `AddToAny`. Among other options, you can choose a universal sharing button, individual sharing icons, and official sharing buttons (Facebook Like Button, Twitter Tweet Button, Google+ Share Button, Google +1 Button) to display, and where and how to display them.
55
 
56
  To place the buttons as a "widget" in your theme (if your theme supports WordPress Widgets), go to `Appearance` > `Widgets`, then drag AddToAny to an available Widget Area and click `Save`.
57
 
65
  In `footer.php` place the following line of code just before the `</body>` line:
66
  `<?php wp_footer(); ?>`
67
 
68
+ = How can I add both the universal button and the individual icons to another area of my theme? =
69
 
70
  In the Theme Editor, place this code block where you want the button and individual icons to appear in your theme:
71
 
72
  `<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>`
73
 
74
+ If you want to customize the shared URL and title for the universal button and standalone services, use the following code as a template:
75
 
76
  `<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
77
  ADDTOANY_SHARE_SAVE_KIT( array("linkname" => "Example Page", "linkurl" => "http://example.com/page.html") );
87
  ADDTOANY_SHARE_SAVE_KIT( array("linkname" => (is_home() ? get_bloginfo('description') : wp_title('', FALSE)), "linkurl" => (is_ssl() ? 'https://' : 'http://') . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI']) );
88
  } ?>`
89
 
90
+ = How can I add just the universal button to another area of my theme? =
91
 
92
  In the Theme Editor, you will place this line of code where you want the button to appear in your theme:
93
 
143
  }
144
  add_filter('A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1);`
145
 
146
+ = How can I align the universal button and/or icons to the center or to the right side of posts? =
147
  It depends on your theme, but you can try adding the following CSS code to your main stylesheet.
148
 
149
  To align right:
152
  To align center:
153
  `.addtoany_share_save_container { text-align:center; }`
154
 
155
+ = How can I remove the button(s) from individual posts and pages? =
156
 
157
+ Insert the following tag into the page or post (HTML tab) that you do not want the button(s) to appear in: `<!--nosharesave-->`
158
 
159
+ = How can I force the button(s) to appear in individual posts and pages? =
160
 
161
  If your button isn't already set up to appear (it is by default), insert the following tag into the page or post (HTML tab) that you want the button to appear in: `<!--sharesave-->`
162
 
188
 
189
  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.
190
 
 
 
191
  Regardless of circumstances for passing W3C tests, the plugin will always output semantically valid and robot-readable code, so publishers do not have to worry about search engine crawler errors due to invalid code. Both <a href="http://en.wikipedia.org/wiki/Web_standards">web standards</a> and <a href="http://en.wikipedia.org/wiki/Cross-browser">cross-browser</a> are taken very seriously.
192
 
193
  = Is there a shortcode for sharing? =
212
 
213
  == Screenshots ==
214
 
215
+ 1. Large vector sharing buttons (SVG icons) are pixel-perfect on Retina and high-DPI dispays
216
+ 2. Share/Save sharing button features Facebook, Twitter, and a universal sharing icon
217
+ 3. Drop-down universal sharing menu that appears instantly when visitors use the share button
218
+ 4. Email tab, with direct links to the most popular web-based emailers' auto-filled Compose page, a web-based sender for use with any email address, and a link for desktop email applications
219
+ 5. Settings panel
220
+ 6. Color chooser for your universal sharing menu
221
 
222
  == Changelog ==
223
+
224
+ = 1.2 =
225
+ * Large sharing buttons (major new feature!)
226
+ * Scalable vector icons (SVG icons)
227
+ * Mobile ready
228
+ * Retina and high-DPI ready
229
+ * Customizable through CSS code (effects, height & width, border-radius, and much more)
230
+ * Support for older browsers (reverts gracefully to PNG)
231
+ * Large icons are available for the most popular services right now. More services will roll out soon
232
+ * Adjust CSS for large icons
233
+ * Remove old Internet Explorer stylesheet for rollover opacity effect
234
+ * Add Icon Size options to settings
235
+ * Defaults and settings adjustments
236
+ * Simplify labels in settings
237
+
238
  = 1.1.6 =
239
  * Add App.net
240
  * Add Outlook.com (formerly Hotmail)
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
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.1.6
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
@@ -95,8 +95,13 @@ function ADDTOANY_SHARE_SAVE_KIT( $args = false ) {
95
 
96
  $_addtoany_counter++;
97
 
 
 
 
 
 
98
  if ( ! isset($args['html_container_open'])) {
99
- $args['html_container_open'] = '<div class="a2a_kit a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">';
100
  $args['is_kit'] = TRUE;
101
  }
102
  if ( ! isset($args['html_container_close']))
@@ -158,6 +163,9 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
158
  array_unshift($service_codes, 'facebook_like', 'twitter_tweet', 'google_plusone', 'google_plus_share');
159
 
160
  $options = get_option('addtoany_options');
 
 
 
161
 
162
  $active_services = $options['active_services'];
163
 
@@ -208,7 +216,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
208
  $class_attr = ($custom_service) ? "" : " class=\"a2a_button_$safe_name\"";
209
 
210
  $link = $html_wrap_open."<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
211
- $link .= "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
212
  $link .= "</a>".$html_wrap_close;
213
  }
214
 
@@ -274,6 +282,9 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
274
  $button_width = ' width="171"';
275
  $button_height = ' height="16"';
276
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
 
 
 
277
  } else if( $options['button'] == 'CUSTOM' ) {
278
  $button_src = $options['button_custom'];
279
  $button_width = '';
@@ -298,7 +309,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
298
  }
299
  }
300
 
301
- if( isset($button_text) && $button_text && ( ! isset($button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
302
  $button = $button_text;
303
  } else {
304
  $style = '';
@@ -668,27 +679,12 @@ function A2A_SHARE_SAVE_shortcode( $attributes ) {
668
  add_shortcode( 'addtoany', 'A2A_SHARE_SAVE_shortcode' );
669
 
670
 
671
-
672
- function A2A_SHARE_SAVE_button_css_IE() {
673
- /* IE support for opacity: */ ?>
674
- <!--[if IE]>
675
- <style type="text/css">
676
- .addtoany_list a img{filter:alpha(opacity=70)}
677
- .addtoany_list a:hover img,.addtoany_list a.addtoany_share_save img{filter:alpha(opacity=100)}
678
- </style>
679
- <![endif]-->
680
- <?php
681
- }
682
-
683
  function A2A_SHARE_SAVE_stylesheet() {
684
  global $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_url_path;
685
 
686
  // Use stylesheet?
687
  if ($A2A_SHARE_SAVE_options['inline_css'] != '-1' && ! is_admin()) {
688
  wp_enqueue_style('A2A_SHARE_SAVE', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.css', false, '1.4');
689
-
690
- // Conditional inline CSS stylesheet for IE
691
- add_filter('wp_head', 'A2A_SHARE_SAVE_button_css_IE');
692
  }
693
  }
694
 
@@ -759,7 +755,7 @@ function A2A_SHARE_SAVE_migrate_options() {
759
  'button' => 'share_save_171_16.png|171|16',
760
  'button_custom' => '',
761
  'additional_js_variables' => '',
762
- 'button_text' => 'Share/Bookmark',
763
  'display_in_excerpts' => '1',
764
  'active_services' => Array(),
765
  );
@@ -803,10 +799,10 @@ function A2A_SHARE_SAVE_options_page() {
803
  if ( ! current_user_can('manage_options') )
804
  return false;
805
 
806
- $new_options = array();
807
-
808
- $namespace = 'A2A_SHARE_SAVE_';
809
-
810
  // Make available services extensible via plugins, themes (functions.php), etc.
811
  $A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services);
812
 
@@ -824,6 +820,7 @@ function A2A_SHARE_SAVE_options_page() {
824
  $new_options['display_in_feed'] = (@$_POST['A2A_SHARE_SAVE_display_in_feed']=='1') ? '1':'-1';
825
  $new_options['show_title'] = (@$_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1':'-1';
826
  $new_options['onclick'] = (@$_POST['A2A_SHARE_SAVE_onclick']=='1') ? '1':'-1';
 
827
  $new_options['button'] = @$_POST['A2A_SHARE_SAVE_button'];
828
  $new_options['button_custom'] = @$_POST['A2A_SHARE_SAVE_button_custom'];
829
  $new_options['additional_js_variables'] = trim(@$_POST['A2A_SHARE_SAVE_additional_js_variables']);
@@ -844,7 +841,7 @@ function A2A_SHARE_SAVE_options_page() {
844
  elseif( $new_options['button'] == 'share_16_16.png|16|16' )
845
  $new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_share_16_16_text'];
846
  else
847
- $new_options['button_text'] = ( trim($_POST['A2A_SHARE_SAVE_button_text']) != '' ) ? $_POST['A2A_SHARE_SAVE_button_text'] : __('Share/Bookmark','add-to-any');
848
 
849
  // Store chosen individual services to make active
850
  $active_services = Array();
@@ -931,17 +928,27 @@ function A2A_SHARE_SAVE_options_page() {
931
 
932
  <div id="icon-options-general" class="icon32"></div>
933
 
934
- <h2><?php _e( 'AddToAny: Share/Save ', 'add-to-any' ) . _e( 'Settings' ); ?></h2>
935
 
936
  <form id="addtoany_admin_form" method="post" action="">
937
 
938
  <?php wp_nonce_field('add-to-any-update-options'); ?>
939
 
940
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
941
  <tr valign="top">
942
- <th scope="row"><?php _e("Standalone Services", "add-to-any"); ?></th>
943
  <td><fieldset>
944
- <ul id="addtoany_services_sortable" class="addtoany_admin_list">
945
  <li class="dummy"><img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path; ?>/icons/transparent.gif" width="16" height="16" alt="" /></li>
946
  </ul>
947
  <p id="addtoany_services_info"><?php _e("Choose the services you want below. &nbsp;Click a chosen service again to remove. &nbsp;Reorder services by dragging and dropping as they appear above.", "add-to-any"); ?></p>
@@ -972,7 +979,7 @@ function A2A_SHARE_SAVE_options_page() {
972
  if ( ! isset($site['icon']))
973
  $site['icon'] = 'default';
974
  ?>
975
- <li id="a2a_wp_<?php echo $service_safe_name; ?>" title="<?php echo $site['name']; ?>">
976
  <span><img src="<?php echo (isset($site['icon_url'])) ? $site['icon_url'] : $A2A_SHARE_SAVE_plugin_url_path.'/icons/'.$site['icon'].'.png'; ?>" width="<?php echo (isset($site['icon_width'])) ? $site['icon_width'] : '16'; ?>" height="<?php echo (isset($site['icon_height'])) ? $site['icon_height'] : '16'; ?>" alt="" /><?php echo $site['name']; ?></span>
977
  </li>
978
  <?php
@@ -980,57 +987,75 @@ function A2A_SHARE_SAVE_options_page() {
980
  </ul>
981
  </fieldset></td>
982
  </tr>
 
983
  <tr valign="top">
984
- <th scope="row"><?php _e("Button", "add-to-any"); ?></th>
985
  <td><fieldset>
986
- <label>
987
- <input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if($options['button']=='favicon.png|16|16') echo ' checked="checked"'; ?>
988
- style="margin:9px 0;vertical-align:middle">
989
- <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share/Bookmark','add-to-any'); ?>" title="+ <?php _e('Share/Bookmark','add-to-any'); ?>"
990
- onclick="this.parentNode.firstChild.checked=true"/>
991
- </label>
992
- <input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-7].checked=true" style="vertical-align:middle;width:150px"
993
- value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share/Bookmark','add-to-any'); ?>" />
994
- <label style="padding-left:9px">
995
- <input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" type="radio"<?php if($options['button']=='share_16_16.png|16|16') echo ' checked="checked"'; ?>
996
- style="margin:9px 0;vertical-align:middle">
997
- <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_16_16.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share/Bookmark','add-to-any'); ?>" title="+ <?php _e('Share/Bookmark','add-to-any'); ?>"
998
- onclick="this.parentNode.firstChild.checked=true"/>
999
- </label>
1000
- <input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px"
1001
- value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share/Bookmark','add-to-any'); ?>" /><br>
1002
- <label>
1003
- <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if($options['button']=='share_save_120_16.png|120|16') echo ' checked="checked"'; ?>
1004
- style="margin:9px 0;vertical-align:middle">
1005
- <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_120_16.png'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
1006
- onclick="this.parentNode.firstChild.checked=true"/>
1007
- </label><br>
1008
- <label>
1009
- <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if( !$options['button'] || $options['button']=='share_save_171_16.png|171|16' ) echo ' checked="checked"'; ?>
1010
- style="margin:9px 0;vertical-align:middle">
1011
- <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_171_16.png'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
1012
- onclick="this.parentNode.firstChild.checked=true"/>
1013
- </label><br>
1014
- <label>
1015
- <input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php if($options['button']=='share_save_256_24.png|256|24') echo ' checked="checked"'; ?>
1016
- style="margin:9px 0;vertical-align:middle">
1017
- <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_256_24.png'; ?>" width="256" height="24" border="0" style="padding:9px;vertical-align:middle"
1018
- onclick="this.parentNode.firstChild.checked=true"/>
1019
- </label><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1020
  <label>
1021
  <input name="A2A_SHARE_SAVE_button" value="CUSTOM" type="radio"<?php if( $options['button'] == 'CUSTOM' ) echo ' checked="checked"'; ?>
1022
  style="margin:9px 0;vertical-align:middle">
1023
  <span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
1024
  </label>
1025
  <input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-2].checked=true" style="vertical-align:middle"
1026
- value="<?php echo $options['button_custom']; ?>" /><br>
 
1027
  <label>
1028
  <input name="A2A_SHARE_SAVE_button" value="TEXT" type="radio"<?php if( $options['button'] == 'TEXT' ) echo ' checked="checked"'; ?>
1029
  style="margin:9px 0;vertical-align:middle">
1030
  <span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?>:</span>
1031
  </label>
1032
  <input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-1].checked=true" style="vertical-align:middle;width:150px"
1033
- value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share/Bookmark','add-to-any'); ?>" />
1034
 
1035
  </fieldset></td>
1036
  </tr>
@@ -1041,35 +1066,40 @@ function A2A_SHARE_SAVE_options_page() {
1041
  <input id="A2A_SHARE_SAVE_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts" type="checkbox"<?php
1042
  if($options['display_in_posts']!='-1') echo ' checked="checked"'; ?> value="1"/>
1043
  <?php printf(__('Display at the %s of posts', 'add-to-any'), position_in_content($options, TRUE)); ?> <strong>*</strong>
1044
- </label><br/>
 
1045
  <label>
1046
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_excerpts" type="checkbox"<?php
1047
  if($options['display_in_excerpts']!='-1') echo ' checked="checked"';
1048
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1049
  ?> value="1"/>
1050
  <?php printf(__('Display at the %s of post excerpts', 'add-to-any'), position_in_content($options)); ?>
1051
- </label><br/>
 
1052
  <label>
1053
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_front_page" type="checkbox"<?php
1054
  if($options['display_in_posts_on_front_page']!='-1') echo ' checked="checked"';
1055
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1056
  ?> value="1"/>
1057
  <?php printf(__('Display at the %s of posts on the front page', 'add-to-any'), position_in_content($options)); ?>
1058
- </label><br/>
 
1059
  <label>
1060
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_archive_pages" type="checkbox"<?php
1061
  if($options['display_in_posts_on_archive_pages']!='-1') echo ' checked="checked"';
1062
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1063
  ?> value="1"/>
1064
  <?php printf(__('Display at the %s of posts on archive pages', 'add-to-any'), position_in_content($options)); ?>
1065
- </label><br/>
 
1066
  <label>
1067
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_feed" type="checkbox"<?php
1068
  if($options['display_in_feed']!='-1') echo ' checked="checked"';
1069
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1070
  ?> value="1"/>
1071
  <?php printf(__('Display at the %s of posts in the feed', 'add-to-any'), position_in_content($options)); ?>
1072
- </label><br/>
 
1073
  <label>
1074
  <input name="A2A_SHARE_SAVE_display_in_pages" type="checkbox"<?php if($options['display_in_pages']!='-1') echo ' checked="checked"'; ?> value="1"/>
1075
  <?php printf(__('Display at the %s of pages', 'add-to-any'), position_in_content($options, TRUE)); ?>
@@ -1102,7 +1132,8 @@ function A2A_SHARE_SAVE_options_page() {
1102
  <input name="A2A_SHARE_SAVE_onclick"
1103
  type="checkbox"<?php if($options['onclick']=='1') echo ' checked="checked"'; ?> value="1"/>
1104
  <?php _e('Only show the menu when the user clicks the Share/Save button', 'add-to-any'); ?>
1105
- </label><br />
 
1106
  <label>
1107
  <input name="A2A_SHARE_SAVE_show_title"
1108
  type="checkbox"<?php if($options['show_title']=='1') echo ' checked="checked"'; ?> value="1"/>
@@ -1137,7 +1168,8 @@ function A2A_SHARE_SAVE_options_page() {
1137
  <input name="A2A_SHARE_SAVE_inline_css" id="A2A_SHARE_SAVE_inline_css"
1138
  type="checkbox"<?php if($options['inline_css']!='-1') echo ' checked="checked"'; ?> value="1"/>
1139
  <?php _e('Use CSS stylesheet', 'add-to-any'); ?>
1140
- </label><br/>
 
1141
  <label for="A2A_SHARE_SAVE_cache">
1142
  <input name="A2A_SHARE_SAVE_cache" id="A2A_SHARE_SAVE_cache"
1143
  type="checkbox"<?php if($options['cache']=='1') echo ' checked="checked"'; ?> value="1"/>
@@ -1166,6 +1198,9 @@ function A2A_SHARE_SAVE_options_page() {
1166
  <p><?php _e('See the <a href="http://wordpress.org/extend/plugins/add-to-any/faq/">FAQs</a>.','add-to-any'); ?></p>
1167
  <p><?php _e('Search the <a href="http://wordpress.org/tags/add-to-any">support forums</a>.','add-to-any'); ?></p>
1168
  </div>
 
 
 
1169
 
1170
  <?php
1171
 
@@ -1181,6 +1216,57 @@ function A2A_SHARE_SAVE_admin_head() {
1181
  <script type="text/javascript"><!--
1182
  jQuery(document).ready(function(){
1183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1184
  // Toggle child options of 'Display in posts'
1185
  jQuery('#A2A_SHARE_SAVE_display_in_posts').bind('change click', function(e){
1186
  if (jQuery(this).is(':checked'))
@@ -1241,13 +1327,14 @@ function A2A_SHARE_SAVE_admin_head() {
1241
  var configurable_html = '',
1242
  this_service = jQuery(this),
1243
  this_service_name = this_service.attr('id').substr(7),
 
1244
  checked = '',
1245
  special_options_html = '';
1246
 
1247
  if (jQuery('#addtoany_services_sortable li').not('.dummy').length == 0)
1248
  jQuery('#addtoany_services_sortable').find('.dummy').hide();
1249
 
1250
- if (this_service.hasClass('addtoany_special_service')) {
1251
  if (this_service_name == 'facebook_like') {
1252
  if (service_options[this_service_name] && service_options[this_service_name].verb)
1253
  checked = ' selected="selected"';
@@ -1266,17 +1353,28 @@ function A2A_SHARE_SAVE_admin_head() {
1266
  configurable_html = '<span class="down_arrow"></span><br style="clear:both"/><div class="special_options">' + special_options_html + '</div>';
1267
  }
1268
 
1269
- this_service.toggleClass('addtoany_selected')
1270
- .unbind('click', moveToSortableList)
1271
- .bind('click', moveToSelectableList)
1272
- .clone()
1273
- .html( this_service.find('img').clone().attr('alt', this_service.attr('title')) ).append(configurable_html)
1274
- .click(function(){
1275
- jQuery(this).not('.addtoany_special_service_options_selected').find('.special_options').slideDown('fast').parent().addClass('addtoany_special_service_options_selected');
1276
- })
1277
- .hide()
1278
- .insertBefore('#addtoany_services_sortable .dummy')
1279
- .fadeIn('fast');
 
 
 
 
 
 
 
 
 
 
 
1280
 
1281
  this_service.attr( 'id', 'old_'+this_service.attr('id') );
1282
  };
@@ -1309,7 +1407,7 @@ function A2A_SHARE_SAVE_admin_head() {
1309
  <?php
1310
  $admin_services_saved = isset($_POST['A2A_SHARE_SAVE_active_services']) || isset($_POST['Submit']);
1311
  $active_services = ( $admin_services_saved )
1312
- ? $_POST['A2A_SHARE_SAVE_active_services'] : $options['active_services'];
1313
  if( ! $active_services )
1314
  $active_services = Array();
1315
  $active_services_last = end($active_services);
@@ -1351,16 +1449,24 @@ function A2A_SHARE_SAVE_admin_head() {
1351
  jQuery('#a2a_wp_'+val).click();
1352
  });
1353
 
1354
- // Add/Remove Services
1355
  jQuery('#addtoany_services_sortable .dummy:first').after('<li id="addtoany_show_services"><?php _e('Add/Remove Services', 'add-to-any'); ?> &#187;</li>');
1356
  jQuery('#addtoany_show_services').click(function(e){
1357
  jQuery('#addtoany_services_selectable, #addtoany_services_info').slideDown('fast');
1358
  jQuery(this).fadeOut('fast');
1359
  });
 
 
 
 
 
 
1360
  jQuery('#addtoany_show_template_button_code').click(function(e){
1361
  jQuery('#addtoany_template_button_code').slideDown('fast');
1362
  jQuery(this).fadeOut('fast');
1363
  });
 
 
1364
  jQuery('#addtoany_show_css_code').click(function(e){
1365
  jQuery('#addtoany_css_code').slideDown('fast');
1366
  jQuery(this).fadeOut('fast');
@@ -1394,10 +1500,19 @@ function A2A_SHARE_SAVE_admin_head() {
1394
  #addtoany_services_sortable .addtoany_special_service_options_selected{border:1px solid #AAA;background-color:#FFF;}
1395
  #addtoany_services_sortable .addtoany_special_service_options_selected span.down_arrow{display:none;}
1396
 
 
1397
  li#addtoany_show_services{border:1px solid #DFDFDF;background-color:#FFF;cursor:pointer;}
1398
  li#addtoany_show_services:hover{border:1px solid #AAA;}
1399
  #addtoany_services_info{clear:left;display:none;}
1400
 
 
 
 
 
 
 
 
 
1401
  #addtoany_template_button_code, #addtoany_css_code{display:none;}
1402
 
1403
  #A2A_SHARE_SAVE_reset_options{color:red;margin-left: 15px;}
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
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
95
 
96
  $_addtoany_counter++;
97
 
98
+ $options = get_option('addtoany_options');
99
+
100
+ // Set a2a_kit_size_## class name only if "icon_size" option is set and it is not '16'
101
+ $icon_size = ( isset($options['icon_size']) && $options['icon_size'] != '16' ) ? ' a2a_kit_size_' . $options['icon_size']. '' : '';
102
+
103
  if ( ! isset($args['html_container_open'])) {
104
+ $args['html_container_open'] = '<div class="a2a_kit' . $icon_size . ' a2a_target addtoany_list" id="wpa2a_' . $_addtoany_counter . '">';
105
  $args['is_kit'] = TRUE;
106
  }
107
  if ( ! isset($args['html_container_close']))
163
  array_unshift($service_codes, 'facebook_like', 'twitter_tweet', 'google_plusone', 'google_plus_share');
164
 
165
  $options = get_option('addtoany_options');
166
+
167
+ // True only if "icon_size" option is set and it is not '16'
168
+ $large_icons = ( isset($options['icon_size']) && $options['icon_size'] != '16' ) ? TRUE : FALSE;
169
 
170
  $active_services = $options['active_services'];
171
 
216
  $class_attr = ($custom_service) ? "" : " class=\"a2a_button_$safe_name\"";
217
 
218
  $link = $html_wrap_open."<a$class_attr href=\"$url\" title=\"$name\" rel=\"nofollow\" target=\"_blank\">";
219
+ $link .= ($large_icons) ? "" : "<img src=\"$src\" width=\"$width\" height=\"$height\" alt=\"$name\"/>";
220
  $link .= "</a>".$html_wrap_close;
221
  }
222
 
282
  $button_width = ' width="171"';
283
  $button_height = ' height="16"';
284
  $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname;
285
+ } else if( $options['button'] == 'A2A_SVG_32' ) {
286
+ // Skip button IMG for A2A icon insertion
287
+ $button_text = '';
288
  } else if( $options['button'] == 'CUSTOM' ) {
289
  $button_src = $options['button_custom'];
290
  $button_width = '';
309
  }
310
  }
311
 
312
+ if( isset($button_text) && ( ! isset($button_fname) || ! $button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) {
313
  $button = $button_text;
314
  } else {
315
  $style = '';
679
  add_shortcode( 'addtoany', 'A2A_SHARE_SAVE_shortcode' );
680
 
681
 
 
 
 
 
 
 
 
 
 
 
 
 
682
  function A2A_SHARE_SAVE_stylesheet() {
683
  global $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_url_path;
684
 
685
  // Use stylesheet?
686
  if ($A2A_SHARE_SAVE_options['inline_css'] != '-1' && ! is_admin()) {
687
  wp_enqueue_style('A2A_SHARE_SAVE', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.css', false, '1.4');
 
 
 
688
  }
689
  }
690
 
755
  'button' => 'share_save_171_16.png|171|16',
756
  'button_custom' => '',
757
  'additional_js_variables' => '',
758
+ 'button_text' => 'Share',
759
  'display_in_excerpts' => '1',
760
  'active_services' => Array(),
761
  );
799
  if ( ! current_user_can('manage_options') )
800
  return false;
801
 
802
+ $new_options = array();
803
+
804
+ $namespace = 'A2A_SHARE_SAVE_';
805
+
806
  // Make available services extensible via plugins, themes (functions.php), etc.
807
  $A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services);
808
 
820
  $new_options['display_in_feed'] = (@$_POST['A2A_SHARE_SAVE_display_in_feed']=='1') ? '1':'-1';
821
  $new_options['show_title'] = (@$_POST['A2A_SHARE_SAVE_show_title']=='1') ? '1':'-1';
822
  $new_options['onclick'] = (@$_POST['A2A_SHARE_SAVE_onclick']=='1') ? '1':'-1';
823
+ $new_options['icon_size'] = @$_POST['A2A_SHARE_SAVE_icon_size'];
824
  $new_options['button'] = @$_POST['A2A_SHARE_SAVE_button'];
825
  $new_options['button_custom'] = @$_POST['A2A_SHARE_SAVE_button_custom'];
826
  $new_options['additional_js_variables'] = trim(@$_POST['A2A_SHARE_SAVE_additional_js_variables']);
841
  elseif( $new_options['button'] == 'share_16_16.png|16|16' )
842
  $new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_share_16_16_text'];
843
  else
844
+ $new_options['button_text'] = ( trim($_POST['A2A_SHARE_SAVE_button_text']) != '' ) ? $_POST['A2A_SHARE_SAVE_button_text'] : __('Share','add-to-any');
845
 
846
  // Store chosen individual services to make active
847
  $active_services = Array();
928
 
929
  <div id="icon-options-general" class="icon32"></div>
930
 
931
+ <h2><?php _e( 'AddToAny Share Settings', 'add-to-any' ); ?></h2>
932
 
933
  <form id="addtoany_admin_form" method="post" action="">
934
 
935
  <?php wp_nonce_field('add-to-any-update-options'); ?>
936
 
937
  <table class="form-table">
938
+
939
+ <tr valign="top">
940
+ <th scope="row"><?php _e("Icon Size", "add-to-any"); ?></th>
941
+ <td><fieldset>
942
+ <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php if($options['icon_size']=='32' ) echo ' checked="checked"'; ?>> <?php _e('Large', 'add-to-any'); ?></label>
943
+ <br>
944
+ <label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php if( !$options['icon_size'] || $options['icon_size']=='16') echo ' checked="checked"'; ?>> <?php _e('Small', 'add-to-any'); ?></label>
945
+ </fieldset></td>
946
+ </tr>
947
+
948
  <tr valign="top">
949
+ <th scope="row"><?php _e("Standalone Buttons", "add-to-any"); ?></th>
950
  <td><fieldset>
951
+ <ul id="addtoany_services_sortable" class="addtoany_admin_list addtoany_override a2a_kit_size_32">
952
  <li class="dummy"><img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path; ?>/icons/transparent.gif" width="16" height="16" alt="" /></li>
953
  </ul>
954
  <p id="addtoany_services_info"><?php _e("Choose the services you want below. &nbsp;Click a chosen service again to remove. &nbsp;Reorder services by dragging and dropping as they appear above.", "add-to-any"); ?></p>
979
  if ( ! isset($site['icon']))
980
  $site['icon'] = 'default';
981
  ?>
982
+ <li data-addtoany-icon-name="<?php echo $site['icon']; ?>" id="a2a_wp_<?php echo $service_safe_name; ?>" title="<?php echo $site['name']; ?>">
983
  <span><img src="<?php echo (isset($site['icon_url'])) ? $site['icon_url'] : $A2A_SHARE_SAVE_plugin_url_path.'/icons/'.$site['icon'].'.png'; ?>" width="<?php echo (isset($site['icon_width'])) ? $site['icon_width'] : '16'; ?>" height="<?php echo (isset($site['icon_height'])) ? $site['icon_height'] : '16'; ?>" alt="" /><?php echo $site['name']; ?></span>
984
  </li>
985
  <?php
987
  </ul>
988
  </fieldset></td>
989
  </tr>
990
+
991
  <tr valign="top">
992
+ <th scope="row"><?php _e("Universal Button", "add-to-any"); ?></th>
993
  <td><fieldset>
994
+ <div class="addtoany_icon_size_large">
995
+ <label class="addtoany_override a2a_kit_size_32">
996
+ <input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if($options['button']=='A2A_SVG_32') echo ' checked="checked"'; ?>
997
+ style="margin:9px 0;vertical-align:middle">
998
+ <span class="a2a_svg a2a_s_a2a" onclick="this.parentNode.firstChild.checked=true" style="margin-left:9px"></span>
999
+ </label>
1000
+ <br>
1001
+ </div>
1002
+
1003
+ <div class="addtoany_icon_size_small">
1004
+ <label>
1005
+ <input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if($options['button']=='favicon.png|16|16') echo ' checked="checked"'; ?>
1006
+ style="margin:9px 0;vertical-align:middle">
1007
+ <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/favicon.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>"
1008
+ onclick="this.parentNode.firstChild.checked=true"/>
1009
+ </label>
1010
+ <input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-7].checked=true" style="vertical-align:middle;width:150px"
1011
+ value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
1012
+ <label style="padding-left:9px">
1013
+ <input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" type="radio"<?php if($options['button']=='share_16_16.png|16|16') echo ' checked="checked"'; ?>
1014
+ style="margin:9px 0;vertical-align:middle">
1015
+ <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_16_16.png'; ?>" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php _e('Share','add-to-any'); ?>" title="+ <?php _e('Share','add-to-any'); ?>"
1016
+ onclick="this.parentNode.firstChild.checked=true"/>
1017
+ </label>
1018
+ <input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px"
1019
+ value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
1020
+ <br>
1021
+ <label>
1022
+ <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if($options['button']=='share_save_120_16.png|120|16') echo ' checked="checked"'; ?>
1023
+ style="margin:9px 0;vertical-align:middle">
1024
+ <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_120_16.png'; ?>" width="120" height="16" border="0" style="padding:9px;vertical-align:middle"
1025
+ onclick="this.parentNode.firstChild.checked=true"/>
1026
+ </label>
1027
+ <br>
1028
+ <label>
1029
+ <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if( !$options['button'] || $options['button']=='share_save_171_16.png|171|16' ) echo ' checked="checked"'; ?>
1030
+ style="margin:9px 0;vertical-align:middle">
1031
+ <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_171_16.png'; ?>" width="171" height="16" border="0" style="padding:9px;vertical-align:middle"
1032
+ onclick="this.parentNode.firstChild.checked=true"/>
1033
+ </label>
1034
+ <br>
1035
+ <label>
1036
+ <input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php if($options['button']=='share_save_256_24.png|256|24') echo ' checked="checked"'; ?>
1037
+ style="margin:9px 0;vertical-align:middle">
1038
+ <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path.'/share_save_256_24.png'; ?>" width="256" height="24" border="0" style="padding:9px;vertical-align:middle"
1039
+ onclick="this.parentNode.firstChild.checked=true"/>
1040
+ </label>
1041
+ <br>
1042
+ </div>
1043
+
1044
  <label>
1045
  <input name="A2A_SHARE_SAVE_button" value="CUSTOM" type="radio"<?php if( $options['button'] == 'CUSTOM' ) echo ' checked="checked"'; ?>
1046
  style="margin:9px 0;vertical-align:middle">
1047
  <span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?>:</span>
1048
  </label>
1049
  <input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-2].checked=true" style="vertical-align:middle"
1050
+ value="<?php echo $options['button_custom']; ?>" />
1051
+ <br>
1052
  <label>
1053
  <input name="A2A_SHARE_SAVE_button" value="TEXT" type="radio"<?php if( $options['button'] == 'TEXT' ) echo ' checked="checked"'; ?>
1054
  style="margin:9px 0;vertical-align:middle">
1055
  <span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?>:</span>
1056
  </label>
1057
  <input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-1].checked=true" style="vertical-align:middle;width:150px"
1058
+ value="<?php echo ( trim($options['button_text']) != '' ) ? stripslashes($options['button_text']) : __('Share','add-to-any'); ?>" />
1059
 
1060
  </fieldset></td>
1061
  </tr>
1066
  <input id="A2A_SHARE_SAVE_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts" type="checkbox"<?php
1067
  if($options['display_in_posts']!='-1') echo ' checked="checked"'; ?> value="1"/>
1068
  <?php printf(__('Display at the %s of posts', 'add-to-any'), position_in_content($options, TRUE)); ?> <strong>*</strong>
1069
+ </label>
1070
+ <br/>
1071
  <label>
1072
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_excerpts" type="checkbox"<?php
1073
  if($options['display_in_excerpts']!='-1') echo ' checked="checked"';
1074
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1075
  ?> value="1"/>
1076
  <?php printf(__('Display at the %s of post excerpts', 'add-to-any'), position_in_content($options)); ?>
1077
+ </label>
1078
+ <br/>
1079
  <label>
1080
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_front_page" type="checkbox"<?php
1081
  if($options['display_in_posts_on_front_page']!='-1') echo ' checked="checked"';
1082
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1083
  ?> value="1"/>
1084
  <?php printf(__('Display at the %s of posts on the front page', 'add-to-any'), position_in_content($options)); ?>
1085
+ </label>
1086
+ <br/>
1087
  <label>
1088
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_archive_pages" type="checkbox"<?php
1089
  if($options['display_in_posts_on_archive_pages']!='-1') echo ' checked="checked"';
1090
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1091
  ?> value="1"/>
1092
  <?php printf(__('Display at the %s of posts on archive pages', 'add-to-any'), position_in_content($options)); ?>
1093
+ </label>
1094
+ <br/>
1095
  <label>
1096
  &nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_feed" type="checkbox"<?php
1097
  if($options['display_in_feed']!='-1') echo ' checked="checked"';
1098
  if($options['display_in_posts']=='-1') echo ' disabled="disabled"';
1099
  ?> value="1"/>
1100
  <?php printf(__('Display at the %s of posts in the feed', 'add-to-any'), position_in_content($options)); ?>
1101
+ </label>
1102
+ <br/>
1103
  <label>
1104
  <input name="A2A_SHARE_SAVE_display_in_pages" type="checkbox"<?php if($options['display_in_pages']!='-1') echo ' checked="checked"'; ?> value="1"/>
1105
  <?php printf(__('Display at the %s of pages', 'add-to-any'), position_in_content($options, TRUE)); ?>
1132
  <input name="A2A_SHARE_SAVE_onclick"
1133
  type="checkbox"<?php if($options['onclick']=='1') echo ' checked="checked"'; ?> value="1"/>
1134
  <?php _e('Only show the menu when the user clicks the Share/Save button', 'add-to-any'); ?>
1135
+ </label>
1136
+ <br />
1137
  <label>
1138
  <input name="A2A_SHARE_SAVE_show_title"
1139
  type="checkbox"<?php if($options['show_title']=='1') echo ' checked="checked"'; ?> value="1"/>
1168
  <input name="A2A_SHARE_SAVE_inline_css" id="A2A_SHARE_SAVE_inline_css"
1169
  type="checkbox"<?php if($options['inline_css']!='-1') echo ' checked="checked"'; ?> value="1"/>
1170
  <?php _e('Use CSS stylesheet', 'add-to-any'); ?>
1171
+ </label>
1172
+ <br/>
1173
  <label for="A2A_SHARE_SAVE_cache">
1174
  <input name="A2A_SHARE_SAVE_cache" id="A2A_SHARE_SAVE_cache"
1175
  type="checkbox"<?php if($options['cache']=='1') echo ' checked="checked"'; ?> value="1"/>
1198
  <p><?php _e('See the <a href="http://wordpress.org/extend/plugins/add-to-any/faq/">FAQs</a>.','add-to-any'); ?></p>
1199
  <p><?php _e('Search the <a href="http://wordpress.org/tags/add-to-any">support forums</a>.','add-to-any'); ?></p>
1200
  </div>
1201
+
1202
+ <script type="text/javascript" src="http<?php if ( is_ssl() ) echo 's'; ?>://static.addtoany.com/menu/page.js"></script>
1203
+ <script type="text/javascript">if ( a2a && a2a.svg_css ) a2a.svg_css();</script>
1204
 
1205
  <?php
1206
 
1216
  <script type="text/javascript"><!--
1217
  jQuery(document).ready(function(){
1218
 
1219
+ var show_appropriate_universal_buttons = function() {
1220
+
1221
+ // Note the currently checkmarked radio button
1222
+ jQuery('input[name="A2A_SHARE_SAVE_button"]:visible').removeClass('addtoany_last_universal_selected').filter(':checked').addClass('addtoany_last_universal_selected');
1223
+
1224
+ var select_proper_radio = function() {
1225
+ // Select the last-selected visible radio
1226
+ jQuery('input[name="A2A_SHARE_SAVE_button"].addtoany_last_universal_selected:radio:visible').attr('checked', true);
1227
+
1228
+ // Otherwise select the first visible radio
1229
+ if ( jQuery('input[name="A2A_SHARE_SAVE_button"]:visible:checked').length < 1 )
1230
+ jQuery('input[name="A2A_SHARE_SAVE_button"]:radio:visible:first').attr('checked', true);
1231
+ };
1232
+
1233
+ if ( jQuery('input[name="A2A_SHARE_SAVE_icon_size"]:checked').val() == '32' ) {
1234
+ // Hide small universal buttons
1235
+ jQuery('.addtoany_icon_size_small').hide('fast');
1236
+ // Show large universal button
1237
+ jQuery('.addtoany_icon_size_large').show('fast', select_proper_radio);
1238
+
1239
+ // Switch to large standalone icons
1240
+ jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_special_service, #addtoany_show_services').html(function() {
1241
+ return jQuery(this).data('a2a_32_icon_html');
1242
+ });
1243
+
1244
+ // Adjust the Add/Remove Services button
1245
+ jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
1246
+ }
1247
+ else {
1248
+ // Hide small universal buttons
1249
+ jQuery('.addtoany_icon_size_large').hide('fast');
1250
+ // Show large universal button
1251
+ jQuery('.addtoany_icon_size_small').show('fast', select_proper_radio);
1252
+
1253
+ // Switch to small standalone icons
1254
+ jQuery('#addtoany_services_sortable li').not('.dummy, .addtoany_special_service, #addtoany_show_services').html(function() {
1255
+ return jQuery(this).data('a2a_16_icon_html');
1256
+ });
1257
+
1258
+ // Adjust the Add/Remove Services button
1259
+ jQuery('#addtoany_show_services').removeClass('addtoany_line_height_32');
1260
+ }
1261
+ };
1262
+
1263
+ show_appropriate_universal_buttons();
1264
+
1265
+ // Display buttons/icons of the selected icon size
1266
+ jQuery('input[name="A2A_SHARE_SAVE_icon_size"]').bind('change', function(e){
1267
+ show_appropriate_universal_buttons();
1268
+ });
1269
+
1270
  // Toggle child options of 'Display in posts'
1271
  jQuery('#A2A_SHARE_SAVE_display_in_posts').bind('change click', function(e){
1272
  if (jQuery(this).is(':checked'))
1327
  var configurable_html = '',
1328
  this_service = jQuery(this),
1329
  this_service_name = this_service.attr('id').substr(7),
1330
+ this_service_is_special = this_service.hasClass('addtoany_special_service'),
1331
  checked = '',
1332
  special_options_html = '';
1333
 
1334
  if (jQuery('#addtoany_services_sortable li').not('.dummy').length == 0)
1335
  jQuery('#addtoany_services_sortable').find('.dummy').hide();
1336
 
1337
+ if (this_service_is_special) {
1338
  if (this_service_name == 'facebook_like') {
1339
  if (service_options[this_service_name] && service_options[this_service_name].verb)
1340
  checked = ' selected="selected"';
1353
  configurable_html = '<span class="down_arrow"></span><br style="clear:both"/><div class="special_options">' + special_options_html + '</div>';
1354
  }
1355
 
1356
+ var icon_size = jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val();
1357
+ new_service = this_service.toggleClass('addtoany_selected')
1358
+ .unbind('click', moveToSortableList)
1359
+ .bind('click', moveToSelectableList)
1360
+ .clone();
1361
+
1362
+ new_service.data('a2a_16_icon_html', this_service.find('img').clone().attr('alt', this_service.attr('title')).wrap('<p>').parent().html() + configurable_html);
1363
+
1364
+ if (this_service_is_special)
1365
+ // If special service, set the same HTML as used for '16px icon size'
1366
+ new_service.data( 'a2a_32_icon_html', new_service.data('a2a_16_icon_html') );
1367
+ else
1368
+ // Set HTML for 32px icon size
1369
+ new_service.data( 'a2a_32_icon_html', '<span class="a2a_svg a2a_s__default a2a_s_' + this_service.attr('data-addtoany-icon-name') + '"></span>' );
1370
+
1371
+ new_service.html( new_service.data('a2a_' + icon_size + '_icon_html') )
1372
+ .click(function(){
1373
+ jQuery(this).not('.addtoany_special_service_options_selected').find('.special_options').slideDown('fast').parent().addClass('addtoany_special_service_options_selected');
1374
+ })
1375
+ .hide()
1376
+ .insertBefore('#addtoany_services_sortable .dummy')
1377
+ .fadeIn('fast');
1378
 
1379
  this_service.attr( 'id', 'old_'+this_service.attr('id') );
1380
  };
1407
  <?php
1408
  $admin_services_saved = isset($_POST['A2A_SHARE_SAVE_active_services']) || isset($_POST['Submit']);
1409
  $active_services = ( $admin_services_saved )
1410
+ ? @$_POST['A2A_SHARE_SAVE_active_services'] : $options['active_services'];
1411
  if( ! $active_services )
1412
  $active_services = Array();
1413
  $active_services_last = end($active_services);
1449
  jQuery('#a2a_wp_'+val).click();
1450
  });
1451
 
1452
+ // Add/Remove Services button
1453
  jQuery('#addtoany_services_sortable .dummy:first').after('<li id="addtoany_show_services"><?php _e('Add/Remove Services', 'add-to-any'); ?> &#187;</li>');
1454
  jQuery('#addtoany_show_services').click(function(e){
1455
  jQuery('#addtoany_services_selectable, #addtoany_services_info').slideDown('fast');
1456
  jQuery(this).fadeOut('fast');
1457
  });
1458
+
1459
+ // Adjust the Add/Remove Services button for large or small icons
1460
+ if ( jQuery('input:radio[name=A2A_SHARE_SAVE_icon_size]:checked').val() == '32' )
1461
+ jQuery('#addtoany_show_services').addClass('addtoany_line_height_32');
1462
+
1463
+ // 'Show template code' button
1464
  jQuery('#addtoany_show_template_button_code').click(function(e){
1465
  jQuery('#addtoany_template_button_code').slideDown('fast');
1466
  jQuery(this).fadeOut('fast');
1467
  });
1468
+
1469
+ // TBD
1470
  jQuery('#addtoany_show_css_code').click(function(e){
1471
  jQuery('#addtoany_css_code').slideDown('fast');
1472
  jQuery(this).fadeOut('fast');
1500
  #addtoany_services_sortable .addtoany_special_service_options_selected{border:1px solid #AAA;background-color:#FFF;}
1501
  #addtoany_services_sortable .addtoany_special_service_options_selected span.down_arrow{display:none;}
1502
 
1503
+ li#addtoany_show_services.addtoany_line_height_32{line-height:32px}
1504
  li#addtoany_show_services{border:1px solid #DFDFDF;background-color:#FFF;cursor:pointer;}
1505
  li#addtoany_show_services:hover{border:1px solid #AAA;}
1506
  #addtoany_services_info{clear:left;display:none;}
1507
 
1508
+ .a2a_kit_size_32.addtoany_override .a2a_svg {
1509
+ border-radius: 4px;
1510
+ display:inline-block;
1511
+ height: 32px;
1512
+ vertical-align:middle;
1513
+ width: 32px;
1514
+ }
1515
+
1516
  #addtoany_template_button_code, #addtoany_css_code{display:none;}
1517
 
1518
  #A2A_SHARE_SAVE_reset_options{color:red;margin-left: 15px;}
addtoany.min.css CHANGED
@@ -1 +1 @@
1
- .addtoany_share_save_container{clear:both;line-height:16px;margin:16px 0}.addtoany_list{display:inline}.addtoany_list a{font-size:16px;padding:0 9px}.addtoany_list a img{height:auto;opacity:.7;overflow:hidden;vertical-align:middle;width:auto}.addtoany_list a:hover img,.addtoany_list a.addtoany_share_save img{opacity:1}.addtoany_special_service{display:inline-block;padding:0 9px;vertical-align:middle}a.addtoany_share_save img{border:0;width:auto;height:auto}
1
+ .addtoany_share_save_container{clear:both;line-height:16px;margin:16px 0}.addtoany_list{display:inline}.addtoany_list a{font-size:16px;padding:0 4px;vertical-align:middle}.addtoany_list a img{height:auto;opacity:1;overflow:hidden;vertical-align:middle;width:auto}.addtoany_list.a2a_kit_size_32 a{font-size:32px}.addtoany_list.a2a_kit_size_32 a span{border-radius:4px;display:inline-block;height:32px;line-height:32px;opacity:1;width:32px}.addtoany_list a:hover img,.addtoany_list a:hover span{opacity:.7}.addtoany_special_service,.addtoany_special_service span,.addtoany_special_service a,.addtoany_special_service div{padding:0 9px;vertical-align:middle}a.addtoany_share_save img{border:0;width:auto;height:auto}
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file