Version Description
- Bug fix: Style conflicts with some themes resolved
- Made friends with WPSupercache
Download this release
Release Info
Developer | srijith.v |
Plugin | WordPress Share Buttons Plugin – AddThis |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- addthis_sidebar_widget.php +0 -1
- addthis_social_widget.php +10 -9
- css/output.css +15 -0
- includes/addthis_addjs.php +1 -5
- readme.txt +9 -1
addthis_sidebar_widget.php
CHANGED
@@ -41,7 +41,6 @@ class AddThisSidebarWidget extends WP_Widget {
|
|
41 |
printf(apply_filters('addthis_sidebar_style_output', $addthis_new_styles[$instance['style']]['src']), '');
|
42 |
|
43 |
echo $after_widget;
|
44 |
-
echo "<style type='text/css'>.addthis_toolbox, .addthis_button {float:left;width:100%;margin:0 0 15px 0;} .addthis_button_tweet {min-width: 83px;float:left;}</style>";
|
45 |
}
|
46 |
|
47 |
/**
|
41 |
printf(apply_filters('addthis_sidebar_style_output', $addthis_new_styles[$instance['style']]['src']), '');
|
42 |
|
43 |
echo $after_widget;
|
|
|
44 |
}
|
45 |
|
46 |
/**
|
addthis_social_widget.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
* Plugin Name: AddThis Social Bookmarking Widget
|
24 |
* Plugin URI: http://www.addthis.com
|
25 |
* 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.
|
26 |
-
* Version: 3.0.
|
27 |
*
|
28 |
* Author: The AddThis Team
|
29 |
* Author URI: http://www.addthis.com/blog
|
@@ -46,8 +46,8 @@ function addthis_early(){
|
|
46 |
|
47 |
|
48 |
define( 'addthis_style_default' , 'fb_tw_p1_sc');
|
49 |
-
define( 'ADDTHIS_PLUGIN_VERSION' , '3.0.
|
50 |
-
define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-3.0.
|
51 |
define( 'ADDTHIS_ATVERSION', '300');
|
52 |
define( 'ADDTHIS_ATVERSION_MANUAL_UPDATE', -1);
|
53 |
define( 'ADDTHIS_ATVERSION_AUTO_UPDATE', 0);
|
@@ -80,11 +80,11 @@ $atversion = is_array($addthis_options) && array_key_exists('atversion_reverted'
|
|
80 |
|
81 |
$addthis_new_styles = array(
|
82 |
|
83 |
-
'fb_tw_p1_sc' => array( 'src' => '<div class="addthis_toolbox addthis_default_style " %s ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="
|
84 |
), // facebook tweet plus 1 share counter
|
85 |
-
'large_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_32x32_style" %s ><a class="
|
86 |
), // 32x32
|
87 |
-
'small_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_" %s ><a class="
|
88 |
), // 32x32
|
89 |
'plus_one_share_counter' => array( 'src' => '<div class="addthis_toolbox addthis_default_style" %s ><a class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a class="addthis_counter addthis_pill_style"></a></div>', 'img' => 'plusone-share.gif', 'name' => 'Plus One and Share Counter', 'above'=> 'hidden', 'below'=>'hidden' , 'defaultHide' => true
|
90 |
), // +1
|
@@ -1423,14 +1423,14 @@ function addthis_display_social_widget($content, $filtered = true, $below_excerp
|
|
1423 |
{
|
1424 |
if ( isset($above) )
|
1425 |
{
|
1426 |
-
if ($options['above'] == 'custom')
|
1427 |
$content = $above . $content;
|
1428 |
else
|
1429 |
$content = sprintf($above, $url_above) . $content;
|
1430 |
}
|
1431 |
if ( isset($below) )
|
1432 |
{
|
1433 |
-
if ($options['below'] == 'custom')
|
1434 |
$content = $content . $below;
|
1435 |
else
|
1436 |
$content = $content . sprintf($below, $url_below);
|
@@ -1463,6 +1463,7 @@ function addthis_output_script($return = false, $justConfig = false )
|
|
1463 |
{
|
1464 |
|
1465 |
global $addthis_settings;
|
|
|
1466 |
|
1467 |
if ( isset($_GET['preview']) && $_GET['preview'] == 1 && $options = get_transient('addthis_settings') )
|
1468 |
$preview = true;
|
@@ -1596,7 +1597,7 @@ function validate_addthis_api_credentials()
|
|
1596 |
$ajax_response = array('profileerror' => 'true', 'profilemessage' => '',
|
1597 |
'credentialerror' => 'true', 'credentialmessage' => '');
|
1598 |
if ($_POST['addthis_username'] && $_POST['addthis_password'] && $_POST['addthis_profile']) {
|
1599 |
-
$url = '
|
1600 |
'username=' . urlencode($_POST['addthis_username']).
|
1601 |
'&password=' . urlencode($_POST['addthis_password']).
|
1602 |
'&pubid=' . urlencode($_POST['addthis_profile']);
|
23 |
* Plugin Name: AddThis Social Bookmarking Widget
|
24 |
* Plugin URI: http://www.addthis.com
|
25 |
* 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.
|
26 |
+
* Version: 3.0.4
|
27 |
*
|
28 |
* Author: The AddThis Team
|
29 |
* Author URI: http://www.addthis.com/blog
|
46 |
|
47 |
|
48 |
define( 'addthis_style_default' , 'fb_tw_p1_sc');
|
49 |
+
define( 'ADDTHIS_PLUGIN_VERSION' , '3.0.4');
|
50 |
+
define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-3.0.4');
|
51 |
define( 'ADDTHIS_ATVERSION', '300');
|
52 |
define( 'ADDTHIS_ATVERSION_MANUAL_UPDATE', -1);
|
53 |
define( 'ADDTHIS_ATVERSION_AUTO_UPDATE', 0);
|
80 |
|
81 |
$addthis_new_styles = array(
|
82 |
|
83 |
+
'fb_tw_p1_sc' => array( 'src' => '<div class="addthis_toolbox addthis_default_style " %s ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_pinterest_pinit"></a><a class="addthis_counter addthis_pill_style"></a></div>' , 'img' => 'horizontal_share_rect.png' , 'name' => 'Like, Tweet, +1, Share', 'above' => '', 'below' => ''
|
84 |
), // facebook tweet plus 1 share counter
|
85 |
+
'large_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_32x32_style" %s ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email"></a><a class="addthis_button_pinterest_share"></a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a></div>', 'img' => 'toolbox-large.png', 'name' => 'Large Toolbox', 'above' => 'hidden ', 'below' => 'hidden'
|
86 |
), // 32x32
|
87 |
+
'small_toolbox' => array( 'src' => '<div class="addthis_toolbox addthis_default_style addthis_" %s ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email"></a><a class="addthis_button_pinterest_share"></a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a></div>', 'img' => 'toolbox-small.png', 'name' => 'Small Toolbox', 'above' => 'hidden ', 'below' => ''
|
88 |
), // 32x32
|
89 |
'plus_one_share_counter' => array( 'src' => '<div class="addthis_toolbox addthis_default_style" %s ><a class="addthis_button_google_plusone" g:plusone:size="medium" ></a><a class="addthis_counter addthis_pill_style"></a></div>', 'img' => 'plusone-share.gif', 'name' => 'Plus One and Share Counter', 'above'=> 'hidden', 'below'=>'hidden' , 'defaultHide' => true
|
90 |
), // +1
|
1423 |
{
|
1424 |
if ( isset($above) )
|
1425 |
{
|
1426 |
+
if ($options['above'] == 'custom' || $options['above'] == 'custom_string')
|
1427 |
$content = $above . $content;
|
1428 |
else
|
1429 |
$content = sprintf($above, $url_above) . $content;
|
1430 |
}
|
1431 |
if ( isset($below) )
|
1432 |
{
|
1433 |
+
if ($options['below'] == 'custom' || $options['below'] == 'custom_string')
|
1434 |
$content = $content . $below;
|
1435 |
else
|
1436 |
$content = $content . sprintf($below, $url_below);
|
1463 |
{
|
1464 |
|
1465 |
global $addthis_settings;
|
1466 |
+
wp_enqueue_style( 'output', plugins_url('css/output.css', __FILE__) );
|
1467 |
|
1468 |
if ( isset($_GET['preview']) && $_GET['preview'] == 1 && $options = get_transient('addthis_settings') )
|
1469 |
$preview = true;
|
1597 |
$ajax_response = array('profileerror' => 'true', 'profilemessage' => '',
|
1598 |
'credentialerror' => 'true', 'credentialmessage' => '');
|
1599 |
if ($_POST['addthis_username'] && $_POST['addthis_password'] && $_POST['addthis_profile']) {
|
1600 |
+
$url = 'http://api.addthis.com/analytics/1.0/pub/shares.json?'.
|
1601 |
'username=' . urlencode($_POST['addthis_username']).
|
1602 |
'&password=' . urlencode($_POST['addthis_password']).
|
1603 |
'&pubid=' . urlencode($_POST['addthis_profile']);
|
css/output.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.entry-content .addthis_toolbox {
|
2 |
+
margin:0 0 10px 0;
|
3 |
+
}.addthis_button_tweet {
|
4 |
+
min-width: 83px;
|
5 |
+
float:left;
|
6 |
+
}
|
7 |
+
.addthis_toolbox, .addthis_button {
|
8 |
+
float:left;
|
9 |
+
width:100%;
|
10 |
+
margin:0 0 15px 0;
|
11 |
+
}
|
12 |
+
.addthis_button_tweet {
|
13 |
+
min-width: 83px;
|
14 |
+
float:left;
|
15 |
+
}
|
includes/addthis_addjs.php
CHANGED
@@ -94,7 +94,6 @@ Class AddThis_addjs{
|
|
94 |
$this->addWidgetToJs();
|
95 |
$this->addAfterToJs();
|
96 |
echo $this->jsToAdd;
|
97 |
-
echo '<style type="text/css">.entry-content .addthis_toolbox {margin:0 0 10px 0;} .addthis_button_tweet {min-width: 83px;float:left;}</style>';
|
98 |
$this->_js_added = true;
|
99 |
$this->jsToAdd = false;
|
100 |
} else {
|
@@ -130,7 +129,7 @@ Class AddThis_addjs{
|
|
130 |
}
|
131 |
|
132 |
function check_for_footer(){
|
133 |
-
$url =
|
134 |
$response = wp_remote_get( $url, array( 'sslverify' => false ) );
|
135 |
$code = (int) wp_remote_retrieve_response_code( $response );
|
136 |
if ( $code == 200 ) {
|
@@ -141,10 +140,7 @@ Class AddThis_addjs{
|
|
141 |
}
|
142 |
|
143 |
function maybe_add_footer_comment(){
|
144 |
-
if ( $_GET['attest'] = 'true' )
|
145 |
-
{
|
146 |
add_action( 'wp_footer', array($this, 'test_footer' ), 99999 ); // Some obscene priority, make sure we run last
|
147 |
-
}
|
148 |
}
|
149 |
|
150 |
function test_footer(){
|
94 |
$this->addWidgetToJs();
|
95 |
$this->addAfterToJs();
|
96 |
echo $this->jsToAdd;
|
|
|
97 |
$this->_js_added = true;
|
98 |
$this->jsToAdd = false;
|
99 |
} else {
|
129 |
}
|
130 |
|
131 |
function check_for_footer(){
|
132 |
+
$url = home_url();
|
133 |
$response = wp_remote_get( $url, array( 'sslverify' => false ) );
|
134 |
$code = (int) wp_remote_retrieve_response_code( $response );
|
135 |
if ( $code == 200 ) {
|
140 |
}
|
141 |
|
142 |
function maybe_add_footer_comment(){
|
|
|
|
|
143 |
add_action( 'wp_footer', array($this, 'test_footer' ), 99999 ); // Some obscene priority, make sure we run last
|
|
|
144 |
}
|
145 |
|
146 |
function test_footer(){
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: srijith.v, solchea, jorbin, _mjk_, addthis_paul, joesullivan
|
|
3 |
Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz, pintrest, widget
|
4 |
Requires at least: 2.9
|
5 |
Tested up to: 3.5
|
6 |
-
Stable tag: 3.0.
|
7 |
|
8 |
AddThis Share Buttons help drive traffic to your site by helping visitors share, bookmark and email your content to over 330 services.
|
9 |
|
@@ -76,6 +76,11 @@ In the screen options you can enable the AddThis meta box. Check the box and sa
|
|
76 |
PHP 5+ is preferred; PHP 4 is supported.
|
77 |
|
78 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
79 |
= 3.0.3 =
|
80 |
* Bug fix: Style tags are now allowed in Custom Code box.
|
81 |
|
@@ -216,6 +221,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
|
|
216 |
|
217 |
== Upgrade Notice ==
|
218 |
|
|
|
|
|
|
|
219 |
= 3.0.3 =
|
220 |
Bug fixes.
|
221 |
|
3 |
Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz, pintrest, widget
|
4 |
Requires at least: 2.9
|
5 |
Tested up to: 3.5
|
6 |
+
Stable tag: 3.0.4
|
7 |
|
8 |
AddThis Share Buttons help drive traffic to your site by helping visitors share, bookmark and email your content to over 330 services.
|
9 |
|
76 |
PHP 5+ is preferred; PHP 4 is supported.
|
77 |
|
78 |
== Changelog ==
|
79 |
+
|
80 |
+
= 3.0.4 =
|
81 |
+
* Bug fix: Style conflicts with some themes resolved
|
82 |
+
* Made friends with WPSupercache
|
83 |
+
|
84 |
= 3.0.3 =
|
85 |
* Bug fix: Style tags are now allowed in Custom Code box.
|
86 |
|
221 |
|
222 |
== Upgrade Notice ==
|
223 |
|
224 |
+
= 3.0.4 =
|
225 |
+
Bug fixes, made WPSupercache friendly
|
226 |
+
|
227 |
= 3.0.3 =
|
228 |
Bug fixes.
|
229 |
|