PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.3
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.php +20 -0 3.0.63.4.3 View file →
@@ -150,5 +150,25 @@
150 150 public function render() {
151 151 $this->_toHTML();
152 152 }
153 153
154 + /**
155 + * Checks if the request is from Gutenberg.
156 + *
157 + * This happens when the chart is being added to a gutenberg block by inserting a visualizer block.
158 + *
159 + * @since ?
160 + *
161 + * @access protected
162 + * @return bool
163 + */
164 + protected function is_request_from_gutenberg() {
165 + global $post;
166 + require_once ABSPATH . 'wp-admin/includes/post.php';
167 + if ( $post && function_exists( 'use_block_editor_for_post' ) && use_block_editor_for_post( $post ) ) {
168 + do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'This request appears to be from Gutenberg block. Ignoring for chart %d', $post->ID ), 'debug', __FILE__, __LINE__ );
169 + return true;
170 + }
171 + return false;
172 + }
173 +
154 174 }