| @@ -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, $pagenow; | |
| 70 | + global $wp_version; | |
| 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,9 +111,8 @@ | ||
| 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, | |
| 116 | 115 | ); |
| 117 | 116 | wp_localize_script( 'visualizer-gutenberg-block', 'visualizerLocalize', $translation_array ); |
| 118 | 117 | |
| 119 | 118 | // Enqueue frontend and editor block styles |
| @@ -351,11 +350,9 @@ | ||
| 351 | 350 | $data['visualizer-default-data'] = get_post_meta( $post_id, Visualizer_Plugin::CF_DEFAULT_DATA, true ); |
| 352 | 351 | |
| 353 | 352 | // faetch and update settings |
| 354 | 353 | $data['visualizer-settings'] = get_post_meta( $post_id, Visualizer_Plugin::CF_SETTINGS, true ); |
| 355 | - if ( empty( $data['visualizer-settings']['pagination'] ) ) { | |
| 356 | - $data['visualizer-settings']['pageSize'] = ''; | |
| 357 | - } | |
| 354 | + | |
| 358 | 355 | // handle series filter hooks |
| 359 | 356 | $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'] ); |
| 360 | 357 | |
| 361 | 358 | // handle settings filter hooks |
| @@ -367,12 +364,8 @@ | ||
| 367 | 364 | // we are going to format only for tabular charts, because we are not sure of the effect on others. |
| 368 | 365 | // this is to solve the case where boolean data shows up as all-ticks on gutenberg. |
| 369 | 366 | if ( in_array( $data['visualizer-chart-type'], array( 'tabular' ), true ) ) { |
| 370 | 367 | $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'] = ''; | |
| 375 | 368 | } |
| 376 | 369 | |
| 377 | 370 | $data['visualizer-data-exploded'] = ''; |
| 378 | 371 | // handle annotations for google charts |