WordPress Charts and Graphs Lite - Version 2.1.3

Version Description

Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 2.1.3
Comparing to
See all releases

Code changes from version 2.1.2 to 2.1.3

CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
 
 
 
 
2
  ### v2.1.2 - 2017-05-30
3
  **Changes:**
4
  - Fixed priority issue with wp_enqueue_media
1
 
2
+ ### v2.1.3 - 2017-05-31
3
+ **Changes:**
4
+
5
  ### v2.1.2 - 2017-05-30
6
  **Changes:**
7
  - Fixed priority issue with wp_enqueue_media
classes/Visualizer/Module/Admin.php CHANGED
@@ -59,22 +59,8 @@ class Visualizer_Module_Admin extends Visualizer_Module {
59
  $this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
60
  $this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
61
  $this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
62
- $this->_addAjaxAction( Visualizer_Plugin::ACTION_TRACK, 'visualizer_enable_track' );
63
  }
64
 
65
- /**
66
- * Enable track ajax action.
67
- */
68
- public function visualizer_enable_track() {
69
- check_admin_referer( Visualizer_Plugin::ACTION_TRACK, 'nonce' );
70
- $status = $_GET['status'];
71
- if ( $status == 'yes' ) {
72
- update_option( 'visualizer_logger_flag', 'yes' );
73
- } else {
74
- update_option( 'visualizer_logger_flag', 'no' );
75
- }
76
- wp_send_json_success( array( 'status' => $status ) );
77
- }
78
 
79
  /**
80
  * Enqueues media scripts and styles.
@@ -384,11 +370,6 @@ class Visualizer_Module_Admin extends Visualizer_Module {
384
  'action' => Visualizer_Plugin::ACTION_EDIT_CHART,
385
  'library' => 'yes',
386
  ), $ajaxurl ),
387
- 'logger' => add_query_arg( array(
388
- 'action' => Visualizer_Plugin::ACTION_TRACK,
389
- 'library' => 'yes',
390
- 'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_TRACK ),
391
- ), $ajaxurl ),
392
  ),
393
  ) );
394
  // render library page
59
  $this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
60
  $this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
61
  $this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
 
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  /**
66
  * Enqueues media scripts and styles.
370
  'action' => Visualizer_Plugin::ACTION_EDIT_CHART,
371
  'library' => 'yes',
372
  ), $ajaxurl ),
 
 
 
 
 
373
  ),
374
  ) );
375
  // render library page
classes/Visualizer/Module/Setup.php CHANGED
@@ -44,18 +44,6 @@ class Visualizer_Module_Setup extends Visualizer_Module {
44
 
45
  $this->_addAction( 'init', 'setupCustomPostTypes' );
46
  $this->_addAction( 'plugins_loaded', 'loadTextDomain' );
47
- $this->_addFilter( 'visualizer_logger_flag', 'get_logger_flag', 10, 1 );
48
- }
49
-
50
- /**
51
- * Either the tracking is active or not.
52
- *
53
- * @return bool The flag status.
54
- */
55
- public function get_logger_flag() {
56
- $flag = get_option( 'visualizer_logger_flag', 'no' );
57
-
58
- return ( $flag === 'yes' );
59
  }
60
 
61
  /**
44
 
45
  $this->_addAction( 'init', 'setupCustomPostTypes' );
46
  $this->_addAction( 'plugins_loaded', 'loadTextDomain' );
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  /**
classes/Visualizer/Plugin.php CHANGED
@@ -28,7 +28,7 @@
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
- const VERSION = '2.1.2';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
@@ -42,7 +42,6 @@ class Visualizer_Plugin {
42
 
43
  // custom actions
44
  const ACTION_GET_CHARTS = 'visualizer-get-charts';
45
- const ACTION_TRACK = 'visualizer-track';
46
  const ACTION_CREATE_CHART = 'visualizer-create-chart';
47
  const ACTION_EDIT_CHART = 'visualizer-edit-chart';
48
  const ACTION_CLONE_CHART = 'visualizer-clone-chart';
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
+ const VERSION = '2.1.3';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
42
 
43
  // custom actions
44
  const ACTION_GET_CHARTS = 'visualizer-get-charts';
 
45
  const ACTION_CREATE_CHART = 'visualizer-create-chart';
46
  const ACTION_EDIT_CHART = 'visualizer-edit-chart';
47
  const ACTION_CLONE_CHART = 'visualizer-clone-chart';
classes/Visualizer/Render/Library.php CHANGED
@@ -197,8 +197,6 @@ class Visualizer_Render_Library extends Visualizer_Render {
197
  */
198
  private function _renderSidebar() {
199
  if ( ! VISUALIZER_PRO ) {
200
- $checked = apply_filters( 'visualizer_logger_flag', false );
201
- $checked = ( $checked === false ) ? '' : 'checked';
202
  echo '<div id="visualizer-sidebar">';
203
  echo '<div class="visualizer-sidebar-box">';
204
  echo '<h3>' . __( 'Gain more editing power', 'visualizer' ) . '</h3><ul>';
@@ -208,15 +206,6 @@ class Visualizer_Render_Library extends Visualizer_Render {
208
  echo '<li>' . __( '3 more chart types', 'visualizer' ) . '</li></ul>';
209
  echo '<a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a>';
210
  echo '</div>';
211
- echo '<div class="visualizer-sidebar-box visualizer-tracking">';
212
- echo '<label class="visualizer-switch">';
213
- echo '<input type="checkbox" ' . $checked . ' >';
214
- echo '<div class="visualizer-slider visualizer-round"></div>';
215
- echo '</label>';
216
- echo '<span>' . __( 'Enable Tracking', 'visualizer' ) . '<sup>*</sup></span>';
217
- echo '<p><small><sup>*</sup>' . __( 'Allow Visualizer to anonymously track how this plugin is used and help us make the plugin better. No sensitive data is tracked.', 'visualizer' ) . '</small></p>';
218
- echo '</div>';
219
- echo '</div>';
220
  }
221
  }
222
 
197
  */
198
  private function _renderSidebar() {
199
  if ( ! VISUALIZER_PRO ) {
 
 
200
  echo '<div id="visualizer-sidebar">';
201
  echo '<div class="visualizer-sidebar-box">';
202
  echo '<h3>' . __( 'Gain more editing power', 'visualizer' ) . '</h3><ul>';
206
  echo '<li>' . __( '3 more chart types', 'visualizer' ) . '</li></ul>';
207
  echo '<a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a>';
208
  echo '</div>';
 
 
 
 
 
 
 
 
 
209
  }
210
  }
211
 
css/media.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 2.1.2
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
1
  /*
2
+ Version: 2.1.3
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
index.php CHANGED
@@ -4,12 +4,13 @@
4
  Plugin Name: Visualizer: Charts and Graphs Lite
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
- Version: 2.1.2
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
11
  WordPress Available: yes
12
  Requires License: no
 
13
  License URI: http://www.opensource.org/licenses/gpl-license.php
14
  */
15
 
4
  Plugin Name: Visualizer: Charts and Graphs Lite
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
+ Version: 2.1.3
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
11
  WordPress Available: yes
12
  Requires License: no
13
+ Pro Slug: visualizer-pro
14
  License URI: http://www.opensource.org/licenses/gpl-license.php
15
  */
16
 
js/library.js CHANGED
@@ -106,18 +106,6 @@
106
  });
107
  return false;
108
  });
109
- $('.visualizer-switch input').on('change', function () {
110
-
111
- var status = $(this).is(':checked');
112
- status = (status) ? 'yes' : 'no';
113
- $.ajax({
114
- url: visualizer.urls.logger,
115
- data: {status: status},
116
- method: "get",
117
- success: function (data, textStatus, jqXHR) {
118
- }
119
- });
120
- });
121
  $(window).resize(function () {
122
  clearTimeout(resizeTimeout);
123
  resizeTimeout = setTimeout(function () {
106
  });
107
  return false;
108
  });
 
 
 
 
 
 
 
 
 
 
 
 
109
  $(window).resize(function () {
110
  clearTimeout(resizeTimeout);
111
  resizeTimeout = setTimeout(function () {
languages/visualizer.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.1\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
- "POT-Creation-Date: 2017-05-26 11:03:14+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,80 +24,80 @@ msgstr ""
24
  "X-Poedit-Bookmarks: \n"
25
  "X-Textdomain-Support: yes\n"
26
 
27
- #: classes/Visualizer/Module/Admin.php:121
28
  msgid "Visualizations"
29
  msgstr ""
30
 
31
- #: classes/Visualizer/Module/Admin.php:124
32
  msgid "From Library"
33
  msgstr ""
34
 
35
- #: classes/Visualizer/Module/Admin.php:125
36
  msgid "Create New"
37
  msgstr ""
38
 
39
- #: classes/Visualizer/Module/Admin.php:150
40
  msgid "Pie"
41
  msgstr ""
42
 
43
- #: classes/Visualizer/Module/Admin.php:154
44
  msgid "Line"
45
  msgstr ""
46
 
47
- #: classes/Visualizer/Module/Admin.php:158
48
  msgid "Area"
49
  msgstr ""
50
 
51
- #: classes/Visualizer/Module/Admin.php:162
52
  msgid "Geo"
53
  msgstr ""
54
 
55
- #: classes/Visualizer/Module/Admin.php:166
56
  msgid "Bar"
57
  msgstr ""
58
 
59
- #: classes/Visualizer/Module/Admin.php:170
60
  msgid "Column"
61
  msgstr ""
62
 
63
- #: classes/Visualizer/Module/Admin.php:174
64
  msgid "Gauge"
65
  msgstr ""
66
 
67
- #: classes/Visualizer/Module/Admin.php:178
68
  msgid "Scatter"
69
  msgstr ""
70
 
71
- #: classes/Visualizer/Module/Admin.php:182
72
  msgid "Candlestick"
73
  msgstr ""
74
 
75
- #: classes/Visualizer/Module/Admin.php:187
76
  msgid "Table"
77
  msgstr ""
78
 
79
- #: classes/Visualizer/Module/Admin.php:191
80
  msgid "Timeline"
81
  msgstr ""
82
 
83
- #: classes/Visualizer/Module/Admin.php:195
84
  msgid "Combo"
85
  msgstr ""
86
 
87
- #: classes/Visualizer/Module/Admin.php:301
88
  #: classes/Visualizer/Render/Library.php:42
89
  msgid "Visualizer Library"
90
  msgstr ""
91
 
92
- #: classes/Visualizer/Module/Admin.php:428
93
  msgid "Library"
94
  msgstr ""
95
 
96
- #: classes/Visualizer/Module/Admin.php:453
97
  msgid "Knowledge Base"
98
  msgstr ""
99
 
100
- #: classes/Visualizer/Module/Admin.php:458
101
  msgid "Pro Addon"
102
  msgstr ""
103
 
@@ -175,40 +175,30 @@ msgstr ""
175
  msgid "Click to select"
176
  msgstr ""
177
 
178
- #: classes/Visualizer/Render/Library.php:204
179
  msgid "Gain more editing power"
180
  msgstr ""
181
 
182
- #: classes/Visualizer/Render/Library.php:205
183
  msgid "Spreadsheet like editor"
184
  msgstr ""
185
 
186
- #: classes/Visualizer/Render/Library.php:206
187
  msgid "Import from other charts"
188
  msgstr ""
189
 
190
- #: classes/Visualizer/Render/Library.php:207
191
  msgid "Auto-sync with online files"
192
  msgstr ""
193
 
194
- #: classes/Visualizer/Render/Library.php:208
195
  msgid "3 more chart types"
196
  msgstr ""
197
 
198
- #: classes/Visualizer/Render/Library.php:209
199
  msgid "View more features"
200
  msgstr ""
201
 
202
- #: classes/Visualizer/Render/Library.php:216
203
- msgid "Enable Tracking"
204
- msgstr ""
205
-
206
- #: classes/Visualizer/Render/Library.php:217
207
- msgid ""
208
- "Allow Visualizer to anonymously track how this plugin is used and help us "
209
- "make the plugin better. No sensitive data is tracked."
210
- msgstr ""
211
-
212
  #: classes/Visualizer/Render/Page/Data.php:73
213
  msgid "Chart Data"
214
  msgstr ""
@@ -322,11 +312,11 @@ msgid "Import Chart"
322
  msgstr ""
323
 
324
  #: classes/Visualizer/Render/Page/Data.php:201
325
- msgid "Import from Wordpress"
326
  msgstr ""
327
 
328
  #: classes/Visualizer/Render/Page/Data.php:205
329
- msgid "You can import here data from Wordpress"
330
  msgstr ""
331
 
332
  #: classes/Visualizer/Render/Page/Data.php:207
@@ -1506,11 +1496,7 @@ msgid ""
1506
  "stop, OK to update."
1507
  msgstr ""
1508
 
1509
- #: vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php:200
1510
- msgid "Popular Plugin"
1511
- msgstr ""
1512
-
1513
- #: vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php:201
1514
  msgid "Install"
1515
  msgstr ""
1516
 
2
  # This file is distributed under the GPL v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
+ "POT-Creation-Date: 2017-05-31 11:52:41+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Poedit-Bookmarks: \n"
25
  "X-Textdomain-Support: yes\n"
26
 
27
+ #: classes/Visualizer/Module/Admin.php:107
28
  msgid "Visualizations"
29
  msgstr ""
30
 
31
+ #: classes/Visualizer/Module/Admin.php:110
32
  msgid "From Library"
33
  msgstr ""
34
 
35
+ #: classes/Visualizer/Module/Admin.php:111
36
  msgid "Create New"
37
  msgstr ""
38
 
39
+ #: classes/Visualizer/Module/Admin.php:136
40
  msgid "Pie"
41
  msgstr ""
42
 
43
+ #: classes/Visualizer/Module/Admin.php:140
44
  msgid "Line"
45
  msgstr ""
46
 
47
+ #: classes/Visualizer/Module/Admin.php:144
48
  msgid "Area"
49
  msgstr ""
50
 
51
+ #: classes/Visualizer/Module/Admin.php:148
52
  msgid "Geo"
53
  msgstr ""
54
 
55
+ #: classes/Visualizer/Module/Admin.php:152
56
  msgid "Bar"
57
  msgstr ""
58
 
59
+ #: classes/Visualizer/Module/Admin.php:156
60
  msgid "Column"
61
  msgstr ""
62
 
63
+ #: classes/Visualizer/Module/Admin.php:160
64
  msgid "Gauge"
65
  msgstr ""
66
 
67
+ #: classes/Visualizer/Module/Admin.php:164
68
  msgid "Scatter"
69
  msgstr ""
70
 
71
+ #: classes/Visualizer/Module/Admin.php:168
72
  msgid "Candlestick"
73
  msgstr ""
74
 
75
+ #: classes/Visualizer/Module/Admin.php:173
76
  msgid "Table"
77
  msgstr ""
78
 
79
+ #: classes/Visualizer/Module/Admin.php:177
80
  msgid "Timeline"
81
  msgstr ""
82
 
83
+ #: classes/Visualizer/Module/Admin.php:181
84
  msgid "Combo"
85
  msgstr ""
86
 
87
+ #: classes/Visualizer/Module/Admin.php:287
88
  #: classes/Visualizer/Render/Library.php:42
89
  msgid "Visualizer Library"
90
  msgstr ""
91
 
92
+ #: classes/Visualizer/Module/Admin.php:409
93
  msgid "Library"
94
  msgstr ""
95
 
96
+ #: classes/Visualizer/Module/Admin.php:434
97
  msgid "Knowledge Base"
98
  msgstr ""
99
 
100
+ #: classes/Visualizer/Module/Admin.php:439
101
  msgid "Pro Addon"
102
  msgstr ""
103
 
175
  msgid "Click to select"
176
  msgstr ""
177
 
178
+ #: classes/Visualizer/Render/Library.php:202
179
  msgid "Gain more editing power"
180
  msgstr ""
181
 
182
+ #: classes/Visualizer/Render/Library.php:203
183
  msgid "Spreadsheet like editor"
184
  msgstr ""
185
 
186
+ #: classes/Visualizer/Render/Library.php:204
187
  msgid "Import from other charts"
188
  msgstr ""
189
 
190
+ #: classes/Visualizer/Render/Library.php:205
191
  msgid "Auto-sync with online files"
192
  msgstr ""
193
 
194
+ #: classes/Visualizer/Render/Library.php:206
195
  msgid "3 more chart types"
196
  msgstr ""
197
 
198
+ #: classes/Visualizer/Render/Library.php:207
199
  msgid "View more features"
200
  msgstr ""
201
 
 
 
 
 
 
 
 
 
 
 
202
  #: classes/Visualizer/Render/Page/Data.php:73
203
  msgid "Chart Data"
204
  msgstr ""
312
  msgstr ""
313
 
314
  #: classes/Visualizer/Render/Page/Data.php:201
315
+ msgid "Import from WordPress"
316
  msgstr ""
317
 
318
  #: classes/Visualizer/Render/Page/Data.php:205
319
+ msgid "You can import here data from WordPress"
320
  msgstr ""
321
 
322
  #: classes/Visualizer/Render/Page/Data.php:207
1496
  "stop, OK to update."
1497
  msgstr ""
1498
 
1499
+ #: vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php:197
 
 
 
 
1500
  msgid "Install"
1501
  msgstr ""
1502
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit2b532b899cc7e910887d8f5952616a01::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit8bcc3ca6cef0c8f1c54aa7a6204d2b15::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf::getLoader();
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php CHANGED
@@ -86,11 +86,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
86
  function add_css( $key ) {
87
  ?>
88
  <style type="text/css" id="<?php echo $key; ?>ti-review-css">
89
- #<?php echo $key; ?>-review-notification{
90
- padding-bottom:5px;
91
  }
92
- #<?php echo $key; ?>-review-notification .review-dismiss{
93
- margin-left:5px;
 
94
  }
95
  </style>
96
  <?php
@@ -135,7 +136,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
135
  $link = 'https://wordpress.org/support/plugin/' . $this->product->get_slug() . '/reviews/#wporg-footer';
136
  $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
137
  $heading = str_replace( array( '{product}' ),
138
- str_replace( 'Lite', '', $this->product->get_name() ), $heading );
139
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
140
  $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
141
 
86
  function add_css( $key ) {
87
  ?>
88
  <style type="text/css" id="<?php echo $key; ?>ti-review-css">
89
+ #<?php echo $key; ?>-review-notification {
90
+ padding-bottom: 5px;
91
  }
92
+
93
+ #<?php echo $key; ?>-review-notification .review-dismiss {
94
+ margin-left: 5px;
95
  }
96
  </style>
97
  <?php
136
  $link = 'https://wordpress.org/support/plugin/' . $this->product->get_slug() . '/reviews/#wporg-footer';
137
  $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
138
  $heading = str_replace( array( '{product}' ),
139
+ trim( str_replace( 'Lite', '', $this->product->get_name() ) ), $heading );
140
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
141
  $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
142
 
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php CHANGED
@@ -59,7 +59,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
59
  $notifications[] = $logger;
60
  }
61
 
62
- $feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
63
 
64
  $instances = $feedback->get_instances();
65
  if ( array_key_exists( 'review', $instances ) ) {
@@ -72,6 +72,15 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
72
  return self::$instance;
73
  }
74
 
 
 
 
 
 
 
 
 
 
75
  /**
76
  * Setup loader hookds.
77
  */
@@ -92,6 +101,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
92
  if ( ! in_array( 'WordPress Available', $headers ) ) {
93
  $headers[] = 'WordPress Available';
94
  }
 
 
 
95
 
96
  return $headers;
97
  }
59
  $notifications[] = $logger;
60
  }
61
 
62
+ $feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
63
 
64
  $instances = $feedback->get_instances();
65
  if ( array_key_exists( 'review', $instances ) ) {
72
  return self::$instance;
73
  }
74
 
75
+ /**
76
+ * Get all products using the SDK.
77
+ *
78
+ * @return array Products available.
79
+ */
80
+ public static function get_products() {
81
+ return self::$products;
82
+ }
83
+
84
  /**
85
  * Setup loader hookds.
86
  */
101
  if ( ! in_array( 'WordPress Available', $headers ) ) {
102
  $headers[] = 'WordPress Available';
103
  }
104
+ if ( ! in_array( 'Pro Slug', $headers ) ) {
105
+ $headers[] = 'Pro Slug';
106
+ }
107
 
108
  return $headers;
109
  }
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php CHANGED
@@ -141,7 +141,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
141
  function get_html( $key ) {
142
  $heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
143
  $heading = str_replace( array( '{product}' ), array(
144
- str_replace( 'Lite', '', $this->product->get_name() )
145
  ),
146
  $heading
147
  );
141
  function get_html( $key ) {
142
  $heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
143
  $heading = str_replace( array( '{product}' ), array(
144
+ trim( str_replace( 'Lite', '', $this->product->get_name() ) )
145
  ),
146
  $heading
147
  );
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php CHANGED
@@ -25,6 +25,14 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
25
  * @var array Notifications for the current product.
26
  */
27
  private $notifications = array();
 
 
 
 
 
 
 
 
28
 
29
  /**
30
  * ThemeIsle_SDK_Notification_Manager constructor.
@@ -33,17 +41,26 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
33
  * @param array $callbacks the objects that will be called when a notification is due.
34
  */
35
  public function __construct( $product_object, $callbacks ) {
 
 
 
 
36
 
 
 
 
 
 
 
 
37
  // Load the notifications only if we have it installed after the required interval.
38
- if ( ( time() - $product_object->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
39
- if ( $product_object instanceof ThemeIsle_SDK_Product && $callbacks && is_array( $callbacks ) ) {
40
- foreach ( $callbacks as $instance ) {
41
- $this->notifications[ $product_object->get_key() . get_class( $instance ) ] = $instance;
42
  }
43
  }
44
  }
45
-
46
- $this->setup_hooks();
47
  }
48
 
49
  /**
@@ -51,6 +68,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
51
  */
52
  private function setup_hooks() {
53
  add_action( 'admin_head', array( $this, 'show_notification' ) );
 
54
  }
55
 
56
  /**
25
  * @var array Notifications for the current product.
26
  */
27
  private $notifications = array();
28
+ /**
29
+ * @var ThemeIsle_SDK_Product Current product.
30
+ */
31
+ private $product;
32
+ /**
33
+ * @var array ThemeIsle_SDK_Feedback Feedbacks available.
34
+ */
35
+ private $callbacks = array();
36
 
37
  /**
38
  * ThemeIsle_SDK_Notification_Manager constructor.
41
  * @param array $callbacks the objects that will be called when a notification is due.
42
  */
43
  public function __construct( $product_object, $callbacks ) {
44
+ $this->product = $product_object;
45
+ $this->callbacks = $callbacks;
46
+ $this->setup_hooks();
47
+ }
48
 
49
+ /**
50
+ * Setup the notifications.
51
+ */
52
+ function setup_notifications() {
53
+ if ( ! current_user_can( 'manage_options' ) ) {
54
+ return;
55
+ }
56
  // Load the notifications only if we have it installed after the required interval.
57
+ if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
58
+ if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
59
+ foreach ( $this->callbacks as $instance ) {
60
+ $this->notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
61
  }
62
  }
63
  }
 
 
64
  }
65
 
66
  /**
68
  */
69
  private function setup_hooks() {
70
  add_action( 'admin_head', array( $this, 'show_notification' ) );
71
+ add_action( 'admin_init', array( $this, 'setup_notifications' ) );
72
  }
73
 
74
  /**
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php CHANGED
@@ -69,6 +69,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
69
  * @var string $logger_option Logger option key.
70
  */
71
  public $logger_option;
 
 
 
 
72
  /**
73
  * @var string $feedback_types All the feedback types the product supports
74
  */
@@ -119,6 +123,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
119
  $this->store_url = $file_headers['AuthorURI'];
120
  $this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
121
  $this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
 
122
  $this->version = $file_headers['Version'];
123
  if ( $this->require_uninstall_feedback() ) {
124
  $this->feedback_types[] = 'deactivate';
@@ -303,12 +308,29 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
303
  if ( ! $this->is_wordpress_available() ) {
304
  return true;
305
  } else {
306
- // If we have the product on wprog, by default this will be false
307
- // and we can change it in each product.
 
 
 
 
 
 
 
308
  return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
 
309
  }
310
  }
311
 
 
 
 
 
 
 
 
 
 
312
  /**
313
  * Return the install timestamp.
314
  *
69
  * @var string $logger_option Logger option key.
70
  */
71
  public $logger_option;
72
+ /**
73
+ * @var string $pro_slug Pro slug, if available.
74
+ */
75
+ public $pro_slug;
76
  /**
77
  * @var string $feedback_types All the feedback types the product supports
78
  */
123
  $this->store_url = $file_headers['AuthorURI'];
124
  $this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
125
  $this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
126
+ $this->pro_slug = ! empty( $file_headers['Pro Slug'] ) ? $file_headers['Pro Slug'] : '';
127
  $this->version = $file_headers['Version'];
128
  if ( $this->require_uninstall_feedback() ) {
129
  $this->feedback_types[] = 'deactivate';
308
  if ( ! $this->is_wordpress_available() ) {
309
  return true;
310
  } else {
311
+ $pro_slug = $this->get_pro_slug();
312
+ if ( ! empty( $pro_slug ) ) {
313
+
314
+ $all_products = ThemeIsle_SDK_Loader::get_products();
315
+ if ( isset( $all_products[ $pro_slug ] ) ) {
316
+ return true;
317
+ }
318
+ }
319
+
320
  return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
321
+
322
  }
323
  }
324
 
325
+ /**
326
+ * Returns the pro slug, if available.
327
+ *
328
+ * @return string The pro slug.
329
+ */
330
+ public function get_pro_slug() {
331
+ return $this->pro_slug;
332
+ }
333
+
334
  /**
335
  * Return the install timestamp.
336
  *
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit2b532b899cc7e910887d8f5952616a01
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit2b532b899cc7e910887d8f5952616a01
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit2b532b899cc7e910887d8f5952616a01', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit2b532b899cc7e910887d8f5952616a01', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit8bcc3ca6cef0c8f1c54aa7a6204d2b15 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit8bcc3ca6cef0c8f1c54aa7a6204d2b15 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit8bcc3ca6cef0c8f1c54aa7a6204d2b15', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit8bcc3ca6cef0c8f1c54aa7a6204d2b15', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -39,15 +39,15 @@
39
  "source": {
40
  "type": "git",
41
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
42
- "reference": "7817845a4f1ffea73264861d67094588bf095400"
43
  },
44
  "dist": {
45
  "type": "zip",
46
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/7817845a4f1ffea73264861d67094588bf095400",
47
- "reference": "7817845a4f1ffea73264861d67094588bf095400",
48
  "shasum": ""
49
  },
50
- "time": "2017-05-30 09:47:46",
51
  "type": "library",
52
  "installation-source": "dist",
53
  "autoload": {
39
  "source": {
40
  "type": "git",
41
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
42
+ "reference": "baa84a7f47fabed805b7678b5d01775d0d16cc9f"
43
  },
44
  "dist": {
45
  "type": "zip",
46
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/baa84a7f47fabed805b7678b5d01775d0d16cc9f",
47
+ "reference": "baa84a7f47fabed805b7678b5d01775d0d16cc9f",
48
  "shasum": ""
49
  },
50
+ "time": "2017-05-31 11:42:19",
51
  "type": "library",
52
  "installation-source": "dist",
53
  "autoload": {