Version Description
- Update template code
- Update Advanced Options description
- Fix button return notice for certain use cases
Download this release
Release Info
Developer | micropat |
Plugin | AddToAny Share Buttons |
Version | 1.2.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.9 to 1.2.9.1
- README.txt +32 -27
- add-to-any.php +4 -4
- addtoany.admin.php +4 -4
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat
|
|
3 |
Tags: sharing, share, share this, bookmarking, social, share button, share buttons, share links, social share, social sharing, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, email, e-mail, print, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, bitly, technorati, lockerz, addthis, sociable, sharedaddy, sharethis, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.9
|
6 |
-
Stable tag: 1.2.9
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
@@ -125,34 +125,34 @@ Upload sharing icons in a single directory to a public location, and make sure t
|
|
125 |
|
126 |
In the Theme Editor, place this code block where you want the button and individual icons to appear in your theme:
|
127 |
|
128 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>`
|
129 |
|
130 |
If you want to customize the shared URL and title for the universal button and standalone services, use the following code as a template:
|
131 |
|
132 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
|
133 |
-
ADDTOANY_SHARE_SAVE_KIT( array(
|
134 |
} ?>`
|
135 |
|
136 |
If you want to share the current URL and title (detected on the client-side), use the following code:
|
137 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
|
138 |
-
ADDTOANY_SHARE_SAVE_KIT( array(
|
139 |
} ?>`
|
140 |
|
141 |
If you want to hardcode the shared current URL and modify the title (server-side), use the following code as a template:
|
142 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) {
|
143 |
-
ADDTOANY_SHARE_SAVE_KIT( array(
|
144 |
} ?>`
|
145 |
|
146 |
= How can I add just the universal button to another area of my theme? =
|
147 |
|
148 |
In the Theme Editor, you will place this line of code where you want the button to appear in your theme:
|
149 |
|
150 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?>`
|
151 |
|
152 |
If you want to customize the shared URL and title for this button, use the following code as a template:
|
153 |
|
154 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) {
|
155 |
-
ADDTOANY_SHARE_SAVE_BUTTON( array(
|
156 |
} ?>`
|
157 |
|
158 |
= How can I add just the individual icons to another area of my theme? =
|
@@ -160,17 +160,17 @@ If you want to customize the shared URL and title for this button, use the follo
|
|
160 |
In the Theme Editor, place this line of code where you want the individual icons to appear in your theme (within an HTML list):
|
161 |
|
162 |
`<?php echo '<div class="a2a_kit a2a_kit_size_32 addtoany_list">';
|
163 |
-
if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) { ADDTOANY_SHARE_SAVE_ICONS(); }
|
164 |
echo '</div>'; ?>`
|
165 |
|
166 |
If you want to customize the shared URL and title for these icons, use the following code as a template:
|
167 |
|
168 |
`<?php
|
169 |
-
if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) {
|
170 |
echo '<div class="a2a_kit a2a_kit_size_32 addtoany_list">';
|
171 |
ADDTOANY_SHARE_SAVE_ICONS( array(
|
172 |
-
|
173 |
-
));
|
174 |
echo '</div>';
|
175 |
} ?>`
|
176 |
|
@@ -178,28 +178,28 @@ if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) {
|
|
178 |
|
179 |
Or you can place the icons as individual links without styling:
|
180 |
|
181 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) { ADDTOANY_SHARE_SAVE_ICONS(); } ?>`
|
182 |
|
183 |
If you want to customize the shared URL and title for these icons, use the following code as a template:
|
184 |
|
185 |
-
`<?php if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) {
|
186 |
-
ADDTOANY_SHARE_SAVE_ICONS( array(
|
187 |
} ?>`
|
188 |
|
189 |
= How can I add a new custom standalone service? =
|
190 |
You can create a plugin or customize the following PHP sample code to add to your theme's function.php file:
|
191 |
|
192 |
`function addtoany_add_services( $services ) {
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
}
|
202 |
-
add_filter('A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1);`
|
203 |
|
204 |
= How can I align the sharing button(s) to the center or to the right side of posts? =
|
205 |
It depends on your theme, but you can try adding the following CSS code to your main stylesheet.
|
@@ -271,6 +271,11 @@ Upload the plugin directory (including all files and directories within) to the
|
|
271 |
|
272 |
== Changelog ==
|
273 |
|
|
|
|
|
|
|
|
|
|
|
274 |
= 1.2.9 =
|
275 |
* New Custom Icons option in the Advanced Options section
|
276 |
* Use any icons at any location (media uploads directory, CDN, etc.)
|
3 |
Tags: sharing, share, share this, bookmarking, social, share button, share buttons, share links, social share, social sharing, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, shortcode, sidebar, widget, email, e-mail, print, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook share, facebook like, like, twitter, twitter button, twitter share, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, buffer, stumbleupon, bitly, technorati, lockerz, addthis, sociable, sharedaddy, sharethis, shareaholic, icon, icons, vector, SVG, wpmu, Add to Any, AddToAny
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.9
|
6 |
+
Stable tag: 1.2.9.1
|
7 |
|
8 |
Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
|
9 |
|
125 |
|
126 |
In the Theme Editor, place this code block where you want the button and individual icons to appear in your theme:
|
127 |
|
128 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>`
|
129 |
|
130 |
If you want to customize the shared URL and title for the universal button and standalone services, use the following code as a template:
|
131 |
|
132 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
|
133 |
+
ADDTOANY_SHARE_SAVE_KIT( array( 'linkname' => 'Example Page', 'linkurl' => 'http://example.com/page.html' ) );
|
134 |
} ?>`
|
135 |
|
136 |
If you want to share the current URL and title (detected on the client-side), use the following code:
|
137 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
|
138 |
+
ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => true ) );
|
139 |
} ?>`
|
140 |
|
141 |
If you want to hardcode the shared current URL and modify the title (server-side), use the following code as a template:
|
142 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
|
143 |
+
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'] ) );
|
144 |
} ?>`
|
145 |
|
146 |
= How can I add just the universal button to another area of my theme? =
|
147 |
|
148 |
In the Theme Editor, you will place this line of code where you want the button to appear in your theme:
|
149 |
|
150 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_BUTTON' ) ) { ADDTOANY_SHARE_SAVE_BUTTON(); } ?>`
|
151 |
|
152 |
If you want to customize the shared URL and title for this button, use the following code as a template:
|
153 |
|
154 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_BUTTON' ) ) {
|
155 |
+
ADDTOANY_SHARE_SAVE_BUTTON( array( 'linkname' => 'Example Page', 'linkurl' => 'http://example.com/page.html' ) );
|
156 |
} ?>`
|
157 |
|
158 |
= How can I add just the individual icons to another area of my theme? =
|
160 |
In the Theme Editor, place this line of code where you want the individual icons to appear in your theme (within an HTML list):
|
161 |
|
162 |
`<?php echo '<div class="a2a_kit a2a_kit_size_32 addtoany_list">';
|
163 |
+
if ( function_exists( 'ADDTOANY_SHARE_SAVE_ICONS' ) ) { ADDTOANY_SHARE_SAVE_ICONS(); }
|
164 |
echo '</div>'; ?>`
|
165 |
|
166 |
If you want to customize the shared URL and title for these icons, use the following code as a template:
|
167 |
|
168 |
`<?php
|
169 |
+
if ( function_exists( 'ADDTOANY_SHARE_SAVE_ICONS' ) ) {
|
170 |
echo '<div class="a2a_kit a2a_kit_size_32 addtoany_list">';
|
171 |
ADDTOANY_SHARE_SAVE_ICONS( array(
|
172 |
+
'linkname' => 'Example Page', 'linkurl' => 'http://example.com/page.html'
|
173 |
+
) );
|
174 |
echo '</div>';
|
175 |
} ?>`
|
176 |
|
178 |
|
179 |
Or you can place the icons as individual links without styling:
|
180 |
|
181 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_ICONS' ) ) { ADDTOANY_SHARE_SAVE_ICONS(); } ?>`
|
182 |
|
183 |
If you want to customize the shared URL and title for these icons, use the following code as a template:
|
184 |
|
185 |
+
`<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_ICONS' ) ) {
|
186 |
+
ADDTOANY_SHARE_SAVE_ICONS( array( 'linkname' => 'Example Page', 'linkurl' => 'http://example.com/page.html' ) );
|
187 |
} ?>`
|
188 |
|
189 |
= How can I add a new custom standalone service? =
|
190 |
You can create a plugin or customize the following PHP sample code to add to your theme's function.php file:
|
191 |
|
192 |
`function addtoany_add_services( $services ) {
|
193 |
+
$services['google_example'] = array(
|
194 |
+
'name' => 'Google Example',
|
195 |
+
'icon_url' => 'http://www.google.com/favicon.ico',
|
196 |
+
'icon_width' => 16,
|
197 |
+
'icon_height' => 16,
|
198 |
+
'href' => 'http://www.example.com/add?linkurl=A2A_LINKURL&linkname=A2A_LINKNAME'
|
199 |
+
);
|
200 |
+
return $services;
|
201 |
}
|
202 |
+
add_filter( 'A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1 );`
|
203 |
|
204 |
= How can I align the sharing button(s) to the center or to the right side of posts? =
|
205 |
It depends on your theme, but you can try adding the following CSS code to your main stylesheet.
|
271 |
|
272 |
== Changelog ==
|
273 |
|
274 |
+
= 1.2.9.1 =
|
275 |
+
* Update template code
|
276 |
+
* Update Advanced Options description
|
277 |
+
* Fix button return notice for certain use cases
|
278 |
+
|
279 |
= 1.2.9 =
|
280 |
* New Custom Icons option in the Advanced Options section
|
281 |
* Use any icons at any location (media uploads directory, CDN, etc.)
|
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.2.9
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
@@ -270,7 +270,7 @@ function ADDTOANY_SHARE_SAVE_ICONS( $args = array() ) {
|
|
270 |
|
271 |
$ind_html .= $html_container_close;
|
272 |
|
273 |
-
if ( $output_later )
|
274 |
return $ind_html;
|
275 |
else
|
276 |
echo $ind_html;
|
@@ -417,7 +417,7 @@ function ADDTOANY_SHARE_SAVE_BUTTON( $args = array() ) {
|
|
417 |
// Closing tags come after <script> to validate in case the container is a list element
|
418 |
$button_html .= $html_wrap_close . $html_container_close;
|
419 |
|
420 |
-
if ( $output_later )
|
421 |
return $button_html;
|
422 |
else
|
423 |
echo $button_html;
|
@@ -468,7 +468,7 @@ function ADDTOANY_SHARE_SAVE_SPECIAL( $special_service_code, $args = array() ) {
|
|
468 |
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
469 |
}
|
470 |
|
471 |
-
if ( $output_later )
|
472 |
return $special_html;
|
473 |
else
|
474 |
echo $special_html;
|
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.9.1
|
7 |
Author: micropat
|
8 |
Author URI: http://www.addtoany.com/
|
9 |
*/
|
270 |
|
271 |
$ind_html .= $html_container_close;
|
272 |
|
273 |
+
if ( isset( $output_later ) && $output_later == true )
|
274 |
return $ind_html;
|
275 |
else
|
276 |
echo $ind_html;
|
417 |
// Closing tags come after <script> to validate in case the container is a list element
|
418 |
$button_html .= $html_wrap_close . $html_container_close;
|
419 |
|
420 |
+
if ( isset( $output_later ) && $output_later == true )
|
421 |
return $button_html;
|
422 |
else
|
423 |
echo $button_html;
|
468 |
$special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes );
|
469 |
}
|
470 |
|
471 |
+
if ( isset( $output_later ) && $output_later == true )
|
472 |
return $special_html;
|
473 |
else
|
474 |
echo $special_html;
|
addtoany.admin.php
CHANGED
@@ -483,9 +483,9 @@ function A2A_SHARE_SAVE_options_page() {
|
|
483 |
<div class="setting-description">
|
484 |
<strong>*</strong> <?php _e("If unchecked, be sure to place the following code in <a href=\"theme-editor.php\">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>)", "add-to-any"); ?>: <span id="addtoany_show_template_button_code" class="button-secondary">»</span>
|
485 |
<div id="addtoany_template_button_code">
|
486 |
-
<code><?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?></code>
|
487 |
</div>
|
488 |
-
<noscript><code><?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?></code></noscript>
|
489 |
</div>
|
490 |
</fieldset></td>
|
491 |
</tr>
|
@@ -521,8 +521,8 @@ function A2A_SHARE_SAVE_options_page() {
|
|
521 |
</label>
|
522 |
</p>
|
523 |
<label for="A2A_SHARE_SAVE_additional_js_variables">
|
524 |
-
<p><?php _e('Below you can
|
525 |
-
<?php _e("Advanced users
|
526 |
</label>
|
527 |
<p>
|
528 |
<textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="6" cols="50"><?php echo stripslashes($options['additional_js_variables']); ?></textarea>
|
483 |
<div class="setting-description">
|
484 |
<strong>*</strong> <?php _e("If unchecked, be sure to place the following code in <a href=\"theme-editor.php\">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>)", "add-to-any"); ?>: <span id="addtoany_show_template_button_code" class="button-secondary">»</span>
|
485 |
<div id="addtoany_template_button_code">
|
486 |
+
<code><?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?></code>
|
487 |
</div>
|
488 |
+
<noscript><code><?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?></code></noscript>
|
489 |
</div>
|
490 |
</fieldset></td>
|
491 |
</tr>
|
521 |
</label>
|
522 |
</p>
|
523 |
<label for="A2A_SHARE_SAVE_additional_js_variables">
|
524 |
+
<p><?php _e('Below you can add special JavaScript code for AddToAny.', 'add-to-any'); ?>
|
525 |
+
<?php _e("Advanced users should explore AddToAny's <a href=\"http://www.addtoany.com/buttons/customize/wordpress\" target=\"_blank\">additional options</a>.", "add-to-any"); ?></p>
|
526 |
</label>
|
527 |
<p>
|
528 |
<textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="6" cols="50"><?php echo stripslashes($options['additional_js_variables']); ?></textarea>
|