PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.0.12
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.0.12
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 +30 -10 3.0.63.0.12 View file →
@@ -63,9 +63,10 @@
63 63 array(
64 64 'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
65 65 'nonce' => wp_create_nonce(),
66 66 'chart' => $this->chart->ID,
67 - ), admin_url( 'admin-ajax.php' )
67 + ),
68 + admin_url( 'admin-ajax.php' )
68 69 );
69 70 ?>
70 71 <span id="visualizer-chart-id" data-id="<?php echo $this->chart->ID; ?>"></span>
71 72 <iframe id="thehole" name="thehole"></iframe>
@@ -134,13 +135,15 @@
134 135 <select name="vz-import-time" id="vz-import-time"
135 136 class="visualizer-select">
136 137 <?php
137 138 $hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_SCHEDULE, true );
138 - $schedules = array(
139 - '1' => __( 'Each hour', 'visualizer' ),
140 - '12' => __( 'Each 12 hours', 'visualizer' ),
141 - '24' => __( 'Each day', 'visualizer' ),
142 - '36' => __( 'Each 3 days', 'visualizer' ),
139 + $schedules = apply_filters(
140 + 'visualizer_chart_schedules', array(
141 + '1' => __( 'Each hour', 'visualizer' ),
142 + '12' => __( 'Each 12 hours', 'visualizer' ),
143 + '24' => __( 'Each day', 'visualizer' ),
144 + '36' => __( 'Each 3 days', 'visualizer' ),
145 + )
143 146 );
144 147 foreach ( $schedules as $num => $name ) {
145 148 $extra = $num == $hours ? 'selected' : '';
146 149 ?>
@@ -172,9 +175,10 @@
172 175 $fetch_link = add_query_arg(
173 176 array(
174 177 'action' => ( VISUALIZER_PRO ) ? Visualizer_Pro::ACTION_FETCH_DATA : '',
175 178 'nonce' => wp_create_nonce(),
176 - ), admin_url( 'admin-ajax.php' )
179 + ),
180 + admin_url( 'admin-ajax.php' )
177 181 );
178 182 $query_args_charts = array(
179 183 'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
180 184 'posts_per_page' => 300,
@@ -253,9 +257,13 @@
253 257 <ul class="viz-group-content">
254 258 <form id="settings-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>"
255 259 method="post">
256 260 <?php echo $this->sidebar; ?>
261 + <input type="hidden" name="save" value="1">
257 262 </form>
263 + <form id="cancel-form" action="<?php echo add_query_arg( 'nonce', wp_create_nonce() ); ?>" method="post">
264 + <input type="hidden" name="cancel" value="1">
265 + </form>
258 266 </ul>
259 267 </li>
260 268
261 269 <?php $this->getPermissionsLink( $this->chart->ID ); ?>
@@ -292,9 +300,10 @@
292 300 echo add_query_arg(
293 301 array(
294 302 'nonce' => wp_create_nonce(),
295 303 'tab' => 'permissions',
296 - ), remove_query_arg( 'tab', $_SERVER['REQUEST_URI'] )
304 + ),
305 + remove_query_arg( 'tab', $_SERVER['REQUEST_URI'] )
297 306 );
298 307 ?>
299 308 " method="post">
300 309 <?php $this->permissionsSidebar(); ?>
@@ -309,11 +318,17 @@
309 318 *
310 319 * @access private
311 320 */
312 321 private function permissionsSidebar() {
322 + // ignore for unit tests because Travis throws the error "Indirect modification of overloaded property Visualizer_Render_Page_Data::$permissions has no effect".
323 + if ( defined( 'WP_TESTS_DOMAIN' ) ) {
324 + return;
325 + }
313 326 Visualizer_Render_Sidebar::_renderGroupStart(
314 327 esc_html__( 'Who can see this chart?', 'visualizer' ) . '<span
315 - class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
328 + class="dashicons dashicons-lock"></span>',
329 + '',
330 + apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
316 331 );
317 332 Visualizer_Render_Sidebar::_renderSectionStart();
318 333 Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can view the chart on the front-end.', 'visualizer' ) );
319 334
@@ -353,9 +368,11 @@
353 368 Visualizer_Render_Sidebar::_renderGroupEnd();
354 369
355 370 Visualizer_Render_Sidebar::_renderGroupStart(
356 371 esc_html__( 'Who can edit this chart?', 'visualizer' ) . '<span
357 - class="dashicons dashicons-lock"></span>', '', apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
372 + class="dashicons dashicons-lock"></span>',
373 + '',
374 + apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
358 375 );
359 376 Visualizer_Render_Sidebar::_renderSectionStart();
360 377 Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can edit the chart on the front-end.', 'visualizer' ) );
361 378
@@ -414,7 +431,10 @@
414 431 echo '</a>';
415 432 echo '</div>';
416 433 }
417 434 echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
435 + if ( isset( $this->cancel_button ) ) {
436 + echo '<input type="submit" id="cancel-button" class="button button-secondary button-large push-right" value="', $this->cancel_button, '">';
437 + }
418 438 }
419 439
420 440 }