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

Version Description

  • Enhancement: updated Shareaholic JavaScript snippet - now a lot simpler!
  • Bugfix: added hooks to prevent conflicts with Shortcode UI plugin
Download this release

Release Info

Developer hngu_shareaholic
Plugin Icon 128x128 WordPress Social Tools, Related Posts, Monetization – Shareaholic
Version 7.6.2.2
Comparing to
See all releases

Code changes from version 7.6.2.1 to 7.6.2.2

Files changed (4) hide show
  1. public_js.php +1 -5
  2. readme.txt +10 -2
  3. shareaholic.php +16 -3
  4. templates/script_tag.php +6 -17
public_js.php CHANGED
@@ -38,11 +38,7 @@ class ShareaholicPublicJS {
38
  $output = '';
39
 
40
  if (ShareaholicUtilities::get_env() === 'staging') {
41
- $output = <<< DOC
42
- shr.setAttribute('data-shr-environment', 'stage');
43
- shr.setAttribute('data-shr-assetbase', '//cdn-staging-shareaholic.s3.amazonaws.com/v2/');
44
- shr.src = '//cdn-staging-shareaholic.s3.amazonaws.com/assets/pub/shareaholic.js';
45
- DOC;
46
  }
47
 
48
  return $output;
38
  $output = '';
39
 
40
  if (ShareaholicUtilities::get_env() === 'staging') {
41
+ $output = "data-shr-environment='stage' data-shr-assetbase='//cdn-staging-shareaholic.s3.amazonaws.com/v2/'";
 
 
 
 
42
  }
43
 
44
  return $output;
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: shareaholic
3
  Tags: shareaholic, shareholic, sexybookmarks, recommendations, related content, cookie consent, share buttons, 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
4
  Requires at least: 3.0
5
- Tested up to: 4.3
6
- Stable tag: 7.6.2.1
7
 
8
  The easiest, most effective way to grow your website traffic, effectively engage your audience, monetize, and gain insights for free.
9
 
@@ -170,6 +170,10 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
170
 
171
  == Changelog ==
172
 
 
 
 
 
173
  = 7.6.2.1 =
174
  * Bugfix: use different hook to avoid modifying headers after they are sent
175
 
@@ -1225,6 +1229,10 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
1225
 
1226
  == Upgrade Notice ==
1227
 
 
 
 
 
1228
  = 7.6.2.1 =
1229
  * Bugfix: use different hook to avoid modifying headers after they are sent
1230
 
2
  Contributors: shareaholic
3
  Tags: shareaholic, shareholic, sexybookmarks, recommendations, related content, cookie consent, share buttons, 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
4
  Requires at least: 3.0
5
+ Tested up to: 4.3.1
6
+ Stable tag: 7.6.2.2
7
 
8
  The easiest, most effective way to grow your website traffic, effectively engage your audience, monetize, and gain insights for free.
9
 
170
 
171
  == Changelog ==
172
 
173
+ = 7.6.2.2 =
174
+ * Enhancement: updated Shareaholic JavaScript snippet - now a lot simpler!
175
+ * Bugfix: added hooks to prevent conflicts with Shortcode UI plugin
176
+
177
  = 7.6.2.1 =
178
  * Bugfix: use different hook to avoid modifying headers after they are sent
179
 
1229
 
1230
  == Upgrade Notice ==
1231
 
1232
+ = 7.6.2.2 =
1233
+ * Enhancement: updated Shareaholic JavaScript snippet - now a lot simpler!
1234
+ * Bugfix: added hooks to prevent conflicts with Shortcode UI plugin
1235
+
1236
  = 7.6.2.1 =
1237
  * Bugfix: use different hook to avoid modifying headers after they are sent
1238
 
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 7.6.2.1
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.6.2.1
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 = '7.6.2.1';
67
 
68
  /**
69
  * Starts off as false so that ::get_instance() returns
@@ -140,6 +140,19 @@ if (!class_exists('Shareaholic')) {
140
 
141
  // use the admin notice API
142
  add_action('admin_notices', array('ShareaholicAdmin', 'admin_notices'));
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
  /**
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 7.6.2.2
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.6.2.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 = '7.6.2.2';
67
 
68
  /**
69
  * Starts off as false so that ::get_instance() returns
140
 
141
  // use the admin notice API
142
  add_action('admin_notices', array('ShareaholicAdmin', 'admin_notices'));
143
+
144
+ // ShortCode UI specific hooks to prevent duplicate app rendering
145
+ // https://wordpress.org/support/topic/custom-post-type-exclude-issue?replies=10#post-3370550
146
+ add_action('scui_external_hooks_remove', array($this, 'remove_apps'));
147
+ add_action('scui_external_hooks_return', array($this, 'return_apps'));
148
+ }
149
+
150
+ public static function remove_apps() {
151
+ remove_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
152
+ }
153
+
154
+ public static function return_apps() {
155
+ add_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
156
  }
157
 
158
  /**
templates/script_tag.php CHANGED
@@ -2,22 +2,11 @@
2
  <script type='text/javascript' data-cfasync='false'>
3
  //<![CDATA[
4
  _SHR_SETTINGS = <?php echo json_encode($base_settings); ?>;
5
-
6
- (function() {
7
- var shr = document.createElement('script');
8
- shr.setAttribute('data-cfasync', 'false');
9
- shr.src = '<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>';
10
- shr.type = 'text/javascript'; shr.async = 'true';
11
- <?php echo $overrides; ?>
12
-
13
- shr.onload = shr.onreadystatechange = function() {
14
- var rs = this.readyState;
15
- if (rs && rs != 'complete' && rs != 'loaded') return;
16
- var site_id = '<?php echo $api_key; ?>';
17
- try { Shareaholic.init(site_id); } catch (e) {}
18
- };
19
- var s = document.getElementsByTagName('script')[0];
20
- s.parentNode.insertBefore(shr, s);
21
- })();
22
  //]]>
23
  </script>
 
 
 
 
 
 
2
  <script type='text/javascript' data-cfasync='false'>
3
  //<![CDATA[
4
  _SHR_SETTINGS = <?php echo json_encode($base_settings); ?>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  //]]>
6
  </script>
7
+ <script type='text/javascript'
8
+ src='<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>'
9
+ data-shr-siteid='<?php echo $api_key; ?>'
10
+ data-cfasync='false'
11
+ async='async' <?php echo $overrides ?>>
12
+ </script>