Version Description
- Added support for arbitrary URL and title in template tag as optional parameters
- i.e., <?php do_action( 'addthis_widget', $url, $title); ?>
- Can be called, for example, with get_permalink() and the_title() within a post loop, or some other URL if necessary
Download this release
Release Info
Developer | _mjk_ |
Plugin | WordPress Share Buttons Plugin – AddThis |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
- addthis_social_widget.php +10 -8
- readme.txt +13 -12
addthis_social_widget.php
CHANGED
@@ -27,7 +27,7 @@ else return;
|
|
27 |
* Plugin Name: AddThis Social Bookmarking Widget
|
28 |
* Plugin URI: http://www.addthis.com
|
29 |
* Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
|
30 |
-
* Version: 1.6.
|
31 |
*
|
32 |
* Author: The AddThis Team
|
33 |
* Author URI: http://www.addthis.com
|
@@ -88,8 +88,8 @@ function addthis_get_wp_version() {
|
|
88 |
/**
|
89 |
* For templates, we need a wrapper for printing out the code on demand.
|
90 |
*/
|
91 |
-
function addthis_print_widget() {
|
92 |
-
echo addthis_social_widget('', true);
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -241,7 +241,7 @@ function addthis_init()
|
|
241 |
$addthis_settings['showoncats'] = get_option('addthis_showoncats') === 'true';
|
242 |
|
243 |
if ($addthis_settings['showonposts']) add_filter('the_content', 'addthis_social_widget'); // true by default
|
244 |
-
add_action( 'addthis_widget', 'addthis_print_widget');
|
245 |
|
246 |
$product = get_option('addthis_product');
|
247 |
|
@@ -294,12 +294,12 @@ function addthis_sidebar_widget($args)
|
|
294 |
/**
|
295 |
* Appends AddThis button to post content.
|
296 |
*/
|
297 |
-
function addthis_social_widget($content, $
|
298 |
{
|
299 |
global $addthis_settings;
|
300 |
|
301 |
// add nothing to RSS feed or search results; control adding to static/archive/category pages
|
302 |
-
if (!$
|
303 |
{
|
304 |
if ($addthis_settings['sidebar_only'] == 'true') return $content;
|
305 |
else if (is_feed()) return $content;
|
@@ -316,8 +316,8 @@ function addthis_social_widget($content, $sidebar = false)
|
|
316 |
}
|
317 |
$pub = urlencode($pub);
|
318 |
|
319 |
-
$link =
|
320 |
-
$title =
|
321 |
$addthis_options = $addthis_settings['options'];
|
322 |
|
323 |
$content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--\n";
|
@@ -355,6 +355,8 @@ EOF;
|
|
355 |
}
|
356 |
else
|
357 |
{
|
|
|
|
|
358 |
$content .= <<<EOF
|
359 |
//-->
|
360 |
</script>
|
27 |
* Plugin Name: AddThis Social Bookmarking Widget
|
28 |
* Plugin URI: http://www.addthis.com
|
29 |
* Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
|
30 |
+
* Version: 1.6.5
|
31 |
*
|
32 |
* Author: The AddThis Team
|
33 |
* Author URI: http://www.addthis.com
|
88 |
/**
|
89 |
* For templates, we need a wrapper for printing out the code on demand.
|
90 |
*/
|
91 |
+
function addthis_print_widget($url, $title) {
|
92 |
+
echo addthis_social_widget('', true, $url, $title);
|
93 |
}
|
94 |
|
95 |
/**
|
241 |
$addthis_settings['showoncats'] = get_option('addthis_showoncats') === 'true';
|
242 |
|
243 |
if ($addthis_settings['showonposts']) add_filter('the_content', 'addthis_social_widget'); // true by default
|
244 |
+
add_action( 'addthis_widget', 'addthis_print_widget', 10, 2);
|
245 |
|
246 |
$product = get_option('addthis_product');
|
247 |
|
294 |
/**
|
295 |
* Appends AddThis button to post content.
|
296 |
*/
|
297 |
+
function addthis_social_widget($content, $onSidebar = false, $url = null, $title = null)
|
298 |
{
|
299 |
global $addthis_settings;
|
300 |
|
301 |
// add nothing to RSS feed or search results; control adding to static/archive/category pages
|
302 |
+
if (!$onSidebar)
|
303 |
{
|
304 |
if ($addthis_settings['sidebar_only'] == 'true') return $content;
|
305 |
else if (is_feed()) return $content;
|
316 |
}
|
317 |
$pub = urlencode($pub);
|
318 |
|
319 |
+
$link = !is_null($url) ? $url : ($onSidebar ? get_bloginfo('url') : get_permalink());
|
320 |
+
$title = !is_null($title) ? $title : ($onSidebar ? get_bloginfo('title') : the_title('', '', false));
|
321 |
$addthis_options = $addthis_settings['options'];
|
322 |
|
323 |
$content .= "\n<!-- AddThis Button BEGIN -->\n".'<script type="text/javascript">'."\n//<!--\n";
|
355 |
}
|
356 |
else
|
357 |
{
|
358 |
+
$link = urlencode($link);
|
359 |
+
$title = urlencode($title);
|
360 |
$content .= <<<EOF
|
361 |
//-->
|
362 |
</script>
|
readme.txt
CHANGED
@@ -2,19 +2,15 @@
|
|
2 |
Contributors: _mjk_
|
3 |
Tags: share, addthis, social, bookmark, sharing, bookmarking, widget
|
4 |
Requires at least: 2.3
|
5 |
-
Tested up to: 2.9.
|
6 |
-
Stable tag: 1.6.
|
7 |
|
8 |
The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
|
9 |
|
10 |
== Description ==
|
11 |
-
|
12 |
-
|
13 |
-
Sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing, which content is shared the most, and more.
|
14 |
-
|
15 |
-
Over 900,000 sites have installed AddThis. Join us!
|
16 |
-
|
17 |
|
|
|
18 |
|
19 |
<a href="http://www.addthis.com/blog">AddThis Blog</a> | <a href="http://www.addthis.com/privacy">Privacy Policy</a>
|
20 |
|
@@ -24,7 +20,7 @@ Over 900,000 sites have installed AddThis. Join us!
|
|
24 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
25 |
1. (Optional) Customize the plugin in the Settings > AddThis menu
|
26 |
|
27 |
-
Note: due to
|
28 |
|
29 |
== Frequently Asked Questions ==
|
30 |
|
@@ -45,14 +41,14 @@ If you've turned on the drop-down menu (which is recommended, as it's been shown
|
|
45 |
1. Performance. The AddThis menu code is tiny and fast. We constantly optimize its behavior and design to make sharing a snap.
|
46 |
1. Peace of mind. AddThis gathers the best services on the internet so you don't have to, and backs them up with industrial strength analytics, code caching, active tech support and a thriving developer community.
|
47 |
1. Flexibility. AddThis can be customized via API, and served securely via SSL. You can roll your own sharing toolbars with our toolbox. Share just about anything, anywhere -- your way.
|
48 |
-
1. Global reach. AddThis sends content to
|
49 |
1. It's free!
|
50 |
|
51 |
= Who else uses AddThis? =
|
52 |
-
Over
|
53 |
|
54 |
= What services does AddThis support? =
|
55 |
-
We currently support over
|
56 |
|
57 |
== Screenshots ==
|
58 |
|
@@ -68,6 +64,11 @@ PHP 5+ is preferred; PHP 4 is supported.
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
|
|
|
|
71 |
= 1.6.4 =
|
72 |
* Fixed parse bug with "static" menu option
|
73 |
* Fixed regression of brand option
|
2 |
Contributors: _mjk_
|
3 |
Tags: share, addthis, social, bookmark, sharing, bookmarking, widget
|
4 |
Requires at least: 2.3
|
5 |
+
Tested up to: 2.9.2
|
6 |
+
Stable tag: 1.6.5
|
7 |
|
8 |
The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
|
9 |
|
10 |
== Description ==
|
11 |
+
Get more traffic back to your site by installing the AddThis WordPress plugin. With AddThis, your users can promote your content by sharing to 295 of the most popular social networking and bookmarking sites (like Facebook, Twitter, Digg, StumbleUpon and MySpace). Our button is small, unobtrusive, quick to load and recognized all over the web.
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
Optionally, sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing, which content is shared the most, and more.
|
14 |
|
15 |
<a href="http://www.addthis.com/blog">AddThis Blog</a> | <a href="http://www.addthis.com/privacy">Privacy Policy</a>
|
16 |
|
20 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
21 |
1. (Optional) Customize the plugin in the Settings > AddThis menu
|
22 |
|
23 |
+
Note: due to confusion, there are no longer separate versions for PHP4 and PHP5.
|
24 |
|
25 |
== Frequently Asked Questions ==
|
26 |
|
41 |
1. Performance. The AddThis menu code is tiny and fast. We constantly optimize its behavior and design to make sharing a snap.
|
42 |
1. Peace of mind. AddThis gathers the best services on the internet so you don't have to, and backs them up with industrial strength analytics, code caching, active tech support and a thriving developer community.
|
43 |
1. Flexibility. AddThis can be customized via API, and served securely via SSL. You can roll your own sharing toolbars with our toolbox. Share just about anything, anywhere -- your way.
|
44 |
+
1. Global reach. AddThis sends content to 295+ sharing services 60+ languages, to over half a billion unique users in countries all over the world.
|
45 |
1. It's free!
|
46 |
|
47 |
= Who else uses AddThis? =
|
48 |
+
Over 1,200,000 sites have installed AddThis. With over a billion unique users, AddThis is helping share content all over the world, in more than sixty languages. You might be surprised who's sharing their website using AddThis--<a href="http://www.addthis.com/features#partners">here are just a few</a>.
|
49 |
|
50 |
= What services does AddThis support? =
|
51 |
+
We currently support over 295 services, from email and blogging platforms to social networks and news aggregators, and we add new services every month. Want to know if your favorite service is supported? This list is accurate up to the minute: <a href="http://www.addthis.com/services">http://www.addthis.com/services</a>.
|
52 |
|
53 |
== Screenshots ==
|
54 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 1.6.5 =
|
68 |
+
* Added support for arbitrary URL and title in template tag as optional parameters
|
69 |
+
* i.e., <?php do_action( 'addthis_widget', $url, $title); ?>
|
70 |
+
* Can be called, for example, with get_permalink() and the_title() within a post loop, or some other URL if necessary
|
71 |
+
|
72 |
= 1.6.4 =
|
73 |
* Fixed parse bug with "static" menu option
|
74 |
* Fixed regression of brand option
|