Version Description
- Bugfix: Removed an unneeded conditional check from the server side Share Counts API to make it more reliable
- Clear W3 Total Cache for clean activation and deactivation
Download this release
Release Info
Developer | shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 7.4.0.4 |
Comparing to | |
See all releases |
Code changes from version 7.4.0.3 to 7.4.0.4
- admin.php +6 -0
- lib/social-share-counts/curl_multi_share_count.php +1 -1
- readme.txt +12 -4
- shareaholic.php +6 -4
- utilities.php +22 -6
admin.php
CHANGED
@@ -250,6 +250,8 @@ class ShareaholicAdmin {
|
|
250 |
));
|
251 |
|
252 |
ShareaholicUtilities::log_event("UpdatedSettings");
|
|
|
|
|
253 |
|
254 |
}
|
255 |
|
@@ -325,6 +327,10 @@ class ShareaholicAdmin {
|
|
325 |
if (isset($_POST['shareaholic']['disable_internal_share_counts_api'])) {
|
326 |
ShareaholicUtilities::update_options(array('disable_internal_share_counts_api' => $_POST['shareaholic']['disable_internal_share_counts_api']));
|
327 |
}
|
|
|
|
|
|
|
|
|
328 |
}
|
329 |
|
330 |
ShareaholicUtilities::load_template('advanced_settings', array(
|
250 |
));
|
251 |
|
252 |
ShareaholicUtilities::log_event("UpdatedSettings");
|
253 |
+
// clear cache after settings update
|
254 |
+
ShareaholicUtilities::clear_cache();
|
255 |
|
256 |
}
|
257 |
|
327 |
if (isset($_POST['shareaholic']['disable_internal_share_counts_api'])) {
|
328 |
ShareaholicUtilities::update_options(array('disable_internal_share_counts_api' => $_POST['shareaholic']['disable_internal_share_counts_api']));
|
329 |
}
|
330 |
+
|
331 |
+
ShareaholicUtilities::log_event("UpdatedSettings");
|
332 |
+
// clear cache after settings update
|
333 |
+
ShareaholicUtilities::clear_cache();
|
334 |
}
|
335 |
|
336 |
ShareaholicUtilities::load_template('advanced_settings', array(
|
lib/social-share-counts/curl_multi_share_count.php
CHANGED
@@ -105,7 +105,7 @@ class ShareaholicCurlMultiShareCount extends ShareaholicShareCount {
|
|
105 |
curl_setopt_array($curl_handle, array(
|
106 |
CURLOPT_HEADER => 0,
|
107 |
CURLOPT_RETURNTRANSFER => 1,
|
108 |
-
CURLOPT_TIMEOUT =>
|
109 |
CURLOPT_SSL_VERIFYPEER => false,
|
110 |
CURLOPT_SSL_VERIFYHOST => false,
|
111 |
));
|
105 |
curl_setopt_array($curl_handle, array(
|
106 |
CURLOPT_HEADER => 0,
|
107 |
CURLOPT_RETURNTRANSFER => 1,
|
108 |
+
CURLOPT_TIMEOUT => 6,
|
109 |
CURLOPT_SSL_VERIFYPEER => false,
|
110 |
CURLOPT_SSL_VERIFYHOST => false,
|
111 |
));
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: shareaholic
|
3 |
Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 7.4.0.
|
7 |
|
8 |
Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
|
9 |
|
@@ -155,14 +155,18 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
155 |
|
156 |
== Changelog ==
|
157 |
|
|
|
|
|
|
|
|
|
158 |
= 7.4.0.3 =
|
159 |
* Bugfix: Added url encoding for server side Share Counts API
|
160 |
|
161 |
= 7.4.0.2 =
|
162 |
-
* Miscellaneous performance enhancements for Share Counts
|
163 |
|
164 |
= 7.4.0.1 =
|
165 |
-
* Miscellaneous performance enhancements for Share Counts
|
166 |
|
167 |
= 7.4.0.0 =
|
168 |
* Share Buttons App
|
@@ -1050,6 +1054,10 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
1050 |
|
1051 |
== Upgrade Notice ==
|
1052 |
|
|
|
|
|
|
|
|
|
1053 |
= 7.4.0.3 =
|
1054 |
|
1055 |
Added url encoding for server side Share Counts API for added reliability
|
2 |
Contributors: shareaholic
|
3 |
Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 3.9
|
6 |
+
Stable tag: 7.4.0.4
|
7 |
|
8 |
Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
|
9 |
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= 7.4.0.4 =
|
159 |
+
* Bugfix: Removed an unneeded conditional check from the server side Share Counts API to make it more reliable
|
160 |
+
* Clear W3 Total Cache for clean activation and deactivation
|
161 |
+
|
162 |
= 7.4.0.3 =
|
163 |
* Bugfix: Added url encoding for server side Share Counts API
|
164 |
|
165 |
= 7.4.0.2 =
|
166 |
+
* Miscellaneous performance enhancements for Share Counts API
|
167 |
|
168 |
= 7.4.0.1 =
|
169 |
+
* Miscellaneous performance enhancements for Share Counts API
|
170 |
|
171 |
= 7.4.0.0 =
|
172 |
* Share Buttons App
|
1054 |
|
1055 |
== Upgrade Notice ==
|
1056 |
|
1057 |
+
= 7.4.0.4 =
|
1058 |
+
|
1059 |
+
Reliability improvements to the server side Share Counts API
|
1060 |
+
|
1061 |
= 7.4.0.3 =
|
1062 |
|
1063 |
Added url encoding for server side Share Counts API for added reliability
|
shareaholic.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
-
* @version 7.4.0.
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
11 |
Plugin URI: https://shareaholic.com/publishers/
|
12 |
Description: Whether you want to get people sharing, grow your fans, make money, or know who's reading your content, Shareaholic will help you get it done. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
|
13 |
-
Version: 7.4.0.
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
@@ -61,7 +61,7 @@ class Shareaholic {
|
|
61 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
62 |
const REC_API_URL = 'http://recommendations.shareaholic.com';
|
63 |
|
64 |
-
const VERSION = '7.4.0.
|
65 |
|
66 |
/**
|
67 |
* Starts off as false so that ::get_instance() returns
|
@@ -132,7 +132,7 @@ class Shareaholic {
|
|
132 |
|
133 |
/**
|
134 |
* This function initializes the plugin so that everything is scoped
|
135 |
-
* under the class and no
|
136 |
*/
|
137 |
public static function init() {
|
138 |
self::update();
|
@@ -164,6 +164,7 @@ class Shareaholic {
|
|
164 |
ShareaholicUtilities::perform_update();
|
165 |
ShareaholicUtilities::set_version(self::VERSION);
|
166 |
ShareaholicUtilities::notify_content_manager_singledomain();
|
|
|
167 |
// Call the share counts api to check for connectivity on update
|
168 |
if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
|
169 |
ShareaholicUtilities::share_counts_api_connectivity_check();
|
@@ -208,6 +209,7 @@ class Shareaholic {
|
|
208 |
*/
|
209 |
public function deactivate() {
|
210 |
ShareaholicUtilities::log_event("Deactivate");
|
|
|
211 |
}
|
212 |
|
213 |
/**
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
+
* @version 7.4.0.4
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
11 |
Plugin URI: https://shareaholic.com/publishers/
|
12 |
Description: Whether you want to get people sharing, grow your fans, make money, or know who's reading your content, Shareaholic will help you get it done. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
|
13 |
+
Version: 7.4.0.4
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
61 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
62 |
const REC_API_URL = 'http://recommendations.shareaholic.com';
|
63 |
|
64 |
+
const VERSION = '7.4.0.4';
|
65 |
|
66 |
/**
|
67 |
* Starts off as false so that ::get_instance() returns
|
132 |
|
133 |
/**
|
134 |
* This function initializes the plugin so that everything is scoped
|
135 |
+
* under the class and no variables leak outside.
|
136 |
*/
|
137 |
public static function init() {
|
138 |
self::update();
|
164 |
ShareaholicUtilities::perform_update();
|
165 |
ShareaholicUtilities::set_version(self::VERSION);
|
166 |
ShareaholicUtilities::notify_content_manager_singledomain();
|
167 |
+
|
168 |
// Call the share counts api to check for connectivity on update
|
169 |
if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
|
170 |
ShareaholicUtilities::share_counts_api_connectivity_check();
|
209 |
*/
|
210 |
public function deactivate() {
|
211 |
ShareaholicUtilities::log_event("Deactivate");
|
212 |
+
ShareaholicUtilities::clear_cache();
|
213 |
}
|
214 |
|
215 |
/**
|
utilities.php
CHANGED
@@ -323,6 +323,11 @@ class ShareaholicUtilities {
|
|
323 |
self::update_options(array('disable_og_tags' => 'off'));
|
324 |
self::update_options(array('metakey_6to7_upgraded' => 'true'));
|
325 |
}
|
|
|
|
|
|
|
|
|
|
|
326 |
// any other things that need to be updated
|
327 |
}
|
328 |
|
@@ -663,7 +668,7 @@ class ShareaholicUtilities {
|
|
663 |
);
|
664 |
|
665 |
ShareaholicUtilities::turn_on_locations($turn_on, $turn_off);
|
666 |
-
|
667 |
} else {
|
668 |
ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
|
669 |
}
|
@@ -947,8 +952,7 @@ class ShareaholicUtilities {
|
|
947 |
*
|
948 |
* @return array Where header => header value
|
949 |
*/
|
950 |
-
public static function add_header_xua($headers)
|
951 |
-
{
|
952 |
if(!isset($headers['X-UA-Compatible'])) {
|
953 |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1';
|
954 |
}
|
@@ -959,10 +963,22 @@ class ShareaholicUtilities {
|
|
959 |
* Draws xua meta tag
|
960 |
*
|
961 |
*/
|
962 |
-
public static function draw_meta_xua()
|
963 |
-
{
|
964 |
echo '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">';
|
965 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
|
967 |
/**
|
968 |
* Server Connectivity check
|
@@ -1034,7 +1050,7 @@ class ShareaholicUtilities {
|
|
1034 |
$has_important_services = true;
|
1035 |
// Does it have counts for twtr, fb, linkedin, pinterest, and delicious?
|
1036 |
foreach (array('twitter', 'facebook', 'linkedin', 'pinterest', 'delicious') as $service) {
|
1037 |
-
if (!isset($response['body']['data'][$service]) || !is_numeric($response['body']['data'][$service])
|
1038 |
$has_important_services = false;
|
1039 |
}
|
1040 |
}
|
323 |
self::update_options(array('disable_og_tags' => 'off'));
|
324 |
self::update_options(array('metakey_6to7_upgraded' => 'true'));
|
325 |
}
|
326 |
+
|
327 |
+
$version = ShareaholicUtilities::get_version();
|
328 |
+
if (!empty($version)){
|
329 |
+
ShareaholicUtilities::clear_cache();
|
330 |
+
}
|
331 |
// any other things that need to be updated
|
332 |
}
|
333 |
|
668 |
);
|
669 |
|
670 |
ShareaholicUtilities::turn_on_locations($turn_on, $turn_off);
|
671 |
+
ShareaholicUtilities::clear_cache();
|
672 |
} else {
|
673 |
ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
|
674 |
}
|
952 |
*
|
953 |
* @return array Where header => header value
|
954 |
*/
|
955 |
+
public static function add_header_xua($headers) {
|
|
|
956 |
if(!isset($headers['X-UA-Compatible'])) {
|
957 |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1';
|
958 |
}
|
963 |
* Draws xua meta tag
|
964 |
*
|
965 |
*/
|
966 |
+
public static function draw_meta_xua() {
|
|
|
967 |
echo '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">';
|
968 |
}
|
969 |
+
|
970 |
+
/*
|
971 |
+
* Clear caching plugins
|
972 |
+
*
|
973 |
+
*/
|
974 |
+
public static function clear_cache() {
|
975 |
+
// W3 Total Cache plugin
|
976 |
+
if (function_exists('w3tc_pgcache_flush')) {
|
977 |
+
w3tc_pgcache_flush();
|
978 |
+
}
|
979 |
+
|
980 |
+
//TODO: Quick Cache, WP Super Cache
|
981 |
+
}
|
982 |
|
983 |
/**
|
984 |
* Server Connectivity check
|
1050 |
$has_important_services = true;
|
1051 |
// Does it have counts for twtr, fb, linkedin, pinterest, and delicious?
|
1052 |
foreach (array('twitter', 'facebook', 'linkedin', 'pinterest', 'delicious') as $service) {
|
1053 |
+
if (!isset($response['body']['data'][$service]) || !is_numeric($response['body']['data'][$service])) {
|
1054 |
$has_important_services = false;
|
1055 |
}
|
1056 |
}
|