Version Description
- Bug fixes & event reporting
Download this release
Release Info
Developer | shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 6.1.3.1 |
Comparing to | |
See all releases |
Code changes from version 6.1.3.0 to 6.1.3.1
includes/shrsb_analytics_settings_page.php
CHANGED
@@ -55,7 +55,11 @@ function shrsb_analytics_settings_page() {
|
|
55 |
'pubGaSocial', 'pubGaKey'
|
56 |
)as $field) {
|
57 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
58 |
-
|
|
|
|
|
|
|
|
|
59 |
} else {
|
60 |
$shrsb_analytics[$field] = NULL;
|
61 |
}
|
55 |
'pubGaSocial', 'pubGaKey'
|
56 |
)as $field) {
|
57 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
58 |
+
$fieldval = $_POST[$field];
|
59 |
+
if($field == 'pubGaSocial' && $fieldval != $shrsb_analytics[$field]) {
|
60 |
+
shrsb_sendTrackingEvent('FeatureToggle', array('f_updated' => 'f_analytics', 'enabled' => ($fieldval == '0' ? 'true' : 'false')));
|
61 |
+
}
|
62 |
+
$shrsb_analytics[$field] = $fieldval;
|
63 |
} else {
|
64 |
$shrsb_analytics[$field] = NULL;
|
65 |
}
|
includes/shrsb_classicbookmarks_settings_page.php
CHANGED
@@ -56,7 +56,11 @@ function shrsb_cb_settings_page() {
|
|
56 |
'cb', 'size', 'pageorpost'
|
57 |
)as $field) {
|
58 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
} else {
|
61 |
$shrsb_cb[$field] = NULL;
|
62 |
}
|
56 |
'cb', 'size', 'pageorpost'
|
57 |
)as $field) {
|
58 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
59 |
+
$fieldval = $_POST[$field];
|
60 |
+
if($field == 'cb' && $fieldval != $shrsb_cb[$field]) {
|
61 |
+
shrsb_sendTrackingEvent('FeatureToggle', array('f_updated' => 'f_classic', 'enabled' => ($fieldval == '0' ? 'true' : 'false')));
|
62 |
+
}
|
63 |
+
$shrsb_cb[$field] = $fieldval;
|
64 |
} else {
|
65 |
$shrsb_cb[$field] = NULL;
|
66 |
}
|
includes/shrsb_recommendations_settings_page.php
CHANGED
@@ -56,7 +56,11 @@ function shrsb_recommendations_settings_page() {
|
|
56 |
'recommendations', 'num', 'pageorpost','style'
|
57 |
)as $field) {
|
58 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
} else {
|
61 |
$shrsb_recommendations[$field] = NULL;
|
62 |
}
|
56 |
'recommendations', 'num', 'pageorpost','style'
|
57 |
)as $field) {
|
58 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
59 |
+
$fieldval = $_POST[$field];
|
60 |
+
if($field == 'recommendations' && $fieldval != $shrsb_recommendations[$field]) {
|
61 |
+
shrsb_sendTrackingEvent('FeatureToggle', array('f_updated' => 'f_rec', 'enabled' => ($fieldval == '0' ? 'true' : 'false')));
|
62 |
+
}
|
63 |
+
$shrsb_recommendations[$field] = $fieldval;
|
64 |
} else {
|
65 |
$shrsb_recommendations[$field] = NULL;
|
66 |
}
|
includes/shrsb_sexybookmarks_settings_page.php
CHANGED
@@ -205,7 +205,11 @@ function shrsb_sb_settings_page() {
|
|
205 |
'tip_text_color' , 'preventminify', 'shrlink', 'perfoption','spritegen_path', 'apikey','ogtags' , 'promo'
|
206 |
)as $field) {
|
207 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
208 |
-
|
|
|
|
|
|
|
|
|
209 |
} else {
|
210 |
$shrsb_plugopts[$field] = NULL;
|
211 |
}
|
205 |
'tip_text_color' , 'preventminify', 'shrlink', 'perfoption','spritegen_path', 'apikey','ogtags' , 'promo'
|
206 |
)as $field) {
|
207 |
if(isset($_POST[$field])) { // this is to prevent warning if $_POST[$field] is not defined
|
208 |
+
$fieldval = $_POST[$field];
|
209 |
+
if($field == 'sexybookmark' && $fieldval != $shrsb_plugopts[$field]) {
|
210 |
+
shrsb_sendTrackingEvent('FeatureToggle', array('f_updated' => 'f_sexy', 'enabled' => ($fieldval == '0' ? 'true' : 'false')));
|
211 |
+
}
|
212 |
+
$shrsb_plugopts[$field] = $fieldval;
|
213 |
} else {
|
214 |
$shrsb_plugopts[$field] = NULL;
|
215 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: shareaholic
|
|
3 |
Tags: SexyBookmarks, SexyBookmark, Facebook, Twitter, LinkedIn, URL Shortener, Bitly, TinyURL, Supr, Goo.gl, Google +1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Google Gmail, Google Notebook, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, Bebo, Mister Wong, Evernote, Twine, Diigo, add this, addtoany, share this, share and follow, share and enjoy, sharing is sexy, sharing is caring, Mail, Yahoo, Reddit, Techmeme, Hacker News, Tweet Button, Twitter Button, Fark, Buffer, MySpace, Orkut, Plurk, Identi.ca, Hyves, Netlog, HubSpot, WeHeartIt, Yandex, PrintFriendly, Print, ReadItLater, Yammer, Pinterest, Google Translate, Pinboard, Shareaholic, Shareholic, Bookmarks, Social, Email Button, Social Share, Bookmark Button, Share Button, Social Bookmarking, Bookmarks Menu, Bookmarking, Share, Share Count, Sharebar, Social Media, SEO, Analytics, Stats, Sharing, Saving, Posting, Facebook Like, Facebook Recommend, Facebook Send, WPMU, nrelate, outbrain, linkwithin, Related Content, Related Posts, Thumbnails, Recommendations
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 3.5.1
|
6 |
-
Stable tag: 6.1.3.
|
7 |
|
8 |
Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
|
9 |
|
@@ -125,6 +125,9 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
128 |
= 6.1.3.0 =
|
129 |
* Fixed Bitly not picking up custom credentials
|
130 |
* Fixed links to Help Center docs
|
3 |
Tags: SexyBookmarks, SexyBookmark, Facebook, Twitter, LinkedIn, URL Shortener, Bitly, TinyURL, Supr, Goo.gl, Google +1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Google Gmail, Google Notebook, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, Bebo, Mister Wong, Evernote, Twine, Diigo, add this, addtoany, share this, share and follow, share and enjoy, sharing is sexy, sharing is caring, Mail, Yahoo, Reddit, Techmeme, Hacker News, Tweet Button, Twitter Button, Fark, Buffer, MySpace, Orkut, Plurk, Identi.ca, Hyves, Netlog, HubSpot, WeHeartIt, Yandex, PrintFriendly, Print, ReadItLater, Yammer, Pinterest, Google Translate, Pinboard, Shareaholic, Shareholic, Bookmarks, Social, Email Button, Social Share, Bookmark Button, Share Button, Social Bookmarking, Bookmarks Menu, Bookmarking, Share, Share Count, Sharebar, Social Media, SEO, Analytics, Stats, Sharing, Saving, Posting, Facebook Like, Facebook Recommend, Facebook Send, WPMU, nrelate, outbrain, linkwithin, Related Content, Related Posts, Thumbnails, Recommendations
|
4 |
Requires at least: 2.7
|
5 |
Tested up to: 3.5.1
|
6 |
+
Stable tag: 6.1.3.1
|
7 |
|
8 |
Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
|
9 |
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 6.1.3.1 =
|
129 |
+
* Bug fixes & event reporting
|
130 |
+
|
131 |
= 6.1.3.0 =
|
132 |
* Fixed Bitly not picking up custom credentials
|
133 |
* Fixed links to Help Center docs
|
sexy-bookmarks.php
CHANGED
@@ -3,13 +3,27 @@
|
|
3 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
4 |
Plugin URI: https://shareaholic.com/publishers/
|
5 |
Description: Shareaholic adds a (X)HTML compliant list of social bookmarking icons to each of your posts. See <a href="admin.php?page=sexy-bookmarks.php">configuration panel</a> for more settings.
|
6 |
-
Version: 6.1.3.
|
7 |
Author: Shareaholic
|
8 |
Author URI: https://shareaholic.com
|
9 |
Credits & Thanks: https://shareaholic.com/tools/wordpress/credits
|
10 |
*/
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/*
|
15 |
* @desc Create Text Domain For Translations
|
@@ -47,7 +61,6 @@ if((isset($_GET['sb_debug']) || isset($_POST['sb_debug']) ) ){
|
|
47 |
shrsb_dump_settings();
|
48 |
}
|
49 |
|
50 |
-
|
51 |
/*
|
52 |
* Newer versions of WordPress include this class already
|
53 |
* However, we've kept this here for people who are using older versions
|
@@ -109,27 +122,62 @@ if ( !function_exists('wp_upload_dir') ) {
|
|
109 |
}
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
//Get the current Version from the database
|
113 |
$shrsb_version = get_option('SHRSBvNum');
|
|
|
114 |
// if the version number is set and is not the latest, then call the upgrade function
|
115 |
if(false !== $shrsb_version && $shrsb_version !== SHRSB_vNum ) {
|
116 |
update_option('SHRSB_DefaultSprite',true);
|
117 |
add_action('admin_notices', 'shrsb_Upgrade', 12);
|
118 |
|
|
|
|
|
119 |
// Added global variable to track the updating state
|
120 |
define('SHRSB_UPGRADING', TRUE);
|
121 |
-
}else{
|
122 |
define('SHRSB_UPGRADING', FALSE);
|
123 |
}
|
124 |
|
125 |
-
|
126 |
-
//Including the Shareaholic global settings
|
127 |
-
require_once 'includes/shrsb_sexybookmarks_page.php'; // SexyBookmarks global Settings
|
128 |
-
require_once 'includes/shrsb_topbar_page.php'; // Topbar global Settings
|
129 |
-
require_once 'includes/shrsb_analytics_page.php'; // Analytics global Settings
|
130 |
-
require_once 'includes/shrsb_recommendations_page.php'; // Recommendations global Settings
|
131 |
-
require_once 'includes/shrsb_classicbookmarks_page.php'; // Classic Bookmarks global Settings
|
132 |
-
|
133 |
$default_spritegen = get_option('SHRSB_DefaultSprite');
|
134 |
|
135 |
if(!is_writable(SHRSB_UPLOADDIR)) {
|
@@ -145,6 +193,7 @@ if(!is_writable(SHRSB_UPLOADDIR)) {
|
|
145 |
//}
|
146 |
|
147 |
|
|
|
148 |
function shrsb_Upgrade() {
|
149 |
global $shrsb_plugopts;
|
150 |
|
@@ -186,6 +235,7 @@ function shrsb_Activate() {
|
|
186 |
if(!file_exists(SHRSB_UPLOADDIR.'spritegen/shr-custom-sprite.png') || !file_exists(SHRSB_UPLOADDIR.'spritegen/shr-custom-sprite.css')) {
|
187 |
delete_option('SHRSB_CustomSprite');
|
188 |
}
|
|
|
189 |
}
|
190 |
register_activation_hook( __FILE__, 'shrsb_Activate' );
|
191 |
|
@@ -194,9 +244,16 @@ function shrsb_deActivate() {
|
|
194 |
if(false !== get_option('SHRSBvNum') || get_option('SHRSBvNum') != '') {
|
195 |
update_option('SHRSBvNum', SHRSB_vNum);
|
196 |
}
|
|
|
197 |
}
|
198 |
register_deactivation_hook( __FILE__, 'shrsb_deActivate' );
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
//add update notice to the main dashboard area so it's visible throughout
|
201 |
function showUpdateNotice() {
|
202 |
|
3 |
Plugin Name: Shareaholic | share buttons, analytics, related content
|
4 |
Plugin URI: https://shareaholic.com/publishers/
|
5 |
Description: Shareaholic adds a (X)HTML compliant list of social bookmarking icons to each of your posts. See <a href="admin.php?page=sexy-bookmarks.php">configuration panel</a> for more settings.
|
6 |
+
Version: 6.1.3.1
|
7 |
Author: Shareaholic
|
8 |
Author URI: https://shareaholic.com
|
9 |
Credits & Thanks: https://shareaholic.com/tools/wordpress/credits
|
10 |
*/
|
11 |
|
12 |
+
|
13 |
+
/*
|
14 |
+
* @desc Report Plugin Installation
|
15 |
+
*/
|
16 |
+
|
17 |
+
if(false == get_option('SHRSBvNum') || get_option('SHRSBvNum') == '') {
|
18 |
+
shrsb_sendTrackingEvent('Install_Fresh');
|
19 |
+
}
|
20 |
+
|
21 |
+
/*
|
22 |
+
* @desc Define Plugin version
|
23 |
+
*/
|
24 |
+
|
25 |
+
define('SHRSB_vNum','6.1.3.1');
|
26 |
+
|
27 |
|
28 |
/*
|
29 |
* @desc Create Text Domain For Translations
|
61 |
shrsb_dump_settings();
|
62 |
}
|
63 |
|
|
|
64 |
/*
|
65 |
* Newer versions of WordPress include this class already
|
66 |
* However, we've kept this here for people who are using older versions
|
122 |
}
|
123 |
}
|
124 |
|
125 |
+
//Including the Shareaholic global settings
|
126 |
+
require_once 'includes/shrsb_sexybookmarks_page.php'; // SexyBookmarks global Settings
|
127 |
+
require_once 'includes/shrsb_topbar_page.php'; // Topbar global Settings
|
128 |
+
require_once 'includes/shrsb_analytics_page.php'; // Analytics global Settings
|
129 |
+
require_once 'includes/shrsb_recommendations_page.php'; // Recommendations global Settings
|
130 |
+
require_once 'includes/shrsb_classicbookmarks_page.php'; // Classic Bookmarks global Settings
|
131 |
+
|
132 |
+
//populate default analytics values to pass with major events - (un)install, upgrade, (de)activate, etc
|
133 |
+
//TD: GET THE USER ID IF AVAILABLE
|
134 |
+
|
135 |
+
function shr_getTrackingData() {
|
136 |
+
global $tracking_metadata, $shrsb_plugopts, $shrsb_cb, $shrsb_tb_plugopts, $shrsb_recommendations;
|
137 |
+
|
138 |
+
$tracking_metadata = array(
|
139 |
+
'plugin_ver' => SHRSB_vNum,
|
140 |
+
'apikey' => isset($shrsb_plugopts['apikey']) ? $shrsb_plugopts['apikey'] : '',
|
141 |
+
'domain' => home_url(),
|
142 |
+
'theme' => get_option('template'),
|
143 |
+
'wp_ver' => get_bloginfo('version'),
|
144 |
+
'f_sexy' => (isset($shrsb_plugopts['sexybookmark']) && $shrsb_plugopts['sexybookmark'] == '1') ? 'true' : 'false',
|
145 |
+
'f_topbar' => (isset($shrsb_tb_plugopts['topbar']) && $shrsb_tb_plugopts['topbar'] == '1') ? 'true' : 'false',
|
146 |
+
'f_classic' => (isset($shrsb_cb['cb']) && $shrsb_cb['cb'] == '1') ? 'true' : 'false',
|
147 |
+
'f_rec' => (isset($shrsb_recommendations['recommendations']) && $shrsb_recommendations['recommendations'] == '1') ? 'true' : 'false'
|
148 |
+
);
|
149 |
+
return $tracking_metadata;
|
150 |
+
}
|
151 |
+
|
152 |
+
//send a tracking event with the default analytics values and extras passed as a key-value array
|
153 |
+
function shrsb_sendTrackingEvent($event_name = 'Default', $extra_params) {
|
154 |
+
global $tracking_metadata;
|
155 |
+
$event_data = isset($tracking_metadata) ? $tracking_metadata : shr_getTrackingData();
|
156 |
+
if (isset($extra_params)) {
|
157 |
+
$event_data = array_merge($event_data, $extra_params);
|
158 |
+
}
|
159 |
+
$trackingURL = "http://www.shareaholic.com/api/events";
|
160 |
+
$trackingParams = array('name' => "WordPress:".$event_name, 'data' => json_encode($event_data) );
|
161 |
+
// Send Ping
|
162 |
+
$response = wp_remote_post($trackingURL, array('body' => $trackingParams) );
|
163 |
+
}
|
164 |
+
|
165 |
//Get the current Version from the database
|
166 |
$shrsb_version = get_option('SHRSBvNum');
|
167 |
+
|
168 |
// if the version number is set and is not the latest, then call the upgrade function
|
169 |
if(false !== $shrsb_version && $shrsb_version !== SHRSB_vNum ) {
|
170 |
update_option('SHRSB_DefaultSprite',true);
|
171 |
add_action('admin_notices', 'shrsb_Upgrade', 12);
|
172 |
|
173 |
+
// shrsb_sendTrackingEvent('Upgrade', array('prev_plugin_ver' => get_option('SHRSBvNum')) );
|
174 |
+
|
175 |
// Added global variable to track the updating state
|
176 |
define('SHRSB_UPGRADING', TRUE);
|
177 |
+
} else {
|
178 |
define('SHRSB_UPGRADING', FALSE);
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
$default_spritegen = get_option('SHRSB_DefaultSprite');
|
182 |
|
183 |
if(!is_writable(SHRSB_UPLOADDIR)) {
|
193 |
//}
|
194 |
|
195 |
|
196 |
+
|
197 |
function shrsb_Upgrade() {
|
198 |
global $shrsb_plugopts;
|
199 |
|
235 |
if(!file_exists(SHRSB_UPLOADDIR.'spritegen/shr-custom-sprite.png') || !file_exists(SHRSB_UPLOADDIR.'spritegen/shr-custom-sprite.css')) {
|
236 |
delete_option('SHRSB_CustomSprite');
|
237 |
}
|
238 |
+
shrsb_sendTrackingEvent('Activate');
|
239 |
}
|
240 |
register_activation_hook( __FILE__, 'shrsb_Activate' );
|
241 |
|
244 |
if(false !== get_option('SHRSBvNum') || get_option('SHRSBvNum') != '') {
|
245 |
update_option('SHRSBvNum', SHRSB_vNum);
|
246 |
}
|
247 |
+
shrsb_sendTrackingEvent('Deactivate');
|
248 |
}
|
249 |
register_deactivation_hook( __FILE__, 'shrsb_deActivate' );
|
250 |
|
251 |
+
//adding uninstall_hook
|
252 |
+
function shrsb_uninstall() {
|
253 |
+
shrsb_sendTrackingEvent('Uninstall');
|
254 |
+
}
|
255 |
+
register_uninstall_hook( __FILE__, 'shrsb_uninstall');
|
256 |
+
|
257 |
//add update notice to the main dashboard area so it's visible throughout
|
258 |
function showUpdateNotice() {
|
259 |
|