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

Version Description

  • Bugfix: Fixed issue where Share Buttons and Related Content apps were not showing after excerpts
  • Various other performance updates and bug fixes
Download this release

Release Info

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

Code changes from version 8.2.0 to 8.3.0

public.php CHANGED
@@ -179,14 +179,14 @@ class ShareaholicPublic {
179
  global $post;
180
 
181
  // Article Publish and Modified Time
182
- $article_published_time = strtotime($post->post_date_gmt);
183
- $article_modified_time = strtotime(get_lastpostmodified('GMT'));
184
 
185
  if (!empty($article_published_time)) {
186
- echo "<meta name='shareaholic:article_published_time' content='" . date('c', $article_published_time) . "' />\n";
187
  }
188
  if (!empty($article_modified_time)) {
189
- echo "<meta name='shareaholic:article_modified_time' content='" . date('c', $article_modified_time) . "' />\n";
190
  }
191
 
192
  // Article Visibility
@@ -346,14 +346,14 @@ class ShareaholicPublic {
346
  $settings[$app]["{$page_type}_above_content"] == 'on') {
347
  // share_buttons_post_above_content
348
  $id = $settings['location_name_ids'][$app]["{$page_type}_above_content"];
349
- $content = self::canvas($id, $app) . $content;
350
  }
351
 
352
  if (isset($settings[$app]["{$page_type}_below_content"]) &&
353
  $settings[$app]["{$page_type}_below_content"] == 'on') {
354
  // share_buttons_post_below_content
355
  $id = $settings['location_name_ids'][$app]["{$page_type}_below_content"];
356
- $content .= self::canvas($id, $app);
357
  }
358
  }
359
  }
@@ -375,7 +375,7 @@ class ShareaholicPublic {
375
  * @param string $link url
376
  * @param string $summary summary text for URL
377
  */
378
- public static function canvas($id, $app, $title = NULL, $link = NULL, $summary = NULL) {
379
  global $post, $wp_query;
380
  $page_type = ShareaholicUtilities::page_type();
381
  $is_list_page = $page_type == 'index' || $page_type == 'category';
@@ -402,6 +402,7 @@ class ShareaholicPublic {
402
 
403
  $canvas = "<div class='shareaholic-canvas'
404
  data-app-id='$id'
 
405
  data-app='$app'
406
  data-title='$title'
407
  data-link='$link'
@@ -768,8 +769,8 @@ class ShareaholicPublic {
768
  'post_tags' => $tags,
769
  'post_categories' => $categories,
770
  'post_language' => get_bloginfo('language'),
771
- 'post_published' => date('c', strtotime($post->post_date_gmt)),
772
- 'post_updated' => date('c', strtotime(get_lastpostmodified('GMT'))),
773
  'post_visibility' => $post->post_status,
774
  ),
775
  'post_stats' => array(
179
  global $post;
180
 
181
  // Article Publish and Modified Time
182
+ $article_published_time = get_the_date( DATE_W3C );
183
+ $article_modified_time = get_the_modified_date( DATE_W3C );
184
 
185
  if (!empty($article_published_time)) {
186
+ echo "<meta name='shareaholic:article_published_time' content='" . $article_published_time . "' />\n";
187
  }
188
  if (!empty($article_modified_time)) {
189
+ echo "<meta name='shareaholic:article_modified_time' content='" . $article_modified_time . "' />\n";
190
  }
191
 
192
  // Article Visibility
346
  $settings[$app]["{$page_type}_above_content"] == 'on') {
347
  // share_buttons_post_above_content
348
  $id = $settings['location_name_ids'][$app]["{$page_type}_above_content"];
349
+ $content = self::canvas($id, $app, "{$page_type}_above_content") . $content;
350
  }
351
 
352
  if (isset($settings[$app]["{$page_type}_below_content"]) &&
353
  $settings[$app]["{$page_type}_below_content"] == 'on') {
354
  // share_buttons_post_below_content
355
  $id = $settings['location_name_ids'][$app]["{$page_type}_below_content"];
356
+ $content .= self::canvas($id, $app, "{$page_type}_below_content");
357
  }
358
  }
359
  }
375
  * @param string $link url
376
  * @param string $summary summary text for URL
377
  */
378
+ public static function canvas($id, $app, $id_name, $title = NULL, $link = NULL, $summary = NULL) {
379
  global $post, $wp_query;
380
  $page_type = ShareaholicUtilities::page_type();
381
  $is_list_page = $page_type == 'index' || $page_type == 'category';
402
 
403
  $canvas = "<div class='shareaholic-canvas'
404
  data-app-id='$id'
405
+ data-app-id-name='$id_name'
406
  data-app='$app'
407
  data-title='$title'
408
  data-link='$link'
769
  'post_tags' => $tags,
770
  'post_categories' => $categories,
771
  'post_language' => get_bloginfo('language'),
772
+ 'post_published' => get_the_date( DATE_W3C ),
773
+ 'post_updated' => get_the_modified_date( DATE_W3C ),
774
  'post_visibility' => $post->post_status,
775
  ),
776
  'post_stats' => array(
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.2.0
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,10 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
196
 
197
  == Changelog ==
198
 
 
 
 
 
199
  = 8.2.0 =
200
  * New: **[Share Buttons for Images (Image Sharer)](https://blog.shareaholic.com/new-share-buttons-for-images-plugin/)** enhancements - you can now fully customize where these share buttons appear on your images and exactly how they will look and function, including setting opacity, offsets, icon padding, position, custom icon colors, size, and a lot more. All this, without touching ANY code! Also adds support for Facebook, Google+, Twitter, LinkedIn, Email, Fancy.com, Yummly and Houzz.
201
  * New: **[Shareaholic Teams](https://blog.shareaholic.com/shareaholic-teams-work-together-to-manage-your-website/)** – multi-user permissions to enable your team to work together to manage your website
@@ -637,6 +641,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
637
 
638
  == Upgrade Notice ==
639
 
 
 
 
640
  = 8.2.0 =
641
  * 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.
642
 
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.3.0
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.3.0 =
200
+ * Bugfix: Fixed issue where Share Buttons and Related Content apps were not showing after excerpts
201
+ * Various other performance updates and bug fixes
202
+
203
  = 8.2.0 =
204
  * New: **[Share Buttons for Images (Image Sharer)](https://blog.shareaholic.com/new-share-buttons-for-images-plugin/)** enhancements - you can now fully customize where these share buttons appear on your images and exactly how they will look and function, including setting opacity, offsets, icon padding, position, custom icon colors, size, and a lot more. All this, without touching ANY code! Also adds support for Facebook, Google+, Twitter, LinkedIn, Email, Fancy.com, Yummly and Houzz.
205
  * New: **[Shareaholic Teams](https://blog.shareaholic.com/shareaholic-teams-work-together-to-manage-your-website/)** – multi-user permissions to enable your team to work together to manage your website
641
 
642
  == Upgrade Notice ==
643
 
644
+ = 8.3.0 =
645
+ Various enhancements
646
+
647
  = 8.2.0 =
648
  * 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.
649
 
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 8.2.0
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.2.0
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.2.0';
67
 
68
  /**
69
  * Starts off as false so that ::get_instance() returns
@@ -104,6 +104,8 @@ if (!class_exists('Shareaholic')) {
104
  add_action('init', array('ShareaholicPublic', 'init'));
105
  add_action('after_setup_theme', array('ShareaholicPublic', 'after_setup_theme'));
106
  add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
 
 
107
  add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 6);
108
  add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
109
 
@@ -145,7 +147,7 @@ if (!class_exists('Shareaholic')) {
145
  // use the admin notice API
146
  add_action('admin_notices', array('ShareaholicAdmin', 'admin_notices'));
147
 
148
- // ShortCode UI specific hooks to prevent duplicate app rendering
149
  // https://wordpress.org/support/topic/custom-post-type-exclude-issue?replies=10#post-3370550
150
  add_action('scui_external_hooks_remove', array($this, 'remove_apps'));
151
  add_action('scui_external_hooks_return', array($this, 'return_apps'));
@@ -153,10 +155,12 @@ if (!class_exists('Shareaholic')) {
153
 
154
  public static function remove_apps() {
155
  remove_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
 
156
  }
157
 
158
  public static function return_apps() {
159
  add_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
 
160
  }
161
 
162
  /**
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 8.3.0
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.3.0
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.3.0';
67
 
68
  /**
69
  * Starts off as false so that ::get_instance() returns
104
  add_action('init', array('ShareaholicPublic', 'init'));
105
  add_action('after_setup_theme', array('ShareaholicPublic', 'after_setup_theme'));
106
  add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
107
+ add_action('the_excerpt', array('ShareaholicPublic', 'draw_canvases'));
108
+
109
  add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 6);
110
  add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
111
 
147
  // use the admin notice API
148
  add_action('admin_notices', array('ShareaholicAdmin', 'admin_notices'));
149
 
150
+ // ShortCode UI plugin specific hooks to prevent duplicate app rendering
151
  // https://wordpress.org/support/topic/custom-post-type-exclude-issue?replies=10#post-3370550
152
  add_action('scui_external_hooks_remove', array($this, 'remove_apps'));
153
  add_action('scui_external_hooks_return', array($this, 'return_apps'));
155
 
156
  public static function remove_apps() {
157
  remove_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
158
+ remove_filter('the_excerpt', array('ShareaholicPublic', 'draw_canvases'));
159
  }
160
 
161
  public static function return_apps() {
162
  add_filter('the_content', array('ShareaholicPublic', 'draw_canvases'));
163
+ add_filter('the_excerpt', array('ShareaholicPublic', 'draw_canvases'));
164
  }
165
 
166
  /**
templates/advanced_settings.php CHANGED
@@ -37,7 +37,7 @@
37
  <?php if (isset($settings['disable_internal_share_counts_api'])) { ?>
38
  <?php echo ($settings['disable_internal_share_counts_api'] == 'on' ? 'checked' : '') ?>
39
  <?php } ?>>
40
- <label class="font-normal" for="share_counts"> <?php echo sprintf(__('Disable server-side Share Counts API', 'shareaholic')); ?> <?php echo sprintf(__('(unless there are issues with calling the service, it is recommended NOT to disable this API)', 'shareaholic')); ?></label>
41
  <p>
42
  <input type='submit' class="btn btn-primary btn-medium" onclick="this.value='<?php echo sprintf(__('Saving Changes...', 'shareaholic')); ?>';" value='<?php echo sprintf(__('Save Changes', 'shareaholic')); ?>'>
43
  </p>
37
  <?php if (isset($settings['disable_internal_share_counts_api'])) { ?>
38
  <?php echo ($settings['disable_internal_share_counts_api'] == 'on' ? 'checked' : '') ?>
39
  <?php } ?>>
40
+ <label class="font-normal" for="share_counts"> <?php echo sprintf(__('Disable server-side Share Counts API', 'shareaholic')); ?> <?php echo sprintf(__('(This feature uses server resources. When "enabled" share counts will appear for <a href="https://github.com/shareaholic/shareaholic-api-docs/blob/master/api_share.md" target="_blank">additional social networks</a>.)', 'shareaholic')); ?></label>
41
  <p>
42
  <input type='submit' class="btn btn-primary btn-medium" onclick="this.value='<?php echo sprintf(__('Saving Changes...', 'shareaholic')); ?>';" value='<?php echo sprintf(__('Save Changes', 'shareaholic')); ?>'>
43
  </p>
utilities.php CHANGED
@@ -84,7 +84,7 @@ class ShareaholicUtilities {
84
  return array(
85
  'disable_admin_bar_menu' => 'off',
86
  'disable_debug_info' => 'off',
87
- 'disable_internal_share_counts_api' => 'off',
88
  'api_key' => '',
89
  'verification_key' => '',
90
  );
84
  return array(
85
  'disable_admin_bar_menu' => 'off',
86
  'disable_debug_info' => 'off',
87
+ 'disable_internal_share_counts_api' => 'on',
88
  'api_key' => '',
89
  'verification_key' => '',
90
  );