WordPress Share Buttons Plugin – AddThis - Version 5.2.2

Version Description

  • Fix for duplicate sharing tools showing up due to weird caching plugin behavior
  • Fix for notices in addthis_social_widget.php on lines 1291 & 1306
  • Fix for changes in wp-cli 0.21.1
Download this release

Release Info

Developer jgrodel
Plugin Icon 128x128 WordPress Share Buttons Plugin – AddThis
Version 5.2.2
Comparing to
See all releases

Code changes from version 5.2.1 to 5.2.2

AddThisWordPressConnector.php CHANGED
@@ -54,7 +54,6 @@ if (!class_exists('AddThisWordPressConnector')) {
54
  'addthis_profile',
55
  'api_key',
56
  'credential_validation_status',
57
- 'debug_enable',
58
  'debug_profile_level',
59
  'debug_profile_type',
60
  'script_location',
@@ -90,15 +89,18 @@ if (!class_exists('AddThisWordPressConnector')) {
90
  'addthis_config_recommended_json',
91
  'addthis_config_trending_json',
92
  'addthis_config_welcome_json',
93
- 'addthis_plugin_controls',
94
  // new code base only fields
 
 
 
 
 
95
  'filter_get_the_excerpt',
96
  'filter_the_excerpt',
97
  'filter_wp_trim_excerpt',
98
- 'startUpgradeAt',
99
- 'debug_enable',
100
- 'darkseid_environment',
101
  'settings_ui_base_url',
 
102
  );
103
 
104
  static $deprecatedSharedVariables = array(
54
  'addthis_profile',
55
  'api_key',
56
  'credential_validation_status',
 
57
  'debug_profile_level',
58
  'debug_profile_type',
59
  'script_location',
89
  'addthis_config_recommended_json',
90
  'addthis_config_trending_json',
91
  'addthis_config_welcome_json',
 
92
  // new code base only fields
93
+ 'ajax_support',
94
+ 'darkseid_environment',
95
+ 'debug_enable',
96
+ 'debug_profile_level',
97
+ 'debug_profile_type',
98
  'filter_get_the_excerpt',
99
  'filter_the_excerpt',
100
  'filter_wp_trim_excerpt',
101
+ 'profile_edition',
 
 
102
  'settings_ui_base_url',
103
+ 'startUpgradeAt',
104
  );
105
 
106
  static $deprecatedSharedVariables = array(
AddThisWordPressSharingButtonsPlugin.php CHANGED
@@ -25,7 +25,7 @@ if (!class_exists('AddThisWordPressSharingButtonsPlugin')) {
25
  Class AddThisWordPressSharingButtonsPlugin {
26
  // implements AddThisWordPressPluginInterface {
27
 
28
- static $version = '5.2.1';
29
  static $settingsPageId = 'addthis_social_widget';
30
  static $name = "Share Buttons by AddThis";
31
  static $productPrefix = 'wpp';
25
  Class AddThisWordPressSharingButtonsPlugin {
26
  // implements AddThisWordPressPluginInterface {
27
 
28
+ static $version = '5.2.2';
29
  static $settingsPageId = 'addthis_social_widget';
30
  static $name = "Share Buttons by AddThis";
31
  static $productPrefix = 'wpp';
addthis-for-wordpress.php CHANGED
@@ -440,10 +440,23 @@ add_action('init', 'Addthis_Wordpress_early', 0);
440
  */
441
  function Addthis_Wordpress_early()
442
  {
 
443
  global $AddThis_addjs_sharing_button_plugin;
444
  global $addThisConfigs;
445
  global $cmsConnector;
446
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  if (!isset($AddThis_addjs_sharing_button_plugin)) {
448
  include 'addthis_addjs_new.php';
449
  $AddThis_addjs_sharing_button_plugin = new AddThis_addjs_sharing_button_plugin($addThisConfigs, $cmsConnector);
440
  */
441
  function Addthis_Wordpress_early()
442
  {
443
+ global $addThisSharingButtonsPluginObject;
444
  global $AddThis_addjs_sharing_button_plugin;
445
  global $addThisConfigs;
446
  global $cmsConnector;
447
 
448
+ if (!isset($addThisSharingButtonsPluginObject)) {
449
+ $addThisSharingButtonsPluginObject = new AddThisWordPressSharingButtonsPlugin();
450
+ }
451
+
452
+ if (!isset($cmsConnector)) {
453
+ $cmsConnector = new AddThisWordPressConnector($addThisSharingButtonsPluginObject);
454
+ }
455
+
456
+ if (!isset($addThisConfigs)) {
457
+ $addThisConfigs = new AddThisConfigs($cmsConnector);
458
+ }
459
+
460
  if (!isset($AddThis_addjs_sharing_button_plugin)) {
461
  include 'addthis_addjs_new.php';
462
  $AddThis_addjs_sharing_button_plugin = new AddThis_addjs_sharing_button_plugin($addThisConfigs, $cmsConnector);
addthis-toolbox.php CHANGED
@@ -126,13 +126,13 @@ class Addthis_ToolBox
126
  }
127
 
128
  if (isset($aboveDivClass)
129
- && strpos($inputHtml, $htmlComments['above']['search']) === false
130
  ) {
131
  $content = $htmlComments['above']['comment'] . self::_buildDiv($aboveDivClass) . $content;
132
  }
133
 
134
  if (isset($belowDivClass)
135
- && strpos($inputHtml, $htmlComments['below']['search']) === false
136
  ) {
137
  $content .= $htmlComments['below']['comment'];
138
  $content .= self::_buildDiv($belowDivClass);
126
  }
127
 
128
  if (isset($aboveDivClass)
129
+ && strpos($content, $htmlComments['above']['search']) === false
130
  ) {
131
  $content = $htmlComments['above']['comment'] . self::_buildDiv($aboveDivClass) . $content;
132
  }
133
 
134
  if (isset($belowDivClass)
135
+ && strpos($content, $htmlComments['below']['search']) === false
136
  ) {
137
  $content .= $htmlComments['below']['comment'];
138
  $content .= self::_buildDiv($belowDivClass);
addthis_social_widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Share Buttons by AddThis
4
  * Plugin URI: http://www.addthis.com
5
  * 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.
6
- * Version: 5.2.1
7
  * Author: The AddThis Team
8
  * Author URI: http://www.addthis.com/
9
  * License: GPL2
@@ -174,9 +174,23 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
174
  // addthis_addjs.php is a standard class shared by the various AddThis plugins to make it easy for us to include our bootstrapping JavaScript only once. Priority should be lowest for Share plugin.
175
  add_action('init', 'addthis_early', 0);
176
  function addthis_early(){
 
177
  global $AddThis_addjs_sharing_button_plugin;
178
  global $addThisConfigs;
179
  global $cmsConnector;
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  if (!isset($AddThis_addjs_sharing_button_plugin)){
181
  require('addthis_addjs_new.php');
182
  $AddThis_addjs_sharing_button_plugin = new AddThis_addjs_sharing_button_plugin($addThisConfigs, $cmsConnector);
@@ -1288,7 +1302,7 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
1288
  && (!$excerpt || _addthis_excerpt_buttons_enabled_above())
1289
  && strpos($content, $htmlComments['above']['search']) === false
1290
  ) {
1291
- $above .= $htmlComments['above']['comment'];
1292
  $above .= addthis_display_widget_above($styles, $options);
1293
  } elseif ($displayAbove) {
1294
  $above = '';
@@ -1303,7 +1317,7 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
1303
  && (!$excerpt || _addthis_excerpt_buttons_enabled_below())
1304
  && strpos($content, $htmlComments['below']['search']) === false
1305
  ) {
1306
- $below .= $htmlComments['below']['comment'];
1307
  $below .= addthis_display_widget_below($styles, $options);
1308
  } elseif ( $excerpt
1309
  && $displayBelow
3
  * Plugin Name: Share Buttons by AddThis
4
  * Plugin URI: http://www.addthis.com
5
  * 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.
6
+ * Version: 5.2.2
7
  * Author: The AddThis Team
8
  * Author URI: http://www.addthis.com/
9
  * License: GPL2
174
  // addthis_addjs.php is a standard class shared by the various AddThis plugins to make it easy for us to include our bootstrapping JavaScript only once. Priority should be lowest for Share plugin.
175
  add_action('init', 'addthis_early', 0);
176
  function addthis_early(){
177
+ global $addThisSharingButtonsPluginObject;
178
  global $AddThis_addjs_sharing_button_plugin;
179
  global $addThisConfigs;
180
  global $cmsConnector;
181
+
182
+ if (!isset($addThisSharingButtonsPluginObject)) {
183
+ $addThisSharingButtonsPluginObject = new AddThisWordPressSharingButtonsPlugin();
184
+ }
185
+
186
+ if (!isset($cmsConnector)) {
187
+ $cmsConnector = new AddThisWordPressConnector($addThisSharingButtonsPluginObject);
188
+ }
189
+
190
+ if (!isset($addThisConfigs)) {
191
+ $addThisConfigs = new AddThisConfigs($cmsConnector);
192
+ }
193
+
194
  if (!isset($AddThis_addjs_sharing_button_plugin)){
195
  require('addthis_addjs_new.php');
196
  $AddThis_addjs_sharing_button_plugin = new AddThis_addjs_sharing_button_plugin($addThisConfigs, $cmsConnector);
1302
  && (!$excerpt || _addthis_excerpt_buttons_enabled_above())
1303
  && strpos($content, $htmlComments['above']['search']) === false
1304
  ) {
1305
+ $above = $htmlComments['above']['comment'];
1306
  $above .= addthis_display_widget_above($styles, $options);
1307
  } elseif ($displayAbove) {
1308
  $above = '';
1317
  && (!$excerpt || _addthis_excerpt_buttons_enabled_below())
1318
  && strpos($content, $htmlComments['below']['search']) === false
1319
  ) {
1320
+ $below = $htmlComments['below']['comment'];
1321
  $below .= addthis_display_widget_below($styles, $options);
1322
  } elseif ( $excerpt
1323
  && $displayBelow
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: abramsm, srijith.v, vipinss, dnrahamim, jgrodel, bradaddthiscom, m
3
  Tags: bookmarking, email sharing, facebook, linkedin, pinterest, share, sharing buttons, social marketing, social tools, twitter, whatsapp
4
  Requires at least: 3.0
5
  Tested up to: 4.3
6
- Stable tag: 5.2.1
7
 
8
  Share buttons from AddThis help you get more traffic from sharing through social networks.
9
 
@@ -76,8 +76,12 @@ In the screen options you can enable the AddThis meta box. Check the box and sav
76
 
77
  == Changelog ==
78
 
79
- = 5.2.1 =
80
  * Fix for duplicate sharing tools showing up due to weird caching plugin behavior
 
 
 
 
81
  * Renaming the plugin from AddThis Sharing Buttons to Share Buttons by AddThis
82
  * Adding AddThis EULA
83
 
@@ -399,6 +403,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
399
 
400
  == Upgrade Notice ==
401
 
 
 
 
402
  = 5.2.1 =
403
  Dupliate button issues? This may help. Also, we renamed the plugin from AddThis Sharing Buttons to Share Buttons by AddThis.
404
 
3
  Tags: bookmarking, email sharing, facebook, linkedin, pinterest, share, sharing buttons, social marketing, social tools, twitter, whatsapp
4
  Requires at least: 3.0
5
  Tested up to: 4.3
6
+ Stable tag: 5.2.2
7
 
8
  Share buttons from AddThis help you get more traffic from sharing through social networks.
9
 
76
 
77
  == Changelog ==
78
 
79
+ = 5.2.2 =
80
  * Fix for duplicate sharing tools showing up due to weird caching plugin behavior
81
+ * Fix for notices in addthis_social_widget.php on lines 1291 & 1306
82
+ * Fix for changes in wp-cli 0.21.1
83
+
84
+ = 5.2.1 =
85
  * Renaming the plugin from AddThis Sharing Buttons to Share Buttons by AddThis
86
  * Adding AddThis EULA
87
 
403
 
404
  == Upgrade Notice ==
405
 
406
+ = 5.2.2 =
407
+ Dupliate button issues? This may help. Yeah, we know we said this last time. But for real now. Also, fixes for compatibility with wp-cli 0.21.1.
408
+
409
  = 5.2.1 =
410
  Dupliate button issues? This may help. Also, we renamed the plugin from AddThis Sharing Buttons to Share Buttons by AddThis.
411