PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.1.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.1.0
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/Module/Chart.php +8 -1 2.0.42.1.0 View file →
@@ -257,8 +257,11 @@
257 257 /**
258 258 * Handle data and settings page
259 259 */
260 260 private function _handleDataAndSettingsPage() {
261 + if ( isset( $_POST['map_api_key'] ) ) {
262 + update_option( 'visualizer-map-api-key', $_POST['map_api_key'] );
263 + }
261 264 if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset( $_GET['nonce'] ) && wp_verify_nonce( $_GET['nonce'] ) ) {
262 265 if ( $this->_chart->post_status == 'auto-draft' ) {
263 266 $this->_chart->post_status = 'publish';
264 267 wp_update_post( $this->_chart->to_array() );
@@ -296,8 +299,9 @@
296 299 ),
297 300 'charts' => array(
298 301 'canvas' => $data,
299 302 ),
303 + 'map_api_key' => get_option( 'visualizer-map-api-key' ),
300 304 ) );
301 305 $render = new Visualizer_Render_Page_Data();
302 306 $render->chart = $this->_chart;
303 307 $render->type = $data['type'];
@@ -374,8 +378,9 @@
374 378 *
375 379 * @access public
376 380 */
377 381 public function uploadData() {
382 + error_log( 'in uploadData ' . print_r( $_GET,true ) . print_r( $_POST,true ) );
378 383 // validate nonce
379 384 // do not use filter_input as it does not work for phpunit test cases, use filter_var instead
380 385 if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'] ) ) {
381 386 status_header( 403 );
@@ -419,9 +424,11 @@
419 424 $render->message = esc_html__( 'CSV file is broken or invalid. Please, try again.', 'visualizer' );
420 425 }
421 426 }
422 427 $render->render();
423 - defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
428 + if ( ! ( defined( 'VISUALIZER_DO_NOT_DIE' ) && VISUALIZER_DO_NOT_DIE ) ) {
429 + defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
430 + }
424 431 }
425 432
426 433 /**
427 434 * Clones the chart.