PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.1.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.1.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Render/Page/Data.php +41 -80 3.1.33.1.2 View file →
@@ -75,14 +75,8 @@
75 75 );
76 76
77 77 // this will allow us to open the correct source tab by default.
78 78 $source_of_chart = strtolower( get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_SOURCE, true ) );
79 - // both import from wp and import from db have the same source so we need to differentiate.
80 - $filter_config = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_FILTER_CONFIG, true );
81 - // if filter config is present, then its import from wp.
82 - if ( ! empty( $filter_config ) ) {
83 - $source_of_chart .= '_wp';
84 - }
85 79 $type = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
86 80 ?>
87 81 <span id="visualizer-chart-id" data-id="<?php echo $this->chart->ID; ?>" data-chart-source="<?php echo $source_of_chart; ?>" data-chart-type="<?php echo $type; ?>"></span>
88 82 <iframe id="thehole" name="thehole"></iframe>
@@ -117,9 +111,9 @@
117 111
118 112 <div class="viz-section-items section-items">
119 113 <p class="viz-group-description"><?php _e( 'You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).', 'visualizer' ); ?> </p>
120 114 <p class="viz-group-description"><?php echo sprintf( __( 'If you are unsure about how to format your data CSV then please take a look at this sample: %1$s %2$s%3$s', 'visualizer' ), '<a href="' . VISUALIZER_ABSURL . 'samples/' . $this->type . '.csv" target="_blank">', $this->type, '.csv</a>' ); ?></p>
121 - <p class="viz-group-description"> <?php _e( 'You can also import data from Google Spreadsheet, for more info check <a href="https://docs.themeisle.com/article/607-how-can-i-populate-data-from-google-spreadsheet" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
115 + <p class="viz-group-description"> <?php _e( 'You can also import data from Google Spreadsheet, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
122 116 <form id="vz-one-time-import" action="<?php echo $upload_link; ?>" method="post"
123 117 target="thehole" enctype="multipart/form-data">
124 118 <div class="remote-file-section">
125 119 <input type="url" id="remote-data" name="remote_data"
@@ -137,10 +131,10 @@
137 131 <span
138 132 class="dashicons dashicons-lock"></span></span>
139 133 <div class="viz-section-items section-items">
140 134 <p class="viz-group-description"><?php _e( 'You can choose here to synchronize your chart data with a remote CSV file.', 'visualizer' ); ?> </p>
141 - <p class="viz-group-description"> <?php _e( 'You can also synchronize with your Google Spreadsheet file, for more info check <a href="https://docs.themeisle.com/article/607-how-can-i-populate-data-from-google-spreadsheet" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
142 - <p class="viz-group-description"> <?php _e( 'We will update the chart data based on your time interval preference by overwriting the current data with the one from the URL.', 'visualizer' ); ?></p>
135 + <p class="viz-group-description"> <?php _e( 'You can also synchronize with your Google Spreadsheet file, for more info check <a href="https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank" >this</a> tutorial', 'visualizer' ); ?></p>
136 + <p class="viz-group-description"> <?php _e( 'We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.', 'visualizer' ); ?></p>
143 137 <form id="vz-schedule-import" action="<?php echo $upload_link; ?>" method="post"
144 138 target="thehole" enctype="multipart/form-data">
145 139 <div class="remote-file-section">
146 140 <input type="url" id="vz-schedule-url" name="remote_data"
@@ -220,51 +214,18 @@
220 214 </div>
221 215 </div>
222 216 </li>
223 217
224 - <?php
225 - $save_filter = add_query_arg(
226 - array(
227 - 'action' => Visualizer_Plugin::ACTION_SAVE_FILTER_QUERY,
228 - 'security' => wp_create_nonce( Visualizer_Plugin::ACTION_SAVE_FILTER_QUERY . Visualizer_Plugin::VERSION ),
229 - 'chart' => $this->chart->ID,
230 - ), admin_url( 'admin-ajax.php' )
231 - );
232 - ?>
233 - <li class="viz-group visualizer_source_query_wp <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?> ">
218 + <li class="viz-group <?php echo apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'schedule-chart' ); ?> ">
234 219 <h2 class="viz-group-title viz-sub-group"><?php _e( 'Import from WordPress', 'visualizer' ); ?><span
235 220 class="dashicons dashicons-lock"></span></h2>
236 221 <div class="viz-group-content edit-data-content">
237 222 <div>
238 223 <p class="viz-group-description"><?php _e( 'You can import data from WordPress here.', 'visualizer' ); ?></p>
239 - <form id="vz-filter-wizard" action="<?php echo $save_filter; ?>" method="post" target="thehole">
240 - <p class="viz-group-description"><?php _e( 'How often do you want to refresh the data from WordPress.', 'visualizer' ); ?></p>
241 - <select name="refresh" id="vz-filter-import-time" class="visualizer-select">
242 - <?php
243 - $bttn_label = 'visualizer_source_query_wp' === $source_of_chart ? __( 'Modify Filter', 'visualizer' ) : __( 'Create Filter', 'visualizer' );
244 - $hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_DB_SCHEDULE, true );
245 - $schedules = apply_filters(
246 - 'visualizer_schedules', array(
247 - '0' => __( 'Live', 'visualizer' ),
248 - '1' => __( 'Each hour', 'visualizer' ),
249 - '12' => __( 'Each 12 hours', 'visualizer' ),
250 - '24' => __( 'Each day', 'visualizer' ),
251 - '72' => __( 'Each 3 days', 'visualizer' ),
252 - )
253 - );
254 - foreach ( $schedules as $num => $name ) {
255 - $extra = $num == $hours ? 'selected' : '';
256 - ?>
257 - <option value="<?php echo $num; ?>" <?php echo $extra; ?>><?php echo $name; ?></option>
258 - <?php
259 - }
260 - ?>
261 - </select>
262 -
263 - <input type="button" id="filter-chart-button" class="button button-secondary" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
264 - <input type="button" id="db-filter-save-button" class="button button-primary" value="<?php _e( 'Save Schedule', 'visualizer' ); ?>">
265 - <?php echo apply_filters( 'visualizer_pro_upsell', '', 'db-query' ); ?>
266 - </form>
224 + <input type="button" id="filter-chart-button" class="button button-primary "
225 + value="<?php _e( 'Create Filters', 'visualizer' ); ?>" data-current="chart"
226 + data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>"
227 + data-t-chart="<?php _e( 'Create Filters', 'visualizer' ); ?>">
267 228 <?php echo apply_filters( 'visualizer_pro_upsell', '', 'schedule-chart' ); ?>
268 229 </div>
269 230 </div>
270 231 </li>
@@ -282,40 +243,44 @@
282 243 <h2 class="viz-group-title viz-sub-group"><?php _e( 'Import from database', 'visualizer' ); ?><span
283 244 class="dashicons dashicons-lock"></span></h2>
284 245 <div class="viz-group-content edit-data-content">
285 246 <div>
286 - <p class="viz-group-description"><?php _e( 'You can import data from the database here.', 'visualizer' ); ?></p>
287 - <form id="vz-db-wizard" action="<?php echo $save_query; ?>" method="post" target="thehole">
288 - <p class="viz-group-description"><?php _e( 'How often do you want to refresh the data from the database.', 'visualizer' ); ?></p>
289 - <select name="refresh" id="vz-db-import-time" class="visualizer-select">
290 - <?php
291 - $bttn_label = 'visualizer_source_query' === $source_of_chart ? __( 'Modify Query', 'visualizer' ) : __( 'Create Query', 'visualizer' );
292 - $hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_DB_SCHEDULE, true );
293 - $schedules = apply_filters(
294 - 'visualizer_schedules', array(
295 - '0' => __( 'Live', 'visualizer' ),
296 - '1' => __( 'Each hour', 'visualizer' ),
297 - '12' => __( 'Each 12 hours', 'visualizer' ),
298 - '24' => __( 'Each day', 'visualizer' ),
299 - '72' => __( 'Each 3 days', 'visualizer' ),
300 - )
301 - );
302 - foreach ( $schedules as $num => $name ) {
303 - $extra = $num == $hours ? 'selected' : '';
304 - ?>
305 - <option value="<?php echo $num; ?>" <?php echo $extra; ?>><?php echo $name; ?></option>
306 - <?php
307 - }
247 + <p class="viz-group-description"><?php _e( 'You can import data from the database here.', 'visualizer' ); ?></p>
248 + <form id="vz-db-wizard" action="<?php echo $save_query; ?>" method="post" target="thehole">
249 + <p class="viz-group-description"><?php _e( 'How often do you want to refresh the data from the database.', 'visualizer' ); ?></p>
250 + <select name="refresh" id="vz-db-import-time" class="visualizer-select">
251 + <?php
252 + $bttn_label = 'visualizer_source_query' === $source_of_chart ? __( 'Modify Query', 'visualizer' ) : __( 'Create Query', 'visualizer' );
253 + $hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_DB_SCHEDULE, true );
254 + $schedules = apply_filters(
255 + 'visualizer_schedules', array(
256 + '0' => __( 'Live', 'visualizer' ),
257 + '1' => __( 'Each hour', 'visualizer' ),
258 + '12' => __( 'Each 12 hours', 'visualizer' ),
259 + '24' => __( 'Each day', 'visualizer' ),
260 + '72' => __( 'Each 3 days', 'visualizer' ),
261 + )
262 + );
263 + foreach ( $schedules as $num => $name ) {
264 + $extra = $num == $hours ? 'selected' : '';
308 265 ?>
309 - </select>
310 - <input type="hidden" name="params" id="viz-db-wizard-params">
266 + <option value="<?php echo $num; ?>" <?php echo $extra; ?>><?php echo $name; ?></option>
267 + <?php
268 + }
269 + ?>
270 + </select>
271 + <input type="hidden" name="params" id="viz-db-wizard-params">
311 272
312 - <input type="button" id="db-chart-button" class="button button-secondary" value="<?php echo $bttn_label; ?>" data-current="chart" data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>" data-t-chart="<?php echo $bttn_label; ?>">
313 - <input type="button" id="db-chart-save-button" class="button button-primary" value="<?php _e( 'Save Schedule', 'visualizer' ); ?>">
273 + <input type="button" id="db-chart-button" class="button button-secondary "
274 + value="<?php echo $bttn_label; ?>" data-current="chart"
275 + data-t-filter="<?php _e( 'Show Chart', 'visualizer' ); ?>"
276 + data-t-chart="<?php echo $bttn_label; ?>">
277 + <input type="button" id="db-chart-save-button" class="button button-primary "
278 + value="<?php _e( 'Save Schedule', 'visualizer' ); ?>">
314 279 <?php echo apply_filters( 'visualizer_pro_upsell', '', 'db-query' ); ?>
315 - </form>
316 - </div>
317 - </div>
280 + </form>
281 + </div>
282 + </div>
318 283 </li>
319 284
320 285 <?php
321 286 // we will auto-open the manual data feature but only when pro is active and source is empty.
@@ -360,12 +325,8 @@
360 325 <form id="cancel-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>" method="post">
361 326 <input type="hidden" name="cancel" value="1">
362 327 </form>
363 328 </ul>
364 - </li>
365 -
366 - <li class="viz-group viz-group-category bottom-fixed sidebar-footer-link" id="vz-chart-docs">
367 - <h2><span class="dashicons dashicons-editor-help"></span><a href="https://docs.themeisle.com/category/657-visualizer" target="_blank"><?php _e( 'Docs', 'visualizer' ); ?></a></h2>
368 329 </li>
369 330
370 331 <?php $this->getPermissionsLink( $this->chart->ID ); ?>
371 332