Version Description
- Enhancement: Show message to users in permalink section in regards to share counts
Download this release
Release Info
Developer | hngu_shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 7.6.2.0 |
Comparing to | |
See all releases |
Code changes from version 7.6.1.9 to 7.6.2.0
- admin.php +8 -0
- readme.txt +7 -1
- shareaholic.php +6 -4
- templates/settings.php +0 -11
- utilities.php +0 -30
admin.php
CHANGED
@@ -482,4 +482,12 @@ class ShareaholicAdmin {
|
|
482 |
wp_mail($to, $subject, $message, $headers);
|
483 |
}
|
484 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
}
|
482 |
wp_mail($to, $subject, $message, $headers);
|
483 |
}
|
484 |
}
|
485 |
+
|
486 |
+
public static function permalink_notice() {
|
487 |
+
$css_class = 'error';
|
488 |
+
$message = 'WARNING: changing the permalink structure will reset the share counts for your pages.';
|
489 |
+
echo "<div class='$css_class'><p style='font-weight: bold;'>";
|
490 |
+
_e($message, 'Shareaholic');
|
491 |
+
echo '</p></div>';
|
492 |
+
}
|
493 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.
|
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,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
170 |
|
171 |
== Changelog ==
|
172 |
|
|
|
|
|
|
|
173 |
= 7.6.1.9 =
|
174 |
* Enhancement: Updated reset plugin routine to not get new key
|
175 |
|
@@ -1219,6 +1222,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
1219 |
|
1220 |
== Upgrade Notice ==
|
1221 |
|
|
|
|
|
|
|
1222 |
= 7.6.1.9 =
|
1223 |
* Enhancement: Updated reset plugin routine to not get new key
|
1224 |
|
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.0
|
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.0 =
|
174 |
+
* Enhancement: Show message to users in permalink section in regards to share counts
|
175 |
+
|
176 |
= 7.6.1.9 =
|
177 |
* Enhancement: Updated reset plugin routine to not get new key
|
178 |
|
1222 |
|
1223 |
== Upgrade Notice ==
|
1224 |
|
1225 |
+
= 7.6.2.0 =
|
1226 |
+
* Enhancement: Show message to users in permalink section in regards to share counts
|
1227 |
+
|
1228 |
= 7.6.1.9 =
|
1229 |
* Enhancement: Updated reset plugin routine to not get new key
|
1230 |
|
shareaholic.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
-
* @version 7.6.
|
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.
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
@@ -38,7 +38,6 @@ if(!defined('SHAREAHOLIC_ASSET_DIR')) define('SHAREAHOLIC_ASSET_DIR', plugins_ur
|
|
38 |
|
39 |
// Caching
|
40 |
if(!defined('SHARE_COUNTS_CHECK_CACHE_LENGTH')) define( 'SHARE_COUNTS_CHECK_CACHE_LENGTH', 300 ); // 300 seconds
|
41 |
-
if(!defined('RECOMMENDATIONS_STATUS_CHECK_CACHE_LENGTH')) define( 'RECOMMENDATIONS_STATUS_CHECK_CACHE_LENGTH', 60 ); // 60 seconds
|
42 |
|
43 |
// because define can use function returns and const can't
|
44 |
if(!defined('SHAREAHOLIC_DEBUG')) define('SHAREAHOLIC_DEBUG', getenv('SHAREAHOLIC_DEBUG'));
|
@@ -64,7 +63,7 @@ if (!class_exists('Shareaholic')) {
|
|
64 |
const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
|
65 |
const REC_API_URL = 'http://recommendations.shareaholic.com';
|
66 |
|
67 |
-
const VERSION = '7.6.
|
68 |
|
69 |
/**
|
70 |
* Starts off as false so that ::get_instance() returns
|
@@ -138,6 +137,9 @@ if (!class_exists('Shareaholic')) {
|
|
138 |
|
139 |
// do something before a site's permalink structure changes
|
140 |
add_action('update_option_permalink_structure', array('ShareaholicUtilities', 'notify_content_manager_sitemap'));
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
/**
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
+
* @version 7.6.2.0
|
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.0
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
38 |
|
39 |
// Caching
|
40 |
if(!defined('SHARE_COUNTS_CHECK_CACHE_LENGTH')) define( 'SHARE_COUNTS_CHECK_CACHE_LENGTH', 300 ); // 300 seconds
|
|
|
41 |
|
42 |
// because define can use function returns and const can't
|
43 |
if(!defined('SHAREAHOLIC_DEBUG')) define('SHAREAHOLIC_DEBUG', getenv('SHAREAHOLIC_DEBUG'));
|
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.0';
|
67 |
|
68 |
/**
|
69 |
* Starts off as false so that ::get_instance() returns
|
137 |
|
138 |
// do something before a site's permalink structure changes
|
139 |
add_action('update_option_permalink_structure', array('ShareaholicUtilities', 'notify_content_manager_sitemap'));
|
140 |
+
|
141 |
+
// use the admin notice API
|
142 |
+
add_action('load-options-permalink.php', array('ShareaholicAdmin', 'permalink_notice'));
|
143 |
}
|
144 |
|
145 |
/**
|
templates/settings.php
CHANGED
@@ -46,17 +46,6 @@
|
|
46 |
<div class='fieldset-footer'>
|
47 |
<span class="helper_secondary"><i class="icon-star"></i> Re-crawl your content, exclude certain pages from being recommended, etc.</span>
|
48 |
<button class='app_wide_settings btn' data-href='recommendations/edit'><?php _e('Edit Related & Promoted Content Settings', 'shareaholic'); ?></button>
|
49 |
-
<div class='app-status'>
|
50 |
-
<strong><?php echo sprintf(__('Status:', 'shareaholic')); ?></strong>
|
51 |
-
<?php
|
52 |
-
$status = ShareaholicUtilities::recommendations_status_check();
|
53 |
-
if ($status == "processing" || $status == 'unknown'){
|
54 |
-
echo '<img class="shrsb_health_icon" align="top" src="'.SHAREAHOLIC_ASSET_DIR.'img/circle_yellow.png" />'. sprintf(__('Processing', 'shareaholic'));
|
55 |
-
} else {
|
56 |
-
echo '<img class="shrsb_health_icon" align="top" src="'.SHAREAHOLIC_ASSET_DIR.'img/circle_green.png" />'. sprintf(__('Ready', 'shareaholic'));
|
57 |
-
}
|
58 |
-
?>
|
59 |
-
</div>
|
60 |
</div>
|
61 |
</fieldset>
|
62 |
|
46 |
<div class='fieldset-footer'>
|
47 |
<span class="helper_secondary"><i class="icon-star"></i> Re-crawl your content, exclude certain pages from being recommended, etc.</span>
|
48 |
<button class='app_wide_settings btn' data-href='recommendations/edit'><?php _e('Edit Related & Promoted Content Settings', 'shareaholic'); ?></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
</div>
|
50 |
</fieldset>
|
51 |
|
utilities.php
CHANGED
@@ -1341,36 +1341,6 @@ class ShareaholicUtilities {
|
|
1341 |
}
|
1342 |
|
1343 |
|
1344 |
-
/**
|
1345 |
-
* This is a wrapper for the Recommendations API
|
1346 |
-
*
|
1347 |
-
*/
|
1348 |
-
public static function recommendations_status_check() {
|
1349 |
-
if (self::get_option('api_key') != NULL){
|
1350 |
-
$recommendations_url = Shareaholic::REC_API_URL . "/v4/recommend?url=" . urlencode(get_bloginfo('url')) . "&internal=6&sponsored=0&api_key=" . self::get_option('api_key');
|
1351 |
-
$cache_key = 'recommendations_status_check-' . md5( $recommendations_url );
|
1352 |
-
|
1353 |
-
$response = get_transient($cache_key);
|
1354 |
-
if (!$response){
|
1355 |
-
$response = ShareaholicCurl::get($recommendations_url);
|
1356 |
-
if( !is_wp_error( $response ) ) {
|
1357 |
-
set_transient( $cache_key, $response, RECOMMENDATIONS_STATUS_CHECK_CACHE_LENGTH );
|
1358 |
-
}
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
if(is_array($response) && array_key_exists('response', $response)) {
|
1362 |
-
$body = $response['body'];
|
1363 |
-
if (is_array($body) && array_key_exists('internal', $body) && !empty($body['internal'])) {
|
1364 |
-
return "ready";
|
1365 |
-
} else {
|
1366 |
-
return "processing";
|
1367 |
-
}
|
1368 |
-
} else {
|
1369 |
-
return "unknown";
|
1370 |
-
}
|
1371 |
-
}
|
1372 |
-
}
|
1373 |
-
|
1374 |
public static function user_info() {
|
1375 |
$current_user = wp_get_current_user();
|
1376 |
|
1341 |
}
|
1342 |
|
1343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1344 |
public static function user_info() {
|
1345 |
$current_user = wp_get_current_user();
|
1346 |
|