WordPress Share Buttons Plugin – AddThis - Version 4.0.1

Version Description

  • Frictionless integration with AddThis Dashboard.
Download this release

Release Info

Developer srijith.v
Plugin Icon 128x128 WordPress Share Buttons Plugin – AddThis
Version 4.0.1
Comparing to
See all releases

Code changes from version 4.0 to 4.0.1

addthis-for-wordpress.php CHANGED
@@ -32,7 +32,7 @@ $pathParts = pathinfo(__FILE__);
32
  $path = $pathParts['dirname'];
33
 
34
  if (!defined('ADDTHIS_PLUGIN_VERSION')) {
35
- define('ADDTHIS_PLUGIN_VERSION', '3.5.11');
36
  }
37
 
38
  if (!defined('ADDTHIS_ATVERSION')) {
@@ -70,6 +70,9 @@ class Addthis_Wordpress
70
 
71
  /** check upgrade or fresh installation **/
72
  private $_upgrade;
 
 
 
73
 
74
  /**
75
  * Initializes the plugin.
@@ -83,6 +86,8 @@ class Addthis_Wordpress
83
  $this->_upgrade = $upgrade;
84
  $this->_getVariables = $_GET;
85
  $this->_postVariables = $_POST;
 
 
86
 
87
  include_once 'addthis-toolbox.php';
88
  new Addthis_ToolBox;
@@ -177,10 +182,11 @@ class Addthis_Wordpress
177
  *
178
  * @return string
179
  */
180
- public static function updatePubid($pubId)
181
  {
182
  global $addthis_addjs;
183
  $addthis_addjs->setProfileId($pubId);
 
184
  return "<div class='addthis_updated wrap'>".
185
  "AddThis Profile ID updated successfully!!!".
186
  "</div>";
@@ -280,7 +286,7 @@ class Addthis_Wordpress
280
  '<span class="addthis-title">AddThis <sup>*</sup></span>'.
281
  '<span class="addthis-name">for WordPress</span>'.
282
  '</p>';
283
- if ($this->_upgrade && !self::getPubid()) {
284
  $html .= $this->_getupdateSuccessMessage();
285
  }
286
 
@@ -338,14 +344,14 @@ class Addthis_Wordpress
338
  private function _getAddThisLinkButton()
339
  {
340
  $html = '';
341
- if (!self::getPubid()) {
342
  $html = "<h2>You're almost done!</h2>";
343
  }
344
  $html .= "<div class='addthis_description'>".
345
  "Beautiful simple website tools designed to help you get ".
346
  "likes, get shares, get follows and get discovered. </div>";
347
 
348
- if (!self::getPubid()) {
349
  // Get pub name
350
  $pubName = self::_getPubName();
351
  $html .= "<a class='addthis_button next' ".
@@ -355,24 +361,17 @@ class Addthis_Wordpress
355
  "'>Next</a>";
356
  } else {
357
 
358
- $addthis_options = get_option('addthis_settings');
359
- if(isset($addthis_options['above']) && isset($addthis_options['profile'])){
360
-
361
- $html .= "<a class='addthis_button' target='_blank'".
362
- "href='".self::ADDTHIS_SITE_URL."?cms=wp&pubid=".self::getPubid().
363
- "'>".
364
- "To control your AddThis plugins, click here &#8594;".
365
- "</a>";
366
-
367
- } else {
368
- $html .= "<a class='addthis_button' target='_blank'".
369
- "href='".self::ADDTHIS_SITE_URL_WITH_PUB."/".self::getPubid().
370
- "'>".
371
- "To control your AddThis plugins, click here &#8594;".
372
- "</a>";
373
- }
374
  }
375
 
 
 
 
 
376
  $html .= "<div class='addthis_seperator'>&nbsp;</div>";
377
  $html .= "<a href = '".
378
  self::getSettingsPageUrl()."&advanced_settings=true'".
@@ -460,7 +459,7 @@ class Addthis_Wordpress
460
  if (isset($this->_getVariables['pubid'])) {
461
  $pubId = $this->_getVariables['pubid'];
462
  } else {
463
- $pubId = self::getPubid();
464
  }
465
 
466
  $html .= "<input type='text' value='".$pubId."' ".
32
  $path = $pathParts['dirname'];
33
 
34
  if (!defined('ADDTHIS_PLUGIN_VERSION')) {
35
+ define('ADDTHIS_PLUGIN_VERSION', '4.0.1');
36
  }
37
 
38
  if (!defined('ADDTHIS_ATVERSION')) {
70
 
71
  /** check upgrade or fresh installation **/
72
  private $_upgrade;
73
+
74
+ /** Addthis Profile id **/
75
+ private $_pubid;
76
 
77
  /**
78
  * Initializes the plugin.
86
  $this->_upgrade = $upgrade;
87
  $this->_getVariables = $_GET;
88
  $this->_postVariables = $_POST;
89
+
90
+ $this->_pubid = self::getPubid();
91
 
92
  include_once 'addthis-toolbox.php';
93
  new Addthis_ToolBox;
182
  *
183
  * @return string
184
  */
185
+ public function updatePubid($pubId)
186
  {
187
  global $addthis_addjs;
188
  $addthis_addjs->setProfileId($pubId);
189
+ $this->_pubid = $pubId;
190
  return "<div class='addthis_updated wrap'>".
191
  "AddThis Profile ID updated successfully!!!".
192
  "</div>";
286
  '<span class="addthis-title">AddThis <sup>*</sup></span>'.
287
  '<span class="addthis-name">for WordPress</span>'.
288
  '</p>';
289
+ if ($this->_upgrade && !$this->_pubid) {
290
  $html .= $this->_getupdateSuccessMessage();
291
  }
292
 
344
  private function _getAddThisLinkButton()
345
  {
346
  $html = '';
347
+ if (!$this->_pubid) {
348
  $html = "<h2>You're almost done!</h2>";
349
  }
350
  $html .= "<div class='addthis_description'>".
351
  "Beautiful simple website tools designed to help you get ".
352
  "likes, get shares, get follows and get discovered. </div>";
353
 
354
+ if (!$this->_pubid) {
355
  // Get pub name
356
  $pubName = self::_getPubName();
357
  $html .= "<a class='addthis_button next' ".
361
  "'>Next</a>";
362
  } else {
363
 
364
+ $html .= "<a class='addthis_button' target='_blank'".
365
+ "href='".self::ADDTHIS_SITE_URL."?cms=wp&pubid=".$this->_pubid.
366
+ "'>".
367
+ "To control your AddThis plugins, click here &#8594;".
368
+ "</a>";
 
 
 
 
 
 
 
 
 
 
 
369
  }
370
 
371
+ $html .="<p class='addthis_support'> If you don’t see your tools after configuring them in the dashboard, please contact ".
372
+ "<a href='http://support.addthis.com/'>AddThis Support</a></p>";
373
+
374
+
375
  $html .= "<div class='addthis_seperator'>&nbsp;</div>";
376
  $html .= "<a href = '".
377
  self::getSettingsPageUrl()."&advanced_settings=true'".
459
  if (isset($this->_getVariables['pubid'])) {
460
  $pubId = $this->_getVariables['pubid'];
461
  } else {
462
+ $pubId = $this->_pubid;
463
  }
464
 
465
  $html .= "<input type='text' value='".$pubId."' ".
addthis-toolbox.php CHANGED
@@ -62,7 +62,11 @@ class Addthis_ToolBox
62
  public function __construct()
63
  {
64
  add_filter('the_content', array($this, 'addWidget'));
65
- add_filter('the_excerpt', array($this, 'addWidget'));
 
 
 
 
66
  }
67
 
68
  /**
@@ -146,4 +150,4 @@ class Addthis_ToolBox
146
  }
147
  return $activatedTools ? explode(',', $activatedTools) : array();
148
  }
149
- }
62
  public function __construct()
63
  {
64
  add_filter('the_content', array($this, 'addWidget'));
65
+ if ( has_excerpt()) {
66
+ add_filter('the_excerpt', array($this, 'addWidget'));
67
+ } else {
68
+ add_filter('get_the_excerpt', array($this, 'addWidget'));
69
+ }
70
  }
71
 
72
  /**
150
  }
151
  return $activatedTools ? explode(',', $activatedTools) : array();
152
  }
153
+ }
addthis_social_widget.php CHANGED
@@ -23,7 +23,7 @@
23
  * Plugin Name: AddThis for WordPress
24
  * Plugin URI: http://www.addthis.com
25
  * Description: Use the AddThis suite of website tools which includes sharing, following, recommended content, and conversion tools to help you make your website smarter. With AddThis, you can see how your users are engaging with your content, provide a personalized experience for each user and encourage them to share, subscribe or follow.
26
- * Version: 4.0
27
  *
28
  * Author: The AddThis Team
29
  * Author URI: http://www.addthis.com/blog
@@ -2127,8 +2127,8 @@ function addthis_plugin_options_php4() {
2127
  <?php if(isset($addthis_options) && !isset($addthis_options['addthis_for_wordpress'])) { ?>
2128
 
2129
  <div class="addthis_upgrade">
2130
- <b>You've upgraded successfully. </b>
2131
- &nbsp;Now sign in to the dashboard to access the full suite of tools from AddThis.
2132
  &nbsp; <a href="?page=<?php echo basename(__FILE__); ?>&upgrade=addthis_for_wordpress">Get Started</a>
2133
  </div>
2134
 
@@ -2524,4 +2524,4 @@ function addthis_deactivation_hook()
2524
  // Deactivation
2525
  register_deactivation_hook(__FILE__, 'addthis_deactivation_hook');
2526
 
2527
- }
23
  * Plugin Name: AddThis for WordPress
24
  * Plugin URI: http://www.addthis.com
25
  * Description: Use the AddThis suite of website tools which includes sharing, following, recommended content, and conversion tools to help you make your website smarter. With AddThis, you can see how your users are engaging with your content, provide a personalized experience for each user and encourage them to share, subscribe or follow.
26
+ * Version: 4.0.1
27
  *
28
  * Author: The AddThis Team
29
  * Author URI: http://www.addthis.com/blog
2127
  <?php if(isset($addthis_options) && !isset($addthis_options['addthis_for_wordpress'])) { ?>
2128
 
2129
  <div class="addthis_upgrade">
2130
+ <b>Now that you've upgraded your plugin you can access even more AddThis tools. </b>
2131
+ &nbsp;Note: Your tool configurations will be reset.
2132
  &nbsp; <a href="?page=<?php echo basename(__FILE__); ?>&upgrade=addthis_for_wordpress">Get Started</a>
2133
  </div>
2134
 
2524
  // Deactivation
2525
  register_deactivation_hook(__FILE__, 'addthis_deactivation_hook');
2526
 
2527
+ }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Smart Website Tools by AddThis ===
2
- Contributors: srijith.v, solchea, _mjk_, addthis_paul
3
  Tags: AddThis, addtoany, bookmark, bookmarking, email, e-mail, sharing buttons, share, share this, facebook, google+, pinterest, instagram, linkedin, whatsapp, social tools, website tools, twitter, content marketing, recommended content, conversion tool, subscription button, conversion tools, email tools, ecommerce tools, social marketing, personalization tools
4
  Requires at least: 3.0
5
- Tested up to: 4.0
6
- Stable tag: 4.0
7
 
8
  AddThis provides the best sharing, social, recommended content, and conversion tools to help you make
9
  your website smarter.
@@ -82,6 +82,9 @@ PHP 5+ is preferred; PHP 4 is supported.
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 4.0 =
86
  * Integrated with AddThis Dashboard.
87
 
@@ -272,6 +275,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
272
 
273
 
274
  == Upgrade Notice ==
 
 
 
275
  = 4.0 =
276
  * WordPress Plugin Upgraded with AddThis Dashboard integration and Access To Pro Tools.
277
 
1
  === Smart Website Tools by AddThis ===
2
+ Contributors: srijith.v, solchea, _mjk_, addthis_paul, abramsm
3
  Tags: AddThis, addtoany, bookmark, bookmarking, email, e-mail, sharing buttons, share, share this, facebook, google+, pinterest, instagram, linkedin, whatsapp, social tools, website tools, twitter, content marketing, recommended content, conversion tool, subscription button, conversion tools, email tools, ecommerce tools, social marketing, personalization tools
4
  Requires at least: 3.0
5
+ Tested up to: 4.1
6
+ Stable tag: 4.0.1
7
 
8
  AddThis provides the best sharing, social, recommended content, and conversion tools to help you make
9
  your website smarter.
82
 
83
  == Changelog ==
84
 
85
+ = 4.0.1 =
86
+ * Frictionless integration with AddThis Dashboard.
87
+
88
  = 4.0 =
89
  * Integrated with AddThis Dashboard.
90
 
275
 
276
 
277
  == Upgrade Notice ==
278
+ = 4.0.1 =
279
+ * Fix for automatically converting profile types to Wordpress type.
280
+
281
  = 4.0 =
282
  * WordPress Plugin Upgraded with AddThis Dashboard integration and Access To Pro Tools.
283