Version Description
- 2017-07-10
Download this release
Release Info
Developer | codeinwp |
Plugin | WordPress Charts and Graphs Lite |
Version | 2.1.9 |
Comparing to | |
See all releases |
Code changes from version 2.1.8 to 2.1.9
- CHANGELOG.md +7 -0
- classes/Visualizer/Plugin.php +1 -1
- css/library.css +4 -4
- css/media.css +1 -1
- index.php +1 -1
- js/render.js +6 -2
- languages/visualizer.pot +2 -6
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +31 -27
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +25 -14
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +5 -3
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php +65 -38
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +37 -30
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +3 -3
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +41 -21
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/installed.json +4 -4
CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v2.1.8 - 2017-07-03
|
3 |
**Changes:**
|
4 |
* Added chart title into library.
|
1 |
|
2 |
+
### v2.1.9 - 2017-08-07
|
3 |
+
**Changes:**
|
4 |
+
|
5 |
+
### v2.1.9 - 2017-07-10
|
6 |
+
**Changes:**
|
7 |
+
* Fixed display error with hex color.
|
8 |
+
|
9 |
### v2.1.8 - 2017-07-03
|
10 |
**Changes:**
|
11 |
* Added chart title into library.
|
classes/Visualizer/Plugin.php
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
-
const VERSION = '2.1.
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
+
const VERSION = '2.1.9';
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
css/library.css
CHANGED
@@ -283,9 +283,9 @@ input:checked + .visualizer-slider:before {
|
|
283 |
padding-top: 20px;
|
284 |
padding-bottom: 20px;
|
285 |
}
|
286 |
-
.visualizer-chart-title{
|
287 |
|
288 |
-
|
289 |
-
font-weight: bold;
|
290 |
padding-bottom: 5px;
|
291 |
-
|
|
|
|
283 |
padding-top: 20px;
|
284 |
padding-bottom: 20px;
|
285 |
}
|
|
|
286 |
|
287 |
+
.visualizer-chart-title {
|
|
|
288 |
padding-bottom: 5px;
|
289 |
+
font-weight: bold;
|
290 |
+
text-align: center;
|
291 |
+
}
|
css/media.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 2.1.
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
1 |
/*
|
2 |
+
Version: 2.1.9
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
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.
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
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.9
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
js/render.js
CHANGED
@@ -139,13 +139,17 @@
|
|
139 |
|
140 |
if(settings.hAxis){
|
141 |
if(settings.hAxis.textStyle && settings.hAxis.textStyle !== ''){
|
142 |
-
settings.hAxis.textStyle
|
|
|
|
|
143 |
}
|
144 |
}
|
145 |
|
146 |
if(settings.vAxis){
|
147 |
if(settings.vAxis.textStyle && settings.vAxis.textStyle !== ''){
|
148 |
-
settings.vAxis.textStyle
|
|
|
|
|
149 |
}
|
150 |
}
|
151 |
|
139 |
|
140 |
if(settings.hAxis){
|
141 |
if(settings.hAxis.textStyle && settings.hAxis.textStyle !== ''){
|
142 |
+
if(typeof(settings.hAxis.textStyle) === "string") {
|
143 |
+
settings.hAxis.textStyle = {color: settings.hAxis.textStyle};
|
144 |
+
}
|
145 |
}
|
146 |
}
|
147 |
|
148 |
if(settings.vAxis){
|
149 |
if(settings.vAxis.textStyle && settings.vAxis.textStyle !== ''){
|
150 |
+
if(typeof(settings.vAxis.textStyle) === "string") {
|
151 |
+
settings.vAxis.textStyle = {color: settings.vAxis.textStyle};
|
152 |
+
}
|
153 |
}
|
154 |
}
|
155 |
|
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.
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -153,10 +153,6 @@ msgstr ""
|
|
153 |
msgid "No charts found"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: classes/Visualizer/Render/Library.php:163
|
157 |
-
msgid "No Title"
|
158 |
-
msgstr ""
|
159 |
-
|
160 |
#: classes/Visualizer/Render/Library.php:189
|
161 |
#: classes/Visualizer/Render/Templates.php:68
|
162 |
msgid "Delete"
|
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.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
|
7 |
+
"POT-Creation-Date: 2017-07-07 08:28:42+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
153 |
msgid "No charts found"
|
154 |
msgstr ""
|
155 |
|
|
|
|
|
|
|
|
|
156 |
#: classes/Visualizer/Render/Library.php:189
|
157 |
#: classes/Visualizer/Render/Templates.php:68
|
158 |
msgid "Delete"
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,rozroz
|
3 |
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to: 4.8
|
6 |
Stable tag: trunk
|
7 |
License: GPL v2.0 or later
|
8 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
@@ -118,6 +118,11 @@ http://docs.themeisle.com/article/610-how-can-i-edit-the-data-manually
|
|
118 |
5. Charts library
|
119 |
|
120 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
121 |
= 2.1.8 - 2017-07-03 =
|
122 |
|
123 |
* Added chart title into library.
|
2 |
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,rozroz
|
3 |
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 4.8
|
6 |
Stable tag: trunk
|
7 |
License: GPL v2.0 or later
|
8 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
118 |
5. Charts library
|
119 |
|
120 |
== Changelog ==
|
121 |
+
= 2.1.9 - 2017-07-10 =
|
122 |
+
|
123 |
+
* Fixed display error with hex color.
|
124 |
+
|
125 |
+
|
126 |
= 2.1.8 - 2017-07-03 =
|
127 |
|
128 |
* Added chart title into library.
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit99c641cdf2e5bd63003111e094124509::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit2492be2130480e3649e7935ea4ce848f::getLoader();
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php
CHANGED
@@ -231,50 +231,50 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
231 |
(function ($) {
|
232 |
$(document).ready(function () {
|
233 |
|
234 |
-
var href = $('tr[data-plugin^="<?php echo $this->product->get_slug()
|
235 |
-
$('#<?php echo $key
|
236 |
e.preventDefault();
|
237 |
e.stopPropagation();
|
238 |
$('body').unbind('thickbox:removed');
|
239 |
tb_remove();
|
240 |
});
|
241 |
|
242 |
-
$('#<?php echo $key
|
243 |
-
$('#<?php echo $key
|
244 |
|
245 |
var radio = $(this).prop('tagName') === 'LABEL' ? $(this).parent() : $(this);
|
246 |
if (radio.parent().find('textarea').length > 0 && radio.parent().find('textarea').val().length === 0) {
|
247 |
-
$('#<?php echo $key
|
248 |
radio.parent().find('textarea').on('keyup', function (ee) {
|
249 |
if ($(this).val().length === 0) {
|
250 |
-
$('#<?php echo $key
|
251 |
} else {
|
252 |
-
$('#<?php echo $key
|
253 |
}
|
254 |
});
|
255 |
} else {
|
256 |
-
$('#<?php echo $key
|
257 |
}
|
258 |
});
|
259 |
|
260 |
-
$('#<?php echo $key
|
261 |
e.preventDefault();
|
262 |
e.stopPropagation();
|
263 |
$.ajax({
|
264 |
url: ajaxurl,
|
265 |
method: 'post',
|
266 |
data: {
|
267 |
-
'action': '<?php echo $key . __CLASS__
|
268 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ )
|
269 |
-
'id': $('#<?php echo $key
|
270 |
-
'msg': $('#<?php echo $key
|
271 |
},
|
272 |
});
|
273 |
location.href = $(this).attr('data-ti-action');
|
274 |
});
|
275 |
-
$('tr[data-plugin^="<?php echo $this->product->get_slug()
|
276 |
var thicbox_timer;
|
277 |
-
$('tr[data-plugin^="<?php echo $this->product->get_slug()
|
278 |
tiBindThickbox();
|
279 |
});
|
280 |
|
@@ -330,13 +330,15 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
330 |
}
|
331 |
|
332 |
return '<div id="' . $this->product->get_key() . '">'
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
'
|
337 |
-
|
338 |
-
|
339 |
-
|
|
|
|
|
340 |
}
|
341 |
|
342 |
/**
|
@@ -346,11 +348,13 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
|
|
346 |
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
347 |
|
348 |
if ( ! empty( $_POST['id'] ) ) {
|
349 |
-
$this->call_api(
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
354 |
}
|
355 |
}
|
356 |
}
|
231 |
(function ($) {
|
232 |
$(document).ready(function () {
|
233 |
|
234 |
+
var href = $('tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a').attr('href');
|
235 |
+
$('#<?php echo $key; ?>ti-deactivate-no').on('click', function (e) {
|
236 |
e.preventDefault();
|
237 |
e.stopPropagation();
|
238 |
$('body').unbind('thickbox:removed');
|
239 |
tb_remove();
|
240 |
});
|
241 |
|
242 |
+
$('#<?php echo $key; ?> ul.ti-list label, #<?php echo $key; ?> ul.ti-list input[name="ti-deactivate-option"]').on('click', function (e) {
|
243 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').val($('#<?php echo $key; ?>ti-deactivate-yes').attr('data-after-text'));
|
244 |
|
245 |
var radio = $(this).prop('tagName') === 'LABEL' ? $(this).parent() : $(this);
|
246 |
if (radio.parent().find('textarea').length > 0 && radio.parent().find('textarea').val().length === 0) {
|
247 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
|
248 |
radio.parent().find('textarea').on('keyup', function (ee) {
|
249 |
if ($(this).val().length === 0) {
|
250 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
|
251 |
} else {
|
252 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
|
253 |
}
|
254 |
});
|
255 |
} else {
|
256 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
|
257 |
}
|
258 |
});
|
259 |
|
260 |
+
$('#<?php echo $key; ?>ti-deactivate-yes').attr('data-ti-action', href).on('click', function (e) {
|
261 |
e.preventDefault();
|
262 |
e.stopPropagation();
|
263 |
$.ajax({
|
264 |
url: ajaxurl,
|
265 |
method: 'post',
|
266 |
data: {
|
267 |
+
'action': '<?php echo $key . __CLASS__; ?>',
|
268 |
+
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
269 |
+
'id': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().attr('ti-option-id'),
|
270 |
+
'msg': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().find('textarea').val()
|
271 |
},
|
272 |
});
|
273 |
location.href = $(this).attr('data-ti-action');
|
274 |
});
|
275 |
+
$('tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a').attr('name', '<?php echo esc_html( $heading ); ?>').attr('href', '<?php echo $src; ?>').addClass('thickbox');
|
276 |
var thicbox_timer;
|
277 |
+
$('tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a').on('click', function () {
|
278 |
tiBindThickbox();
|
279 |
});
|
280 |
|
330 |
}
|
331 |
|
332 |
return '<div id="' . $this->product->get_key() . '">'
|
333 |
+
. '<ul class="ti-list">' . $list . '</ul>'
|
334 |
+
. '<div class="actions">'
|
335 |
+
. get_submit_button(
|
336 |
+
__( $button_submit_before ), 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
|
337 |
+
'data-after-text' => $button_submit,
|
338 |
+
)
|
339 |
+
)
|
340 |
+
. get_submit_button( __( $button_cancel ), 'primary', $this->product->get_key() . 'ti-deactivate-no', false )
|
341 |
+
. '</div></div>';
|
342 |
}
|
343 |
|
344 |
/**
|
348 |
check_ajax_referer( (string) __CLASS__, 'nonce' );
|
349 |
|
350 |
if ( ! empty( $_POST['id'] ) ) {
|
351 |
+
$this->call_api(
|
352 |
+
array(
|
353 |
+
'type' => 'deactivate',
|
354 |
+
'id' => $_POST['id'],
|
355 |
+
'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
|
356 |
+
)
|
357 |
+
);
|
358 |
}
|
359 |
}
|
360 |
}
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php
CHANGED
@@ -21,12 +21,19 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
21 |
/**
|
22 |
* @var string $heading The heading of the modal
|
23 |
*/
|
24 |
-
private $heading = 'Hey, it’s great to see you have {product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~
|
25 |
|
26 |
/**
|
27 |
* @var string $button_cancel The text of the cancel button
|
28 |
*/
|
29 |
private $button_cancel = 'No, thanks.';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* @var string $button_already The text of the already did it button
|
32 |
*/
|
@@ -107,17 +114,17 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
107 |
<script type="text/javascript" id="<?php echo $key; ?>ti-review-js">
|
108 |
(function ($) {
|
109 |
$(document).ready(function () {
|
110 |
-
$('#<?php echo $key?>_review').on('click', '.notice-dismiss, .review-dismiss', function (e) {
|
111 |
|
112 |
$.ajax({
|
113 |
url: ajaxurl,
|
114 |
method: "post",
|
115 |
data: {
|
116 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ )
|
117 |
-
'action': '<?php echo $this->product->get_key() . __CLASS__
|
118 |
},
|
119 |
success: function () {
|
120 |
-
$('#<?php echo $key
|
121 |
}
|
122 |
});
|
123 |
});
|
@@ -133,19 +140,23 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
|
|
133 |
* @param string $key The product key.
|
134 |
*/
|
135 |
function get_html( $key ) {
|
136 |
-
$link
|
137 |
-
$heading
|
138 |
-
$heading
|
139 |
-
|
|
|
|
|
|
|
|
|
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 |
|
143 |
return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
}
|
150 |
|
151 |
/**
|
21 |
/**
|
22 |
* @var string $heading The heading of the modal
|
23 |
*/
|
24 |
+
private $heading = 'Hey, it’s great to see you have {product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
|
25 |
|
26 |
/**
|
27 |
* @var string $button_cancel The text of the cancel button
|
28 |
*/
|
29 |
private $button_cancel = 'No, thanks.';
|
30 |
+
/**
|
31 |
+
* @var array Developers who work for each type of product for review purpose.
|
32 |
+
*/
|
33 |
+
private $developers = array(
|
34 |
+
'plugin' => array( 'Marius', 'Bogdan' ),
|
35 |
+
'theme' => array( 'Rodica', 'Andrei', 'Bogdan', 'Cristi' ),
|
36 |
+
);
|
37 |
/**
|
38 |
* @var string $button_already The text of the already did it button
|
39 |
*/
|
114 |
<script type="text/javascript" id="<?php echo $key; ?>ti-review-js">
|
115 |
(function ($) {
|
116 |
$(document).ready(function () {
|
117 |
+
$('#<?php echo $key; ?>_review').on('click', '.notice-dismiss, .review-dismiss', function (e) {
|
118 |
|
119 |
$.ajax({
|
120 |
url: ajaxurl,
|
121 |
method: "post",
|
122 |
data: {
|
123 |
+
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
124 |
+
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>'
|
125 |
},
|
126 |
success: function () {
|
127 |
+
$('#<?php echo $key; ?>_review').hide();
|
128 |
}
|
129 |
});
|
130 |
});
|
140 |
* @param string $key The product key.
|
141 |
*/
|
142 |
function get_html( $key ) {
|
143 |
+
$link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
|
144 |
+
$heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
|
145 |
+
$heading = str_replace(
|
146 |
+
array( '{product}' ),
|
147 |
+
trim( str_replace( 'Lite', '', $this->product->get_name() ) ), $heading
|
148 |
+
);
|
149 |
+
$heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
|
150 |
+
|
151 |
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
|
152 |
$button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
|
153 |
|
154 |
return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
|
155 |
+
. '<p>' . $heading . '</p>'
|
156 |
+
. '<div class="actions">'
|
157 |
+
. '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
|
158 |
+
. get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
|
159 |
+
. '</div></div>';
|
160 |
}
|
161 |
|
162 |
/**
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
CHANGED
@@ -57,9 +57,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
|
|
57 |
$attributes['slug'] = $slug;
|
58 |
$attributes['version'] = $version;
|
59 |
|
60 |
-
$response = wp_remote_post(
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
57 |
$attributes['slug'] = $slug;
|
58 |
$attributes['version'] = $version;
|
59 |
|
60 |
+
$response = wp_remote_post(
|
61 |
+
$this->feedback_url, array(
|
62 |
+
'body' => $attributes,
|
63 |
+
)
|
64 |
+
);
|
65 |
}
|
66 |
|
67 |
/**
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php
CHANGED
@@ -90,13 +90,14 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
90 |
// Decode the JSON response
|
91 |
$themes = json_decode( $r['body']['themes'] );
|
92 |
|
93 |
-
unset( $themes->themes->{
|
94 |
|
95 |
// Encode the updated JSON response
|
96 |
$r['body']['themes'] = json_encode( $themes );
|
97 |
|
98 |
return $r;
|
99 |
}
|
|
|
100 |
/**
|
101 |
* Register the setting for the license of the product
|
102 |
*
|
@@ -228,25 +229,35 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
228 |
return false;
|
229 |
}
|
230 |
$status = $this->get_license_status();
|
231 |
-
$no_activations_string = apply_filters(
|
|
|
232 |
upgrade your plan in order to use %s on more
|
233 |
websites. Please ask the %s
|
234 |
-
Staff for more details.'
|
235 |
-
|
|
|
|
|
236 |
your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a
|
237 |
-
href="%s">here</a> '
|
238 |
-
|
239 |
-
|
|
|
|
|
|
|
240 |
$hide_notice_string = apply_filters( $this->product->get_key() . '_lc_hide_notice_string', 'Hide Notice' );
|
241 |
if ( $status != 'valid' ) {
|
242 |
if ( $this->check_activation() ) {
|
243 |
if ( $this->check_hide( 'activation' ) ) {
|
244 |
?>
|
245 |
<div class="error">
|
246 |
-
<p><strong
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
250 |
href="<?php echo add_query_arg( $this->product->get_key() . '_activation', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
251 |
</p>
|
252 |
</div>
|
@@ -258,7 +269,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
258 |
<?php if ( $this->check_hide( 'valid' ) ) : ?>
|
259 |
<div class="error">
|
260 |
<p>
|
261 |
-
<strong><?php echo sprintf( $no_valid_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->product->
|
262 |
<a
|
263 |
href="<?php echo add_query_arg( $this->product->get_key() . '_hide_valid', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
264 |
</p>
|
@@ -271,9 +282,15 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
271 |
?>
|
272 |
<div class="update-nag">
|
273 |
<p>
|
274 |
-
<strong
|
|
|
|
|
|
|
275 |
href="' . $this->renew_url() . '"
|
276 |
-
target="_blank">' . $this->product->get_store_name() . '</a>'
|
|
|
|
|
|
|
277 |
<a
|
278 |
href="<?php echo add_query_arg( $this->product->get_key() . '_hide_expiration', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
279 |
</p>
|
@@ -333,10 +350,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
333 |
'url' => rawurlencode( home_url() ),
|
334 |
);
|
335 |
// Call the custom API.
|
336 |
-
$response = wp_remote_get(
|
337 |
-
|
338 |
-
|
339 |
-
|
|
|
|
|
340 |
if ( is_wp_error( $response ) ) {
|
341 |
$license_data = new stdClass();
|
342 |
$license_data->license = 'valid';
|
@@ -436,10 +455,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
436 |
*/
|
437 |
public function enable() {
|
438 |
if ( $this->product->get_type() == 'plugin' ) {
|
439 |
-
add_filter(
|
440 |
-
|
441 |
-
|
442 |
-
|
|
|
|
|
443 |
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
444 |
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
|
445 |
}
|
@@ -473,10 +494,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
473 |
return;
|
474 |
}
|
475 |
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
|
476 |
-
$
|
|
|
477 |
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
478 |
echo '<div id="update-nag">';
|
479 |
-
printf(
|
|
|
480 |
$theme->get( 'Name' ),
|
481 |
$api_response->new_version,
|
482 |
'#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog',
|
@@ -534,11 +557,13 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
534 |
'author' => $this->product->get_store_name(),
|
535 |
'url' => rawurlencode( home_url() ),
|
536 |
);
|
537 |
-
$response = wp_remote_post(
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
|
|
|
|
542 |
// make sure the response was successful
|
543 |
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
544 |
$failed = true;
|
@@ -606,7 +631,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
606 |
* @uses is_wp_error()
|
607 |
*
|
608 |
* @param string $_action The requested action.
|
609 |
-
* @param array $_data
|
610 |
*
|
611 |
* @return false||object
|
612 |
*/
|
@@ -622,11 +647,13 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
622 |
'author' => $this->product->get_store_name(),
|
623 |
'url' => rawurlencode( home_url() ),
|
624 |
);
|
625 |
-
$request = wp_remote_post(
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
|
|
|
|
630 |
if ( ! is_wp_error( $request ) ) :
|
631 |
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
632 |
if ( $request && isset( $request->sections ) ) {
|
@@ -644,9 +671,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
644 |
*
|
645 |
* @uses api_request()
|
646 |
*
|
647 |
-
* @param mixed $_data
|
648 |
* @param string $_action Action to send.
|
649 |
-
* @param object $_args
|
650 |
*
|
651 |
* @return object $_data
|
652 |
*/
|
@@ -666,7 +693,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Licenser' ) ) :
|
|
666 |
* Disable SSL verification in order to prevent download update failures
|
667 |
*
|
668 |
* @param array $args Http args.
|
669 |
-
* @param string $url
|
670 |
*
|
671 |
* @return object $array
|
672 |
*/
|
90 |
// Decode the JSON response
|
91 |
$themes = json_decode( $r['body']['themes'] );
|
92 |
|
93 |
+
unset( $themes->themes->{$this->product->get_slug()} );
|
94 |
|
95 |
// Encode the updated JSON response
|
96 |
$r['body']['themes'] = json_encode( $themes );
|
97 |
|
98 |
return $r;
|
99 |
}
|
100 |
+
|
101 |
/**
|
102 |
* Register the setting for the license of the product
|
103 |
*
|
229 |
return false;
|
230 |
}
|
231 |
$status = $this->get_license_status();
|
232 |
+
$no_activations_string = apply_filters(
|
233 |
+
$this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to
|
234 |
upgrade your plan in order to use %s on more
|
235 |
websites. Please ask the %s
|
236 |
+
Staff for more details.'
|
237 |
+
);
|
238 |
+
$no_valid_string = apply_filters(
|
239 |
+
$this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s , please add
|
240 |
your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a
|
241 |
+
href="%s">here</a> '
|
242 |
+
);
|
243 |
+
$expiration_string = apply_filters(
|
244 |
+
$this->product->get_key() . '_lc_expiration_string', 'Your license is about to expire
|
245 |
+
for %s. You can go to %s and renew it '
|
246 |
+
);
|
247 |
$hide_notice_string = apply_filters( $this->product->get_key() . '_lc_hide_notice_string', 'Hide Notice' );
|
248 |
if ( $status != 'valid' ) {
|
249 |
if ( $this->check_activation() ) {
|
250 |
if ( $this->check_hide( 'activation' ) ) {
|
251 |
?>
|
252 |
<div class="error">
|
253 |
+
<p><strong>
|
254 |
+
<?php
|
255 |
+
echo sprintf(
|
256 |
+
$no_activations_string, $this->product->get_name(), $this->product->get_name(), '<a href="' . $this->product->get_store_url() . '"
|
257 |
+
target="_blank">' . $this->product->get_store_name() . '</a>'
|
258 |
+
);
|
259 |
+
?>
|
260 |
+
</strong> | <a
|
261 |
href="<?php echo add_query_arg( $this->product->get_key() . '_activation', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
262 |
</p>
|
263 |
</div>
|
269 |
<?php if ( $this->check_hide( 'valid' ) ) : ?>
|
270 |
<div class="error">
|
271 |
<p>
|
272 |
+
<strong><?php echo sprintf( $no_valid_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->product->get_store_url(), admin_url( 'options-general.php' ) . '#' . $this->product->get_key() ); ?> </strong>|
|
273 |
<a
|
274 |
href="<?php echo add_query_arg( $this->product->get_key() . '_hide_valid', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
275 |
</p>
|
282 |
?>
|
283 |
<div class="update-nag">
|
284 |
<p>
|
285 |
+
<strong>
|
286 |
+
<?php
|
287 |
+
echo sprintf(
|
288 |
+
$expiration_string, $this->product->get_name() . ' ' . $this->product->get_type(), '<a
|
289 |
href="' . $this->renew_url() . '"
|
290 |
+
target="_blank">' . $this->product->get_store_name() . '</a>'
|
291 |
+
);
|
292 |
+
?>
|
293 |
+
</strong> |
|
294 |
<a
|
295 |
href="<?php echo add_query_arg( $this->product->get_key() . '_hide_expiration', 'yes' ); ?> "><?php echo $hide_notice_string; ?></a>
|
296 |
</p>
|
350 |
'url' => rawurlencode( home_url() ),
|
351 |
);
|
352 |
// Call the custom API.
|
353 |
+
$response = wp_remote_get(
|
354 |
+
add_query_arg( $api_params, $this->product->get_store_url() ), array(
|
355 |
+
'timeout' => 15,
|
356 |
+
'sslverify' => false,
|
357 |
+
)
|
358 |
+
);
|
359 |
if ( is_wp_error( $response ) ) {
|
360 |
$license_data = new stdClass();
|
361 |
$license_data->license = 'valid';
|
455 |
*/
|
456 |
public function enable() {
|
457 |
if ( $this->product->get_type() == 'plugin' ) {
|
458 |
+
add_filter(
|
459 |
+
'pre_set_site_transient_update_plugins', array(
|
460 |
+
$this,
|
461 |
+
'pre_set_site_transient_update_plugins_filter',
|
462 |
+
)
|
463 |
+
);
|
464 |
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
465 |
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
|
466 |
}
|
494 |
return;
|
495 |
}
|
496 |
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
|
497 |
+
$update_message = apply_filters( 'themeisle_sdk_license_update_message', 'Updating this theme will lose any customizations you have made. Cancel to stop, OK to update.' );
|
498 |
+
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( $update_message ) . '\') ) {return true;}return false;"';
|
499 |
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
|
500 |
echo '<div id="update-nag">';
|
501 |
+
printf(
|
502 |
+
'<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.',
|
503 |
$theme->get( 'Name' ),
|
504 |
$api_response->new_version,
|
505 |
'#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog',
|
557 |
'author' => $this->product->get_store_name(),
|
558 |
'url' => rawurlencode( home_url() ),
|
559 |
);
|
560 |
+
$response = wp_remote_post(
|
561 |
+
$this->product->get_store_url(), array(
|
562 |
+
'timeout' => 15,
|
563 |
+
'sslverify' => false,
|
564 |
+
'body' => $api_params,
|
565 |
+
)
|
566 |
+
);
|
567 |
// make sure the response was successful
|
568 |
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
|
569 |
$failed = true;
|
631 |
* @uses is_wp_error()
|
632 |
*
|
633 |
* @param string $_action The requested action.
|
634 |
+
* @param array $_data Parameters for the API action.
|
635 |
*
|
636 |
* @return false||object
|
637 |
*/
|
647 |
'author' => $this->product->get_store_name(),
|
648 |
'url' => rawurlencode( home_url() ),
|
649 |
);
|
650 |
+
$request = wp_remote_post(
|
651 |
+
$this->product->get_store_url(), array(
|
652 |
+
'timeout' => 15,
|
653 |
+
'sslverify' => false,
|
654 |
+
'body' => $api_params,
|
655 |
+
)
|
656 |
+
);
|
657 |
if ( ! is_wp_error( $request ) ) :
|
658 |
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
659 |
if ( $request && isset( $request->sections ) ) {
|
671 |
*
|
672 |
* @uses api_request()
|
673 |
*
|
674 |
+
* @param mixed $_data Plugin data.
|
675 |
* @param string $_action Action to send.
|
676 |
+
* @param object $_args Arguments to use.
|
677 |
*
|
678 |
* @return object $_data
|
679 |
*/
|
693 |
* Disable SSL verification in order to prevent download update failures
|
694 |
*
|
695 |
* @param array $args Http args.
|
696 |
+
* @param string $url Url to check.
|
697 |
*
|
698 |
* @return object $array
|
699 |
*/
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
CHANGED
@@ -47,7 +47,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
|
|
47 |
self::$products[ $product_object->get_slug() ] = $product_object;
|
48 |
|
49 |
$notifications = array();
|
50 |
-
// Based on the
|
51 |
if ( ! $product_object->is_wordpress_available() ) {
|
52 |
$licenser = new ThemeIsle_SDK_Licenser( $product_object );
|
53 |
$licenser->enable();
|
47 |
self::$products[ $product_object->get_slug() ] = $product_object;
|
48 |
|
49 |
$notifications = array();
|
50 |
+
// Based on the WordPress Available file header we enable the logger or not.
|
51 |
if ( ! $product_object->is_wordpress_available() ) {
|
52 |
$licenser = new ThemeIsle_SDK_Licenser( $product_object );
|
53 |
$licenser->enable();
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php
CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
37 |
/**
|
38 |
* @var string $heading The heading of the modal
|
39 |
*/
|
40 |
-
private $heading = 'Do you enjoy {product}? Become a contributor by opting in to our anonymous
|
41 |
|
42 |
/**
|
43 |
* @var string $button_submit The text of the submit button
|
@@ -77,20 +77,22 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
77 |
* Send the statistics to the api endpoint
|
78 |
*/
|
79 |
public function send_log() {
|
80 |
-
wp_remote_post(
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
'
|
86 |
-
|
87 |
-
|
88 |
-
'
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -140,8 +142,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
140 |
*/
|
141 |
function get_html( $key ) {
|
142 |
$heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
|
143 |
-
$heading = str_replace(
|
144 |
-
|
|
|
145 |
),
|
146 |
$heading
|
147 |
);
|
@@ -149,15 +152,19 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
149 |
$button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', $this->button_cancel );
|
150 |
|
151 |
return '<div >'
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
'
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
161 |
}
|
162 |
|
163 |
/**
|
@@ -179,18 +186,18 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
|
|
179 |
<script type="text/javascript" id="<?php echo $key; ?>ti-logger-js">
|
180 |
(function ($) {
|
181 |
$(document).ready(function () {
|
182 |
-
$('.<?php echo $key?>-ti-logger').on('click', function (e) {
|
183 |
|
184 |
$.ajax({
|
185 |
url: ajaxurl,
|
186 |
method: "post",
|
187 |
data: {
|
188 |
-
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ )
|
189 |
-
'action': '<?php echo $this->product->get_key() . __CLASS__
|
190 |
'enable': $(this).attr('data-ti-log-enable')
|
191 |
},
|
192 |
success: function () {
|
193 |
-
$('#<?php echo $key
|
194 |
}
|
195 |
});
|
196 |
});
|
37 |
/**
|
38 |
* @var string $heading The heading of the modal
|
39 |
*/
|
40 |
+
private $heading = 'Do you enjoy {product}? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
|
41 |
|
42 |
/**
|
43 |
* @var string $button_submit The text of the submit button
|
77 |
* Send the statistics to the api endpoint
|
78 |
*/
|
79 |
public function send_log() {
|
80 |
+
wp_remote_post(
|
81 |
+
$this->logging_url, array(
|
82 |
+
'method' => 'POST',
|
83 |
+
'timeout' => 3,
|
84 |
+
'redirection' => 5,
|
85 |
+
'headers' => array(
|
86 |
+
'X-ThemeIsle-Event' => 'log_site',
|
87 |
+
),
|
88 |
+
'body' => array(
|
89 |
+
'site' => get_site_url(),
|
90 |
+
'slug' => $this->product->get_slug(),
|
91 |
+
'version' => $this->product->get_version(),
|
92 |
+
'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
|
93 |
+
),
|
94 |
+
)
|
95 |
+
);
|
96 |
}
|
97 |
|
98 |
/**
|
142 |
*/
|
143 |
function get_html( $key ) {
|
144 |
$heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
|
145 |
+
$heading = str_replace(
|
146 |
+
array( '{product}' ), array(
|
147 |
+
trim( str_replace( 'Lite', '', $this->product->get_name() ) ),
|
148 |
),
|
149 |
$heading
|
150 |
);
|
152 |
$button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', $this->button_cancel );
|
153 |
|
154 |
return '<div >'
|
155 |
+
. '<p>' . $heading . '</p>'
|
156 |
+
. '<div class="actions">'
|
157 |
+
. get_submit_button(
|
158 |
+
__( $button_submit ), 'primary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-yes', false, array(
|
159 |
+
'data-ti-log-enable' => 1,
|
160 |
+
)
|
161 |
+
)
|
162 |
+
. get_submit_button(
|
163 |
+
__( $button_cancel ), 'secondary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-no', false, array(
|
164 |
+
'data-ti-log-enable' => 0,
|
165 |
+
)
|
166 |
+
)
|
167 |
+
. '</div></div>';
|
168 |
}
|
169 |
|
170 |
/**
|
186 |
<script type="text/javascript" id="<?php echo $key; ?>ti-logger-js">
|
187 |
(function ($) {
|
188 |
$(document).ready(function () {
|
189 |
+
$('.<?php echo $key; ?>-ti-logger').on('click', function (e) {
|
190 |
|
191 |
$.ajax({
|
192 |
url: ajaxurl,
|
193 |
method: "post",
|
194 |
data: {
|
195 |
+
'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
|
196 |
+
'action': '<?php echo $this->product->get_key() . __CLASS__; ?>',
|
197 |
'enable': $(this).attr('data-ti-log-enable')
|
198 |
},
|
199 |
success: function () {
|
200 |
+
$('#<?php echo $key; ?>-logger-notification').hide();
|
201 |
}
|
202 |
});
|
203 |
});
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
CHANGED
@@ -66,7 +66,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
66 |
*/
|
67 |
private $requires_license;
|
68 |
/**
|
69 |
-
* @var bool $wordpress_available Either is available on
|
70 |
*/
|
71 |
private $wordpress_available;
|
72 |
/**
|
@@ -152,7 +152,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
152 |
if ( $this->require_uninstall_feedback() ) {
|
153 |
$this->feedback_types[] = 'deactivate';
|
154 |
}
|
155 |
-
if ( $this->is_wordpress_available()
|
156 |
$this->feedback_types[] = 'review';
|
157 |
}
|
158 |
}
|
@@ -343,7 +343,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
343 |
* @return bool Either we log the data or not.
|
344 |
*/
|
345 |
public function is_logger_active() {
|
346 |
-
// If is not available on
|
347 |
if ( ! $this->is_wordpress_available() ) {
|
348 |
return true;
|
349 |
} else {
|
66 |
*/
|
67 |
private $requires_license;
|
68 |
/**
|
69 |
+
* @var bool $wordpress_available Either is available on WordPress or not.
|
70 |
*/
|
71 |
private $wordpress_available;
|
72 |
/**
|
152 |
if ( $this->require_uninstall_feedback() ) {
|
153 |
$this->feedback_types[] = 'deactivate';
|
154 |
}
|
155 |
+
if ( $this->is_wordpress_available() ) {
|
156 |
$this->feedback_types[] = 'review';
|
157 |
}
|
158 |
}
|
343 |
* @return bool Either we log the data or not.
|
344 |
*/
|
345 |
public function is_logger_active() {
|
346 |
+
// If is not available on WordPress log this automatically.
|
347 |
if ( ! $this->is_wordpress_available() ) {
|
348 |
return true;
|
349 |
} else {
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php
CHANGED
@@ -52,9 +52,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
52 |
*/
|
53 |
function setup_vars() {
|
54 |
$this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' );
|
55 |
-
$this->feeds = apply_filters(
|
56 |
-
'
|
57 |
-
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -67,10 +69,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
67 |
if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
|
68 |
return;
|
69 |
}
|
70 |
-
wp_add_dashboard_widget(
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
}
|
75 |
|
76 |
/**
|
@@ -174,11 +178,16 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
174 |
<li class="ti-dw-feed-item"><span class="ti-dw-date-container"><span
|
175 |
class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
|
176 |
class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><a
|
177 |
-
href="
|
|
|
|
|
178 |
array(
|
179 |
'utm_campaign' => 'feed',
|
180 |
'utm_medium' => 'dashboard_widget',
|
181 |
-
|
|
|
|
|
|
|
182 |
<div class="clear"></div>
|
183 |
</li>
|
184 |
<?php
|
@@ -190,26 +199,37 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
|
|
190 |
$type = $recommend['type'];
|
191 |
if ( ( $type == 'theme' && current_user_can( 'install_themes' ) ) || ( $type == 'plugin' && current_user_can( 'install_plugins' ) ) ) {
|
192 |
add_thickbox();
|
193 |
-
$url = add_query_arg(
|
194 |
-
|
195 |
-
|
|
|
|
|
196 |
|
197 |
if ( 'plugin' === $type ) {
|
198 |
|
199 |
-
$url = add_query_arg(
|
200 |
-
|
201 |
-
|
202 |
-
|
|
|
|
|
203 |
}
|
204 |
?>
|
205 |
<li class="ti-dw-recommend-item ">
|
206 |
<span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
|
207 |
-
: </span
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
(<a class="thickbox open-plugin-details-modal"
|
212 |
-
|
213 |
</li>
|
214 |
|
215 |
<?php
|
52 |
*/
|
53 |
function setup_vars() {
|
54 |
$this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' );
|
55 |
+
$this->feeds = apply_filters(
|
56 |
+
'themeisle_sdk_dashboard_widget_feeds', array(
|
57 |
+
'https://themeisle.com/blog/feed',
|
58 |
+
)
|
59 |
+
);
|
60 |
}
|
61 |
|
62 |
/**
|
69 |
if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
|
70 |
return;
|
71 |
}
|
72 |
+
wp_add_dashboard_widget(
|
73 |
+
'themeisle', $this->dashboard_name, array(
|
74 |
+
&$this,
|
75 |
+
'render_dashboard_widget',
|
76 |
+
)
|
77 |
+
);
|
78 |
}
|
79 |
|
80 |
/**
|
178 |
<li class="ti-dw-feed-item"><span class="ti-dw-date-container"><span
|
179 |
class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
|
180 |
class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><a
|
181 |
+
href="
|
182 |
+
<?php
|
183 |
+
echo add_query_arg(
|
184 |
array(
|
185 |
'utm_campaign' => 'feed',
|
186 |
'utm_medium' => 'dashboard_widget',
|
187 |
+
), $item['link']
|
188 |
+
);
|
189 |
+
?>
|
190 |
+
" target="_blank"><?php echo $item['title']; ?></a>
|
191 |
<div class="clear"></div>
|
192 |
</li>
|
193 |
<?php
|
199 |
$type = $recommend['type'];
|
200 |
if ( ( $type == 'theme' && current_user_can( 'install_themes' ) ) || ( $type == 'plugin' && current_user_can( 'install_plugins' ) ) ) {
|
201 |
add_thickbox();
|
202 |
+
$url = add_query_arg(
|
203 |
+
array(
|
204 |
+
'theme' => $recommend['slug'],
|
205 |
+
), network_admin_url( 'theme-install.php' )
|
206 |
+
);
|
207 |
|
208 |
if ( 'plugin' === $type ) {
|
209 |
|
210 |
+
$url = add_query_arg(
|
211 |
+
array(
|
212 |
+
'tab' => 'plugin-information',
|
213 |
+
'plugin' => $recommend['slug'],
|
214 |
+
), network_admin_url( 'plugin-install.php' )
|
215 |
+
);
|
216 |
}
|
217 |
?>
|
218 |
<li class="ti-dw-recommend-item ">
|
219 |
<span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
|
220 |
+
: </span>
|
221 |
+
<?php
|
222 |
+
echo trim(
|
223 |
+
str_replace(
|
224 |
+
array(
|
225 |
+
'lite',
|
226 |
+
'Lite',
|
227 |
+
), '', $recommend['name']
|
228 |
+
)
|
229 |
+
);
|
230 |
+
?>
|
231 |
(<a class="thickbox open-plugin-details-modal"
|
232 |
+
href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
|
233 |
</li>
|
234 |
|
235 |
<?php
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
-
$themeisle_sdk_version = '1.
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
+
$themeisle_sdk_version = '1.5.0';
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf2962d8ba4331e5137c3dae20c26e681
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitf2962d8ba4331e5137c3dae20c26e681
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit99c641cdf2e5bd63003111e094124509
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit99c641cdf2e5bd63003111e094124509', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit99c641cdf2e5bd63003111e094124509', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequire99c641cdf2e5bd63003111e094124509($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire99c641cdf2e5bd63003111e094124509($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
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
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInite0ffea9447daabaa40bdd6ba02f97924 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit2492be2130480e3649e7935ea4ce848f {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit2492be2130480e3649e7935ea4ce848f', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit2492be2130480e3649e7935ea4ce848f', '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": "
|
43 |
},
|
44 |
"dist": {
|
45 |
"type": "zip",
|
46 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
47 |
-
"reference": "
|
48 |
"shasum": ""
|
49 |
},
|
50 |
-
"time": "2017-07
|
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": "b3c85372e9a5c8f692747445c7921634d457f7cb"
|
43 |
},
|
44 |
"dist": {
|
45 |
"type": "zip",
|
46 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/b3c85372e9a5c8f692747445c7921634d457f7cb",
|
47 |
+
"reference": "b3c85372e9a5c8f692747445c7921634d457f7cb",
|
48 |
"shasum": ""
|
49 |
},
|
50 |
+
"time": "2017-08-07 08:36:48",
|
51 |
"type": "library",
|
52 |
"installation-source": "dist",
|
53 |
"autoload": {
|