WordPress Social Tools, Related Posts, Monetization – Shareaholic - Version 9.4.0

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 Icon 128x128 WordPress Social Tools, Related Posts, Monetization – Shareaholic
Version 9.4.0
Comparing to
See all releases

Code changes from version 9.3.3 to 9.4.0

admin.php CHANGED
@@ -192,7 +192,7 @@ class ShareaholicAdmin {
192
  $api_key = ShareaholicUtilities::get_option( 'api_key' );
193
  echo <<<JQUERY
194
  <script type="text/javascript">
195
- window.location = "https://www.shareaholic.com/plans?siteID=$api_key";
196
  </script>
197
  JQUERY;
198
  }
@@ -501,14 +501,16 @@ JQUERY;
501
  'shareaholic-advanced',
502
  array( 'ShareaholicAdmin', 'advanced_admin' )
503
  );
504
- add_submenu_page(
505
- 'shareaholic-settings',
506
- __( 'Upgrade', 'shareaholic' ),
507
- __( '<span style="color: #FCB214;">Upgrade</span>', 'shareaholic' ),
508
- 'activate_plugins',
509
- 'shareaholic-premium',
510
- array( 'ShareaholicAdmin', 'go_premium' )
511
- );
 
 
512
  }
513
 
514
  /**
@@ -601,11 +603,11 @@ JQUERY;
601
  ShareaholicUtilities::load_template(
602
  'terms_of_service_modal',
603
  array(
604
- 'image_url' => SHAREAHOLIC_ASSET_DIR . 'img',
605
  )
606
  );
607
  }
608
-
609
  if ( ShareaholicUtilities::has_accepted_terms_of_service() ) {
610
  $api_key = ShareaholicUtilities::get_or_create_api_key();
611
  $jwt = self::get_publisher_token();
@@ -662,7 +664,7 @@ JQUERY;
662
  ShareaholicUtilities::load_template(
663
  'terms_of_service_modal',
664
  array(
665
- 'image_url' => SHAREAHOLIC_ASSET_DIR . 'img',
666
  )
667
  );
668
  }
@@ -752,7 +754,7 @@ JQUERY;
752
  ShareaholicUtilities::load_template(
753
  'terms_of_service_modal',
754
  array(
755
- 'image_url' => SHAREAHOLIC_ASSET_DIR . 'img',
756
  )
757
  );
758
  }
@@ -894,7 +896,7 @@ JQUERY;
894
  $plugins[] = (object) array(
895
  'title_slugged' => sanitize_title($plugin_data['Name']),
896
  'basename' => plugin_basename(SHAREAHOLIC_FILE),
897
- 'logo' => SHAREAHOLIC_ASSET_DIR. '/img/icon-256x256.png',
898
  'api_server' => 'yarpp.com',
899
  'script_cache_ver' => Shareaholic::VERSION,
900
  'bgcolor' => '#fff',
192
  $api_key = ShareaholicUtilities::get_option( 'api_key' );
193
  echo <<<JQUERY
194
  <script type="text/javascript">
195
+ window.location = "https://www.shareaholic.com/plans?siteID=$api_key&brand=shareaholic";
196
  </script>
197
  JQUERY;
198
  }
501
  'shareaholic-advanced',
502
  array( 'ShareaholicAdmin', 'advanced_admin' )
503
  );
504
+ if (ShareaholicUtilities::get_option( 'api_key' )) {
505
+ add_submenu_page(
506
+ 'shareaholic-settings',
507
+ __( 'Upgrade', 'shareaholic' ),
508
+ __( '<span style="color: #FCB214;">Upgrade</span>', 'shareaholic' ),
509
+ 'activate_plugins',
510
+ 'shareaholic-premium',
511
+ array( 'ShareaholicAdmin', 'go_premium' )
512
+ );
513
+ }
514
  }
515
 
516
  /**
603
  ShareaholicUtilities::load_template(
604
  'terms_of_service_modal',
605
  array(
606
+ 'image_url' => plugins_url('/assets/img', SHAREAHOLIC_FILE),
607
  )
608
  );
609
  }
610
+
611
  if ( ShareaholicUtilities::has_accepted_terms_of_service() ) {
612
  $api_key = ShareaholicUtilities::get_or_create_api_key();
613
  $jwt = self::get_publisher_token();
664
  ShareaholicUtilities::load_template(
665
  'terms_of_service_modal',
666
  array(
667
+ 'image_url' => plugins_url('/assets/img', SHAREAHOLIC_FILE),
668
  )
669
  );
670
  }
754
  ShareaholicUtilities::load_template(
755
  'terms_of_service_modal',
756
  array(
757
+ 'image_url' => plugins_url('/assets/img', SHAREAHOLIC_FILE),
758
  )
759
  );
760
  }
896
  $plugins[] = (object) array(
897
  'title_slugged' => sanitize_title($plugin_data['Name']),
898
  'basename' => plugin_basename(SHAREAHOLIC_FILE),
899
+ 'logo' => plugins_url('/assets/img/icon-256x256.png', SHAREAHOLIC_FILE),
900
  'api_server' => 'yarpp.com',
901
  'script_cache_ver' => Shareaholic::VERSION,
902
  'bgcolor' => '#fff',
lib/plugin-deactivation-survey/deactivate-feedback-form.js CHANGED
@@ -132,7 +132,7 @@
132
 
133
  shareaholic.DeactivateFeedbackForm.prototype.onDeactivateClicked = function(event)
134
  {
135
- this.deactivateURL = event.target.href;
136
 
137
  if ( ! this.dialog) {
138
  this.dialog = $( this.element ).remodal({hashTracking:false,closeOnOutsideClick:false});
132
 
133
  shareaholic.DeactivateFeedbackForm.prototype.onDeactivateClicked = function(event)
134
  {
135
+ this.deactivateURL = event.currentTarget.href;
136
 
137
  if ( ! this.dialog) {
138
  this.dialog = $( this.element ).remodal({hashTracking:false,closeOnOutsideClick:false});
lib/plugin-deactivation-survey/deactivate-feedback-form.php CHANGED
@@ -60,8 +60,10 @@ if ( ! function_exists( 'shareaholic_deactivate_feedback' ) ) {
60
  $current_user = wp_get_current_user();
61
  if ( $current_user instanceof WP_User && is_user_logged_in() && $current_user->ID ) {
62
  $email = $current_user->user_email;
63
- if ( $current_user->roles[0] ) {
64
- $role = $current_user->roles[0];
 
 
65
  }
66
  } else {
67
  $email = '';
60
  $current_user = wp_get_current_user();
61
  if ( $current_user instanceof WP_User && is_user_logged_in() && $current_user->ID ) {
62
  $email = $current_user->user_email;
63
+ if ( is_array($current_user->roles) ) {
64
+ $role = reset($current_user->roles);
65
+ } else {
66
+ $role = '';
67
  }
68
  } else {
69
  $email = '';
public.php CHANGED
@@ -55,7 +55,7 @@ class ShareaholicPublic {
55
  if ( $hints ) {
56
  array_push(
57
  $hints,
58
- '//k4z6w9b5.stackpathcdn.com',
59
  '//cdn.shareaholic.net',
60
  '//www.shareaholic.net',
61
  '//analytics.shareaholic.com',
55
  if ( $hints ) {
56
  array_push(
57
  $hints,
58
+ '//m9m6e2w5.stackpathcdn.com',
59
  '//cdn.shareaholic.net',
60
  '//www.shareaholic.net',
61
  '//analytics.shareaholic.com',
readme.txt CHANGED
@@ -2,14 +2,12 @@
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.4
6
  Requires PHP: 5.3
7
- Stable tag: 9.3.3
8
-
9
 
10
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
11
 
12
-
13
  == Description ==
14
 
15
  Shareaholic is the **world's leading suite of Audience Growth & Engagement tools**. It allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
@@ -309,51 +307,57 @@ The default Shareaholic thumbnail width is 640px with dynamic height and no crop
309
  Each time you change Shareaholic's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. We highly recommend the [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) plugin for this purpose.
310
 
311
  == Changelog ==
312
- = 9.3.3 (2020-06-25) =
 
 
 
 
 
 
 
313
  * [Bugfix](https://wordpress.org/support/topic/wont-let-me-deactivate-or-delete-plugin/): Fixes deactivation survey plugin conflict
314
 
315
- = 9.3.2 (2020-06-17) =
316
  * [Bugfix](https://wordpress.org/support/topic/wont-let-me-deactivate-or-delete-plugin/): Do not dismiss deactivation modal when clicking outside it
317
 
318
- = 9.3.1 (2020-06-10) =
319
  * Enhancement: Update Odnoklassniki (ok.ru) endpoints
320
 
321
- = 9.3.0 (2020-05-18) =
322
  * New: Display optional feedback form on plugin deactivation
323
  * Code style standards improvements to match WordPress official spec
324
 
325
- = 9.2.0 (2020-04-07) =
326
  * Enhancement: Hook to change the priority number in content, example: `add_filter( 'shareaholic_content_priority', 20 );`
327
  * Enhancement: Don't add content to `get_the_excerpt` because it's too early and strips tags
328
  * Support for WordPress 5.4+
329
 
330
- = 9.1.0 (2020-02-21) =
331
  * Enhancement: The Cloud Dashboard can now 100% adjust all In-Page block status! Your marketing team now has superpowers to make changes to all app settings without developer help.
332
 
333
- = 9.0.1 (2020-02-20) =
334
  * Enhancement: Sync In-Page block app status between Plugin &harr; Shareaholic Cloud
335
  * Enhancement: Removed additional duplicate options from legacy dashboard
336
  * Bugfix: Fixed plugin reset function
337
  * Bugfix: Fixed handling of `null` setting arrays
338
 
339
- = 8.13.16 (2020-02-14) =
340
  * Bugfix: Set In-Page block app ID for shortcode when required
341
 
342
- = 8.13.15 (2020-02-13) =
343
  * Bugfix: Set correct status defaults on the backend upon setup for In-Page blocks
344
  * Enhancement: Set canvas divs to hidden initially and do not include In-Page block app IDs
345
 
346
- = 8.13.14 (2020-02-11) =
347
  * Feature: Check Share Share Counts from Admin Menu
348
  * Enhancement: Fewer scripts in Admin section
349
  * Enhancement: Better Admin UX
350
 
351
- = 8.13.13 (2020-01-10) =
352
  * Enhancement: A complete rewrite of our JavaScript code resulting in delivering Google PageSpeed scores of 95+ on mobile and 100 on desktop. Yes, 100 out of 100. Shareaholic is now fast and Google agrees.
353
  * Bugfix: Call to undefined function preg_filter() on PHP < v5.3. Use preg_replace instead.
354
  * Bump minimum PHP version to 5.3
355
 
356
-
357
  = 8.13.12 (2019-12-04) =
358
  * Feature: Disambiguate between page type, category and page tags for more control over the Related Posts algorithm
359
  * Feature: [Share Buttons are now ADA (Americans with Disabilities Act) accessiblity standards compliant](https://www.shareaholic.com/blog/accessibility-a11y/)
@@ -1053,88 +1057,8 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
1053
  * Show Related Posts data status
1054
 
1055
  == Upgrade Notice ==
1056
- = 9.3.3 =
1057
  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!
1058
 
1059
  = 8.12.1 =
1060
- Introduces a brand-new unified Shareaholic Admin UI (in beta) and massive page speed gains = 50% faster load times on your site! This update also fixes issue with some themes rendering Shareaholic Apps multiple times. This one is a must upgrade!
1061
-
1062
- = 8.10.7 =
1063
- W3C validation improvements
1064
-
1065
- = 8.10.6 =
1066
- WeChat Share and Follow Buttons and Twitter Card bug fixes
1067
-
1068
- = 8.10.5 =
1069
- Various Admin Panel improvements
1070
-
1071
- = 8.10.4 =
1072
- New themes, improved content syncing for more accurate Related Content and Analytics, refreshed Post-Share Prompt Slider design, Related Posts headline customizer and more!
1073
-
1074
- = 8.10.3 =
1075
- New option to include <code>%author%</code> tag for Share Count Recovery
1076
-
1077
- = 8.9.1 =
1078
- Critical fix for bug introduced in last release; fixes JS references
1079
-
1080
- = 8.9.0 =
1081
- Various speed improvements and bug fixes
1082
-
1083
- = 8.8.4 =
1084
- Adds support for additional Structure Tags for Share Count Recovery
1085
-
1086
- = 8.8.3 =
1087
- New Share and Follow Buttons! Plus compatability with WP Rocket
1088
-
1089
- = 8.8.2 =
1090
- Various [Related Posts](https://www.shareaholic.com/website-tools/related-content) enhancements
1091
-
1092
- = 8.8.1 =
1093
- General maintenance release
1094
-
1095
- = 8.8.0 =
1096
- Fixed Share Buttons configurator. Icon drag and drop now works. Update also includes new theme options for Related Posts.
1097
-
1098
- = 8.7.0 =
1099
- * Several performance upgrades to make Shareaholic EVEN FASTER!!
1100
- * Performance Enhancement: Settings file is now loaded from a globally distributed CDN (Amazon), which will make Shareaholic faster on your site
1101
- * Performance Enhancement: Added support for DNS-Prefetch and Preload which will make Shareaholic EVEN FASTER!!
1102
-
1103
- = 8.6.7 =
1104
- Fixed bug where share buttons and other apps were showing up intermittently due to a race condition in the loading sequence
1105
-
1106
- = 8.6.6 =
1107
- New: You can now set custom Related Posts thumbnail dimensions. See [FAQ in the readme](https://wordpress.org/plugins/shareaholic/) if you would like to change the thumbnail size.
1108
-
1109
- = 8.6.5 =
1110
- We've improved the server connectivity check. If you've been getting the 'retry' error message after installing Shareaholic, this one is for you.
1111
-
1112
- = 8.6.1 =
1113
- New option to show or hide share buttons, related content, etc on excerpts
1114
-
1115
- = 8.6.0 =
1116
- Huge localization update!
1117
-
1118
- = 8.5.3 =
1119
- Some hosting companies are incorrectly flagging "index.html" as malware. This is a standard file and there is absolutely no reason to panic or be concerned. This update fixes the cause of the false positive. Please upgrade ASAP as a precaution.
1120
-
1121
- = 8.5.0 =
1122
- Various enhancements and Social Share Count Recovery in cases where permalink structure changes
1123
-
1124
- = 8.4.4 =
1125
- Another critical bugfix for users of the SG Optimizer plugin (SiteGround hosting). This update will seamlessly allow you to re-activate Shareaholic.
1126
-
1127
- = 8.4.3 =
1128
- Critical bugfix for users of SG Optimizer plugin
1129
-
1130
- = 8.4.2 =
1131
- More robust cache busting. Added support for WPEngine cache engine (Memcached, MaxCDN, Varnish), WP Fastest Cache, SG Optimizer, Cachify Cache, Zencache, etc.
1132
-
1133
- = 8.4.1 =
1134
- Critical bugfix for older versions of PHP
1135
-
1136
- = 8.2.0 =
1137
- * Must Upgrade! Enhancements to Social Share Count Recovery - adds support for case where permalink structure changes, Share Buttons for Images (Image Sharer) and introducing Teams.
1138
-
1139
- = 8.1.0 =
1140
- New Tools Badge! Introducing a brand new way to launch the Shareaholic Console without ever leaving your website! Contains quick-links to your site analytics, help center, and much more to help you manage your site with greater ease. If you'd rather hide this badge or change its location, you can do so from your settings. It is 100% configurable.
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.5
6
  Requires PHP: 5.3
7
+ Stable tag: 9.4.0
 
8
 
9
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
10
 
 
11
  == Description ==
12
 
13
  Shareaholic is the **world's leading suite of Audience Growth & Engagement tools**. It allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
307
  Each time you change Shareaholic's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. We highly recommend the [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) plugin for this purpose.
308
 
309
  == Changelog ==
310
+ = 9.4.0 (04-September-2020) =
311
+ * Confirms support for WordPress v5.5+
312
+ * Enhancement: No longer need legacy `<![CDATA[]]>`
313
+ * Feature: Snapchat Social Share Buttons ([learn more](https://www.shareaholic.com/blog/introducing-snapchat-social-share-buttons-for-websites/))
314
+ * Feature: Parler Social Share Buttons ([learn more](https://www.shareaholic.com/website-tools/social-share-buttons/parler))
315
+ * Feature: Option to include a selection of your most popular site content in the Related Posts section ([learn more](https://www.shareaholic.com/blog/content-recommendations-custom-algorithm-options/))
316
+
317
+ = 9.3.3 (25-June-2020) =
318
  * [Bugfix](https://wordpress.org/support/topic/wont-let-me-deactivate-or-delete-plugin/): Fixes deactivation survey plugin conflict
319
 
320
+ = 9.3.2 (17-June-2020) =
321
  * [Bugfix](https://wordpress.org/support/topic/wont-let-me-deactivate-or-delete-plugin/): Do not dismiss deactivation modal when clicking outside it
322
 
323
+ = 9.3.1 (10-June-2020) =
324
  * Enhancement: Update Odnoklassniki (ok.ru) endpoints
325
 
326
+ = 9.3.0 (18-May-2020) =
327
  * New: Display optional feedback form on plugin deactivation
328
  * Code style standards improvements to match WordPress official spec
329
 
330
+ = 9.2.0 (07-April-2020) =
331
  * Enhancement: Hook to change the priority number in content, example: `add_filter( 'shareaholic_content_priority', 20 );`
332
  * Enhancement: Don't add content to `get_the_excerpt` because it's too early and strips tags
333
  * Support for WordPress 5.4+
334
 
335
+ = 9.1.0 (21-February-2020) =
336
  * Enhancement: The Cloud Dashboard can now 100% adjust all In-Page block status! Your marketing team now has superpowers to make changes to all app settings without developer help.
337
 
338
+ = 9.0.1 (20-February-2020) =
339
  * Enhancement: Sync In-Page block app status between Plugin &harr; Shareaholic Cloud
340
  * Enhancement: Removed additional duplicate options from legacy dashboard
341
  * Bugfix: Fixed plugin reset function
342
  * Bugfix: Fixed handling of `null` setting arrays
343
 
344
+ = 8.13.16 (14-February-2020) =
345
  * Bugfix: Set In-Page block app ID for shortcode when required
346
 
347
+ = 8.13.15 (13-February-2020) =
348
  * Bugfix: Set correct status defaults on the backend upon setup for In-Page blocks
349
  * Enhancement: Set canvas divs to hidden initially and do not include In-Page block app IDs
350
 
351
+ = 8.13.14 (11-February-2020) =
352
  * Feature: Check Share Share Counts from Admin Menu
353
  * Enhancement: Fewer scripts in Admin section
354
  * Enhancement: Better Admin UX
355
 
356
+ = 8.13.13 (10-January-2020) =
357
  * Enhancement: A complete rewrite of our JavaScript code resulting in delivering Google PageSpeed scores of 95+ on mobile and 100 on desktop. Yes, 100 out of 100. Shareaholic is now fast and Google agrees.
358
  * Bugfix: Call to undefined function preg_filter() on PHP < v5.3. Use preg_replace instead.
359
  * Bump minimum PHP version to 5.3
360
 
 
361
  = 8.13.12 (2019-12-04) =
362
  * Feature: Disambiguate between page type, category and page tags for more control over the Related Posts algorithm
363
  * Feature: [Share Buttons are now ADA (Americans with Disabilities Act) accessiblity standards compliant](https://www.shareaholic.com/blog/accessibility-a11y/)
1057
  * Show Related Posts data status
1058
 
1059
  == Upgrade Notice ==
1060
+ = 9.4.0 =
1061
  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!
1062
 
1063
  = 8.12.1 =
1064
+ Introduces a brand-new unified Shareaholic Admin UI (in beta) and massive page speed gains = 50% faster load times on your site! This update also fixes issue with some themes rendering Shareaholic Apps multiple times. This one is a must upgrade!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 9.3.3
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 9.3.3
18
  */
19
 
20
  /**
@@ -38,10 +38,6 @@ if ( ! defined( 'SHAREAHOLIC_PATH' ) ) {
38
  define( 'SHAREAHOLIC_PATH', plugin_dir_path( SHAREAHOLIC_FILE ) );
39
  }
40
 
41
- if ( ! defined( 'SHAREAHOLIC_ASSET_DIR' ) ) {
42
- define( 'SHAREAHOLIC_ASSET_DIR', plugins_url( '/assets/', __FILE__ ) );
43
- }
44
-
45
  // Caching
46
  if ( ! defined( 'SHARE_COUNTS_CHECK_CACHE_LENGTH' ) ) {
47
  define( 'SHARE_COUNTS_CHECK_CACHE_LENGTH', 900 ); // 900 seconds
@@ -71,7 +67,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 = '9.3.3';
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: 9.4.0
7
  Author: Shareaholic
8
  Author URI: https://www.shareaholic.com
9
  Text Domain: shareaholic
14
  * The main file!
15
  *
16
  * @package shareaholic
17
+ * @version 9.4.0
18
  */
19
 
20
  /**
38
  define( 'SHAREAHOLIC_PATH', plugin_dir_path( SHAREAHOLIC_FILE ) );
39
  }
40
 
 
 
 
 
41
  // Caching
42
  if ( ! defined( 'SHARE_COUNTS_CHECK_CACHE_LENGTH' ) ) {
43
  define( 'SHARE_COUNTS_CHECK_CACHE_LENGTH', 900 ); // 900 seconds
67
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
68
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
69
 
70
+ const VERSION = '9.4.0';
71
 
72
  /**
73
  * Starts off as false so that ::get_instance() returns
templates/failed_to_create_api_key.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php if ( current_user_can( 'manage_options' ) ) { ?>
2
  <div class="shareaholic-wrap-container" style="padding: 0 20px 0px 15px; background-color: #45a147; margin: 25px 0px 20px -18px;">
3
- <div style="margin: 0px 8px 0 4px; float: left;"><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/check.png" width=56 height=50 /></div>
4
  <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.4); font-size: 14px; display: table-cell;">
5
  <p>
6
  <strong><?php echo sprintf( __( 'Action required: You\'ve installed Shareaholic for WordPress. We\'re ready when you are. %1$sGet started now &raquo;%2$s', 'shareaholic' ), '<a href="admin.php?page=shareaholic-settings" class="button-secondary">', '</a>' ); ?></strong>
1
  <?php if ( current_user_can( 'manage_options' ) ) { ?>
2
  <div class="shareaholic-wrap-container" style="padding: 0 20px 0px 15px; background-color: #45a147; margin: 25px 0px 20px -18px;">
3
+ <div style="margin: 0px 8px 0 4px; float: left;"><img src="<?php echo plugins_url('/assets/img/check.png', SHAREAHOLIC_FILE) ?>" width=56 height=50 /></div>
4
  <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.4); font-size: 14px; display: table-cell;">
5
  <p>
6
  <strong><?php echo sprintf( __( 'Action required: You\'ve installed Shareaholic for WordPress. We\'re ready when you are. %1$sGet started now &raquo;%2$s', 'shareaholic' ), '<a href="admin.php?page=shareaholic-settings" class="button-secondary">', '</a>' ); ?></strong>
templates/script_tag.php CHANGED
@@ -1,8 +1,6 @@
1
- <!-- Powered by Shareaholic; Grow your Audience faster! - https://www.shareaholic.com -->
2
  <link rel='preload' href='<?php echo ShareaholicUtilities::asset_url( 'assets/pub/shareaholic.js' ); ?>' as='script'/>
3
  <script data-no-minify='1' data-cfasync='false'>
4
- //<![CDATA[
5
  _SHR_SETTINGS = <?php echo json_encode( $base_settings ); ?>;
6
- //]]>
7
  </script>
8
  <script data-no-minify='1' data-cfasync='false' src='<?php echo ShareaholicUtilities::asset_url( 'assets/pub/shareaholic.js' ); ?>' data-shr-siteid='<?php echo $api_key; ?>' async <?php echo $overrides; ?>></script>
1
+ <!-- Shareaholic - https://www.shareaholic.com -->
2
  <link rel='preload' href='<?php echo ShareaholicUtilities::asset_url( 'assets/pub/shareaholic.js' ); ?>' as='script'/>
3
  <script data-no-minify='1' data-cfasync='false'>
 
4
  _SHR_SETTINGS = <?php echo json_encode( $base_settings ); ?>;
 
5
  </script>
6
  <script data-no-minify='1' data-cfasync='false' src='<?php echo ShareaholicUtilities::asset_url( 'assets/pub/shareaholic.js' ); ?>' data-shr-siteid='<?php echo $api_key; ?>' async <?php echo $overrides; ?>></script>
templates/terms_of_service_notice.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php if ( current_user_can( 'manage_options' ) ) { ?>
2
  <div class="shareaholic-wrap-container" style="background-color: #009688; margin: 5px 0px 5px -20px;">
3
  <div style="margin: 0px 15px 0 20px; float: left;">
4
- <img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/check.png" width="56" height="50" />
5
  </div>
6
  <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.2); font-size: 14px; line-height: 1.5em; height: 50px; vertical-align: middle; display: table-cell; line-height: 1.5;">
7
  <?php echo sprintf( __( 'You\'ve added Shareaholic - Welcome! Action required: %1$sComplete Installation &raquo;%2$s', 'shareaholic' ), '<a href="admin.php?page=shareaholic-settings" class="button-secondary" style="vertical-align: initial;">', '</a>' ); ?>
1
  <?php if ( current_user_can( 'manage_options' ) ) { ?>
2
  <div class="shareaholic-wrap-container" style="background-color: #009688; margin: 5px 0px 5px -20px;">
3
  <div style="margin: 0px 15px 0 20px; float: left;">
4
+ <img src="<?php echo plugins_url('/assets/img/check.png', SHAREAHOLIC_FILE) ?>" width="56" height="50" />
5
  </div>
6
  <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.2); font-size: 14px; line-height: 1.5em; height: 50px; vertical-align: middle; display: table-cell; line-height: 1.5;">
7
  <?php echo sprintf( __( 'You\'ve added Shareaholic - Welcome! Action required: %1$sComplete Installation &raquo;%2$s', 'shareaholic' ), '<a href="admin.php?page=shareaholic-settings" class="button-secondary" style="vertical-align: initial;">', '</a>' ); ?>
utilities.php CHANGED
@@ -85,11 +85,11 @@ class ShareaholicUtilities {
85
  */
86
  private static function defaults() {
87
  return array(
88
- 'disable_admin_bar_menu' => 'on', // advanced.
89
  'disable_review_notice' => 'off', // advanced.
90
- 'disable_debug_info' => 'off', // advanced.
91
- 'enable_user_nicename' => 'off', // advanced.
92
- 'disable_internal_share_counts_api' => 'on', // advanced.
93
  'disable_og_tags' => 'off', // advanced.
94
  'api_key' => '',
95
  'verification_key' => '',
@@ -107,12 +107,17 @@ class ShareaholicUtilities {
107
  public static function admin_plugin_action_links( $links ) {
108
  if ( is_array( $links ) ) {
109
  $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=shareaholic-settings' ) ) . '">' . __( 'Settings', 'shareaholic' ) . '</a>';
110
- $premium_link = '<a href="https://www.shareaholic.com/plans" target="_blank" rel="noopener noreferrer">' . __( 'Upgrade', 'shareaholic' ) . '</a>';
 
 
111
  $helpdesk_link = '<a href="https://support.shareaholic.com/" target="_blank" rel="noopener noreferrer">' . __( 'Support & Documentation', 'shareaholic' ) . '</a>';
112
 
113
  array_unshift( $links, $settings_link );
114
  $links[] = $helpdesk_link;
115
- $links[] = $premium_link;
 
 
 
116
  }
117
 
118
  return $links;
85
  */
86
  private static function defaults() {
87
  return array(
88
+ 'disable_admin_bar_menu' => 'on', // advanced.
89
  'disable_review_notice' => 'off', // advanced.
90
+ 'disable_debug_info' => 'off', // advanced.
91
+ 'enable_user_nicename' => 'off', // advanced.
92
+ 'disable_internal_share_counts_api' => 'on', // advanced.
93
  'disable_og_tags' => 'off', // advanced.
94
  'api_key' => '',
95
  'verification_key' => '',
107
  public static function admin_plugin_action_links( $links ) {
108
  if ( is_array( $links ) ) {
109
  $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=shareaholic-settings' ) ) . '">' . __( 'Settings', 'shareaholic' ) . '</a>';
110
+ if (ShareaholicUtilities::get_option( 'api_key' )) {
111
+ $premium_link = '<a href="https://www.shareaholic.com/plans?siteID='. ShareaholicUtilities::get_option( 'api_key' ) .'&brand=shareaholic" target="_blank" rel="noopener noreferrer">' . __( 'Upgrade', 'shareaholic' ) . '</a>';
112
+ }
113
  $helpdesk_link = '<a href="https://support.shareaholic.com/" target="_blank" rel="noopener noreferrer">' . __( 'Support & Documentation', 'shareaholic' ) . '</a>';
114
 
115
  array_unshift( $links, $settings_link );
116
  $links[] = $helpdesk_link;
117
+
118
+ if (ShareaholicUtilities::get_option( 'api_key' )) {
119
+ $links[] = $premium_link;
120
+ }
121
  }
122
 
123
  return $links;