Version Description
More robust cache busting. Added support for WPEngine cache engine (Memcached, MaxCDN, Varnish), SG Optimizer, Cachify Cache, Zencache, etc.
Download this release
Release Info
Developer | shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 8.4.2 |
Comparing to | |
See all releases |
Code changes from version 8.4.1 to 8.4.2
- public.php +1 -0
- readme.txt +7 -1
- shareaholic.php +6 -3
- utilities.php +62 -26
public.php
CHANGED
@@ -549,6 +549,7 @@ class ShareaholicPublic {
|
|
549 |
|
550 |
$info = array(
|
551 |
'plugin_version' => Shareaholic::VERSION,
|
|
|
552 |
'site_id' => ShareaholicUtilities::get_option('api_key'),
|
553 |
'domain' => get_bloginfo('url'),
|
554 |
'language' => get_bloginfo('language'),
|
549 |
|
550 |
$info = array(
|
551 |
'plugin_version' => Shareaholic::VERSION,
|
552 |
+
'plugin_version_in_db' => ShareaholicUtilities::get_version(),
|
553 |
'site_id' => ShareaholicUtilities::get_option('api_key'),
|
554 |
'domain' => get_bloginfo('url'),
|
555 |
'language' => get_bloginfo('language'),
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: shareaholic
|
|
3 |
Tags: share buttons, related content, cookie compliance, eu cookie law, shareaholic, shareholic, sexybookmarks, recommendations, cookie consent, email button, social sharing, social bookmarking, share image, image sharing, follow buttons, floated share buttons, floating share buttons, analytics, social media, social plugin, facebook, twitter, google plus, google bookmarks, gmail, linkedin, pinterest, reddit, tumblr, evernote, digg, delicious, stumbleupon, printfriendly, fancy, amazon, xing, vk, yahoo, mister wong, viadeo, odnoklassniki box.net, diigo, yammer, ycombinator, hotmail, instapaper, mixi, arto, whatsapp, hootsuite, inbound.org, plurk, aim, buffer, meneame, pinboard.in, stumpedia, bitly, blogger, yummly, izeby, kaboodle, weibo, instagram, tinyurl, typepad, weheartit, flipboard, pocket, wanelo, fark, wykop, symphony, kindle, houzz, youtube, sms, onenote, google classroom, disqus, spotify, zillow, feedly, kik, line, livejournal, baidu
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.8
|
6 |
-
Stable tag: 8.4.
|
7 |
|
8 |
World's leading all-in-one Content Amplification Platform that helps grow your site traffic, engagement, conversions & monetization for FREE.
|
9 |
|
@@ -196,6 +196,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
196 |
|
197 |
== Changelog ==
|
198 |
|
|
|
|
|
|
|
199 |
= 8.4.1 (2017-09-19) =
|
200 |
* Critical bugfix for older versions of PHP
|
201 |
|
@@ -651,6 +654,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
651 |
* Show Related Posts data status
|
652 |
|
653 |
== Upgrade Notice ==
|
|
|
|
|
|
|
654 |
= 8.4.1 =
|
655 |
Critical bugfix for older versions of PHP
|
656 |
|
3 |
Tags: share buttons, related content, cookie compliance, eu cookie law, shareaholic, shareholic, sexybookmarks, recommendations, cookie consent, email button, social sharing, social bookmarking, share image, image sharing, follow buttons, floated share buttons, floating share buttons, analytics, social media, social plugin, facebook, twitter, google plus, google bookmarks, gmail, linkedin, pinterest, reddit, tumblr, evernote, digg, delicious, stumbleupon, printfriendly, fancy, amazon, xing, vk, yahoo, mister wong, viadeo, odnoklassniki box.net, diigo, yammer, ycombinator, hotmail, instapaper, mixi, arto, whatsapp, hootsuite, inbound.org, plurk, aim, buffer, meneame, pinboard.in, stumpedia, bitly, blogger, yummly, izeby, kaboodle, weibo, instagram, tinyurl, typepad, weheartit, flipboard, pocket, wanelo, fark, wykop, symphony, kindle, houzz, youtube, sms, onenote, google classroom, disqus, spotify, zillow, feedly, kik, line, livejournal, baidu
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.8
|
6 |
+
Stable tag: 8.4.2
|
7 |
|
8 |
World's leading all-in-one Content Amplification Platform that helps grow your site traffic, engagement, conversions & monetization for FREE.
|
9 |
|
196 |
|
197 |
== Changelog ==
|
198 |
|
199 |
+
= 8.4.2 (2017-09-20) =
|
200 |
+
* Enhancement: More robust cache busting. Added support for WPEngine cache engine (Memcached, MaxCDN, Varnish), SG Optimizer, Cachify Cache, Zencache, etc.
|
201 |
+
|
202 |
= 8.4.1 (2017-09-19) =
|
203 |
* Critical bugfix for older versions of PHP
|
204 |
|
654 |
* Show Related Posts data status
|
655 |
|
656 |
== Upgrade Notice ==
|
657 |
+
= 8.4.2 =
|
658 |
+
More robust cache busting. Added support for WPEngine cache engine (Memcached, MaxCDN, Varnish), SG Optimizer, Cachify Cache, Zencache, etc.
|
659 |
+
|
660 |
= 8.4.1 =
|
661 |
Critical bugfix for older versions of PHP
|
662 |
|
shareaholic.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
-
* @version 8.4.
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
11 |
Plugin URI: https://shareaholic.com/publishers/
|
12 |
Description: The world's leading all-in-one Content Amplification Platform that helps grow your website traffic, engagement, conversions & monetization. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
|
13 |
-
Version: 8.4.
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
@@ -63,7 +63,7 @@ if (!class_exists('Shareaholic')) {
|
|
63 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
64 |
const REC_API_URL = 'http://recommendations.shareaholic.com';
|
65 |
|
66 |
-
const VERSION = '8.4.
|
67 |
|
68 |
/**
|
69 |
* Starts off as false so that ::get_instance() returns
|
@@ -241,6 +241,9 @@ if (!class_exists('Shareaholic')) {
|
|
241 |
|
242 |
// Activate the Shareaholic Cron Job for new users
|
243 |
ShareaholicCron::activate();
|
|
|
|
|
|
|
244 |
}
|
245 |
|
246 |
/**
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
+
* @version 8.4.2
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
11 |
Plugin URI: https://shareaholic.com/publishers/
|
12 |
Description: The world's leading all-in-one Content Amplification Platform that helps grow your website traffic, engagement, conversions & monetization. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
|
13 |
+
Version: 8.4.2
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
63 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
64 |
const REC_API_URL = 'http://recommendations.shareaholic.com';
|
65 |
|
66 |
+
const VERSION = '8.4.2';
|
67 |
|
68 |
/**
|
69 |
* Starts off as false so that ::get_instance() returns
|
241 |
|
242 |
// Activate the Shareaholic Cron Job for new users
|
243 |
ShareaholicCron::activate();
|
244 |
+
|
245 |
+
// Clear site cache
|
246 |
+
ShareaholicUtilities::clear_cache();
|
247 |
}
|
248 |
|
249 |
/**
|
utilities.php
CHANGED
@@ -201,11 +201,7 @@ class ShareaholicUtilities {
|
|
201 |
public static function update_options($array) {
|
202 |
$old_settings = self::get_settings();
|
203 |
$new_settings = self::array_merge_recursive_distinct($old_settings, $array);
|
204 |
-
|
205 |
-
if (function_exists('wp_cache_delete')) {
|
206 |
-
wp_cache_delete('shareaholic_settings');
|
207 |
-
}
|
208 |
-
update_option('shareaholic_settings', $new_settings, false);
|
209 |
}
|
210 |
|
211 |
/**
|
@@ -344,11 +340,13 @@ class ShareaholicUtilities {
|
|
344 |
}
|
345 |
|
346 |
// Re-acquire site content. Important: Run ONLY if API KEY is set
|
|
|
347 |
$api_key = ShareaholicUtilities::get_option('api_key');
|
348 |
if (ShareaholicUtilities::has_accepted_terms_of_service() && !empty($api_key)) {
|
349 |
ShareaholicUtilities::notify_content_manager_sitemap();
|
350 |
ShareaholicUtilities::notify_content_manager_singledomain();
|
351 |
}
|
|
|
352 |
|
353 |
// Check for SS Share Counts API connectivity
|
354 |
if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
|
@@ -357,12 +355,9 @@ class ShareaholicUtilities {
|
|
357 |
|
358 |
// Activate Shareaholic Cron job
|
359 |
ShareaholicCron::activate();
|
360 |
-
|
361 |
// Clear site cache
|
362 |
-
|
363 |
-
if (!empty($version)){
|
364 |
-
ShareaholicUtilities::clear_cache();
|
365 |
-
}
|
366 |
|
367 |
// add other things that need to run on version change here
|
368 |
|
@@ -1278,26 +1273,67 @@ class ShareaholicUtilities {
|
|
1278 |
*
|
1279 |
*/
|
1280 |
public static function clear_cache() {
|
|
|
|
|
|
|
|
|
|
|
1281 |
// W3 Total Cache plugin
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
if (function_exists('wp_cache_clear_cache')) {
|
1287 |
-
|
|
|
|
|
|
|
|
|
|
|
1288 |
}
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1294 |
if (function_exists('auto_clear_cache')) {
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
|
|
|
|
|
|
|
|
1301 |
}
|
1302 |
|
1303 |
/**
|
201 |
public static function update_options($array) {
|
202 |
$old_settings = self::get_settings();
|
203 |
$new_settings = self::array_merge_recursive_distinct($old_settings, $array);
|
204 |
+
update_option('shareaholic_settings', $new_settings);
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
|
207 |
/**
|
340 |
}
|
341 |
|
342 |
// Re-acquire site content. Important: Run ONLY if API KEY is set
|
343 |
+
/*
|
344 |
$api_key = ShareaholicUtilities::get_option('api_key');
|
345 |
if (ShareaholicUtilities::has_accepted_terms_of_service() && !empty($api_key)) {
|
346 |
ShareaholicUtilities::notify_content_manager_sitemap();
|
347 |
ShareaholicUtilities::notify_content_manager_singledomain();
|
348 |
}
|
349 |
+
*/
|
350 |
|
351 |
// Check for SS Share Counts API connectivity
|
352 |
if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
|
355 |
|
356 |
// Activate Shareaholic Cron job
|
357 |
ShareaholicCron::activate();
|
358 |
+
|
359 |
// Clear site cache
|
360 |
+
ShareaholicUtilities::clear_cache();
|
|
|
|
|
|
|
361 |
|
362 |
// add other things that need to run on version change here
|
363 |
|
1273 |
*
|
1274 |
*/
|
1275 |
public static function clear_cache() {
|
1276 |
+
|
1277 |
+
// Default WordPress
|
1278 |
+
if (function_exists('wp_cache_flush')) {
|
1279 |
+
wp_cache_flush();
|
1280 |
+
}
|
1281 |
// W3 Total Cache plugin
|
1282 |
+
if (function_exists('w3tc_pgcache_flush')) {
|
1283 |
+
w3tc_pgcache_flush();
|
1284 |
+
}
|
1285 |
+
// WP Super Cache
|
1286 |
if (function_exists('wp_cache_clear_cache')) {
|
1287 |
+
if (is_multisite()) {
|
1288 |
+
$blog_id = get_current_blog_id();
|
1289 |
+
wp_cache_clear_cache($blog_id);
|
1290 |
+
} else {
|
1291 |
+
wp_cache_clear_cache();
|
1292 |
+
}
|
1293 |
}
|
1294 |
+
// Hyper Cache
|
1295 |
+
if (function_exists('hyper_cache_flush_all')) {
|
1296 |
+
hyper_cache_flush_all();
|
1297 |
+
}
|
1298 |
+
// WP Fastest Cache
|
1299 |
+
if (class_exists('WpFastestCache')) {
|
1300 |
+
$WpFastestCache = new WpFastestCache();
|
1301 |
+
if (method_exists($WpFastestCache, 'deleteCache')) {
|
1302 |
+
$WpFastestCache->deleteCache();
|
1303 |
+
}
|
1304 |
+
}
|
1305 |
+
// WPEngine
|
1306 |
+
if (class_exists('WpeCommon')) {
|
1307 |
+
if (method_exists('WpeCommon', 'purge_memcached')) {
|
1308 |
+
WpeCommon::purge_memcached();
|
1309 |
+
}
|
1310 |
+
if (method_exists('WpeCommon','clear_maxcdn_cache')) {
|
1311 |
+
WpeCommon::clear_maxcdn_cache();
|
1312 |
+
}
|
1313 |
+
if (method_exists('WpeCommon', 'purge_varnish_cache')) {
|
1314 |
+
WpeCommon::purge_varnish_cache();
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
// SG Optimizer
|
1318 |
+
if (function_exists('sg_cachepress_purge_cache')) {
|
1319 |
+
sg_cachepress_purge_cache();
|
1320 |
+
}
|
1321 |
+
// Cachify Cache
|
1322 |
+
if (has_action('cachify_flush_cache')) {
|
1323 |
+
do_action('cachify_flush_cache');
|
1324 |
+
}
|
1325 |
+
// Quick Cache
|
1326 |
if (function_exists('auto_clear_cache')) {
|
1327 |
+
auto_clear_cache();
|
1328 |
+
}
|
1329 |
+
// Zencache
|
1330 |
+
if (class_exists('zencache')) {
|
1331 |
+
zencache::clear();
|
1332 |
+
}
|
1333 |
+
// CometCache
|
1334 |
+
if (class_exists("comet_cache")) {
|
1335 |
+
comet_cache::clear();
|
1336 |
+
}
|
1337 |
}
|
1338 |
|
1339 |
/**
|