Version Description
- Added ability to reset activation keys for a full multisite network
Download this release
Release Info
Developer | raptor235 |
Plugin | Sidekick |
Version | 2.6.4 |
Comparing to | |
See all releases |
Code changes from version 2.6.3 to 2.6.4
- js/sidekick_admin.js +91 -10
- libs/licensing.php +74 -12
- libs/ms_admin_page.php +11 -4
- readme.txt +4 -1
- sidekick.php +9 -5
js/sidekick_admin.js
CHANGED
@@ -23,7 +23,19 @@ function updateCounts(e){
|
|
23 |
|
24 |
function setup_buttons_deactivate(){
|
25 |
jQuery('.site button.deactivate').off('click').click(function(){
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
});
|
28 |
}
|
29 |
|
@@ -67,12 +79,19 @@ function load_sites_by_status(status,target){
|
|
67 |
button = '<button class="deactivate">Deactivate</button></div>';
|
68 |
}
|
69 |
|
70 |
-
if (e.sites) {
|
|
|
|
|
|
|
|
|
|
|
71 |
_.each(e.sites,function(site,key){
|
72 |
jQuery('.site_list').append('<div class="site" data-path="' + site.path + '" data-domain="' + site.domain + '" data-userid="' + site.user_id + '" data-blogid="' + site.blog_id + '">' + site.domain + '/' + site.path + button);
|
73 |
});
|
74 |
} else {
|
75 |
jQuery('.site_list').append('<div class="site">No Sites</div>');
|
|
|
|
|
76 |
}
|
77 |
|
78 |
setup_buttons();
|
@@ -139,12 +158,33 @@ function setup_buttons_activate_batch(){
|
|
139 |
if (parseInt(e.activated_count,10) === parseInt(e.sites_per_page,10)) {
|
140 |
jQuery('.activate_all').trigger('click');
|
141 |
} else {
|
142 |
-
jQuery(
|
|
|
143 |
}
|
144 |
|
145 |
},'json');
|
146 |
|
147 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
var activateCallback = function(button){
|
@@ -162,6 +202,22 @@ var activateCallback = function(button){
|
|
162 |
};
|
163 |
};
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
function setup_buttons_activate(){
|
166 |
jQuery('.site button.activate').off('click').click(function(){
|
167 |
var data = {
|
@@ -351,13 +407,13 @@ function setup_events(){
|
|
351 |
|
352 |
});
|
353 |
|
354 |
-
jQuery('.activate_all').click(function(){
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
});
|
361 |
|
362 |
jQuery('.sk_bucket').not(':has(li)').remove();
|
363 |
jQuery('.sk_product').not(':has(li)').remove();
|
@@ -496,6 +552,31 @@ function setup_sk_admin(){
|
|
496 |
}
|
497 |
}
|
498 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
jQuery(document).ready(function($) {
|
|
|
500 |
setup_intro_welcome_button();
|
501 |
});
|
23 |
|
24 |
function setup_buttons_deactivate(){
|
25 |
jQuery('.site button.deactivate').off('click').click(function(){
|
26 |
+
|
27 |
+
var data = {
|
28 |
+
action: 'sk_deactivate_single',
|
29 |
+
blog_id: jQuery(this).parent().data('blogid'),
|
30 |
+
user_id: jQuery(this).parent().data('userid'),
|
31 |
+
domain: jQuery(this).parent().data('domain'),
|
32 |
+
path: jQuery(this).parent().data('path')
|
33 |
+
};
|
34 |
+
|
35 |
+
jQuery(this).html('Deactivating...');
|
36 |
+
jQuery('.single_activation_error').html('').hide();
|
37 |
+
jQuery.post(ajaxurl, data, deactivateCallback(this),'json');
|
38 |
+
|
39 |
});
|
40 |
}
|
41 |
|
79 |
button = '<button class="deactivate">Deactivate</button></div>';
|
80 |
}
|
81 |
|
82 |
+
if (e.sites && e.sites.length > 0) {
|
83 |
+
|
84 |
+
if (e.sites.length < 25) {
|
85 |
+
jQuery('.action').hide();
|
86 |
+
}
|
87 |
+
|
88 |
_.each(e.sites,function(site,key){
|
89 |
jQuery('.site_list').append('<div class="site" data-path="' + site.path + '" data-domain="' + site.domain + '" data-userid="' + site.user_id + '" data-blogid="' + site.blog_id + '">' + site.domain + '/' + site.path + button);
|
90 |
});
|
91 |
} else {
|
92 |
jQuery('.site_list').append('<div class="site">No Sites</div>');
|
93 |
+
jQuery('.activate_all').hide();
|
94 |
+
jQuery('.action').hide();
|
95 |
}
|
96 |
|
97 |
setup_buttons();
|
158 |
if (parseInt(e.activated_count,10) === parseInt(e.sites_per_page,10)) {
|
159 |
jQuery('.activate_all').trigger('click');
|
160 |
} else {
|
161 |
+
jQuery('.activate_all').html('Done').removeClass('loading');
|
162 |
+
window.location.reload();
|
163 |
}
|
164 |
|
165 |
},'json');
|
166 |
|
167 |
});
|
168 |
+
|
169 |
+
jQuery('.reset_all').off('click').click(function(){
|
170 |
+
|
171 |
+
var sure = confirm('This will reset all the activation keys. Are You Sure?');
|
172 |
+
|
173 |
+
if (sure) {
|
174 |
+
var data = {
|
175 |
+
action: 'sk_reset'
|
176 |
+
};
|
177 |
+
|
178 |
+
jQuery(this).html('Reseting...').addClass('loading');
|
179 |
+
|
180 |
+
jQuery.post(ajaxurl, data, function(){
|
181 |
+
jQuery('.reset_all').html('Done!').removeClass('loading');
|
182 |
+
window.location.reload();
|
183 |
+
},'json');
|
184 |
+
}
|
185 |
+
|
186 |
+
});
|
187 |
+
|
188 |
}
|
189 |
|
190 |
var activateCallback = function(button){
|
202 |
};
|
203 |
};
|
204 |
|
205 |
+
|
206 |
+
var deactivateCallback = function(button){
|
207 |
+
return function(e){
|
208 |
+
if (!e.success) {
|
209 |
+
jQuery(button).html('Error').addClass('red');
|
210 |
+
if (e.payload.message === 'Already Deactivated') {
|
211 |
+
updateStatCounts();
|
212 |
+
}
|
213 |
+
jQuery('.single_activation_error').html(e.payload.message).show();
|
214 |
+
} else if (e.success) {
|
215 |
+
updateStatCounts();
|
216 |
+
jQuery(button).html('Success').addClass('green');
|
217 |
+
}
|
218 |
+
};
|
219 |
+
};
|
220 |
+
|
221 |
function setup_buttons_activate(){
|
222 |
jQuery('.site button.activate').off('click').click(function(){
|
223 |
var data = {
|
407 |
|
408 |
});
|
409 |
|
410 |
+
// jQuery('.activate_all').click(function(){
|
411 |
+
// jQuery('.activate_sk').each(function(key,item){
|
412 |
+
// setTimeout(function() {
|
413 |
+
// jQuery(item).trigger('click');
|
414 |
+
// }, key*1000);
|
415 |
+
// });
|
416 |
+
// });
|
417 |
|
418 |
jQuery('.sk_bucket').not(':has(li)').remove();
|
419 |
jQuery('.sk_product').not(':has(li)').remove();
|
552 |
}
|
553 |
}
|
554 |
|
555 |
+
function setupSkHeartBeat(){
|
556 |
+
console.log('setupSkHeartBeat');
|
557 |
+
// Hook into the heartbeat-send
|
558 |
+
jQuery(document).on('heartbeat-send', function(e, data) {
|
559 |
+
console.log('hb send');
|
560 |
+
data['sk_hb_data'] = 'removedSites';
|
561 |
+
});
|
562 |
+
|
563 |
+
// Listen for the custom event "heartbeat-tick" on jQuery(document).
|
564 |
+
jQuery(document).on( 'heartbeat-tick', function(e, data) {
|
565 |
+
|
566 |
+
console.log('111 data %o', data);
|
567 |
+
|
568 |
+
|
569 |
+
// Only proceed if our EDD data is present
|
570 |
+
if ( ! data['edd-payment-count'] ){
|
571 |
+
return;
|
572 |
+
}
|
573 |
+
|
574 |
+
|
575 |
+
|
576 |
+
});
|
577 |
+
}
|
578 |
+
|
579 |
jQuery(document).ready(function($) {
|
580 |
+
setupSkHeartBeat();
|
581 |
setup_intro_welcome_button();
|
582 |
});
|
libs/licensing.php
CHANGED
@@ -85,6 +85,29 @@ if (!class_exists('sidekickMassActivator')) {
|
|
85 |
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
function getAffiliateId(){
|
89 |
if (defined('SK_AFFILIATE_ID')) {
|
90 |
$affiliate_id = intval(SK_AFFILIATE_ID);
|
@@ -112,13 +135,21 @@ if (!class_exists('sidekickMassActivator')) {
|
|
112 |
if ($count == $this->sites_per_page) {
|
113 |
break;
|
114 |
}
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
$count++;
|
117 |
}
|
118 |
}
|
119 |
//mlog('$checked_blogs',$checked_blogs);
|
120 |
|
121 |
$result = array('activated_count' => $count, 'sites_per_page' => $this->sites_per_page, 'unactivated_count' => count($checked_blogs['unactivated']));
|
|
|
122 |
die(json_encode($result));
|
123 |
}
|
124 |
|
@@ -127,24 +158,52 @@ if (!class_exists('sidekickMassActivator')) {
|
|
127 |
die(json_encode($result));
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
function deactivate_single() {
|
131 |
|
132 |
$checked_blogs = get_option('sk_checked_blogs');
|
133 |
$blog_id = $_POST['blog_id'];
|
134 |
|
135 |
-
if (isset($checked_blogs['active'][$
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
140 |
} else {
|
141 |
-
die('{"payload":{"message":"Error #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
|
|
143 |
}
|
144 |
|
145 |
function send_request($type, $end_point, $data = null, $second_attempt = null) {
|
146 |
|
147 |
-
|
148 |
|
149 |
$url = SK_API . $end_point;
|
150 |
$sk_token = get_transient('sk_token');
|
@@ -174,6 +233,9 @@ if (!class_exists('sidekickMassActivator')) {
|
|
174 |
} else if (isset($type) && $type == 'get') {
|
175 |
$args['method'] = 'GET';
|
176 |
$args['body'] = $data;
|
|
|
|
|
|
|
177 |
}
|
178 |
|
179 |
$result = wp_remote_post($url, $args);
|
@@ -291,10 +353,10 @@ if (!class_exists('sidekickMassActivator')) {
|
|
291 |
|
292 |
if (false === ($blogs = get_transient('sk_blog_list'))) {
|
293 |
$blogs = $wpdb->get_results($wpdb->prepare("SELECT *
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
set_transient('sk_blog_list', $blogs, 24 * HOUR_IN_SECONDS);
|
299 |
}
|
300 |
|
85 |
|
86 |
}
|
87 |
|
88 |
+
function deactivate($blog_id) {
|
89 |
+
mlog("FUNCTION: deactivate [$blog_id]");
|
90 |
+
|
91 |
+
switch_to_blog($blog_id);
|
92 |
+
$sk_activation_id = get_option('sk_activation_id');
|
93 |
+
delete_option('sk_activation_id');
|
94 |
+
restore_current_blog();
|
95 |
+
|
96 |
+
$result = $this->send_request('delete', '/domains', array('domainKey' => $sk_activation_id));
|
97 |
+
|
98 |
+
mlog('$result',$result);
|
99 |
+
|
100 |
+
if (isset($result) && isset($result->success) && $result->success == true) {
|
101 |
+
delete_option('sk_auto_activation_error');
|
102 |
+
} else {
|
103 |
+
update_option('sk_auto_activation_error', $result->message);
|
104 |
+
wp_mail('bart@sidekick.pro', 'Failed Domain Deactivation', json_encode($result));
|
105 |
+
}
|
106 |
+
|
107 |
+
return $result;
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
function getAffiliateId(){
|
112 |
if (defined('SK_AFFILIATE_ID')) {
|
113 |
$affiliate_id = intval(SK_AFFILIATE_ID);
|
135 |
if ($count == $this->sites_per_page) {
|
136 |
break;
|
137 |
}
|
138 |
+
mlog('$blog',$blog);
|
139 |
+
|
140 |
+
$userId = null;
|
141 |
+
if (isset($blog->user_id)) {
|
142 |
+
$userId = $blog->user_id;
|
143 |
+
}
|
144 |
+
|
145 |
+
$this->activate($blog->blog_id, $userId, $blog->domain, $blog->path);
|
146 |
$count++;
|
147 |
}
|
148 |
}
|
149 |
//mlog('$checked_blogs',$checked_blogs);
|
150 |
|
151 |
$result = array('activated_count' => $count, 'sites_per_page' => $this->sites_per_page, 'unactivated_count' => count($checked_blogs['unactivated']));
|
152 |
+
mlog('123$result',$result);
|
153 |
die(json_encode($result));
|
154 |
}
|
155 |
|
158 |
die(json_encode($result));
|
159 |
}
|
160 |
|
161 |
+
function resetCacheAndClearActivationIDs(){
|
162 |
+
mlog('resetCacheAndClearActivationIDs');
|
163 |
+
$sites = wp_get_sites();
|
164 |
+
|
165 |
+
delete_option('sk_checked_blogs');
|
166 |
+
|
167 |
+
foreach ($sites as $sites_key => $site) {
|
168 |
+
$this->deactivate($site['blog_id']);
|
169 |
+
}
|
170 |
+
|
171 |
+
die('1');
|
172 |
+
}
|
173 |
+
|
174 |
function deactivate_single() {
|
175 |
|
176 |
$checked_blogs = get_option('sk_checked_blogs');
|
177 |
$blog_id = $_POST['blog_id'];
|
178 |
|
179 |
+
if (isset($checked_blogs['active'][$blog_id])) {
|
180 |
+
|
181 |
+
if ($this->deactivate($blog_id)){
|
182 |
+
die('{"success":1}');
|
183 |
+
} else {
|
184 |
+
die('{"payload":{"message":"Error #13a"}}');
|
185 |
+
}
|
186 |
+
|
187 |
} else {
|
188 |
+
die('{"payload":{"message":"Error #13b"}}');
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
function heartbeat_received($data){
|
193 |
+
// Make sure we only run our query if the edd_heartbeat key is present
|
194 |
+
mlog('$_POST',$_POST);
|
195 |
+
mlog('$_GET',$_GET);
|
196 |
+
if( $_POST['data']['sk_hb_data'] == 'removedSites' ) {
|
197 |
+
|
198 |
+
$response['bart'] = 'test';
|
199 |
+
|
200 |
}
|
201 |
+
return $response;
|
202 |
}
|
203 |
|
204 |
function send_request($type, $end_point, $data = null, $second_attempt = null) {
|
205 |
|
206 |
+
mlog("FUNCTION: send_request [$type] -> $end_point");
|
207 |
|
208 |
$url = SK_API . $end_point;
|
209 |
$sk_token = get_transient('sk_token');
|
233 |
} else if (isset($type) && $type == 'get') {
|
234 |
$args['method'] = 'GET';
|
235 |
$args['body'] = $data;
|
236 |
+
} else if (isset($type) && $type == 'delete') {
|
237 |
+
$args['method'] = 'DELETE';
|
238 |
+
$url .= '?' . http_build_query($data);
|
239 |
}
|
240 |
|
241 |
$result = wp_remote_post($url, $args);
|
353 |
|
354 |
if (false === ($blogs = get_transient('sk_blog_list'))) {
|
355 |
$blogs = $wpdb->get_results($wpdb->prepare("SELECT *
|
356 |
+
FROM $wpdb->blogs
|
357 |
+
WHERE spam = '%d' AND deleted = '%d'
|
358 |
+
"
|
359 |
+
, 0, 0));
|
360 |
set_transient('sk_blog_list', $blogs, 24 * HOUR_IN_SECONDS);
|
361 |
}
|
362 |
|
libs/ms_admin_page.php
CHANGED
@@ -51,9 +51,7 @@
|
|
51 |
<div class="well">
|
52 |
<h3>Activate Sidekick Account</h3>
|
53 |
<p>Please keep this information <b>private</b>.</p>
|
54 |
-
|
55 |
-
<p><b>Important - </b>Only WordPress basics and Enterprise plans are currently supported. <b>Custom Walkthrough</b> plans will be supported in the near future.</p>
|
56 |
-
|
57 |
<form method="post">
|
58 |
<?php settings_fields('sk_license'); ?>
|
59 |
<table class="form-table">
|
@@ -82,6 +80,9 @@
|
|
82 |
<?php endif ?>
|
83 |
<option <?php echo ($sk_selected_library == -1) ? 'SELECTED' : '' ?> value='-1'>WordPress Basics Only</option>
|
84 |
</select>
|
|
|
|
|
|
|
85 |
</td>
|
86 |
</tr>
|
87 |
|
@@ -90,6 +91,8 @@
|
|
90 |
<th scope="row" valign="top">Enable Auto-Activations</th>
|
91 |
<td>
|
92 |
<input class='checkbox' type='checkbox' name='sk_auto_activations' <?php echo ($sk_auto_activations) ? 'CHECKED' : '' ?>>
|
|
|
|
|
93 |
</td>
|
94 |
</tr>
|
95 |
|
@@ -125,7 +128,9 @@
|
|
125 |
<?php endif ?>
|
126 |
<tr>
|
127 |
<th></th>
|
128 |
-
<td><?php submit_button('Update');
|
|
|
|
|
129 |
</tr>
|
130 |
</tbody>
|
131 |
</table>
|
@@ -180,6 +185,8 @@
|
|
180 |
Loading...
|
181 |
</div>
|
182 |
|
|
|
|
|
183 |
</div>
|
184 |
</div>
|
185 |
|
51 |
<div class="well">
|
52 |
<h3>Activate Sidekick Account</h3>
|
53 |
<p>Please keep this information <b>private</b>.</p>
|
54 |
+
|
|
|
|
|
55 |
<form method="post">
|
56 |
<?php settings_fields('sk_license'); ?>
|
57 |
<table class="form-table">
|
80 |
<?php endif ?>
|
81 |
<option <?php echo ($sk_selected_library == -1) ? 'SELECTED' : '' ?> value='-1'>WordPress Basics Only</option>
|
82 |
</select>
|
83 |
+
<p>
|
84 |
+
Once your library is published, it will appear here for you to distribute.
|
85 |
+
</p>
|
86 |
</td>
|
87 |
</tr>
|
88 |
|
91 |
<th scope="row" valign="top">Enable Auto-Activations</th>
|
92 |
<td>
|
93 |
<input class='checkbox' type='checkbox' name='sk_auto_activations' <?php echo ($sk_auto_activations) ? 'CHECKED' : '' ?>>
|
94 |
+
<p>Once active, every site created on this multisite installation will have Sidekick automatically activted.</p>
|
95 |
+
|
96 |
</td>
|
97 |
</tr>
|
98 |
|
128 |
<?php endif ?>
|
129 |
<tr>
|
130 |
<th></th>
|
131 |
+
<td><?php submit_button('Update'); ?>
|
132 |
+
<p>**Please make sure you click the update button above before activating any network websites below.</p>
|
133 |
+
</td>
|
134 |
</tr>
|
135 |
</tbody>
|
136 |
</table>
|
185 |
Loading...
|
186 |
</div>
|
187 |
|
188 |
+
<button class='reset_all'>Reset All<div class="spinner"></div></button>
|
189 |
+
|
190 |
</div>
|
191 |
</div>
|
192 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.sidekick.pro
|
|
4 |
Tags: help, tutorial, tutorials,screencast, self-help, training, learn, learning, sidekick, guide, teach, video, manual, videos, wphelp, support, instructions, question, questions, answers, answer, clippy, q&a, wpuniversity, helper, walkthrough
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.3.1
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GNU Version 2 or Any Later Version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -149,6 +149,9 @@ We read and respond to every piece of feedback we get.
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
152 |
= 2.6.3 =
|
153 |
* Fixes auto start walkthrough selected option box
|
154 |
|
4 |
Tags: help, tutorial, tutorials,screencast, self-help, training, learn, learning, sidekick, guide, teach, video, manual, videos, wphelp, support, instructions, question, questions, answers, answer, clippy, q&a, wpuniversity, helper, walkthrough
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.3.1
|
7 |
+
Stable tag: 2.6.4
|
8 |
License: GNU Version 2 or Any Later Version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= 2.6.4 =
|
153 |
+
* Added ability to reset activation keys for a full multisite network
|
154 |
+
|
155 |
= 2.6.3 =
|
156 |
* Fixes auto start walkthrough selected option box
|
157 |
|
sidekick.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URL: http://wordpress.org/plugins/sidekick/
|
|
6 |
Description: Adds a real-time WordPress training walkthroughs right in your Dashboard
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.3.1
|
9 |
-
Version: 2.6.
|
10 |
Author: Sidekick.pro
|
11 |
Author URI: http://www.sidekick.pro
|
12 |
*/
|
@@ -24,13 +24,14 @@ if (!class_exists('Sidekick')){
|
|
24 |
|
25 |
function __construct(){
|
26 |
if (!defined('SK_API')) define('SK_API','https: //apiv2.sidekick.pro');
|
27 |
-
if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.6.
|
28 |
}
|
29 |
|
30 |
function enqueue_required(){
|
31 |
wp_enqueue_script('jquery' , null );
|
32 |
wp_enqueue_script('underscore' , null, array('underscore'));
|
33 |
wp_enqueue_script('backbone' , null, array('jquery','underscore'));
|
|
|
34 |
wp_enqueue_script('jquery-ui-core' , null, array('jquery') );
|
35 |
wp_enqueue_script('jquery-ui-position' , null, array('jquery-ui-core') );
|
36 |
wp_enqueue_script('jquery-ui-draggable' , null, array('jquery-ui-core') );
|
@@ -38,7 +39,7 @@ if (!class_exists('Sidekick')){
|
|
38 |
wp_enqueue_script('jquery-effects-scale' , null, array('jquery-ui-core') );
|
39 |
wp_enqueue_script('jquery-effects-highlight' , null, array('jquery-ui-core') );
|
40 |
wp_enqueue_script('sidekick-admin' , '//assets.sidekick.pro/plugin/tag/latest/js/sidekick_admin.js',array( 'jquery' ), null);
|
41 |
-
wp_enqueue_script('sidekick'
|
42 |
wp_enqueue_style('wp-pointer');
|
43 |
wp_enqueue_script('wp-pointer');
|
44 |
|
@@ -292,7 +293,7 @@ if (!class_exists('Sidekick')){
|
|
292 |
|
293 |
// WordPress
|
294 |
"embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
|
295 |
-
"plugin_version" => '2.6.
|
296 |
"site_url" => $sk_config_data->get_domain(),
|
297 |
"domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
|
298 |
"plugin_url" => admin_url("admin.php?page=sidekick"),
|
@@ -348,7 +349,7 @@ if (!class_exists('Sidekick')){
|
|
348 |
function check_ver(){
|
349 |
|
350 |
if (isset($_GET['sk_ver_check'])){
|
351 |
-
$data = json_encode('2.6.
|
352 |
|
353 |
if(array_key_exists('callback', $_GET)){
|
354 |
|
@@ -452,13 +453,16 @@ if (!class_exists('Sidekick')){
|
|
452 |
// Multisite Licensing
|
453 |
|
454 |
if (is_multisite()) {
|
|
|
455 |
require_once('libs/licensing.php');
|
456 |
$sidekickMassActivator = new sidekickMassActivator;
|
457 |
|
458 |
add_action('network_admin_menu', array($sidekickMassActivator,'setup_menu'));
|
459 |
add_action('wp_ajax_sk_activate_single', array($sidekickMassActivator,'activate_single'));
|
|
|
460 |
add_action('wp_ajax_sk_activate_batch', array($sidekickMassActivator,'activate_batch'));
|
461 |
add_action('wp_ajax_sk_load_sites_by_status', array($sidekickMassActivator,'load_sites_by_status'));
|
|
|
462 |
|
463 |
$sk_auto_activations = get_option( 'sk_auto_activations');
|
464 |
if ($sk_auto_activations) {
|
6 |
Description: Adds a real-time WordPress training walkthroughs right in your Dashboard
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.3.1
|
9 |
+
Version: 2.6.4
|
10 |
Author: Sidekick.pro
|
11 |
Author URI: http://www.sidekick.pro
|
12 |
*/
|
24 |
|
25 |
function __construct(){
|
26 |
if (!defined('SK_API')) define('SK_API','https: //apiv2.sidekick.pro');
|
27 |
+
if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.6.4'));
|
28 |
}
|
29 |
|
30 |
function enqueue_required(){
|
31 |
wp_enqueue_script('jquery' , null );
|
32 |
wp_enqueue_script('underscore' , null, array('underscore'));
|
33 |
wp_enqueue_script('backbone' , null, array('jquery','underscore'));
|
34 |
+
wp_enqueue_script('heartbeat');
|
35 |
wp_enqueue_script('jquery-ui-core' , null, array('jquery') );
|
36 |
wp_enqueue_script('jquery-ui-position' , null, array('jquery-ui-core') );
|
37 |
wp_enqueue_script('jquery-ui-draggable' , null, array('jquery-ui-core') );
|
39 |
wp_enqueue_script('jquery-effects-scale' , null, array('jquery-ui-core') );
|
40 |
wp_enqueue_script('jquery-effects-highlight' , null, array('jquery-ui-core') );
|
41 |
wp_enqueue_script('sidekick-admin' , '//assets.sidekick.pro/plugin/tag/latest/js/sidekick_admin.js',array( 'jquery' ), null);
|
42 |
+
wp_enqueue_script('sidekick' ,"//loader.sidekick.pro/platforms/d9993157-d972-4c49-93be-a0c684096961.js", array('backbone','jquery','underscore','jquery-effects-highlight'),null,true);
|
43 |
wp_enqueue_style('wp-pointer');
|
44 |
wp_enqueue_script('wp-pointer');
|
45 |
|
293 |
|
294 |
// WordPress
|
295 |
"embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
|
296 |
+
"plugin_version" => '2.6.4', // WordPress plugin version
|
297 |
"site_url" => $sk_config_data->get_domain(),
|
298 |
"domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
|
299 |
"plugin_url" => admin_url("admin.php?page=sidekick"),
|
349 |
function check_ver(){
|
350 |
|
351 |
if (isset($_GET['sk_ver_check'])){
|
352 |
+
$data = json_encode('2.6.4');
|
353 |
|
354 |
if(array_key_exists('callback', $_GET)){
|
355 |
|
453 |
// Multisite Licensing
|
454 |
|
455 |
if (is_multisite()) {
|
456 |
+
|
457 |
require_once('libs/licensing.php');
|
458 |
$sidekickMassActivator = new sidekickMassActivator;
|
459 |
|
460 |
add_action('network_admin_menu', array($sidekickMassActivator,'setup_menu'));
|
461 |
add_action('wp_ajax_sk_activate_single', array($sidekickMassActivator,'activate_single'));
|
462 |
+
add_action('wp_ajax_sk_deactivate_single', array($sidekickMassActivator,'deactivate_single'));
|
463 |
add_action('wp_ajax_sk_activate_batch', array($sidekickMassActivator,'activate_batch'));
|
464 |
add_action('wp_ajax_sk_load_sites_by_status', array($sidekickMassActivator,'load_sites_by_status'));
|
465 |
+
add_action('wp_ajax_sk_reset', array($sidekickMassActivator,'resetCacheAndClearActivationIDs'));
|
466 |
|
467 |
$sk_auto_activations = get_option( 'sk_auto_activations');
|
468 |
if ($sk_auto_activations) {
|