Version Description
- Enhancement: Added Shareaholic navigation bar to the Shareaholic settings pages
Download this release
Release Info
Developer | hngu_shareaholic |
Plugin | WordPress Social Tools, Related Posts, Monetization – Shareaholic |
Version | 7.6.1.1 |
Comparing to | |
See all releases |
Code changes from version 7.6.1.0 to 7.6.1.1
- admin.php +12 -0
- public.php +1 -0
- public_js.php +15 -8
- readme.txt +7 -1
- shareaholic.php +3 -3
- templates/advanced_settings.php +2 -1
- templates/header.php +99 -0
- templates/script_tag.php +2 -0
- templates/settings.php +2 -7
- utilities.php +1 -1
admin.php
CHANGED
@@ -50,6 +50,18 @@ class ShareaholicAdmin {
|
|
50 |
ShareaholicUtilities::load_template('footer');
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/**
|
54 |
* Renders SnapEngage
|
55 |
*/
|
50 |
ShareaholicUtilities::load_template('footer');
|
51 |
}
|
52 |
|
53 |
+
/**
|
54 |
+
* Renders footer
|
55 |
+
*/
|
56 |
+
public static function show_header() {
|
57 |
+
$settings = ShareaholicUtilities::get_settings();
|
58 |
+
$settings['base_link'] = Shareaholic::URL . '/publisher_tools/' . $settings['api_key'] . '/';
|
59 |
+
$settings['website_settings_link'] = $settings['base_link'] . 'websites/edit?verification_key=' . $settings['verification_key'];
|
60 |
+
ShareaholicUtilities::load_template('header', array(
|
61 |
+
'settings' => $settings
|
62 |
+
));
|
63 |
+
}
|
64 |
+
|
65 |
/**
|
66 |
* Renders SnapEngage
|
67 |
*/
|
public.php
CHANGED
@@ -64,6 +64,7 @@ class ShareaholicPublic {
|
|
64 |
'shareaholic_url' => Shareaholic::URL,
|
65 |
'api_key' => ShareaholicUtilities::get_option('api_key'),
|
66 |
'page_config' => ShareaholicPublicJS::get_page_config(),
|
|
|
67 |
));
|
68 |
}
|
69 |
}
|
64 |
'shareaholic_url' => Shareaholic::URL,
|
65 |
'api_key' => ShareaholicUtilities::get_option('api_key'),
|
66 |
'page_config' => ShareaholicPublicJS::get_page_config(),
|
67 |
+
'base_settings' => ShareaholicPublicJS::get_base_settings()
|
68 |
));
|
69 |
}
|
70 |
}
|
public_js.php
CHANGED
@@ -22,14 +22,8 @@ class ShareaholicPublicJS {
|
|
22 |
* @return string The stringified version of the page config
|
23 |
*/
|
24 |
public static function get_page_config() {
|
25 |
-
$config =
|
26 |
-
|
27 |
-
'endpoints' => array(
|
28 |
-
'local_recs_url' => admin_url('admin-ajax.php') . '?action=shareaholic_permalink_related',
|
29 |
-
'share_counts_url' => admin_url('admin-ajax.php') . '?action=shareaholic_share_counts_api'
|
30 |
-
),
|
31 |
-
'user' => ShareaholicUtilities::user_info()
|
32 |
-
);
|
33 |
$functions_map = self::get_function_definitions();
|
34 |
$share_buttons = self::get_share_buttons_config();
|
35 |
|
@@ -50,6 +44,19 @@ class ShareaholicPublicJS {
|
|
50 |
return $json_string;
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/**
|
54 |
* Get the share_buttons configuration to be used by Shareaholic.js
|
55 |
*
|
22 |
* @return string The stringified version of the page config
|
23 |
*/
|
24 |
public static function get_page_config() {
|
25 |
+
$config = self::get_base_settings();
|
26 |
+
$config['apps'] = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
$functions_map = self::get_function_definitions();
|
28 |
$share_buttons = self::get_share_buttons_config();
|
29 |
|
44 |
return $json_string;
|
45 |
}
|
46 |
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Return a base set of settings for the Shareaholic JS or Publisher SDK
|
50 |
+
*/
|
51 |
+
public static function get_base_settings() {
|
52 |
+
return array(
|
53 |
+
'endpoints' => array(
|
54 |
+
'local_recs_url' => admin_url('admin-ajax.php') . '?action=shareaholic_permalink_related',
|
55 |
+
'share_counts_url' => admin_url('admin-ajax.php') . '?action=shareaholic_share_counts_api'
|
56 |
+
)
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
/**
|
61 |
* Get the share_buttons configuration to be used by Shareaholic.js
|
62 |
*
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: shareaholic
|
|
3 |
Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, houzz, yummly, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, sumome, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 7.6.1.
|
7 |
|
8 |
The easiest, most effective way to grow your website traffic, effectively engage your audience, monetize, and gain insights for free.
|
9 |
|
@@ -169,6 +169,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
|
|
|
|
|
|
172 |
= 7.6.1.0 =
|
173 |
* Bugfix: fix for security vulnerability. Upgrade immediately.
|
174 |
|
@@ -1191,6 +1194,9 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
|
|
1191 |
|
1192 |
== Upgrade Notice ==
|
1193 |
|
|
|
|
|
|
|
1194 |
= 7.6.1.0 =
|
1195 |
Fix for security vulnerability. Upgrade immediately.
|
1196 |
|
3 |
Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, houzz, yummly, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, sumome, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 7.6.1.1
|
7 |
|
8 |
The easiest, most effective way to grow your website traffic, effectively engage your audience, monetize, and gain insights for free.
|
9 |
|
169 |
|
170 |
== Changelog ==
|
171 |
|
172 |
+
= 7.6.1.1 =
|
173 |
+
* Enhancement: Added Shareaholic navigation bar to the Shareaholic settings pages
|
174 |
+
|
175 |
= 7.6.1.0 =
|
176 |
* Bugfix: fix for security vulnerability. Upgrade immediately.
|
177 |
|
1194 |
|
1195 |
== Upgrade Notice ==
|
1196 |
|
1197 |
+
= 7.6.1.1 =
|
1198 |
+
Added Shareaholic navigation bar to the Shareaholic settings pages
|
1199 |
+
|
1200 |
= 7.6.1.0 =
|
1201 |
Fix for security vulnerability. Upgrade immediately.
|
1202 |
|
shareaholic.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
-
* @version 7.6.1.
|
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.1.
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: shareaholic
|
@@ -64,7 +64,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.1.
|
68 |
|
69 |
/**
|
70 |
* Starts off as false so that ::get_instance() returns
|
3 |
* The main file!
|
4 |
*
|
5 |
* @package shareaholic
|
6 |
+
* @version 7.6.1.1
|
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.1.1
|
14 |
Author: Shareaholic
|
15 |
Author URI: https://shareaholic.com
|
16 |
Text Domain: 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.1.1';
|
68 |
|
69 |
/**
|
70 |
* Starts off as false so that ::get_instance() returns
|
templates/advanced_settings.php
CHANGED
@@ -1,6 +1,7 @@
|
|
|
|
1 |
<div class='wrap'>
|
2 |
<div id="icon-options-general" class="icon32"></div>
|
3 |
-
<h2><?php _e('
|
4 |
<div style="margin-top:20px;"></div>
|
5 |
|
6 |
<div class='unit size4of5' style="min-height:300px;">
|
1 |
+
<?php ShareaholicAdmin::show_header(); ?>
|
2 |
<div class='wrap'>
|
3 |
<div id="icon-options-general" class="icon32"></div>
|
4 |
+
<h2><?php _e('Advanced Settings', 'shareaholic'); ?></h2>
|
5 |
<div style="margin-top:20px;"></div>
|
6 |
|
7 |
<div class='unit size4of5' style="min-height:300px;">
|
templates/header.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
window.first_part_of_url = '<?php echo $settings['base_link']?>';
|
3 |
+
window.verification_key = '<?php echo $settings['verification_key'] ?>';
|
4 |
+
window.SHAREAHOLIC_PLUGIN_VERSION = '<?php echo ShareaholicUtilities::get_version(); ?>';
|
5 |
+
window.shareaholic_add_location_nonce = '<?php echo wp_create_nonce("shareaholic_add_location"); ?>';
|
6 |
+
</script>
|
7 |
+
|
8 |
+
<script type="text/javascript"
|
9 |
+
data-sorendpoint="<?php echo Shareaholic::URL; ?>"
|
10 |
+
data-sorassetbase="<?php echo ShareaholicUtilities::asset_url('assets'); ?>"
|
11 |
+
src="<?php echo ShareaholicUtilities::asset_url('assets/headerWidget.js'); ?>">
|
12 |
+
</script>
|
13 |
+
<link href="<?php echo ShareaholicUtilities::asset_url('assets/header.css'); ?>" media="all" rel="stylesheet" type="text/css">
|
14 |
+
|
15 |
+
<!-- Start Header Template -->
|
16 |
+
<div class="new-design flat-layout wordpress-admin" style="display:none;">
|
17 |
+
<header class="header-section js-header">
|
18 |
+
<div class="header">
|
19 |
+
<a href= "https://shareaholic.com" class="logo"></a>
|
20 |
+
<nav class="header-nav">
|
21 |
+
</nav>
|
22 |
+
<ul class="user-nav js-logged-out" style="display:none;">
|
23 |
+
<li><a href="#" class="btn dark-green js-action-signup">Sign Up Free</a></li>
|
24 |
+
<li><a href="#" class="btn js-action-login">Log In</a></li>
|
25 |
+
</ul>
|
26 |
+
<!-- Logged In -->
|
27 |
+
<div class="user-nav logged-in js-logged-in" style="display:none;">
|
28 |
+
|
29 |
+
<a class="btn user-menu-btn" href="javascript:void">
|
30 |
+
<span class="mask"></span>
|
31 |
+
<span class="js-user username">Jones</span> <span class="fa fa-angle-down"></span></a>
|
32 |
+
<ul class="user-menu">
|
33 |
+
<li class="warning divider js-error-twitter" style="display:none;"><a href="#" class="js-action-twitterauth"><i class="caution-icon"></i> Reconnect Twitter Account</a></li>
|
34 |
+
<li><a href="<?php echo $settings['website_settings_link']; ?>" class="dashboard" target="_blank">Website Settings</a></li>
|
35 |
+
<li><a href="#" class="js-action-admanager divider" target="_blank">Ad Manager</a></li>
|
36 |
+
<li><a href="#" class="js-action-profile" target="_blank">My Profile</a></li>
|
37 |
+
<li><a href="#" class="js-action-settings" target="_blank">Account</a></li>
|
38 |
+
<li><a href="#" class="js-action-logout divider">Log Out</a></li>
|
39 |
+
<li><a href="#" class="help js-action-help" target="_blank">Help</a></li>
|
40 |
+
</ul>
|
41 |
+
<img class="avatar js-avatar">
|
42 |
+
</div>
|
43 |
+
<!-- Mobile Start -->
|
44 |
+
<a href="#" class="mobile-menu-link"><span class="fa fa-bars"></span></a>
|
45 |
+
</div>
|
46 |
+
<!-- Mobile Menu-->
|
47 |
+
<div class="mobile-menu">
|
48 |
+
<!-- Logged Out-->
|
49 |
+
<ul class="js-logged-out" style="display:none;">
|
50 |
+
<li><a href="/publishers">For <strong>Publishers</strong></a></li>
|
51 |
+
<li><a href="/advertisers">For <strong>Advertisers</strong></a></li>
|
52 |
+
<li><a href="#" class="js-action-login">Log In</a></li>
|
53 |
+
<li><a href="#" class="js-action-signup">Sign Up for FREE</a></li>
|
54 |
+
</ul>
|
55 |
+
<!-- Logged In-->
|
56 |
+
<ul class="js-logged-in" style="display:none;">
|
57 |
+
<li class="warning js-error-twitter" style="display:none;"><a href="#" class="js-action-twitterauth "><i class="caution-icon"></i> Reconnect Twitter Account</a></li>
|
58 |
+
<li><a href="#" class="dashboard js-action-dashboard">Website Dashboard</a></li>
|
59 |
+
<li><a href="#" class="js-action-admanager">Ad Manager</a></li>
|
60 |
+
<li><a href="#" class="js-action-profile">My Profile</a></li>
|
61 |
+
<li><a href="#" class="js-action-settings">Account</a></li>
|
62 |
+
<li><a href="#" class="js-action-logout">Log Out</a></li>
|
63 |
+
<li><a href="#" class="help js-action-help">Help</a></li>
|
64 |
+
</ul>
|
65 |
+
</div>
|
66 |
+
</header>
|
67 |
+
</div>
|
68 |
+
<!-- End Header Template -->
|
69 |
+
|
70 |
+
<script>
|
71 |
+
|
72 |
+
(function($) {
|
73 |
+
|
74 |
+
function formatUniversalHeader() {
|
75 |
+
var $header = $('.new-design');
|
76 |
+
var $jsHeader = $header.children('header.header-section.js-header');
|
77 |
+
var $wpcontent = $('#wpcontent');
|
78 |
+
var $target = $('#wpbody'); // specify where we want to insert header
|
79 |
+
|
80 |
+
// we need to move the header to the left due to padding
|
81 |
+
// from other elements on the page
|
82 |
+
var paddingOffset = $wpcontent.css('padding-left') || '20px';
|
83 |
+
paddingOffset = '-' + paddingOffset;
|
84 |
+
$header.css('margin-left', paddingOffset);
|
85 |
+
|
86 |
+
// move the header to the target and show it to the user
|
87 |
+
$target.prepend($header);
|
88 |
+
$header.show();
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
$(function() {
|
93 |
+
formatUniversalHeader();
|
94 |
+
});
|
95 |
+
|
96 |
+
})(jQuery);
|
97 |
+
|
98 |
+
</script>
|
99 |
+
|
templates/script_tag.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<!-- This site is powered by Shareaholic - https://shareaholic.com -->
|
2 |
<script type='text/javascript' data-cfasync='false'>
|
3 |
//<![CDATA[
|
|
|
|
|
4 |
(function() {
|
5 |
var shr = document.createElement('script');
|
6 |
shr.setAttribute('data-cfasync', 'false');
|
1 |
<!-- This site is powered by Shareaholic - https://shareaholic.com -->
|
2 |
<script type='text/javascript' data-cfasync='false'>
|
3 |
//<![CDATA[
|
4 |
+
_SHR_SETTINGS = <?php echo json_encode($base_settings); ?>;
|
5 |
+
|
6 |
(function() {
|
7 |
var shr = document.createElement('script');
|
8 |
shr.setAttribute('data-cfasync', 'false');
|
templates/settings.php
CHANGED
@@ -1,18 +1,13 @@
|
|
|
|
1 |
<div class='wrap'>
|
2 |
<div id="icon-options-general" class="icon32"></div>
|
3 |
-
<h2><?php echo sprintf(__('
|
4 |
|
5 |
<div class='reveal-modal' id='editing_modal'>
|
6 |
<div id='iframe_container' class='bg-loading-img' allowtransparency='true'></div>
|
7 |
<a class="close-reveal-modal">×</a>
|
8 |
</div>
|
9 |
|
10 |
-
<script>
|
11 |
-
window.first_part_of_url = '<?php echo Shareaholic::URL . '/publisher_tools/' . $settings['api_key']?>/';
|
12 |
-
window.verification_key = '<?php echo $settings['verification_key'] ?>';
|
13 |
-
window.shareaholic_add_location_nonce = '<?php echo wp_create_nonce("shareaholic_add_location"); ?>';
|
14 |
-
</script>
|
15 |
-
|
16 |
<div class='unit size3of5'>
|
17 |
<form name="settings" method="post" action="<?php echo $action; ?>">
|
18 |
<?php wp_nonce_field($action, 'nonce_field') ?>
|
1 |
+
<?php ShareaholicAdmin::show_header(); ?>
|
2 |
<div class='wrap'>
|
3 |
<div id="icon-options-general" class="icon32"></div>
|
4 |
+
<h2><?php echo sprintf(__('App Manager', 'shareaholic')); ?></h2>
|
5 |
|
6 |
<div class='reveal-modal' id='editing_modal'>
|
7 |
<div id='iframe_container' class='bg-loading-img' allowtransparency='true'></div>
|
8 |
<a class="close-reveal-modal">×</a>
|
9 |
</div>
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<div class='unit size3of5'>
|
12 |
<form name="settings" method="post" action="<?php echo $action; ?>">
|
13 |
<?php wp_nonce_field($action, 'nonce_field') ?>
|
utilities.php
CHANGED
@@ -134,7 +134,7 @@ class ShareaholicUtilities {
|
|
134 |
$wp_admin_bar->add_menu(array(
|
135 |
'parent' => 'wp_shareaholic_adminbar_menu',
|
136 |
'id' => 'wp_shareaholic_adminbar_submenu-general',
|
137 |
-
'title' => __('
|
138 |
'href' => 'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/verify?verification_key='.self::get_option('verification_key').'&redirect_to='.'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/websites/edit?verification_key='.self::get_option('verification_key'),
|
139 |
'meta' => Array( 'target' => '_blank' )
|
140 |
));
|
134 |
$wp_admin_bar->add_menu(array(
|
135 |
'parent' => 'wp_shareaholic_adminbar_menu',
|
136 |
'id' => 'wp_shareaholic_adminbar_submenu-general',
|
137 |
+
'title' => __('Website Settings', 'shareaholic'),
|
138 |
'href' => 'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/verify?verification_key='.self::get_option('verification_key').'&redirect_to='.'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/websites/edit?verification_key='.self::get_option('verification_key'),
|
139 |
'meta' => Array( 'target' => '_blank' )
|
140 |
));
|