PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.10.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.10.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 3.10.4 All 148 releases
← All changes | classes/Visualizer/Render/Page/Update.php +29 -3 3.0.83.10.8 View file →
@@ -37,8 +37,11 @@
37 37 *
38 38 * @access protected
39 39 */
40 40 protected function _toHTML() {
41 + if ( $this->is_request_from_gutenberg() ) {
42 + return;
43 + }
41 44 echo '<!DOCTYPE html>';
42 45 echo '<html>';
43 46 echo '<head>';
44 47 echo '<script type="text/javascript">';
@@ -47,13 +50,19 @@
47 50 echo 'var win = window.dialogArguments || opener || parent || top;';
48 51 echo 'if (win.visualizer) {';
49 52 echo 'win.visualizer.charts.canvas.series = ', $this->series, ';';
50 53 echo 'win.visualizer.charts.canvas.data = ', $this->data, ';';
51 - echo 'win.visualizer.render();';
54 + if ( $this->settings ) {
55 + echo 'win.visualizer.charts.canvas.settings = ', $this->settings, ';';
56 + }
57 + echo 'win.vizUpdateChartPreview();';
58 +
59 + // echo $this->updateEditorAndSettings();
52 60 echo '}';
53 61
54 - // added by Ash/Upwork
55 - if ( VISUALIZER_PRO ) {
62 + do_action( 'visualizer_add_update_hook', $this->series, $this->data );
63 +
64 + if ( Visualizer_Module::is_pro() && Visualizer_Module::is_pro_older_than( '1.9.0' ) ) {
56 65 global $Visualizer_Pro;
57 66 $Visualizer_Pro->_addUpdateHook( $this->series, $this->data );
58 67 }
59 68 } else {
@@ -63,7 +72,24 @@
63 72 echo '</script>';
64 73 echo '</head>';
65 74 echo '<body></body>';
66 75 echo '</html>';
76 + }
77 +
78 +
79 + /**
80 + * Update the hidden content in the LHS and the advanced settings
81 + */
82 + private function updateEditorAndSettings() {
83 + $editor = '';
84 + if ( Visualizer_Module::can_show_feature( 'simple-editor' ) ) {
85 + ob_start();
86 + Visualizer_Render_Layout::show( 'simple-editor-screen', $this->id );
87 + $editor = ob_get_clean();
88 + }
89 +
90 + $sidebar = apply_filters( 'visualizer_get_sidebar', '', $this->id );
91 +
92 + return 'win.vizUpdateHTML(' . json_encode( array( 'html' => $editor ) ) . ', ' . json_encode( array( 'html' => $sidebar ) ) . ');';
67 93 }
68 94
69 95 }