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 | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 8.13.8 |
Comparing to | |
See all releases |
Code changes from version 8.13.7 to 8.13.8
- admin.php +23 -8
- cron.php +3 -1
- readme.txt +41 -12
- shareaholic.php +3 -3
- templates/advanced_settings.php +7 -0
- utilities.php +1 -0
admin.php
CHANGED
@@ -14,8 +14,8 @@ class ShareaholicAdmin {
|
|
14 |
|
15 |
const ACTIVATE_TIMESTAMP_OPTION = 'shareaholic_activate_timestamp';
|
16 |
const REVIEW_DISMISS_OPTION = 'shareaholic_review_notice';
|
17 |
-
const REVIEW_FIRST_PERIOD =
|
18 |
-
const REVIEW_LATER_PERIOD =
|
19 |
const REVIEW_FOREVER_PERIOD = 63113904; // 2 years in seconds
|
20 |
|
21 |
/**
|
@@ -48,7 +48,7 @@ class ShareaholicAdmin {
|
|
48 |
$user_id = $current_user->ID;
|
49 |
|
50 |
if (!is_admin() ||
|
51 |
-
!current_user_can('
|
52 |
!isset($_GET['_wpnonce']) ||
|
53 |
!wp_verify_nonce($_GET['_wpnonce'], 'review-nonce') ||
|
54 |
!isset($_GET['shr_defer_t']) ||
|
@@ -96,6 +96,9 @@ class ShareaholicAdmin {
|
|
96 |
|
97 |
public static function display_review_notice() {
|
98 |
|
|
|
|
|
|
|
99 |
$dismiss_forever = add_query_arg( array(
|
100 |
self::REVIEW_DISMISS_OPTION => true,
|
101 |
'shr_defer_t' => self::REVIEW_FOREVER_PERIOD
|
@@ -105,7 +108,7 @@ class ShareaholicAdmin {
|
|
105 |
self::REVIEW_DISMISS_OPTION => true,
|
106 |
'shr_defer_t' => self::REVIEW_LATER_PERIOD
|
107 |
));
|
108 |
-
|
109 |
$dismiss_forever_url = wp_nonce_url($dismiss_forever, 'review-nonce');
|
110 |
$dismiss_forlater_url = wp_nonce_url($dismiss_forlater, 'review-nonce');
|
111 |
|
@@ -132,12 +135,20 @@ class ShareaholicAdmin {
|
|
132 |
}
|
133 |
}
|
134 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
<div class="notice notice-info is-dismissible shareaholic-review-notice">
|
136 |
<p class="shareaholic-review-notice-text">' . __('Hey there! We noticed that you have had success using ', 'shareaholic') . '<a href="' . admin_url('admin.php?page=shareaholic-settings') . '">Shareaholic</a>' . __(' — awesome! Could you please do us a BIG favor and give us a quick 5-star rating on WordPress? It would help us spread the word and boost our motivation. We would really appreciate it 🙂 ~ Your friends @ Shareaholic', 'shareaholic') . '
|
137 |
<br />
|
138 |
<br />
|
139 |
-
<a
|
140 |
-
<a
|
141 |
<a href="' . $dismiss_forever_url . '">' . __('I already did', 'shareaholic') . '</a>
|
142 |
</p>
|
143 |
</div>';
|
@@ -149,7 +160,7 @@ class ShareaholicAdmin {
|
|
149 |
*/
|
150 |
|
151 |
public static function activation_redirect() {
|
152 |
-
// Bail if no activation redirect
|
153 |
if (!get_transient('_shr_activation_redirect')){
|
154 |
return;
|
155 |
}
|
@@ -617,7 +628,7 @@ JQUERY;
|
|
617 |
check_admin_referer($action, 'nonce_field')) {
|
618 |
echo "<div class='updated settings_updated'><p><strong>". sprintf(__('Settings successfully saved', 'shareaholic')) . "</strong></p></div>";
|
619 |
|
620 |
-
foreach (array('disable_og_tags', 'disable_admin_bar_menu', 'disable_debug_info', 'enable_user_nicename','disable_internal_share_counts_api') as $setting) {
|
621 |
if (!isset($_POST['shareaholic'][$setting])) {
|
622 |
// If form value is unchecked, set to off
|
623 |
$_POST['shareaholic'][$setting] = 'off';
|
@@ -640,6 +651,10 @@ JQUERY;
|
|
640 |
ShareaholicUtilities::update_options(array('disable_admin_bar_menu' => $_POST['shareaholic']['disable_admin_bar_menu']));
|
641 |
}
|
642 |
|
|
|
|
|
|
|
|
|
643 |
if (isset($_POST['shareaholic']['facebook_app_id'])) {
|
644 |
ShareaholicUtilities::update_options(array('facebook_app_id' => sanitize_text_field($_POST['shareaholic']['facebook_app_id'])));
|
645 |
}
|
14 |
|
15 |
const ACTIVATE_TIMESTAMP_OPTION = 'shareaholic_activate_timestamp';
|
16 |
const REVIEW_DISMISS_OPTION = 'shareaholic_review_notice';
|
17 |
+
const REVIEW_FIRST_PERIOD = 518400; // 6 days in seconds
|
18 |
+
const REVIEW_LATER_PERIOD = 7776000; // 3 months in seconds
|
19 |
const REVIEW_FOREVER_PERIOD = 63113904; // 2 years in seconds
|
20 |
|
21 |
/**
|
48 |
$user_id = $current_user->ID;
|
49 |
|
50 |
if (!is_admin() ||
|
51 |
+
!current_user_can('publish_posts') ||
|
52 |
!isset($_GET['_wpnonce']) ||
|
53 |
!wp_verify_nonce($_GET['_wpnonce'], 'review-nonce') ||
|
54 |
!isset($_GET['shr_defer_t']) ||
|
96 |
|
97 |
public static function display_review_notice() {
|
98 |
|
99 |
+
if (ShareaholicUtilities::get_option('disable_review_notice') == "on")
|
100 |
+
return;
|
101 |
+
|
102 |
$dismiss_forever = add_query_arg( array(
|
103 |
self::REVIEW_DISMISS_OPTION => true,
|
104 |
'shr_defer_t' => self::REVIEW_FOREVER_PERIOD
|
108 |
self::REVIEW_DISMISS_OPTION => true,
|
109 |
'shr_defer_t' => self::REVIEW_LATER_PERIOD
|
110 |
));
|
111 |
+
|
112 |
$dismiss_forever_url = wp_nonce_url($dismiss_forever, 'review-nonce');
|
113 |
$dismiss_forlater_url = wp_nonce_url($dismiss_forlater, 'review-nonce');
|
114 |
|
135 |
}
|
136 |
}
|
137 |
</style>
|
138 |
+
|
139 |
+
<script>
|
140 |
+
function shr_openWindowReload(link, reload) {
|
141 |
+
window.open(link, "_blank");
|
142 |
+
document.location.href = reload;
|
143 |
+
}
|
144 |
+
</script>
|
145 |
+
|
146 |
<div class="notice notice-info is-dismissible shareaholic-review-notice">
|
147 |
<p class="shareaholic-review-notice-text">' . __('Hey there! We noticed that you have had success using ', 'shareaholic') . '<a href="' . admin_url('admin.php?page=shareaholic-settings') . '">Shareaholic</a>' . __(' — awesome! Could you please do us a BIG favor and give us a quick 5-star rating on WordPress? It would help us spread the word and boost our motivation. We would really appreciate it 🙂 ~ Your friends @ Shareaholic', 'shareaholic') . '
|
148 |
<br />
|
149 |
<br />
|
150 |
+
<a onClick="' . "shr_openWindowReload('https://wordpress.org/support/plugin/shareaholic/reviews/?rate=5#new-post', '$dismiss_forever_url')" . '" class="button button-primary">' . __('Ok, you deserve it', 'shareaholic') . '</a>
|
151 |
+
<a href="' . $dismiss_forlater_url . '">' . __('No, not good enough', 'shareaholic') . '</a>
|
152 |
<a href="' . $dismiss_forever_url . '">' . __('I already did', 'shareaholic') . '</a>
|
153 |
</p>
|
154 |
</div>';
|
160 |
*/
|
161 |
|
162 |
public static function activation_redirect() {
|
163 |
+
// Bail if no activation redirect transient
|
164 |
if (!get_transient('_shr_activation_redirect')){
|
165 |
return;
|
166 |
}
|
628 |
check_admin_referer($action, 'nonce_field')) {
|
629 |
echo "<div class='updated settings_updated'><p><strong>". sprintf(__('Settings successfully saved', 'shareaholic')) . "</strong></p></div>";
|
630 |
|
631 |
+
foreach (array('disable_og_tags', 'disable_admin_bar_menu', 'disable_review_notice', 'disable_debug_info', 'enable_user_nicename','disable_internal_share_counts_api') as $setting) {
|
632 |
if (!isset($_POST['shareaholic'][$setting])) {
|
633 |
// If form value is unchecked, set to off
|
634 |
$_POST['shareaholic'][$setting] = 'off';
|
651 |
ShareaholicUtilities::update_options(array('disable_admin_bar_menu' => $_POST['shareaholic']['disable_admin_bar_menu']));
|
652 |
}
|
653 |
|
654 |
+
if (isset($_POST['shareaholic']['disable_review_notice'])) {
|
655 |
+
ShareaholicUtilities::update_options(array('disable_review_notice' => $_POST['shareaholic']['disable_review_notice']));
|
656 |
+
}
|
657 |
+
|
658 |
if (isset($_POST['shareaholic']['facebook_app_id'])) {
|
659 |
ShareaholicUtilities::update_options(array('facebook_app_id' => sanitize_text_field($_POST['shareaholic']['facebook_app_id'])));
|
660 |
}
|
cron.php
CHANGED
@@ -59,7 +59,9 @@ class ShareaholicCron {
|
|
59 |
}
|
60 |
|
61 |
public static function heartbeat() {
|
62 |
-
ShareaholicUtilities::
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
59 |
}
|
60 |
|
61 |
public static function heartbeat() {
|
62 |
+
if (ShareaholicUtilities::has_accepted_terms_of_service()) {
|
63 |
+
ShareaholicUtilities::heartbeat();
|
64 |
+
}
|
65 |
}
|
66 |
|
67 |
/**
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: social, social sharing, google analytics, pinterest, twitter, share butto
|
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.2
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 8.13.
|
8 |
|
9 |
|
10 |
Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
|
@@ -148,18 +148,29 @@ A special thanks to some of you who have helped us out a great deal:
|
|
148 |
|
149 |
Shareaholic is used all over the world. Our goal is to support Shareaholic in the native language of all our users and people who want to use our products.
|
150 |
|
151 |
-
All text across all
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
*
|
156 |
-
*
|
157 |
-
*
|
158 |
-
* German (de)
|
159 |
-
* Japanese (ja)
|
160 |
* Dutch (nl)
|
161 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
* Portuguese (pt)
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
* Contribute a translation! -- we would appreciate your help in translating Shareaholic into even more languages! It doesn’t take much to get started. [Instructions](https://translate.wordpress.org/projects/wp-plugins/shareaholic).
|
164 |
|
165 |
== Social Platform Integrations ==
|
@@ -272,12 +283,26 @@ When Shareaholic is activated it redirects to its welcome screen. If you want to
|
|
272 |
*
|
273 |
* Use this if you use the TGM Plugin Activation to install plugins
|
274 |
*/
|
275 |
-
|
276 |
function prefix_shareaholic_disable_welcome_redirect() {
|
277 |
delete_transient( '_shr_activation_redirect' );
|
278 |
}
|
279 |
`
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
= How can I change the thumbnail image size for Shareaholic Related Posts? =
|
282 |
|
283 |
The default Shareaholic thumbnail width is 640px with dynamic height and no cropping. The thumbnail size can be specified programmatically by adding `add_image_size('shareaholic-thumbnail', $width, $height, true);` to your theme's `functions.php` file with [appropriate width and height variables](https://developer.wordpress.org/reference/functions/add_image_size/).
|
@@ -285,6 +310,10 @@ The default Shareaholic thumbnail width is 640px with dynamic height and no crop
|
|
285 |
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.
|
286 |
|
287 |
== Changelog ==
|
|
|
|
|
|
|
|
|
288 |
= 8.13.7 (2019-09-16) =
|
289 |
* Huge Enhancement: We have been working hard on reducing Shareaholic's code footprint. We are pleased to share that Shareaholic code has shed ~20% of its size, is much faster, and is no longer dependent on jQuery! More work is actively being done here - stay tuned.
|
290 |
* Enhancement: Calls to the Share Count Proxy [More info](https://www.shareaholic.com/blog/social-share-count-api/) are consolidated to one single request for a given page. This dramatically cuts down on the number of requests on a page for faster load times.
|
@@ -963,7 +992,7 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
|
|
963 |
* Show Related Posts data status
|
964 |
|
965 |
== Upgrade Notice ==
|
966 |
-
= 8.13.
|
967 |
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!
|
968 |
|
969 |
= 8.12.1 =
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.2
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 8.13.8
|
8 |
|
9 |
|
10 |
Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
|
148 |
|
149 |
Shareaholic is used all over the world. Our goal is to support Shareaholic in the native language of all our users and people who want to use our products.
|
150 |
|
151 |
+
All text across all Apps such as Share Buttons, Cookie Consent, Content Recommendations, etc are customizable **to any language**.
|
152 |
|
153 |
+
The Shareaholic Plugin Admin UI itself is currently localized in the following languages:
|
154 |
+
|
155 |
+
* Catalan - Català (ca)
|
156 |
+
* Chinese Simplified - 简体中文 (zh-CN)
|
157 |
+
* Chinese Traditional - 中國傳統的 (zh-TW)
|
|
|
|
|
158 |
* Dutch (nl)
|
159 |
+
* English (en)
|
160 |
+
* Estonian - Eestlane (et)
|
161 |
+
* French - Français (fr)
|
162 |
+
* German - Deutsch (de)
|
163 |
+
* Greek - Ελληνικά (el)
|
164 |
+
* Italian - Italiano (it)
|
165 |
+
* Japanese - 日本語 (ja)
|
166 |
+
* Polish - polski (pl)
|
167 |
* Portuguese (pt)
|
168 |
+
* Romanian - Română (ro)
|
169 |
+
* Russian - Русский (ru)
|
170 |
+
* Spanish - Español (es)
|
171 |
+
* Swedish - svenska (sv)
|
172 |
+
* Turkish - Türk (tr)
|
173 |
+
* Vietnamese - Tiếng Việt (vi)
|
174 |
* Contribute a translation! -- we would appreciate your help in translating Shareaholic into even more languages! It doesn’t take much to get started. [Instructions](https://translate.wordpress.org/projects/wp-plugins/shareaholic).
|
175 |
|
176 |
== Social Platform Integrations ==
|
283 |
*
|
284 |
* Use this if you use the TGM Plugin Activation to install plugins
|
285 |
*/
|
|
|
286 |
function prefix_shareaholic_disable_welcome_redirect() {
|
287 |
delete_transient( '_shr_activation_redirect' );
|
288 |
}
|
289 |
`
|
290 |
|
291 |
+
= Can I disable the Review Notice forever? =
|
292 |
+
|
293 |
+
If you want to prevent the Review Notice from appearing you can use the function below:
|
294 |
+
|
295 |
+
`
|
296 |
+
/**
|
297 |
+
* Disable Shareaholic Review Notice
|
298 |
+
*
|
299 |
+
*/
|
300 |
+
function prefix_shareaholic_disable_review_notice() {
|
301 |
+
remove_action('admin_notices', array('ShareaholicAdmin', 'display_review_notice'));
|
302 |
+
}
|
303 |
+
add_action('admin_init', 'prefix_shareaholic_disable_review_notice', 11);
|
304 |
+
`
|
305 |
+
|
306 |
= How can I change the thumbnail image size for Shareaholic Related Posts? =
|
307 |
|
308 |
The default Shareaholic thumbnail width is 640px with dynamic height and no cropping. The thumbnail size can be specified programmatically by adding `add_image_size('shareaholic-thumbnail', $width, $height, true);` to your theme's `functions.php` file with [appropriate width and height variables](https://developer.wordpress.org/reference/functions/add_image_size/).
|
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 |
+
= 8.13.8 (2019-09-16) =
|
314 |
+
* Enhancement: Review Notice updates
|
315 |
+
* Enhancement: Advanced Option to disable the Review Notice for everyone
|
316 |
+
|
317 |
= 8.13.7 (2019-09-16) =
|
318 |
* Huge Enhancement: We have been working hard on reducing Shareaholic's code footprint. We are pleased to share that Shareaholic code has shed ~20% of its size, is much faster, and is no longer dependent on jQuery! More work is actively being done here - stay tuned.
|
319 |
* Enhancement: Calls to the Share Count Proxy [More info](https://www.shareaholic.com/blog/social-share-count-api/) are consolidated to one single request for a given page. This dramatically cuts down on the number of requests on a page for faster load times.
|
992 |
* Show Related Posts data status
|
993 |
|
994 |
== Upgrade Notice ==
|
995 |
+
= 8.13.8 =
|
996 |
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!
|
997 |
|
998 |
= 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: 8.13.
|
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 8.13.
|
18 |
*/
|
19 |
|
20 |
/**
|
@@ -59,7 +59,7 @@ if (!class_exists('Shareaholic')) {
|
|
59 |
const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
60 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
61 |
|
62 |
-
const VERSION = '8.13.
|
63 |
|
64 |
/**
|
65 |
* 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: 8.13.8
|
7 |
Author: Shareaholic
|
8 |
Author URI: https://www.shareaholic.com
|
9 |
Text Domain: shareaholic
|
14 |
* The main file!
|
15 |
*
|
16 |
* @package shareaholic
|
17 |
+
* @version 8.13.8
|
18 |
*/
|
19 |
|
20 |
/**
|
59 |
const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
60 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
61 |
|
62 |
+
const VERSION = '8.13.8';
|
63 |
|
64 |
/**
|
65 |
* Starts off as false so that ::get_instance() returns
|
templates/advanced_settings.php
CHANGED
@@ -135,6 +135,13 @@ window.ShareaholicConfig = {
|
|
135 |
<?php } ?>>
|
136 |
<label for="admin_bar"> <?php echo sprintf(__('Disable Admin Bar Menu (requires page refresh)', 'shareaholic')); ?></label>
|
137 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
<div class="shr-form-item">
|
139 |
<input type='checkbox' id='debugger' name='shareaholic[disable_debug_info]' class='check'
|
140 |
<?php if (isset($settings['disable_debug_info'])) { ?>
|
135 |
<?php } ?>>
|
136 |
<label for="admin_bar"> <?php echo sprintf(__('Disable Admin Bar Menu (requires page refresh)', 'shareaholic')); ?></label>
|
137 |
</div>
|
138 |
+
<div class="shr-form-item">
|
139 |
+
<input type='checkbox' id='review_notice' name='shareaholic[disable_review_notice]' class='check'
|
140 |
+
<?php if (isset($settings['disable_review_notice'])) { ?>
|
141 |
+
<?php echo ($settings['disable_review_notice'] == 'on' ? 'checked' : '') ?>
|
142 |
+
<?php } ?>>
|
143 |
+
<label for="review_notice"> <?php echo sprintf(__('Disable Review Notice', 'shareaholic')); ?></label>
|
144 |
+
</div>
|
145 |
<div class="shr-form-item">
|
146 |
<input type='checkbox' id='debugger' name='shareaholic[disable_debug_info]' class='check'
|
147 |
<?php if (isset($settings['disable_debug_info'])) { ?>
|
utilities.php
CHANGED
@@ -83,6 +83,7 @@ class ShareaholicUtilities {
|
|
83 |
private static function defaults() {
|
84 |
return array(
|
85 |
'disable_admin_bar_menu' => 'on', // advanced
|
|
|
86 |
'disable_debug_info' => 'off', // advanced
|
87 |
'enable_user_nicename' => 'off', // advanced
|
88 |
'disable_internal_share_counts_api' => 'on', // advanced
|
83 |
private static function defaults() {
|
84 |
return array(
|
85 |
'disable_admin_bar_menu' => 'on', // advanced
|
86 |
+
'disable_review_notice' => 'off', // advanced
|
87 |
'disable_debug_info' => 'off', // advanced
|
88 |
'enable_user_nicename' => 'off', // advanced
|
89 |
'disable_internal_share_counts_api' => 'on', // advanced
|