WordPress Social Tools, Related Posts, Monetization – Shareaholic - Version 9.2.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.2.0
Comparing to
See all releases

Code changes from version 9.1.0 to 9.2.0

Files changed (3) hide show
  1. public.php +9 -1
  2. readme.txt +8 -3
  3. shareaholic.php +9 -5
public.php CHANGED
@@ -373,6 +373,13 @@ class ShareaholicPublic {
373
  */
374
  public static function draw_canvases( $content ) {
375
  global $wp_current_filter;
 
 
 
 
 
 
 
376
  if ( is_main_query() ) {
377
  $settings = ShareaholicUtilities::get_settings();
378
  $page_type = ShareaholicUtilities::page_type();
@@ -382,7 +389,7 @@ class ShareaholicPublic {
382
  foreach ( $wp_current_filter as $filter ) {
383
  if ( 'the_content' == $filter ) {
384
  if ( $has_run ) {
385
- // has already run once
386
  return $content;
387
  } else {
388
  // first run, set flag!
@@ -394,6 +401,7 @@ class ShareaholicPublic {
394
  foreach ( array( 'share_buttons', 'recommendations' ) as $app ) {
395
  // check Excerpt prefs
396
  if ( 'the_excerpt' == current_filter() && isset( $settings[ "{$app}_display_on_excerpts" ] ) && $settings[ "{$app}_display_on_excerpts" ] == 'off' ) {
 
397
  return $content;
398
  }
399
 
373
  */
374
  public static function draw_canvases( $content ) {
375
  global $wp_current_filter;
376
+
377
+ // Don't add to get_the_excerpt because it's too early and strips tags (adding to the_excerpt is allowed)
378
+ if ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {
379
+ // Return early
380
+ return $content;
381
+ }
382
+
383
  if ( is_main_query() ) {
384
  $settings = ShareaholicUtilities::get_settings();
385
  $page_type = ShareaholicUtilities::page_type();
389
  foreach ( $wp_current_filter as $filter ) {
390
  if ( 'the_content' == $filter ) {
391
  if ( $has_run ) {
392
+ // has already run once, return early
393
  return $content;
394
  } else {
395
  // first run, set flag!
401
  foreach ( array( 'share_buttons', 'recommendations' ) as $app ) {
402
  // check Excerpt prefs
403
  if ( 'the_excerpt' == current_filter() && isset( $settings[ "{$app}_display_on_excerpts" ] ) && $settings[ "{$app}_display_on_excerpts" ] == 'off' ) {
404
+ // Return early
405
  return $content;
406
  }
407
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
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: 9.1.0
8
 
9
 
10
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
@@ -310,6 +310,11 @@ The default Shareaholic thumbnail width is 640px with dynamic height and no crop
310
  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.
311
 
312
  == Changelog ==
 
 
 
 
 
313
  = 9.1.0 (2020-02-21) =
314
  * 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.
315
 
@@ -1036,7 +1041,7 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
1036
  * Show Related Posts data status
1037
 
1038
  == Upgrade Notice ==
1039
- = 9.1.0 =
1040
  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!
1041
 
1042
  = 8.12.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, 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.2.0
8
 
9
 
10
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
310
  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.
311
 
312
  == Changelog ==
313
+ = 9.2.0 (2020-04-07) =
314
+ * Enhancement: Hook to change the priority number in content, example: `add_filter( 'shareaholic_content_priority', 20 );`
315
+ * Enhancement: Don't add content to `get_the_excerpt` because it's too early and strips tags
316
+ * Support for WordPress 5.4+
317
+
318
  = 9.1.0 (2020-02-21) =
319
  * 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.
320
 
1041
  * Show Related Posts data status
1042
 
1043
  == Upgrade Notice ==
1044
+ = 9.2.0 =
1045
  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!
1046
 
1047
  = 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: 9.1.0
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.1.0
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 = '9.1.0';
75
 
76
  /**
77
  * Starts off as false so that ::get_instance() returns
@@ -176,8 +176,12 @@ if ( ! class_exists( 'Shareaholic' ) ) {
176
 
177
  public static function shareaholic_draw_canvas( $query ) {
178
  if ( $query->is_main_query() ) {
179
- add_filter( 'the_content', array( 'ShareaholicPublic', 'draw_canvases' ), 98 );
180
- add_filter( 'the_excerpt', array( 'ShareaholicPublic', 'draw_canvases' ), 98 );
 
 
 
 
181
  }
182
  }
183
 
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.2.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.2.0
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 = '9.2.0';
75
 
76
  /**
77
  * Starts off as false so that ::get_instance() returns
176
 
177
  public static function shareaholic_draw_canvas( $query ) {
178
  if ( $query->is_main_query() ) {
179
+ // Hook to change the priority number of In-Page Block canvases
180
+ // Example: add_filter( 'shareaholic_content_priority', 20 );
181
+ $priority = apply_filters( 'shareaholic_content_priority', 98 );
182
+
183
+ add_filter( 'the_content', array( 'ShareaholicPublic', 'draw_canvases' ), $priority );
184
+ add_filter( 'the_excerpt', array( 'ShareaholicPublic', 'draw_canvases' ), $priority );
185
  }
186
  }
187