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

Version Description

New option to include %author% tag for Share Count Recovery

Download this release

Release Info

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

Code changes from version 8.10.2 to 8.10.3

admin.php CHANGED
@@ -525,7 +525,7 @@ JQUERY;
525
  if(isset($_POST['already_submitted']) && $_POST['already_submitted'] == 'Y' &&
526
  check_admin_referer($action, 'nonce_field')) {
527
  echo "<div class='updated settings_updated'><p><strong>". sprintf(__('Settings successfully saved', 'shareaholic')) . "</strong></p></div>";
528
- foreach (array('disable_og_tags', 'disable_admin_bar_menu', 'disable_debug_info', 'disable_internal_share_counts_api') as $setting) {
529
  if (isset($settings[$setting]) &&
530
  !isset($_POST['shareaholic'][$setting]) &&
531
  $settings[$setting] == 'on') {
@@ -555,6 +555,10 @@ JQUERY;
555
  ShareaholicUtilities::update_options(array('disable_debug_info' => $_POST['shareaholic']['disable_debug_info']));
556
  }
557
 
 
 
 
 
558
  if (isset($_POST['shareaholic']['disable_internal_share_counts_api'])) {
559
  ShareaholicUtilities::update_options(array('disable_internal_share_counts_api' => $_POST['shareaholic']['disable_internal_share_counts_api']));
560
  }
525
  if(isset($_POST['already_submitted']) && $_POST['already_submitted'] == 'Y' &&
526
  check_admin_referer($action, 'nonce_field')) {
527
  echo "<div class='updated settings_updated'><p><strong>". sprintf(__('Settings successfully saved', 'shareaholic')) . "</strong></p></div>";
528
+ foreach (array('disable_og_tags', 'disable_admin_bar_menu', 'disable_debug_info', 'enable_user_nicename','disable_internal_share_counts_api') as $setting) {
529
  if (isset($settings[$setting]) &&
530
  !isset($_POST['shareaholic'][$setting]) &&
531
  $settings[$setting] == 'on') {
555
  ShareaholicUtilities::update_options(array('disable_debug_info' => $_POST['shareaholic']['disable_debug_info']));
556
  }
557
 
558
+ if (isset($_POST['shareaholic']['enable_user_nicename'])) {
559
+ ShareaholicUtilities::update_options(array('enable_user_nicename' => $_POST['shareaholic']['enable_user_nicename']));
560
+ }
561
+
562
  if (isset($_POST['shareaholic']['disable_internal_share_counts_api'])) {
563
  ShareaholicUtilities::update_options(array('disable_internal_share_counts_api' => $_POST['shareaholic']['disable_internal_share_counts_api']));
564
  }
assets/css/main.css CHANGED
@@ -12,6 +12,10 @@ body {
12
  text-decoration: none;
13
  }
14
 
 
 
 
 
15
  .btn-warning {
16
  color: #fff !important;
17
  }
12
  text-decoration: none;
13
  }
14
 
15
+ .update-nag {
16
+ display: none !important;
17
+ }
18
+
19
  .btn-warning {
20
  color: #fff !important;
21
  }
public_js.php CHANGED
@@ -47,7 +47,10 @@ class ShareaholicPublicJS {
47
 
48
  $base_settings['url_components']['post_id'] = "$post->ID";
49
  $base_settings['url_components']['postname'] = $post->post_name;
50
- $base_settings['url_components']['author'] = get_the_author_meta('user_nicename', $post->post_author);
 
 
 
51
 
52
  // ******** copied from WP core - START ******** //
53
  $category = '';
47
 
48
  $base_settings['url_components']['post_id'] = "$post->ID";
49
  $base_settings['url_components']['postname'] = $post->post_name;
50
+
51
+ if (ShareaholicUtilities::get_option('enable_user_nicename') == "on"){
52
+ $base_settings['url_components']['author'] = get_the_author_meta('user_nicename', $post->post_author);
53
+ }
54
 
55
  // ******** copied from WP core - START ******** //
56
  $category = '';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: buttons, related posts, google analytics, share buttons, social sharing,
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
  Requires PHP: 5.2
7
- Stable tag: 8.10.2
8
 
9
 
10
  Improve Audience Engagement with Award Winning Site-Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
@@ -244,6 +244,10 @@ Yes! Shareaholic's core features are and always will be free.
244
 
245
  Shareaholic's paid services include Share Count Recovery, advanced analytics, premium customization settings, priority support, and more. To learn more, visit our [plan comparison page](https://www.shareaholic.com/plans).
246
 
 
 
 
 
247
  = Where can I find a detailed FAQ? =
248
 
249
  Please see here: [Shareaholic Helpdesk](https://support.shareaholic.com/hc/en-us)
@@ -259,6 +263,9 @@ The default Shareaholic thumbnail width is 640px with dynamic height and no crop
259
  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.
260
 
261
  == Changelog ==
 
 
 
262
  = 8.10.2 (2018-11-20) =
263
  * Bugfix: Fixed issue with Site Profile ID generation introduced in 8.10.0
264
 
@@ -840,6 +847,9 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
840
 
841
  == Upgrade Notice ==
842
 
 
 
 
843
  = 8.10.2 =
844
 
845
  Various reliablity improvements
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
  Requires PHP: 5.2
7
+ Stable tag: 8.10.3
8
 
9
 
10
  Improve Audience Engagement with Award Winning Site-Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
244
 
245
  Shareaholic's paid services include Share Count Recovery, advanced analytics, premium customization settings, priority support, and more. To learn more, visit our [plan comparison page](https://www.shareaholic.com/plans).
246
 
247
+ = Shareaholic is not displaying for me. Why, and what should I try? =
248
+
249
+ Something on your own personal device/browser/connection is likely filtering web functionality like major social buttons. The usual cause for this uncommon issue is 3rd party browser add-on software that blocks ads and optionally filters out major social buttons. For example, some security apps and Internet connections have an option to filter social buttons. Usually a social filter option is disabled by default, but if you find that some software is inappropriately filtering Shareaholic, please [let us know](https://www.shareaholic.com/contact).
250
+
251
  = Where can I find a detailed FAQ? =
252
 
253
  Please see here: [Shareaholic Helpdesk](https://support.shareaholic.com/hc/en-us)
263
  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.
264
 
265
  == Changelog ==
266
+ = 8.10.3 (2018-12-11) =
267
+ * Enhancement: Advanced option to include <code>%author%</code> tag for [Share Count Recovery](https://www.shareaholic.com/sharecounter/)
268
+
269
  = 8.10.2 (2018-11-20) =
270
  * Bugfix: Fixed issue with Site Profile ID generation introduced in 8.10.0
271
 
847
 
848
  == Upgrade Notice ==
849
 
850
+ = 8.10.3 =
851
+ New option to include <code>%author%</code> tag for Share Count Recovery
852
+
853
  = 8.10.2 =
854
 
855
  Various reliablity improvements
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 8.10.2
7
  */
8
 
9
  /*
10
  Plugin Name: Shareaholic - Share Buttons, Analytics, Related Posts
11
  Plugin URI: https://www.shareaholic.com/website-tools/
12
  Description: The best WordPress all-in-one Social Media and Related Posts solution. Get found on social and grow your following. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for settings.
13
- Version: 8.10.2
14
  Author: Shareaholic
15
  Author URI: https://www.shareaholic.com
16
  Text Domain: shareaholic
@@ -61,7 +61,7 @@ if (!class_exists('Shareaholic')) {
61
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
62
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
63
 
64
- const VERSION = '8.10.2';
65
 
66
  /**
67
  * Starts off as false so that ::get_instance() returns
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 8.10.3
7
  */
8
 
9
  /*
10
  Plugin Name: Shareaholic - Share Buttons, Analytics, Related Posts
11
  Plugin URI: https://www.shareaholic.com/website-tools/
12
  Description: The best WordPress all-in-one Social Media and Related Posts solution. Get found on social and grow your following. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for settings.
13
+ Version: 8.10.3
14
  Author: Shareaholic
15
  Author URI: https://www.shareaholic.com
16
  Text Domain: shareaholic
61
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
62
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
63
 
64
+ const VERSION = '8.10.3';
65
 
66
  /**
67
  * Starts off as false so that ::get_instance() returns
templates/advanced_settings.php CHANGED
@@ -33,6 +33,12 @@
33
  <?php } ?>>
34
  <label class="font-normal" for="debugger"> <?php echo sprintf(__('Disable Debugger (it is recommended NOT to disable the debugger)', 'shareaholic')); ?></label>
35
  <br/>
 
 
 
 
 
 
36
  <input type='checkbox' id='share_counts' name='shareaholic[disable_internal_share_counts_api]' class='check'
37
  <?php if (isset($settings['disable_internal_share_counts_api'])) { ?>
38
  <?php echo ($settings['disable_internal_share_counts_api'] == 'on' ? 'checked' : '') ?>
@@ -60,12 +66,14 @@
60
  <?php } ?>
61
  </p>
62
  <p>
63
- <?php if (ShareaholicUtilities::share_counts_api_connectivity_check() == 'SUCCESS') { ?>
64
- <span class="key-status passed"><i class="fa fa-circle" aria-hidden="true" class="green"></i> <?php _e('Server-side Share Counts API is reachable', 'shareaholic'); ?></span>
65
- <p class="key-description"><?php _e('The server-side Share Counts API should be working correctly.', 'shareaholic'); ?> <?php _e('All servers and services needed by the API are accessible.', 'shareaholic'); ?></p>
66
- <?php } else { // can't connect to any server ?>
67
- <span class="key-status failed"><i class="fa fa-circle" aria-hidden="true" class="red"></i> <?php _e('Unable to reach the server-side Share Count API', 'shareaholic'); ?></span> <a href="#" onClick="window.location.reload(); this.innerHTML='<?php _e('Checking...', 'shareaholic'); ?>';"><?php _e('Re-check', 'shareaholic'); ?></a>
68
- <p class="key-description"><?php echo sprintf( __('A network problem or firewall is blocking connections from your web server to various Share Count APIs. <strong>The API cannot work correctly until this is fixed.</strong> If you continue to face this issue, please contact <a href="#" onclick="%s">us</a> and we will follow up! In the meantime, if you disable the server-side Share Counts API from the Advanced options above, Shareaholic will default to using client-side APIs for share counts successfully -- so nothing to worry about!'), 'SnapEngage.startLink();'); ?></p>
 
 
69
  <?php } ?>
70
  </p>
71
  </div>
33
  <?php } ?>>
34
  <label class="font-normal" for="debugger"> <?php echo sprintf(__('Disable Debugger (it is recommended NOT to disable the debugger)', 'shareaholic')); ?></label>
35
  <br/>
36
+ <input type='checkbox' id='user_nicename' name='shareaholic[enable_user_nicename]' class='check'
37
+ <?php if (isset($settings['enable_user_nicename'])) { ?>
38
+ <?php echo ($settings['enable_user_nicename'] == 'on' ? 'checked' : '') ?>
39
+ <?php } ?>>
40
+ <label class="font-normal" for="user_nicename"> <?php echo sprintf(__('Enable <code>&percnt;author&percnt;</code> permalink tag for Share Count Recovery', 'shareaholic')); ?></label>
41
+ <br/>
42
  <input type='checkbox' id='share_counts' name='shareaholic[disable_internal_share_counts_api]' class='check'
43
  <?php if (isset($settings['disable_internal_share_counts_api'])) { ?>
44
  <?php echo ($settings['disable_internal_share_counts_api'] == 'on' ? 'checked' : '') ?>
66
  <?php } ?>
67
  </p>
68
  <p>
69
+ <?php if (ShareaholicUtilities::get_option('disable_internal_share_counts_api') == NULL || ShareaholicUtilities::get_option('disable_internal_share_counts_api') == "off"){ ?>
70
+ <?php if (ShareaholicUtilities::share_counts_api_connectivity_check() == 'SUCCESS') { ?>
71
+ <span class="key-status passed"><i class="fa fa-circle" aria-hidden="true" class="green"></i> <?php _e('Server-side Share Counts API is reachable', 'shareaholic'); ?></span>
72
+ <p class="key-description"><?php _e('The server-side Share Counts API should be working correctly.', 'shareaholic'); ?> <?php _e('All servers and services needed by the API are accessible.', 'shareaholic'); ?></p>
73
+ <?php } else { // can't connect to any server ?>
74
+ <span class="key-status failed"><i class="fa fa-circle" aria-hidden="true" class="red"></i> <?php _e('Unable to reach the server-side Share Count API', 'shareaholic'); ?></span> <a href="#" onClick="window.location.reload(); this.innerHTML='<?php _e('Checking...', 'shareaholic'); ?>';"><?php _e('Re-check', 'shareaholic'); ?></a>
75
+ <p class="key-description"><?php echo sprintf( __('A network problem or firewall is blocking connections from your web server to various Share Count APIs. <strong>The API cannot work correctly until this is fixed.</strong> If you continue to face this issue, please contact <a href="#" onclick="%s">us</a> and we will follow up! In the meantime, if you disable the server-side Share Counts API from the Advanced options above, Shareaholic will default to using client-side APIs for share counts successfully -- so nothing to worry about!'), 'SnapEngage.startLink();'); ?></p>
76
+ <?php } ?>
77
  <?php } ?>
78
  </p>
79
  </div>
utilities.php CHANGED
@@ -84,6 +84,7 @@ class ShareaholicUtilities {
84
  return array(
85
  'disable_admin_bar_menu' => 'on',
86
  'disable_debug_info' => 'off',
 
87
  'disable_internal_share_counts_api' => 'on',
88
  'api_key' => '',
89
  'verification_key' => '',
84
  return array(
85
  'disable_admin_bar_menu' => 'on',
86
  'disable_debug_info' => 'off',
87
+ 'enable_user_nicename' => 'off',
88
  'disable_internal_share_counts_api' => 'on',
89
  'api_key' => '',
90
  'verification_key' => '',