PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.10.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.10.1
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/Gutenberg/Block.php +9 -2 3.10.03.10.1 View file →
@@ -66,9 +66,9 @@
66 66 /**
67 67 * Enqueue front end and editor JavaScript and CSS
68 68 */
69 69 public function enqueue_gutenberg_scripts() {
70 - global $wp_version;
70 + global $wp_version, $pagenow;
71 71
72 72 $blockPath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/block.js';
73 73 $handsontableJS = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/handsontable.js';
74 74 $stylePath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/block.css';
@@ -111,8 +111,9 @@
111 111 'adminPage' => menu_page_url( 'visualizer', false ),
112 112 'sqlTable' => $table_col_mapping,
113 113 'chartsPerPage' => defined( 'TI_CYPRESS_TESTING' ) ? 20 : 6,
114 114 'proFeaturesLocked' => Visualizer_Module_Admin::proFeaturesLocked(),
115 + 'isFullSiteEditor' => 'site-editor.php' === $pagenow,
115 116 );
116 117 wp_localize_script( 'visualizer-gutenberg-block', 'visualizerLocalize', $translation_array );
117 118
118 119 // Enqueue frontend and editor block styles
@@ -350,9 +351,11 @@
350 351 $data['visualizer-default-data'] = get_post_meta( $post_id, Visualizer_Plugin::CF_DEFAULT_DATA, true );
351 352
352 353 // faetch and update settings
353 354 $data['visualizer-settings'] = get_post_meta( $post_id, Visualizer_Plugin::CF_SETTINGS, true );
354 -
355 + if ( empty( $data['visualizer-settings']['pagination'] ) ) {
356 + $data['visualizer-settings']['pageSize'] = '';
357 + }
355 358 // handle series filter hooks
356 359 $data['visualizer-series'] = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_SERIES, get_post_meta( $post_id, Visualizer_Plugin::CF_SERIES, true ), $post_id, $data['visualizer-chart-type'] );
357 360
358 361 // handle settings filter hooks
@@ -364,8 +367,12 @@
364 367 // we are going to format only for tabular charts, because we are not sure of the effect on others.
365 368 // this is to solve the case where boolean data shows up as all-ticks on gutenberg.
366 369 if ( in_array( $data['visualizer-chart-type'], array( 'tabular' ), true ) ) {
367 370 $data['visualizer-data'] = $this->format_chart_data( $data['visualizer-data'], $data['visualizer-series'] );
371 + }
372 +
373 + if ( ! isset( $data['visualizer-settings']['hAxis']['format'] ) ) {
374 + $data['visualizer-settings']['hAxis']['format'] = '';
368 375 }
369 376
370 377 $data['visualizer-data-exploded'] = '';
371 378 // handle annotations for google charts