PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.1
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 +1 -12 3.10.103.9.1 View file →
@@ -531,19 +531,12 @@
531 531 // Set current screen for the render chart.
532 532 set_current_screen( 'visualizer_render_chart' );
533 533 // check chart, if chart not exists, will create new one and redirects to the same page with proper chart id
534 534 $chart_id = isset( $_GET['chart'] ) ? filter_var( $_GET['chart'], FILTER_VALIDATE_INT ) : '';
535 - if ( ! empty( $_POST ) ) {
536 - $_POST = map_deep( $_POST, 'wp_strip_all_tags' );
537 - }
538 535 if ( ! $chart_id || ! ( $chart = get_post( $chart_id ) ) || $chart->post_type !== Visualizer_Plugin::CPT_VISUALIZER ) {
539 536 if ( empty( $_GET['lang'] ) || empty( $_GET['parent_chart_id'] ) ) {
540 537 $this->deleteOldCharts();
541 538 $default_type = isset( $_GET['type'] ) && ! empty( $_GET['type'] ) ? $_GET['type'] : 'line';
542 - $chart_status = Visualizer_Module_Admin::checkChartStatus( $default_type );
543 - if ( ! $chart_status ) {
544 - $default_type = 'line';
545 - }
546 539 $source = new Visualizer_Source_Csv( VISUALIZER_ABSPATH . DIRECTORY_SEPARATOR . 'samples' . DIRECTORY_SEPARATOR . $default_type . '.csv' );
547 540 $source->fetch();
548 541 $chart_id = wp_insert_post(
549 542 array(
@@ -952,9 +945,9 @@
952 945 // process post request
953 946 if ( $_SERVER['REQUEST_METHOD'] === 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ) ) ) {
954 947 $type = filter_input( INPUT_POST, 'type' );
955 948 $library = filter_input( INPUT_POST, 'chart-library' );
956 - if ( Visualizer_Module_Admin::checkChartStatus( $type ) ) {
949 + if ( in_array( $type, Visualizer_Plugin::getChartTypes(), true ) ) {
957 950 if ( empty( $library ) ) {
958 951 // library cannot be empty.
959 952 do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, 'Chart library empty while creating the chart! Aborting...', 'error', __FILE__, __LINE__ );
960 953 return;
@@ -1586,12 +1579,8 @@
1586 1579 // Save the image in the uploads directory.
1587 1580 require_once ABSPATH . '/wp-admin/includes/file.php';
1588 1581 \WP_Filesystem();
1589 1582 global $wp_filesystem;
1590 - if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base' ) ) {
1591 - $creds = request_filesystem_credentials( site_url() );
1592 - wp_filesystem( $creds );
1593 - }
1594 1583 $upload_file = $wp_filesystem->put_contents( $upload_path . $hashed_filename, $decoded );
1595 1584
1596 1585 // Insert new chart image.
1597 1586 $attachment = array(