PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.7.6
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.7.6
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 +4 -29 3.10.141.7.6 View file →
@@ -37,11 +37,8 @@
37 37 *
38 38 * @access protected
39 39 */
40 40 protected function _toHTML() {
41 - if ( $this->is_request_from_gutenberg() ) {
42 - return;
43 - }
44 41 echo '<!DOCTYPE html>';
45 42 echo '<html>';
46 43 echo '<head>';
47 44 echo '<script type="text/javascript">';
@@ -50,22 +47,17 @@
50 47 echo 'var win = window.dialogArguments || opener || parent || top;';
51 48 echo 'if (win.visualizer) {';
52 49 echo 'win.visualizer.charts.canvas.series = ', $this->series, ';';
53 50 echo 'win.visualizer.charts.canvas.data = ', $this->data, ';';
54 - if ( $this->settings ) {
55 - echo 'win.visualizer.charts.canvas.settings = ', $this->settings, ';';
56 - }
57 - echo 'win.vizUpdateChartPreview();';
58 -
59 - // echo $this->updateEditorAndSettings();
51 + echo 'win.visualizer.render();';
60 52 echo '}';
61 53
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' ) ) {
54 + // added by Ash/Upwork
55 + if ( defined( 'Visualizer_Pro' ) ) {
65 56 global $Visualizer_Pro;
66 57 $Visualizer_Pro->_addUpdateHook( $this->series, $this->data );
67 58 }
59 + // Added by Ash/Upwork
68 60 } else {
69 61 echo 'alert("', $this->message, '");';
70 62 }
71 63 echo '})();';
@@ -72,24 +64,7 @@
72 64 echo '</script>';
73 65 echo '</head>';
74 66 echo '<body></body>';
75 67 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 ) ) . ');';
93 68 }
94 69
95 70 }