Version Description
- Removing data-title and addthis:title attributes from inline tool HTML so that Open Graph tags can be used.
- Replacing deprecated update_usermeta with update_user_meta
- Replacing deprecated delete_usermeta with delete_user_meta
- Updating link to configure tools at AddThis.com
- Compatibility improvements for Follow Buttons by AddThis, Related Posts by AddThis, Website Tools by AddThis & Smart Layers by AddThis.
Download this release
Release Info
Developer | jgrodel |
Plugin | WordPress Share Buttons Plugin – AddThis |
Version | 5.3.5 |
Comparing to | |
See all releases |
Code changes from version 5.3.4 to 5.3.5
- AddThisWordPressConnector.php +18 -19
- AddThisWordPressSharingButtonsPlugin.php +1 -1
- addthis-toolbox.php +1 -2
- addthis_post_metabox.php +0 -101
- addthis_social_widget.php +5 -12
- readme.txt +12 -2
AddThisWordPressConnector.php
CHANGED
@@ -45,26 +45,36 @@ if (!class_exists('AddThisWordPressConnector')) {
|
|
45 |
);
|
46 |
|
47 |
static $sharedVariables = array(
|
48 |
-
|
49 |
'addthis_anonymous_profile',
|
50 |
'addthis_asynchronous_loading',
|
51 |
-
'addthis_environment',
|
52 |
'addthis_per_post_enabled',
|
53 |
-
'addthis_plugin_controls',
|
54 |
'addthis_profile',
|
55 |
-
'api_key',
|
56 |
'addthis_rate_us',
|
57 |
'addthis_rate_us_timestamp',
|
|
|
|
|
|
|
58 |
'credential_validation_status',
|
59 |
-
'
|
60 |
-
'
|
|
|
61 |
'script_location',
|
|
|
62 |
'wpfooter',
|
63 |
'xmlns_attrs',
|
64 |
'follow_buttons_feature_enabled',
|
65 |
'recommended_content_feature_enabled',
|
66 |
'sharing_buttons_feature_enabled',
|
67 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
// addthis_share
|
69 |
'addthis_twitter_template',
|
70 |
'addthis_bitly',
|
@@ -79,6 +89,7 @@ if (!class_exists('AddThisWordPressConnector')) {
|
|
79 |
'addthis_layers_recommended_json',
|
80 |
'addthis_layers_trending_json',
|
81 |
'addthis_layers_welcome_json',
|
|
|
82 |
// addthis_config
|
83 |
'data_ga_property',
|
84 |
'addthis_language',
|
@@ -91,18 +102,6 @@ if (!class_exists('AddThisWordPressConnector')) {
|
|
91 |
'addthis_config_recommended_json',
|
92 |
'addthis_config_trending_json',
|
93 |
'addthis_config_welcome_json',
|
94 |
-
// new code base only fields
|
95 |
-
'ajax_support',
|
96 |
-
'darkseid_environment',
|
97 |
-
'debug_enable',
|
98 |
-
'debug_profile_level',
|
99 |
-
'debug_profile_type',
|
100 |
-
'filter_get_the_excerpt',
|
101 |
-
'filter_the_excerpt',
|
102 |
-
'filter_wp_trim_excerpt',
|
103 |
-
'profile_edition',
|
104 |
-
'settings_ui_base_url',
|
105 |
-
'startUpgradeAt',
|
106 |
);
|
107 |
|
108 |
static $deprecatedSharedVariables = array(
|
45 |
);
|
46 |
|
47 |
static $sharedVariables = array(
|
48 |
+
// general
|
49 |
'addthis_anonymous_profile',
|
50 |
'addthis_asynchronous_loading',
|
|
|
51 |
'addthis_per_post_enabled',
|
|
|
52 |
'addthis_profile',
|
|
|
53 |
'addthis_rate_us',
|
54 |
'addthis_rate_us_timestamp',
|
55 |
+
'profile_edition',
|
56 |
+
'api_key',
|
57 |
+
'ajax_support',
|
58 |
'credential_validation_status',
|
59 |
+
'filter_get_the_excerpt',
|
60 |
+
'filter_the_excerpt',
|
61 |
+
'filter_wp_trim_excerpt',
|
62 |
'script_location',
|
63 |
+
'startUpgradeAt',
|
64 |
'wpfooter',
|
65 |
'xmlns_attrs',
|
66 |
'follow_buttons_feature_enabled',
|
67 |
'recommended_content_feature_enabled',
|
68 |
'sharing_buttons_feature_enabled',
|
69 |
+
'html',
|
70 |
+
'enqueue_client',
|
71 |
+
'enqueue_local_settings',
|
72 |
+
// debug settings
|
73 |
+
'debug_enable',
|
74 |
+
'addthis_plugin_controls',
|
75 |
+
'addthis_environment',
|
76 |
+
'darkseid_environment',
|
77 |
+
'settings_ui_base_url',
|
78 |
// addthis_share
|
79 |
'addthis_twitter_template',
|
80 |
'addthis_bitly',
|
89 |
'addthis_layers_recommended_json',
|
90 |
'addthis_layers_trending_json',
|
91 |
'addthis_layers_welcome_json',
|
92 |
+
'smart_layers_bad_json',
|
93 |
// addthis_config
|
94 |
'data_ga_property',
|
95 |
'addthis_language',
|
102 |
'addthis_config_recommended_json',
|
103 |
'addthis_config_trending_json',
|
104 |
'addthis_config_welcome_json',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
);
|
106 |
|
107 |
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.3.
|
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.3.5';
|
29 |
static $settingsPageId = 'addthis_social_widget';
|
30 |
static $name = "Share Buttons by AddThis";
|
31 |
static $productPrefix = 'wpp';
|
addthis-toolbox.php
CHANGED
@@ -159,11 +159,10 @@ class Addthis_ToolBox
|
|
159 |
*/
|
160 |
private static function _buildDiv($class, $inline_data = true)
|
161 |
{
|
162 |
-
$title = get_the_title();
|
163 |
$url = get_permalink();
|
164 |
if($inline_data == true){
|
165 |
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'".
|
166 |
-
" data-
|
167 |
"</div>";
|
168 |
} else {
|
169 |
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'></div>";
|
159 |
*/
|
160 |
private static function _buildDiv($class, $inline_data = true)
|
161 |
{
|
|
|
162 |
$url = get_permalink();
|
163 |
if($inline_data == true){
|
164 |
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'".
|
165 |
+
" data-url='".$url."'>".
|
166 |
"</div>";
|
167 |
} else {
|
168 |
return "<div class='".$class." addthis_default_style addthis_toolbox at-wordpress-hide'></div>";
|
addthis_post_metabox.php
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* +--------------------------------------------------------------------------+
|
4 |
-
* | Copyright (c) 2008-2015 AddThis, LLC |
|
5 |
-
* +--------------------------------------------------------------------------+
|
6 |
-
* | This program is free software; you can redistribute it and/or modify |
|
7 |
-
* | it under the terms of the GNU General Public License as published by |
|
8 |
-
* | the Free Software Foundation; either version 2 of the License, or |
|
9 |
-
* | (at your option) any later version. |
|
10 |
-
* | |
|
11 |
-
* | This program is distributed in the hope that it will be useful, |
|
12 |
-
* | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
-
* | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
-
* | GNU General Public License for more details. |
|
15 |
-
* | |
|
16 |
-
* | You should have received a copy of the GNU General Public License |
|
17 |
-
* | along with this program; if not, write to the Free Software |
|
18 |
-
* | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
19 |
-
* +--------------------------------------------------------------------------+
|
20 |
-
*/
|
21 |
-
|
22 |
-
class addthis_post_metabox{
|
23 |
-
|
24 |
-
function admin_init()
|
25 |
-
{
|
26 |
-
$screens = array('post', 'page');
|
27 |
-
|
28 |
-
foreach($screens as $screen) {
|
29 |
-
add_meta_box(
|
30 |
-
'addthis',
|
31 |
-
'AddThis',
|
32 |
-
array($this, 'post_metabox'),
|
33 |
-
$screen,
|
34 |
-
'side',
|
35 |
-
'default'
|
36 |
-
);
|
37 |
-
}
|
38 |
-
|
39 |
-
add_action('save_post', array($this, 'save_post'));
|
40 |
-
|
41 |
-
add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'));
|
42 |
-
}
|
43 |
-
|
44 |
-
function default_hidden_meta_boxes($hidden)
|
45 |
-
{
|
46 |
-
$hidden[] = 'addthis';
|
47 |
-
return $hidden;
|
48 |
-
}
|
49 |
-
|
50 |
-
function post_metabox(){
|
51 |
-
global $post_id;
|
52 |
-
|
53 |
-
if ( is_null($post_id) )
|
54 |
-
$checked = '';
|
55 |
-
else
|
56 |
-
{
|
57 |
-
$custom_fields = get_post_custom($post_id);
|
58 |
-
$checked = ( isset ($custom_fields['addthis_exclude']) ) ? 'checked="checked"' : '' ;
|
59 |
-
}
|
60 |
-
|
61 |
-
wp_nonce_field('addthis_postmetabox_nonce', 'addthis_postmetabox_nonce');
|
62 |
-
echo '<label for="addthis_show_option">';
|
63 |
-
_e("Remove AddThis:", 'myplugin_textdomain' );
|
64 |
-
echo '</label> ';
|
65 |
-
echo '<input type="checkbox" id="addthis_show_option" name="addthis_show_option" value="1" '.$checked.'>';
|
66 |
-
}
|
67 |
-
|
68 |
-
function save_post($post_id)
|
69 |
-
{
|
70 |
-
global $post;
|
71 |
-
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
72 |
-
return;
|
73 |
-
|
74 |
-
if ( ! isset($_POST['addthis_postmetabox_nonce'] ) || !wp_verify_nonce( $_POST['addthis_postmetabox_nonce'], 'addthis_postmetabox_nonce' ) )
|
75 |
-
return;
|
76 |
-
|
77 |
-
if ( ! isset($_POST['addthis_show_option']) )
|
78 |
-
{
|
79 |
-
delete_post_meta($post_id, 'addthis_exclude');
|
80 |
-
}
|
81 |
-
else
|
82 |
-
{
|
83 |
-
delete_post_meta($post_id, 'addthis_exclude');
|
84 |
-
$custom_fields = get_post_custom($post_id);
|
85 |
-
if (! isset ($custom_fields['addthis_exclude'][0]) && ($post->post_type=="post") )
|
86 |
-
{
|
87 |
-
add_post_meta($post_id, 'addthis_exclude', 'true');
|
88 |
-
}
|
89 |
-
else
|
90 |
-
{
|
91 |
-
update_post_meta($post_id, 'addthis_exclude', 'true' , $custom_fields['addthis_exclude'][0] );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
$addthis_post_metabox = new addthis_post_metabox;
|
100 |
-
add_action('admin_init', array($addthis_post_metabox, 'admin_init'));
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.3.
|
7 |
* Author: The AddThis Team
|
8 |
* Author URI: http://www.addthis.com/
|
9 |
* License: GPL2
|
@@ -470,18 +470,10 @@ if ($addthis_options['addthis_plugin_controls'] == "AddThis") {
|
|
470 |
$url = get_permalink();
|
471 |
}
|
472 |
|
473 |
-
if (is_null($title)) {
|
474 |
-
$title = esc_attr(get_the_title());
|
475 |
-
}
|
476 |
-
|
477 |
if (!is_null($url)) {
|
478 |
$identifier = "addthis:url='$url' ";
|
479 |
}
|
480 |
|
481 |
-
if (!is_null($title)) {
|
482 |
-
$identifier .= "addthis:title='$title'";
|
483 |
-
}
|
484 |
-
|
485 |
if (!isset($identifier)) {
|
486 |
$identifier = '';
|
487 |
}
|
@@ -1970,7 +1962,7 @@ EOF;
|
|
1970 |
{
|
1971 |
function delete_user_meta($userid, $metakey, $ignored = '')
|
1972 |
{
|
1973 |
-
return
|
1974 |
}
|
1975 |
}
|
1976 |
|
@@ -1978,7 +1970,7 @@ EOF;
|
|
1978 |
{
|
1979 |
function add_user_meta($userid, $metakey, $metavalue)
|
1980 |
{
|
1981 |
-
return
|
1982 |
}
|
1983 |
}
|
1984 |
if (! function_exists('get_home_url'))
|
@@ -2095,7 +2087,8 @@ function _addthis_analytics_url() {
|
|
2095 |
function _addthis_tools_url() {
|
2096 |
global $addThisConfigs;
|
2097 |
$addthis_options = $addThisConfigs->getConfigs();
|
2098 |
-
$toolsUrl = 'https://www.addthis.com/
|
|
|
2099 |
return $toolsUrl;
|
2100 |
}
|
2101 |
|
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.3.5
|
7 |
* Author: The AddThis Team
|
8 |
* Author URI: http://www.addthis.com/
|
9 |
* License: GPL2
|
470 |
$url = get_permalink();
|
471 |
}
|
472 |
|
|
|
|
|
|
|
|
|
473 |
if (!is_null($url)) {
|
474 |
$identifier = "addthis:url='$url' ";
|
475 |
}
|
476 |
|
|
|
|
|
|
|
|
|
477 |
if (!isset($identifier)) {
|
478 |
$identifier = '';
|
479 |
}
|
1962 |
{
|
1963 |
function delete_user_meta($userid, $metakey, $ignored = '')
|
1964 |
{
|
1965 |
+
return delete_user_meta($userid, $metakey);
|
1966 |
}
|
1967 |
}
|
1968 |
|
1970 |
{
|
1971 |
function add_user_meta($userid, $metakey, $metavalue)
|
1972 |
{
|
1973 |
+
return update_user_meta($userid, $metakey, $metavalue);
|
1974 |
}
|
1975 |
}
|
1976 |
if (! function_exists('get_home_url'))
|
2087 |
function _addthis_tools_url() {
|
2088 |
global $addThisConfigs;
|
2089 |
$addthis_options = $addThisConfigs->getConfigs();
|
2090 |
+
$toolsUrl = 'https://www.addthis.com/dashboard#gallery/pub/'. $addThisConfigs->getProfileId();
|
2091 |
+
|
2092 |
return $toolsUrl;
|
2093 |
}
|
2094 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: abramsm, srijith.v, vipinss, dnrahamim, jgrodel, bradaddthiscom, mkitzman, addthis_paul, addthis_matt, addthis_elsa, ribin_addthis, AddThis_Mike
|
3 |
Tags: AddThis, bookmark, bookmarking, Facebook, LinkedIn, mobile, mobile sharing, Pinterest, plugin, share, share button, share buttons, share buttons plugin, sharing, sharing buttons, sharing sidebar, sidebar, social buttons, social tools, twitter, widget
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 5.3.
|
7 |
|
8 |
Increase social traffic to your website with WordPress share buttons that connect directly to over 200 social networks.
|
9 |
|
@@ -112,6 +112,13 @@ In the screen options you can enable the AddThis meta box. Check the box and sav
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
= 5.3.4 =
|
116 |
* Removing reporting of WordPress version for non-admin users
|
117 |
|
@@ -463,6 +470,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
|
|
463 |
|
464 |
== Upgrade Notice ==
|
465 |
|
|
|
|
|
|
|
466 |
= 5.3.4 =
|
467 |
Removing reporting of WordPress version for non-admin users.
|
468 |
|
2 |
Contributors: abramsm, srijith.v, vipinss, dnrahamim, jgrodel, bradaddthiscom, mkitzman, addthis_paul, addthis_matt, addthis_elsa, ribin_addthis, AddThis_Mike
|
3 |
Tags: AddThis, bookmark, bookmarking, Facebook, LinkedIn, mobile, mobile sharing, Pinterest, plugin, share, share button, share buttons, share buttons plugin, sharing, sharing buttons, sharing sidebar, sidebar, social buttons, social tools, twitter, widget
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.7.3
|
6 |
+
Stable tag: 5.3.5
|
7 |
|
8 |
Increase social traffic to your website with WordPress share buttons that connect directly to over 200 social networks.
|
9 |
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 5.3.5 =
|
116 |
+
* Removing data-title and addthis:title attributes from inline tool HTML so that Open Graph tags can be used.
|
117 |
+
* Replacing deprecated update_usermeta with update_user_meta
|
118 |
+
* Replacing deprecated delete_usermeta with delete_user_meta
|
119 |
+
* Updating link to configure tools at AddThis.com
|
120 |
+
* Compatibility improvements for <a href="https://wordpress.org/plugins/addthis-follow/">Follow Buttons by AddThis</a>, <a href="https://wordpress.org/plugins/addthis-related-posts/">Related Posts by AddThis</a>, <a href="https://wordpress.org/plugins/addthis-all/">Website Tools by AddThis</a> & <a href="https://wordpress.org/plugins/addthis-smart-layers/">Smart Layers by AddThis</a>.
|
121 |
+
|
122 |
= 5.3.4 =
|
123 |
* Removing reporting of WordPress version for non-admin users
|
124 |
|
470 |
|
471 |
== Upgrade Notice ==
|
472 |
|
473 |
+
= 5.3.5 =
|
474 |
+
Removing data-title and addthis:title attributes from inline tool HTML so that Open Graph tags can be used. Replacing some deprecated functions. Compatibility improvements for <a href="https://wordpress.org/plugins/addthis-follow/">Follow Buttons by AddThis</a>, <a href="https://wordpress.org/plugins/addthis-related-posts/">Related Posts by AddThis</a>, <a href="https://wordpress.org/plugins/addthis-all/">Website Tools by AddThis</a> & <a href="https://wordpress.org/plugins/addthis-smart-layers/">Smart Layers by AddThis</a>.
|
475 |
+
|
476 |
= 5.3.4 =
|
477 |
Removing reporting of WordPress version for non-admin users.
|
478 |
|