Version Description
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!
Download this release
Release Info
Developer | shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 8.13.15 |
Comparing to | |
See all releases |
Code changes from version 8.13.14 to 8.13.15
- public.php +1 -5
- readme.txt +9 -5
- shareaholic.php +3 -3
- utilities.php +55 -40
public.php
CHANGED
@@ -456,7 +456,7 @@ class ShareaholicPublic {
|
|
456 |
$summary = ShareaholicUtilities::truncate_text( $summary, 500 );
|
457 |
}
|
458 |
|
459 |
-
$canvas = "<div class='shareaholic-canvas'
|
460 |
data-app='$app'
|
461 |
data-title='$title'
|
462 |
data-link='$link'";
|
@@ -465,10 +465,6 @@ class ShareaholicPublic {
|
|
465 |
$canvas .= " data-summary='$summary'";
|
466 |
}
|
467 |
|
468 |
-
if ( $id != null ) {
|
469 |
-
$canvas .= " data-app-id='$id'";
|
470 |
-
}
|
471 |
-
|
472 |
if ( $id_name != null ) {
|
473 |
$canvas .= " data-app-id-name='$id_name'";
|
474 |
}
|
456 |
$summary = ShareaholicUtilities::truncate_text( $summary, 500 );
|
457 |
}
|
458 |
|
459 |
+
$canvas = "<div style='display:none;' class='shareaholic-canvas'
|
460 |
data-app='$app'
|
461 |
data-title='$title'
|
462 |
data-link='$link'";
|
465 |
$canvas .= " data-summary='$summary'";
|
466 |
}
|
467 |
|
|
|
|
|
|
|
|
|
468 |
if ( $id_name != null ) {
|
469 |
$canvas .= " data-app-id-name='$id_name'";
|
470 |
}
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
===
|
2 |
Contributors: shareaholic
|
3 |
-
Tags: social, social sharing, google analytics, pinterest, twitter, share buttons, content, woocommerce, typepad, amazon, analytics, arto, baidu, bitly, blogger, buffer, cookie compliance, cookie consent, delicious, digg, diigo, disqus, email button,
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 8.13.
|
8 |
|
9 |
|
10 |
Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
|
@@ -311,7 +311,11 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
|
|
311 |
|
312 |
== Changelog ==
|
313 |
|
314 |
-
= 8.13.
|
|
|
|
|
|
|
|
|
315 |
* Feature: Check Share Share Counts from Admin Menu
|
316 |
* Enhancement: Fewer scripts in Admin section
|
317 |
* Enhancement: Better Admin UX
|
@@ -1021,7 +1025,7 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
|
|
1021 |
* Show Related Posts data status
|
1022 |
|
1023 |
== Upgrade Notice ==
|
1024 |
-
= 8.13.
|
1025 |
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!
|
1026 |
|
1027 |
= 8.12.1 =
|
1 |
+
=== Social Sharing Buttons, Related Posts, Google Analytics - Shareaholic ===
|
2 |
Contributors: shareaholic
|
3 |
+
Tags: social, social sharing, google analytics, pinterest, twitter, share buttons, content, woocommerce, typepad, amazon, analytics, arto, baidu, bitly, blogger, buffer, cookie compliance, cookie consent, delicious, digg, diigo, disqus, email button, evernote, facebook, facebook sharing, fancy, fark, feedly, flipboard, floated share buttons, floating share buttons, follow buttons, GDPR, gmail, google bookmarks, google classroom, hootsuite, houzz, instagram, instagram sharing, instapaper, kik, kindle, line, linkedin, livejournal, meneame, mix, mixi, odnoklassniki, box.net, onenote, pinboard.in, pinterest, pinterest sharing, plurk, pocket, printfriendly, recommendations, reddit, sexybookmarks, share buttons, share image, shareaholic, shareholic, sms, social bookmarking, social media, social plugin, social share buttons, spotify, stumbleupon, stumpedia, symphony, tinyurl, tumblr, twitter, viadeo, vk, wanelo, wechat, weheartit, weibo, whatsapp, wykop, xing, yahoo, yammer, ycombinator, hacker news, youtube, yummly, zillow
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 8.13.15
|
8 |
|
9 |
|
10 |
Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
|
311 |
|
312 |
== Changelog ==
|
313 |
|
314 |
+
= 8.13.15 (2020-02-13) =
|
315 |
+
* Bugfix: Set correct status defaults on the backend upon setup for In-Page blocks
|
316 |
+
* Enhancement: Set canvas div's to hidden initially and do not include in-page app IDs
|
317 |
+
|
318 |
+
= 8.13.14 (2020-02-11) =
|
319 |
* Feature: Check Share Share Counts from Admin Menu
|
320 |
* Enhancement: Fewer scripts in Admin section
|
321 |
* Enhancement: Better Admin UX
|
1025 |
* Show Related Posts data status
|
1026 |
|
1027 |
== Upgrade Notice ==
|
1028 |
+
= 8.13.15 =
|
1029 |
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!
|
1030 |
|
1031 |
= 8.12.1 =
|
shareaholic.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Shareaholic - Grow and Engage Your Audience
|
4 |
Plugin URI: https://www.shareaholic.com/website-tools/
|
5 |
Description: Shareaholic’s official WordPress plugin allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
|
6 |
-
Version: 8.13.
|
7 |
Author: Shareaholic
|
8 |
Author URI: https://www.shareaholic.com
|
9 |
Text Domain: shareaholic
|
@@ -14,7 +14,7 @@ Domain Path: /languages
|
|
14 |
* The main file!
|
15 |
*
|
16 |
* @package shareaholic
|
17 |
-
* @version 8.13.
|
18 |
*/
|
19 |
|
20 |
/**
|
@@ -71,7 +71,7 @@ if ( ! class_exists( 'Shareaholic' ) ) {
|
|
71 |
const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
72 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
73 |
|
74 |
-
const VERSION = '8.13.
|
75 |
|
76 |
/**
|
77 |
* Starts off as false so that ::get_instance() returns
|
3 |
Plugin Name: Shareaholic - Grow and Engage Your Audience
|
4 |
Plugin URI: https://www.shareaholic.com/website-tools/
|
5 |
Description: Shareaholic’s official WordPress plugin allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
|
6 |
+
Version: 8.13.15
|
7 |
Author: Shareaholic
|
8 |
Author URI: https://www.shareaholic.com
|
9 |
Text Domain: shareaholic
|
14 |
* The main file!
|
15 |
*
|
16 |
* @package shareaholic
|
17 |
+
* @version 8.13.15
|
18 |
*/
|
19 |
|
20 |
/**
|
71 |
const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
72 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
73 |
|
74 |
+
const VERSION = '8.13.15';
|
75 |
|
76 |
/**
|
77 |
* Starts off as false so that ::get_instance() returns
|
utilities.php
CHANGED
@@ -659,6 +659,20 @@ class ShareaholicUtilities {
|
|
659 |
delete_option( 'shareaholic_perform_update' );
|
660 |
}
|
661 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
662 |
/**
|
663 |
* Checks whether a plugin is active
|
664 |
*
|
@@ -673,6 +687,22 @@ class ShareaholicUtilities {
|
|
673 |
}
|
674 |
}
|
675 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
/**
|
677 |
* Returns Stats
|
678 |
*/
|
@@ -688,20 +718,6 @@ class ShareaholicUtilities {
|
|
688 |
return ( isset( $stats ) ? $stats : array() );
|
689 |
}
|
690 |
|
691 |
-
/**
|
692 |
-
* Returns Active Plugins
|
693 |
-
*/
|
694 |
-
public static function get_active_plugins() {
|
695 |
-
$active_plugins = (array) get_option( 'active_plugins', array() );
|
696 |
-
|
697 |
-
if ( is_multisite() ) {
|
698 |
-
$network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
|
699 |
-
$active_plugins = array_merge( $active_plugins, array_keys( $network_plugins ) );
|
700 |
-
}
|
701 |
-
|
702 |
-
return ( isset( $active_plugins ) ? array_values( array_unique( $active_plugins ) ) : array() );
|
703 |
-
}
|
704 |
-
|
705 |
/**
|
706 |
* Returns Local Share Count Proxy Status
|
707 |
*/
|
@@ -816,9 +832,6 @@ class ShareaholicUtilities {
|
|
816 |
}
|
817 |
}
|
818 |
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
/**
|
823 |
* Get share buttons locations that should be turned on by default
|
824 |
*
|
@@ -829,18 +842,22 @@ class ShareaholicUtilities {
|
|
829 |
array(
|
830 |
'name' => 'post_below_content',
|
831 |
'counter' => 'badge-counter',
|
|
|
832 |
),
|
833 |
array(
|
834 |
'name' => 'page_below_content',
|
835 |
'counter' => 'badge-counter',
|
|
|
836 |
),
|
837 |
array(
|
838 |
'name' => 'index_below_content',
|
839 |
'counter' => 'badge-counter',
|
|
|
840 |
),
|
841 |
array(
|
842 |
'name' => 'category_below_content',
|
843 |
'counter' => 'badge-counter',
|
|
|
844 |
),
|
845 |
);
|
846 |
}
|
@@ -855,18 +872,22 @@ class ShareaholicUtilities {
|
|
855 |
array(
|
856 |
'name' => 'post_above_content',
|
857 |
'counter' => 'badge-counter',
|
|
|
858 |
),
|
859 |
array(
|
860 |
'name' => 'page_above_content',
|
861 |
'counter' => 'badge-counter',
|
|
|
862 |
),
|
863 |
array(
|
864 |
'name' => 'index_above_content',
|
865 |
'counter' => 'badge-counter',
|
|
|
866 |
),
|
867 |
array(
|
868 |
'name' => 'category_above_content',
|
869 |
'counter' => 'badge-counter',
|
|
|
870 |
),
|
871 |
);
|
872 |
}
|
@@ -878,12 +899,17 @@ class ShareaholicUtilities {
|
|
878 |
*/
|
879 |
public static function get_default_rec_on_locations() {
|
880 |
return array(
|
881 |
-
array(
|
882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
);
|
884 |
}
|
885 |
|
886 |
-
|
887 |
/**
|
888 |
* Get recommendations locations that should be turned off by default
|
889 |
*
|
@@ -891,8 +917,14 @@ class ShareaholicUtilities {
|
|
891 |
*/
|
892 |
public static function get_default_rec_off_locations() {
|
893 |
return array(
|
894 |
-
array(
|
895 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
);
|
897 |
}
|
898 |
|
@@ -1236,23 +1268,6 @@ class ShareaholicUtilities {
|
|
1236 |
$response = ShareaholicCurl::post( $heartbeat_api_url, $data, 'json', true, 2 );
|
1237 |
}
|
1238 |
|
1239 |
-
/**
|
1240 |
-
* Deletes the api key
|
1241 |
-
*/
|
1242 |
-
public static function delete_api_key() {
|
1243 |
-
$payload = array(
|
1244 |
-
'site_id' => self::get_option( 'api_key' ),
|
1245 |
-
'verification_key' => self::get_option( 'verification_key' ),
|
1246 |
-
);
|
1247 |
-
|
1248 |
-
$response = ShareaholicCurl::post(
|
1249 |
-
Shareaholic::API_URL . '/integrations/plugin/delete',
|
1250 |
-
$payload,
|
1251 |
-
'json',
|
1252 |
-
true
|
1253 |
-
);
|
1254 |
-
}
|
1255 |
-
|
1256 |
/**
|
1257 |
* This loads the locales
|
1258 |
*/
|
@@ -1644,7 +1659,7 @@ class ShareaholicUtilities {
|
|
1644 |
// Did it return at least 4 services?
|
1645 |
$has_majority_services = count( array_keys( $response['body']['data'] ) ) >= 4 ? true : false;
|
1646 |
$has_important_services = true;
|
1647 |
-
// Does it have counts for
|
1648 |
foreach ( array( 'facebook', 'pinterest' ) as $service ) {
|
1649 |
if ( ! isset( $response['body']['data'][ $service ] ) || ! is_numeric( $response['body']['data'][ $service ] ) ) {
|
1650 |
$has_important_services = false;
|
659 |
delete_option( 'shareaholic_perform_update' );
|
660 |
}
|
661 |
|
662 |
+
/**
|
663 |
+
* Returns Active Plugins
|
664 |
+
*/
|
665 |
+
public static function get_active_plugins() {
|
666 |
+
$active_plugins = (array) get_option( 'active_plugins', array() );
|
667 |
+
|
668 |
+
if ( is_multisite() ) {
|
669 |
+
$network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
|
670 |
+
$active_plugins = array_merge( $active_plugins, array_keys( $network_plugins ) );
|
671 |
+
}
|
672 |
+
|
673 |
+
return ( isset( $active_plugins ) ? array_values( array_unique( $active_plugins ) ) : array() );
|
674 |
+
}
|
675 |
+
|
676 |
/**
|
677 |
* Checks whether a plugin is active
|
678 |
*
|
687 |
}
|
688 |
}
|
689 |
|
690 |
+
/**
|
691 |
+
* Deletes the api key
|
692 |
+
*/
|
693 |
+
public static function delete_api_key() {
|
694 |
+
$payload = array(
|
695 |
+
'site_id' => self::get_option( 'api_key' ),
|
696 |
+
'verification_key' => self::get_option( 'verification_key' ),
|
697 |
+
);
|
698 |
+
$response = ShareaholicCurl::post(
|
699 |
+
Shareaholic::API_URL . '/integrations/plugin/delete',
|
700 |
+
$payload,
|
701 |
+
'json',
|
702 |
+
true
|
703 |
+
);
|
704 |
+
}
|
705 |
+
|
706 |
/**
|
707 |
* Returns Stats
|
708 |
*/
|
718 |
return ( isset( $stats ) ? $stats : array() );
|
719 |
}
|
720 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
/**
|
722 |
* Returns Local Share Count Proxy Status
|
723 |
*/
|
832 |
}
|
833 |
}
|
834 |
|
|
|
|
|
|
|
835 |
/**
|
836 |
* Get share buttons locations that should be turned on by default
|
837 |
*
|
842 |
array(
|
843 |
'name' => 'post_below_content',
|
844 |
'counter' => 'badge-counter',
|
845 |
+
'enabled' => true,
|
846 |
),
|
847 |
array(
|
848 |
'name' => 'page_below_content',
|
849 |
'counter' => 'badge-counter',
|
850 |
+
'enabled' => true,
|
851 |
),
|
852 |
array(
|
853 |
'name' => 'index_below_content',
|
854 |
'counter' => 'badge-counter',
|
855 |
+
'enabled' => true,
|
856 |
),
|
857 |
array(
|
858 |
'name' => 'category_below_content',
|
859 |
'counter' => 'badge-counter',
|
860 |
+
'enabled' => true,
|
861 |
),
|
862 |
);
|
863 |
}
|
872 |
array(
|
873 |
'name' => 'post_above_content',
|
874 |
'counter' => 'badge-counter',
|
875 |
+
'enabled' => false,
|
876 |
),
|
877 |
array(
|
878 |
'name' => 'page_above_content',
|
879 |
'counter' => 'badge-counter',
|
880 |
+
'enabled' => false,
|
881 |
),
|
882 |
array(
|
883 |
'name' => 'index_above_content',
|
884 |
'counter' => 'badge-counter',
|
885 |
+
'enabled' => false,
|
886 |
),
|
887 |
array(
|
888 |
'name' => 'category_above_content',
|
889 |
'counter' => 'badge-counter',
|
890 |
+
'enabled' => false,
|
891 |
),
|
892 |
);
|
893 |
}
|
899 |
*/
|
900 |
public static function get_default_rec_on_locations() {
|
901 |
return array(
|
902 |
+
array(
|
903 |
+
'name' => 'post_below_content',
|
904 |
+
'enabled' => true,
|
905 |
+
),
|
906 |
+
array(
|
907 |
+
'name' => 'page_below_content',
|
908 |
+
'enabled' => true,
|
909 |
+
),
|
910 |
);
|
911 |
}
|
912 |
|
|
|
913 |
/**
|
914 |
* Get recommendations locations that should be turned off by default
|
915 |
*
|
917 |
*/
|
918 |
public static function get_default_rec_off_locations() {
|
919 |
return array(
|
920 |
+
array(
|
921 |
+
'name' => 'index_below_content',
|
922 |
+
'enabled' => false,
|
923 |
+
),
|
924 |
+
array(
|
925 |
+
'name' => 'category_below_content',
|
926 |
+
'enabled' => false,
|
927 |
+
),
|
928 |
);
|
929 |
}
|
930 |
|
1268 |
$response = ShareaholicCurl::post( $heartbeat_api_url, $data, 'json', true, 2 );
|
1269 |
}
|
1270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
/**
|
1272 |
* This loads the locales
|
1273 |
*/
|
1659 |
// Did it return at least 4 services?
|
1660 |
$has_majority_services = count( array_keys( $response['body']['data'] ) ) >= 4 ? true : false;
|
1661 |
$has_important_services = true;
|
1662 |
+
// Does it have counts for facebook, pinterest?
|
1663 |
foreach ( array( 'facebook', 'pinterest' ) as $service ) {
|
1664 |
if ( ! isset( $response['body']['data'][ $service ] ) || ! is_numeric( $response['body']['data'][ $service ] ) ) {
|
1665 |
$has_important_services = false;
|