Version Description
- 2018-02-27
Download this release
Release Info
Developer | codeinwp |
Plugin | WordPress Charts and Graphs Lite |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- CHANGELOG.md +7 -0
- classes/Visualizer/Module.php +1 -1
- classes/Visualizer/Module/Admin.php +116 -52
- classes/Visualizer/Module/Chart.php +11 -1
- classes/Visualizer/Module/Language.php +74 -0
- classes/Visualizer/Plugin.php +1 -1
- classes/Visualizer/Render/Page/Data.php +16 -11
- classes/Visualizer/Source.php +3 -0
- css/media.css +11 -1
- index.php +3 -1
- js/mce.js +19 -0
- js/media/view.js +12 -1
- readme.md +8 -0
- readme.txt +8 -0
- themeisle-hash.json +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +2 -2
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +1 -1
- 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 +6 -5
CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.0.5 - 2018-01-05
|
3 |
**Changes:**
|
4 |
* Fix chart rendering bug in firefox.
|
1 |
|
2 |
+
### v3.0.6 - 2018-02-27
|
3 |
+
**Changes:**
|
4 |
+
* Fix UTF-8 support while saving the data.
|
5 |
+
* Improve editing experience.
|
6 |
+
* Improves compatibility with Premium version.
|
7 |
+
* Adds chart button into TinyMCE editor.
|
8 |
+
|
9 |
### v3.0.5 - 2018-01-05
|
10 |
**Changes:**
|
11 |
* Fix chart rendering bug in firefox.
|
classes/Visualizer/Module.php
CHANGED
@@ -257,7 +257,7 @@ class Visualizer_Module {
|
|
257 |
if ( class_exists( 'PHPExcel' ) ) {
|
258 |
$doc = new PHPExcel();
|
259 |
$doc->getActiveSheet()->fromArray( $rows, null, 'A1' );
|
260 |
-
$doc->getActiveSheet()->setTitle( $chart );
|
261 |
$doc = apply_filters( 'visualizer_excel_doc', $doc );
|
262 |
$writer = PHPExcel_IOFactory::createWriter( $doc, 'Excel2007' );
|
263 |
ob_start();
|
257 |
if ( class_exists( 'PHPExcel' ) ) {
|
258 |
$doc = new PHPExcel();
|
259 |
$doc->getActiveSheet()->fromArray( $rows, null, 'A1' );
|
260 |
+
$doc->getActiveSheet()->setTitle( sanitize_title( $chart ) );
|
261 |
$doc = apply_filters( 'visualizer_excel_doc', $doc );
|
262 |
$writer = PHPExcel_IOFactory::createWriter( $doc, 'Excel2007' );
|
263 |
ob_start();
|
classes/Visualizer/Module/Admin.php
CHANGED
@@ -61,6 +61,59 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
61 |
$this->_addFilter( 'visualizer_logger_data', 'getLoggerData' );
|
62 |
$this->_addFilter( 'visualizer_get_chart_counts', 'getChartCountsByTypeAndMeta' );
|
63 |
$this->_addFilter( 'visualizer_feedback_review_trigger', 'feedbackReviewTrigger' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -121,6 +174,7 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
121 |
* @return array The extended array of media view strings.
|
122 |
*/
|
123 |
public function setupMediaViewStrings( $strings ) {
|
|
|
124 |
$strings['visualizer'] = array(
|
125 |
'actions' => array(
|
126 |
'get_charts' => Visualizer_Plugin::ACTION_GET_CHARTS,
|
@@ -134,8 +188,8 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
134 |
'create' => esc_html__( 'Create New', 'visualizer' ),
|
135 |
),
|
136 |
'library' => array(
|
137 |
-
'filters' =>
|
138 |
-
'types' => array_keys(
|
139 |
),
|
140 |
'nonce' => wp_create_nonce(),
|
141 |
'buildurl' => add_query_arg( 'action', Visualizer_Plugin::ACTION_CREATE_CHART, admin_url( 'admin-ajax.php' ) ),
|
@@ -153,57 +207,67 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
153 |
* @access private
|
154 |
* @return array The associated array of chart types with localized names.
|
155 |
*/
|
156 |
-
public static function _getChartTypesLocalized( $enabledOnly = false, $get2Darray = false ) {
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
'
|
161 |
-
),
|
162 |
-
'line' => array(
|
163 |
-
'name' => esc_html__( 'Line', 'visualizer' ),
|
164 |
-
'enabled' => true,
|
165 |
-
),
|
166 |
-
'area' => array(
|
167 |
-
'name' => esc_html__( 'Area', 'visualizer' ),
|
168 |
-
'enabled' => true,
|
169 |
-
),
|
170 |
-
'geo' => array(
|
171 |
-
'name' => esc_html__( 'Geo', 'visualizer' ),
|
172 |
-
'enabled' => true,
|
173 |
-
),
|
174 |
-
'bar' => array(
|
175 |
-
'name' => esc_html__( 'Bar', 'visualizer' ),
|
176 |
-
'enabled' => true,
|
177 |
-
),
|
178 |
-
'column' => array(
|
179 |
-
'name' => esc_html__( 'Column', 'visualizer' ),
|
180 |
-
'enabled' => true,
|
181 |
-
),
|
182 |
-
'gauge' => array(
|
183 |
-
'name' => esc_html__( 'Gauge', 'visualizer' ),
|
184 |
-
'enabled' => true,
|
185 |
-
),
|
186 |
-
'scatter' => array(
|
187 |
-
'name' => esc_html__( 'Scatter', 'visualizer' ),
|
188 |
'enabled' => true,
|
189 |
-
)
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
);
|
208 |
$types = apply_filters( 'visualizer_pro_chart_types', $types );
|
209 |
if ( $enabledOnly ) {
|
61 |
$this->_addFilter( 'visualizer_logger_data', 'getLoggerData' );
|
62 |
$this->_addFilter( 'visualizer_get_chart_counts', 'getChartCountsByTypeAndMeta' );
|
63 |
$this->_addFilter( 'visualizer_feedback_review_trigger', 'feedbackReviewTrigger' );
|
64 |
+
|
65 |
+
$this->_addAction( 'admin_init', 'init' );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Admin init.
|
70 |
+
*
|
71 |
+
* @access public
|
72 |
+
*/
|
73 |
+
public function init() {
|
74 |
+
if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) && 'true' == get_user_option( 'rich_editing' ) ) {
|
75 |
+
$this->_addFilter( 'mce_external_languages', 'add_tinymce_lang', 10, 1 );
|
76 |
+
$this->_addFilter( 'mce_external_plugins', 'tinymce_plugin', 10, 1 );
|
77 |
+
$this->_addFilter( 'mce_buttons', 'register_mce_button', 10, 1 );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Load plugin translation for - TinyMCE API
|
83 |
+
*
|
84 |
+
* @access public
|
85 |
+
* @param array $arr The tinymce_lang array.
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
public function add_tinymce_lang( $arr ) {
|
89 |
+
$ui_lang = VISUALIZER_ABSPATH . '/classes/Visualizer/Module/Language.php';
|
90 |
+
$ui_lang = apply_filters( 'visualizer_ui_lang_filter', $ui_lang );
|
91 |
+
$arr[] = $ui_lang;
|
92 |
+
return $arr;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Load custom js options - TinyMCE API
|
97 |
+
*
|
98 |
+
* @access public
|
99 |
+
* @param array $plugin_array The tinymce plugin array.
|
100 |
+
* @return array
|
101 |
+
*/
|
102 |
+
public function tinymce_plugin( $plugin_array ) {
|
103 |
+
$plugin_array['visualizer_mce_button'] = VISUALIZER_ABSURL . 'js/mce.js';
|
104 |
+
return $plugin_array;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Register new button in the editor
|
109 |
+
*
|
110 |
+
* @access public
|
111 |
+
* @param array $buttons The tinymce buttons array.
|
112 |
+
* @return array
|
113 |
+
*/
|
114 |
+
public function register_mce_button( $buttons ) {
|
115 |
+
array_push( $buttons, 'visualizer_mce_button' );
|
116 |
+
return $buttons;
|
117 |
}
|
118 |
|
119 |
/**
|
174 |
* @return array The extended array of media view strings.
|
175 |
*/
|
176 |
public function setupMediaViewStrings( $strings ) {
|
177 |
+
$chart_types = self::_getChartTypesLocalized( true, true, true );
|
178 |
$strings['visualizer'] = array(
|
179 |
'actions' => array(
|
180 |
'get_charts' => Visualizer_Plugin::ACTION_GET_CHARTS,
|
188 |
'create' => esc_html__( 'Create New', 'visualizer' ),
|
189 |
),
|
190 |
'library' => array(
|
191 |
+
'filters' => $chart_types,
|
192 |
+
'types' => array_keys( $chart_types ),
|
193 |
),
|
194 |
'nonce' => wp_create_nonce(),
|
195 |
'buildurl' => add_query_arg( 'action', Visualizer_Plugin::ACTION_CREATE_CHART, admin_url( 'admin-ajax.php' ) ),
|
207 |
* @access private
|
208 |
* @return array The associated array of chart types with localized names.
|
209 |
*/
|
210 |
+
public static function _getChartTypesLocalized( $enabledOnly = false, $get2Darray = false, $add_select = false ) {
|
211 |
+
$additional = array();
|
212 |
+
if ( $add_select ) {
|
213 |
+
$additional['select'] = array(
|
214 |
+
'name' => esc_html__( 'All', 'visualizer' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
'enabled' => true,
|
216 |
+
);
|
217 |
+
}
|
218 |
+
|
219 |
+
$types = array_merge(
|
220 |
+
$additional, array(
|
221 |
+
'pie' => array(
|
222 |
+
'name' => esc_html__( 'Pie', 'visualizer' ),
|
223 |
+
'enabled' => true,
|
224 |
+
),
|
225 |
+
'line' => array(
|
226 |
+
'name' => esc_html__( 'Line', 'visualizer' ),
|
227 |
+
'enabled' => true,
|
228 |
+
),
|
229 |
+
'area' => array(
|
230 |
+
'name' => esc_html__( 'Area', 'visualizer' ),
|
231 |
+
'enabled' => true,
|
232 |
+
),
|
233 |
+
'geo' => array(
|
234 |
+
'name' => esc_html__( 'Geo', 'visualizer' ),
|
235 |
+
'enabled' => true,
|
236 |
+
),
|
237 |
+
'bar' => array(
|
238 |
+
'name' => esc_html__( 'Bar', 'visualizer' ),
|
239 |
+
'enabled' => true,
|
240 |
+
),
|
241 |
+
'column' => array(
|
242 |
+
'name' => esc_html__( 'Column', 'visualizer' ),
|
243 |
+
'enabled' => true,
|
244 |
+
),
|
245 |
+
'gauge' => array(
|
246 |
+
'name' => esc_html__( 'Gauge', 'visualizer' ),
|
247 |
+
'enabled' => true,
|
248 |
+
),
|
249 |
+
'scatter' => array(
|
250 |
+
'name' => esc_html__( 'Scatter', 'visualizer' ),
|
251 |
+
'enabled' => true,
|
252 |
+
),
|
253 |
+
'candlestick' => array(
|
254 |
+
'name' => esc_html__( 'Candlestick', 'visualizer' ),
|
255 |
+
'enabled' => true,
|
256 |
+
),
|
257 |
+
// pro types
|
258 |
+
'table' => array(
|
259 |
+
'name' => esc_html__( 'Table', 'visualizer' ),
|
260 |
+
'enabled' => false,
|
261 |
+
),
|
262 |
+
'timeline' => array(
|
263 |
+
'name' => esc_html__( 'Timeline', 'visualizer' ),
|
264 |
+
'enabled' => false,
|
265 |
+
),
|
266 |
+
'combo' => array(
|
267 |
+
'name' => esc_html__( 'Combo', 'visualizer' ),
|
268 |
+
'enabled' => false,
|
269 |
+
),
|
270 |
+
)
|
271 |
);
|
272 |
$types = apply_filters( 'visualizer_pro_chart_types', $types );
|
273 |
if ( $enabledOnly ) {
|
classes/Visualizer/Module/Chart.php
CHANGED
@@ -83,6 +83,11 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
83 |
),
|
84 |
);
|
85 |
$filter = filter_input( INPUT_GET, 's', FILTER_SANITIZE_STRING );
|
|
|
|
|
|
|
|
|
|
|
86 |
if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
|
87 |
$query_args['meta_query'] = array(
|
88 |
array(
|
@@ -262,9 +267,14 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
262 |
// dispatch pages
|
263 |
$this->_chart = get_post( $chart_id );
|
264 |
$tab = isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ? $_GET['tab'] : 'visualizer';
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
switch ( $tab ) {
|
266 |
case 'settings':
|
267 |
-
// changed by Ash/Upwork
|
268 |
$this->_handleDataAndSettingsPage();
|
269 |
break;
|
270 |
case 'type': // fall through.
|
83 |
),
|
84 |
);
|
85 |
$filter = filter_input( INPUT_GET, 's', FILTER_SANITIZE_STRING );
|
86 |
+
if ( empty( $filter ) ) {
|
87 |
+
// 'filter' is from the modal from the add media button.
|
88 |
+
$filter = filter_input( INPUT_GET, 'filter', FILTER_SANITIZE_STRING );
|
89 |
+
}
|
90 |
+
|
91 |
if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
|
92 |
$query_args['meta_query'] = array(
|
93 |
array(
|
267 |
// dispatch pages
|
268 |
$this->_chart = get_post( $chart_id );
|
269 |
$tab = isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ? $_GET['tab'] : 'visualizer';
|
270 |
+
|
271 |
+
// skip chart type pages only for existing charts.
|
272 |
+
if ( VISUALIZER_SKIP_CHART_TYPE_PAGE && 'auto-draft' !== $this->_chart->post_status ) {
|
273 |
+
$tab = 'settings';
|
274 |
+
}
|
275 |
+
|
276 |
switch ( $tab ) {
|
277 |
case 'settings':
|
|
|
278 |
$this->_handleDataAndSettingsPage();
|
279 |
break;
|
280 |
case 'type': // fall through.
|
classes/Visualizer/Module/Language.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Language function file for tinymce.
|
4 |
+
*
|
5 |
+
* @link http://themeisle.com
|
6 |
+
* @since 3.0.0
|
7 |
+
*/
|
8 |
+
/**
|
9 |
+
*
|
10 |
+
* SECURITY : Exit if accessed directly
|
11 |
+
*/
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
die( 'Direct access not allowed!' );
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
*
|
18 |
+
* Translation for TinyMCE
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! class_exists( '_WP_Editors' ) ) {
|
22 |
+
require( ABSPATH . WPINC . '/class-wp-editor.php' );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The module for all languages stuff.
|
27 |
+
*
|
28 |
+
* @category Visualizer
|
29 |
+
* @package Module
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Module_Language extends Visualizer_Module {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The strings for translation.
|
37 |
+
*
|
38 |
+
* @access protected
|
39 |
+
* @var array $strings The ID of this plugin.
|
40 |
+
*/
|
41 |
+
protected $strings;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Initialize the class and set its properties.
|
45 |
+
*
|
46 |
+
* @since 3.0.0
|
47 |
+
* @access public
|
48 |
+
*/
|
49 |
+
public function __construct() {
|
50 |
+
$this->strings = array(
|
51 |
+
'plugin_label' => __( 'Insert Chart', 'visualizer' ),
|
52 |
+
'plugin_title' => __( 'Insert Chart', 'visualizer' ),
|
53 |
+
);
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
*
|
58 |
+
* The method that returns the translation array
|
59 |
+
*
|
60 |
+
* @access public
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function tinymce_translation() {
|
64 |
+
|
65 |
+
$locale = _WP_Editors::$mce_locale;
|
66 |
+
$translated = 'tinyMCE.addI18n("' . $locale . '.visualizer_tinymce_plugin", ' . json_encode( $this->strings ) . ");\n";
|
67 |
+
|
68 |
+
return $translated;
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
$visualizerLangClass = new Visualizer_Module_Language();
|
74 |
+
$strings = $visualizerLangClass->tinymce_translation();
|
classes/Visualizer/Plugin.php
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
-
const VERSION = '3.0.
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
+
const VERSION = '3.0.6';
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
classes/Visualizer/Render/Page/Data.php
CHANGED
@@ -159,7 +159,7 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
159 |
</li>
|
160 |
</ul>
|
161 |
</li>
|
162 |
-
<li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', '' ); ?>
|
163 |
<h2 class="viz-group-title viz-sub-group"
|
164 |
data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
|
165 |
class="dashicons dashicons-lock"></span></h2>
|
@@ -216,9 +216,13 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
216 |
</div>
|
217 |
</li>
|
218 |
|
219 |
-
|
|
|
|
|
|
|
|
|
220 |
<h2 class="viz-group-title viz-sub-group visualizer-editor-tab"
|
221 |
-
data-current="chart"><?php _e( '
|
222 |
class="dashicons dashicons-lock"></span></h2>
|
223 |
<form id="editor-form" action="<?php echo $upload_link; ?>" method="post" target="thehole">
|
224 |
<input type="hidden" id="chart-data" name="chart_data">
|
@@ -401,15 +405,16 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
401 |
* @access protected
|
402 |
*/
|
403 |
protected function _renderToolbar() {
|
404 |
-
//
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
|
|
|
|
|
|
410 |
echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
|
411 |
-
echo '</div>';
|
412 |
-
|
413 |
}
|
414 |
|
415 |
}
|
159 |
</li>
|
160 |
</ul>
|
161 |
</li>
|
162 |
+
<li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' ); ?>">
|
163 |
<h2 class="viz-group-title viz-sub-group"
|
164 |
data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
|
165 |
class="dashicons dashicons-lock"></span></h2>
|
216 |
</div>
|
217 |
</li>
|
218 |
|
219 |
+
<?php
|
220 |
+
// we will auto-open the manual data feature but only when pro is active.
|
221 |
+
$pro_class = apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature' );
|
222 |
+
?>
|
223 |
+
<li class="viz-group <?php echo $pro_class; ?> <?php echo empty( $pro_class ) ? 'open' : ''; ?> ">
|
224 |
<h2 class="viz-group-title viz-sub-group visualizer-editor-tab"
|
225 |
+
data-current="chart"><?php _e( 'Manual Data', 'visualizer' ); ?><span
|
226 |
class="dashicons dashicons-lock"></span></h2>
|
227 |
<form id="editor-form" action="<?php echo $upload_link; ?>" method="post" target="thehole">
|
228 |
<input type="hidden" id="chart-data" name="chart_data">
|
405 |
* @access protected
|
406 |
*/
|
407 |
protected function _renderToolbar() {
|
408 |
+
// don't show back button at all.
|
409 |
+
// NOTE: We can't be selective on the post_status here because when a new chart reaches the settings screen, its status changes to publish.
|
410 |
+
if ( ! VISUALIZER_SKIP_CHART_TYPE_PAGE ) {
|
411 |
+
echo '<div class="toolbar-div">';
|
412 |
+
echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">';
|
413 |
+
esc_html_e( 'Back', 'visualizer' );
|
414 |
+
echo '</a>';
|
415 |
+
echo '</div>';
|
416 |
+
}
|
417 |
echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
|
|
|
|
|
418 |
}
|
419 |
|
420 |
}
|
classes/Visualizer/Source.php
CHANGED
@@ -221,6 +221,9 @@ abstract class Visualizer_Source {
|
|
221 |
);
|
222 |
}
|
223 |
break;
|
|
|
|
|
|
|
224 |
}
|
225 |
}
|
226 |
|
221 |
);
|
222 |
}
|
223 |
break;
|
224 |
+
case 'string':
|
225 |
+
$data[ $i ] = utf8_encode( $data[ $i ] );
|
226 |
+
break;
|
227 |
}
|
228 |
}
|
229 |
|
css/media.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 3.0.
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
@@ -162,3 +162,13 @@ a.visualizer-library-pagination-page:hover {
|
|
162 |
z-index: 1001;
|
163 |
background: url(../images/ajax-loader.gif) no-repeat center center;
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*
|
2 |
+
Version: 3.0.6
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
162 |
z-index: 1001;
|
163 |
background: url(../images/ajax-loader.gif) no-repeat center center;
|
164 |
}
|
165 |
+
|
166 |
+
|
167 |
+
/* TinyMCE button */
|
168 |
+
i.mce-i-visualizer-icon:before {
|
169 |
+
content: "\f184";
|
170 |
+
display: inline-block;
|
171 |
+
-webkit-font-smoothing: antialiased;
|
172 |
+
font: 400 20px/1 dashicons;
|
173 |
+
vertical-align: top;
|
174 |
+
}
|
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: 3.0.
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
@@ -30,6 +30,8 @@ if ( class_exists( 'Visualizer_Pro', false ) ) {
|
|
30 |
defined( 'VISUALIZER_PRO' ) || define( 'VISUALIZER_PRO', false );
|
31 |
}
|
32 |
// Added by Ash/Upwork
|
|
|
|
|
33 |
/**
|
34 |
* Automatically loads classes for the plugin. Checks a namespace and loads only
|
35 |
* approved classes.
|
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: 3.0.6
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
30 |
defined( 'VISUALIZER_PRO' ) || define( 'VISUALIZER_PRO', false );
|
31 |
}
|
32 |
// Added by Ash/Upwork
|
33 |
+
define( 'VISUALIZER_SKIP_CHART_TYPE_PAGE', true );
|
34 |
+
|
35 |
/**
|
36 |
* Automatically loads classes for the plugin. Checks a namespace and loads only
|
37 |
* approved classes.
|
js/mce.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global tinymce */
|
2 |
+
/* jshint unused:false */
|
3 |
+
(function($) {
|
4 |
+
tinymce.PluginManager.add('visualizer_mce_button', function( editor, url ) {
|
5 |
+
editor.addButton( 'visualizer_mce_button', {
|
6 |
+
title: editor.getLang( 'visualizer_tinymce_plugin.plugin_label' ),
|
7 |
+
label: editor.getLang( 'visualizer_tinymce_plugin.plugin_label' ),
|
8 |
+
icon: 'visualizer-icon',
|
9 |
+
onclick: function() {
|
10 |
+
var frame = wp.media({
|
11 |
+
frame:'post',
|
12 |
+
state:'visualizer'
|
13 |
+
});
|
14 |
+
frame.open( );
|
15 |
+
}
|
16 |
+
});
|
17 |
+
});
|
18 |
+
|
19 |
+
})(jQuery);
|
js/media/view.js
CHANGED
@@ -59,7 +59,18 @@
|
|
59 |
settings.height = self.options.height;
|
60 |
|
61 |
table = new gv.DataTable({cols: series});
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
chart = new gv[chart](self.el);
|
64 |
|
65 |
switch (type) {
|
59 |
settings.height = self.options.height;
|
60 |
|
61 |
table = new gv.DataTable({cols: series});
|
62 |
+
|
63 |
+
switch (type) {
|
64 |
+
case "gauge":
|
65 |
+
case "table":
|
66 |
+
case "timeline":
|
67 |
+
chart = type.charAt(0).toUpperCase() + type.slice(1);
|
68 |
+
break;
|
69 |
+
default:
|
70 |
+
chart = type.charAt(0).toUpperCase() + type.slice(1) + 'Chart';
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
|
74 |
chart = new gv[chart](self.el);
|
75 |
|
76 |
switch (type) {
|
readme.md
CHANGED
@@ -144,6 +144,14 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
144 |
5. Charts library
|
145 |
|
146 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
### 3.0.5 - 2018-01-05 ###
|
148 |
|
149 |
* Fix chart rendering bug in firefox.
|
144 |
5. Charts library
|
145 |
|
146 |
## Changelog ##
|
147 |
+
### 3.0.6 - 2018-02-27 ###
|
148 |
+
|
149 |
+
* Fix UTF-8 support while saving the data.
|
150 |
+
* Improve editing experience.
|
151 |
+
* Improves compatibility with Premium version.
|
152 |
+
* Adds chart button into TinyMCE editor.
|
153 |
+
|
154 |
+
|
155 |
### 3.0.5 - 2018-01-05 ###
|
156 |
|
157 |
* Fix chart rendering bug in firefox.
|
readme.txt
CHANGED
@@ -144,6 +144,14 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
144 |
5. Charts library
|
145 |
|
146 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
= 3.0.5 - 2018-01-05 =
|
148 |
|
149 |
* Fix chart rendering bug in firefox.
|
144 |
5. Charts library
|
145 |
|
146 |
== Changelog ==
|
147 |
+
= 3.0.6 - 2018-02-27 =
|
148 |
+
|
149 |
+
* Fix UTF-8 support while saving the data.
|
150 |
+
* Improve editing experience.
|
151 |
+
* Improves compatibility with Premium version.
|
152 |
+
* Adds chart button into TinyMCE editor.
|
153 |
+
|
154 |
+
|
155 |
= 3.0.5 - 2018-01-05 =
|
156 |
|
157 |
* Fix chart rendering bug in firefox.
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"index.php":"
|
1 |
+
{"index.php":"40387cfe04e5931a1dc92531bf7d4d6e"}
|
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 ComposerAutoloaderInita3e79a669fb08c2815f31e71dae09bf3::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 ComposerAutoloaderInit9b330336959bcbd0ec1425bc228e8f60::getLoader();
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php
CHANGED
@@ -235,7 +235,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
|
|
235 |
|
236 |
// fetch the calculated hashes.
|
237 |
if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
|
238 |
-
return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf(
|
239 |
}
|
240 |
|
241 |
$hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
|
@@ -296,7 +296,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
|
|
296 |
$value = sanitize_text_field( $data[ $param ] );
|
297 |
if ( empty( $value ) ) {
|
298 |
return new WP_Error(
|
299 |
-
'themeisle_' . $param . '_invalid', sprintf(
|
300 |
'status' => 403,
|
301 |
)
|
302 |
);
|
235 |
|
236 |
// fetch the calculated hashes.
|
237 |
if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
|
238 |
+
return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) );
|
239 |
}
|
240 |
|
241 |
$hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
|
296 |
$value = sanitize_text_field( $data[ $param ] );
|
297 |
if ( empty( $value ) ) {
|
298 |
return new WP_Error(
|
299 |
+
'themeisle_' . $param . '_invalid', sprintf( 'Invalid %', $param ), array(
|
300 |
'status' => 403,
|
301 |
)
|
302 |
);
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
|
|
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();
|
54 |
}
|
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() && apply_filters( $product_object->get_key() . '_enable_licenser', true ) === true ) {
|
52 |
$licenser = new ThemeIsle_SDK_Licenser( $product_object );
|
53 |
$licenser->enable();
|
54 |
}
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
-
$themeisle_sdk_version = '2.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 = '2.1.1';
|
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 ComposerAutoloaderInit69ebc7aafdafbe7639bc884e2bd30cbf
|
|
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 ComposerAutoloaderInit69ebc7aafdafbe7639bc884e2bd30cbf
|
|
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 ComposerAutoloaderInita3e79a669fb08c2815f31e71dae09bf3
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInita3e79a669fb08c2815f31e71dae09bf3', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita3e79a669fb08c2815f31e71dae09bf3', '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 |
+
composerRequirea3e79a669fb08c2815f31e71dae09bf3($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequirea3e79a669fb08c2815f31e71dae09bf3($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 ComposerAutoloaderInit84d34e384812d8eeefe26fe6872698d5 {
|
|
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 ComposerAutoloaderInit9b330336959bcbd0ec1425bc228e8f60 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit9b330336959bcbd0ec1425bc228e8f60', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9b330336959bcbd0ec1425bc228e8f60', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/installed.json
CHANGED
@@ -6,15 +6,15 @@
|
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
-
"time": "2018-
|
18 |
"type": "library",
|
19 |
"installation-source": "dist",
|
20 |
"autoload": {
|
@@ -129,6 +129,7 @@
|
|
129 |
"spreadsheet",
|
130 |
"xls",
|
131 |
"xlsx"
|
132 |
-
]
|
|
|
133 |
}
|
134 |
]
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
+
"reference": "9d866559c6090f0e7e70fe3e5a4be8672461a11a"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/9d866559c6090f0e7e70fe3e5a4be8672461a11a",
|
14 |
+
"reference": "9d866559c6090f0e7e70fe3e5a4be8672461a11a",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
+
"time": "2018-02-16 16:31:29",
|
18 |
"type": "library",
|
19 |
"installation-source": "dist",
|
20 |
"autoload": {
|
129 |
"spreadsheet",
|
130 |
"xls",
|
131 |
"xlsx"
|
132 |
+
],
|
133 |
+
"abandoned": "phpoffice/phpspreadsheet"
|
134 |
}
|
135 |
]
|