Sidekick - Version 2.6.0

Version Description

  • WordPress 4.3 compatibility
  • Upgrade directly from SIDEKICK
Download this release

Release Info

Developer raptor235
Plugin Icon 128x128 Sidekick
Version 2.6.0
Comparing to
See all releases

Code changes from version 2.5.6 to 2.6.0

Files changed (3) hide show
  1. readme.txt +5 -1
  2. sidekick.php +25 -7
  3. sidekick_embed.php +25 -7
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: 3.7
6
  Tested up to: 4.2
7
- Stable tag: 2.5.6
8
  License: GNU Version 2 or Any Later Version
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -145,6 +145,10 @@ We read and respond to every piece of feedback we get.
145
 
146
  == Changelog ==
147
 
 
 
 
 
148
  = 2.5.5 =
149
  * Fixes an issue with activation
150
 
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: 3.7
6
  Tested up to: 4.2
7
+ Stable tag: 2.6.0
8
  License: GNU Version 2 or Any Later Version
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
145
 
146
  == Changelog ==
147
 
148
+ = 2.6.0 =
149
+ * WordPress 4.3 compatibility
150
+ * Upgrade directly from SIDEKICK
151
+
152
  = 2.5.5 =
153
  * Fixes an issue with activation
154
 
sidekick.php CHANGED
@@ -5,8 +5,8 @@ Plugin Name: Sidekick
5
  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.0
8
- Tested up to: 4.1.1
9
- Version: 2.5.6
10
  Author: Sidekick.pro
11
  Author URI: http://www.sidekick.pro
12
  */
@@ -23,9 +23,7 @@ if (!class_exists('Sidekick')){
23
  class Sidekick{
24
 
25
  function __construct(){
26
- if (!defined('SK_API')) define('SK_API','//apiv2.sidekick.pro/');
27
- if (!defined('SK_TRACKING_API')) define('SK_TRACKING_API','//tracking.sidekick.pro/');
28
- if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.5.6'));
29
  }
30
 
31
  function enqueue_required(){
@@ -52,11 +50,24 @@ if (!class_exists('Sidekick')){
52
  }
53
 
54
  function activate($return = false){
 
55
  if (isset($_POST['activation_id']) && current_user_can('install_plugins')) {
 
56
  update_option('sk_activation_id',$_POST['activation_id']);
 
57
  }
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
60
  function admin_page(){
61
 
62
  if ( empty( $_POST ) || check_admin_referer( 'update_sk_settings' ) ) {
@@ -280,7 +291,7 @@ if (!class_exists('Sidekick')){
280
 
281
  // WordPress
282
  "embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
283
- "plugin_version" => '2.5.6', // WordPress plugin version
284
  "site_url" => $sk_config_data->get_domain(),
285
  "domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
286
  "plugin_url" => admin_url("admin.php?page=sidekick"),
@@ -310,6 +321,10 @@ if (!class_exists('Sidekick')){
310
  <?php echo json_encode($sk_config) ?>
311
  </script>
312
 
 
 
 
 
313
  <?php endif ?>
314
 
315
  <?php
@@ -332,7 +347,7 @@ if (!class_exists('Sidekick')){
332
  function check_ver(){
333
 
334
  if (isset($_GET['sk_ver_check'])){
335
- $data = json_encode('2.5.6');
336
 
337
  if(array_key_exists('callback', $_GET)){
338
 
@@ -422,6 +437,9 @@ if (!class_exists('Sidekick')){
422
  add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
423
  add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue_required'),1000);
424
 
 
 
 
425
  // Reset Transient Cache
426
 
427
  add_action('wp_update_comment_count',array($sidekick,'delete_sk_get_comments'));
5
  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.0
8
+ Tested up to: 4.3
9
+ Version: 2.6.0
10
  Author: Sidekick.pro
11
  Author URI: http://www.sidekick.pro
12
  */
23
  class Sidekick{
24
 
25
  function __construct(){
26
+ if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.6.0'));
 
 
27
  }
28
 
29
  function enqueue_required(){
50
  }
51
 
52
  function activate($return = false){
53
+ mlog("activate");
54
  if (isset($_POST['activation_id']) && current_user_can('install_plugins')) {
55
+ mlog("activate2");
56
  update_option('sk_activation_id',$_POST['activation_id']);
57
+ return true;
58
  }
59
  }
60
 
61
+ function upgrade(){
62
+ mlog("upgrade");
63
+
64
+ if (!isset($_POST['authorization']) || !wp_verify_nonce($_POST['authorization'], 'sk_upgrade')) {
65
+ die('-1');
66
+ }
67
+
68
+ return $this->activate();
69
+ }
70
+
71
  function admin_page(){
72
 
73
  if ( empty( $_POST ) || check_admin_referer( 'update_sk_settings' ) ) {
291
 
292
  // WordPress
293
  "embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
294
+ "plugin_version" => '2.6.0', // WordPress plugin version
295
  "site_url" => $sk_config_data->get_domain(),
296
  "domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
297
  "plugin_url" => admin_url("admin.php?page=sidekick"),
321
  <?php echo json_encode($sk_config) ?>
322
  </script>
323
 
324
+ <script type="text/javascript">
325
+ var sk_nonce_upgrade = '<?php echo wp_create_nonce('sk_upgrade'); ?>'
326
+ </script>
327
+
328
  <?php endif ?>
329
 
330
  <?php
347
  function check_ver(){
348
 
349
  if (isset($_GET['sk_ver_check'])){
350
+ $data = json_encode('2.6.0');
351
 
352
  if(array_key_exists('callback', $_GET)){
353
 
437
  add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
438
  add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue_required'),1000);
439
 
440
+ add_action('wp_ajax_sk_upgrade', array($sidekick,'upgrade'));
441
+
442
+
443
  // Reset Transient Cache
444
 
445
  add_action('wp_update_comment_count',array($sidekick,'delete_sk_get_comments'));
sidekick_embed.php CHANGED
@@ -7,8 +7,8 @@ Description: Adds a real-time WordPress training walkthroughs right in your Dash
7
  This SIDEKICK embed file will enable SIDEKICK as part of your plugin or theme. This is strictly a configuration plugin for the SIDEKICK platform, the actual platform is requested directly from our servers.
8
  We recommend not activating SIDEKICK automatically for people but via an Opt-In process when they configure your own theme or plugin.
9
  Requires at least: 4.0
10
- Tested up to: 4.1.1
11
- Version: 2.5.6
12
  Author: Sidekick.pro
13
  Author URI: http://www.sidekick.pro
14
  */
@@ -28,9 +28,7 @@ if (!$sidekick_active && !class_exists('Sidekick')){
28
  class Sidekick{
29
 
30
  function __construct(){
31
- if (!defined('SK_API')) define('SK_API','//apiv2.sidekick.pro/');
32
- if (!defined('SK_TRACKING_API')) define('SK_TRACKING_API','//tracking.sidekick.pro/');
33
- if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.5.6'));
34
  }
35
 
36
  function enqueue_required(){
@@ -57,11 +55,24 @@ if (!$sidekick_active && !class_exists('Sidekick')){
57
  }
58
 
59
  function activate($return = false){
 
60
  if (isset($_POST['activation_id']) && current_user_can('install_plugins')) {
 
61
  update_option('sk_activation_id',$_POST['activation_id']);
 
62
  }
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
65
  function admin_page(){
66
 
67
  if ( empty( $_POST ) || check_admin_referer( 'update_sk_settings' ) ) {
@@ -539,7 +550,7 @@ if (!$sidekick_active && !class_exists('Sidekick')){
539
 
540
  // WordPress
541
  "embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
542
- "plugin_version" => '2.5.6', // WordPress plugin version
543
  "site_url" => $sk_config_data->get_domain(),
544
  "domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
545
  "plugin_url" => admin_url("admin.php?page=sidekick"),
@@ -569,6 +580,10 @@ if (!$sidekick_active && !class_exists('Sidekick')){
569
  <?php echo json_encode($sk_config) ?>
570
  </script>
571
 
 
 
 
 
572
  <?php endif ?>
573
 
574
  <?php
@@ -591,7 +606,7 @@ if (!$sidekick_active && !class_exists('Sidekick')){
591
  function check_ver(){
592
 
593
  if (isset($_GET['sk_ver_check'])){
594
- $data = json_encode('2.5.6');
595
 
596
  if(array_key_exists('callback', $_GET)){
597
 
@@ -681,6 +696,9 @@ if (!$sidekick_active && !class_exists('Sidekick')){
681
  add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
682
  add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue_required'),1000);
683
 
 
 
 
684
  // Reset Transient Cache
685
 
686
  add_action('wp_update_comment_count',array($sidekick,'delete_sk_get_comments'));
7
  This SIDEKICK embed file will enable SIDEKICK as part of your plugin or theme. This is strictly a configuration plugin for the SIDEKICK platform, the actual platform is requested directly from our servers.
8
  We recommend not activating SIDEKICK automatically for people but via an Opt-In process when they configure your own theme or plugin.
9
  Requires at least: 4.0
10
+ Tested up to: 4.3
11
+ Version: 2.6.0
12
  Author: Sidekick.pro
13
  Author URI: http://www.sidekick.pro
14
  */
28
  class Sidekick{
29
 
30
  function __construct(){
31
+ if (!defined('SK_CACHE_PREFIX')) define('SK_CACHE_PREFIX',str_replace('.', '_', '2.6.0'));
 
 
32
  }
33
 
34
  function enqueue_required(){
55
  }
56
 
57
  function activate($return = false){
58
+ mlog("activate");
59
  if (isset($_POST['activation_id']) && current_user_can('install_plugins')) {
60
+ mlog("activate2");
61
  update_option('sk_activation_id',$_POST['activation_id']);
62
+ return true;
63
  }
64
  }
65
 
66
+ function upgrade(){
67
+ mlog("upgrade");
68
+
69
+ if (!isset($_POST['authorization']) || !wp_verify_nonce($_POST['authorization'], 'sk_upgrade')) {
70
+ die('-1');
71
+ }
72
+
73
+ return $this->activate();
74
+ }
75
+
76
  function admin_page(){
77
 
78
  if ( empty( $_POST ) || check_admin_referer( 'update_sk_settings' ) ) {
550
 
551
  // WordPress
552
  "embed_partner_id" => SK_EMBEDDED_PARTNER, // for tracking purposes if sidekick has been embeded in another WordPress plugin or theme
553
+ "plugin_version" => '2.6.0', // WordPress plugin version
554
  "site_url" => $sk_config_data->get_domain(),
555
  "domain" => str_replace("http://","",$_SERVER["SERVER_NAME"]),
556
  "plugin_url" => admin_url("admin.php?page=sidekick"),
580
  <?php echo json_encode($sk_config) ?>
581
  </script>
582
 
583
+ <script type="text/javascript">
584
+ var sk_nonce_upgrade = '<?php echo wp_create_nonce('sk_upgrade'); ?>'
585
+ </script>
586
+
587
  <?php endif ?>
588
 
589
  <?php
606
  function check_ver(){
607
 
608
  if (isset($_GET['sk_ver_check'])){
609
+ $data = json_encode('2.6.0');
610
 
611
  if(array_key_exists('callback', $_GET)){
612
 
696
  add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
697
  add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue_required'),1000);
698
 
699
+ add_action('wp_ajax_sk_upgrade', array($sidekick,'upgrade'));
700
+
701
+
702
  // Reset Transient Cache
703
 
704
  add_action('wp_update_comment_count',array($sidekick,'delete_sk_get_comments'));