PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.4
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.4
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 +5 -1 3.9.33.9.4 View file →
@@ -538,8 +538,12 @@
538 538 if ( ! $chart_id || ! ( $chart = get_post( $chart_id ) ) || $chart->post_type !== Visualizer_Plugin::CPT_VISUALIZER ) {
539 539 if ( empty( $_GET['lang'] ) || empty( $_GET['parent_chart_id'] ) ) {
540 540 $this->deleteOldCharts();
541 541 $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 + }
542 546 $source = new Visualizer_Source_Csv( VISUALIZER_ABSPATH . DIRECTORY_SEPARATOR . 'samples' . DIRECTORY_SEPARATOR . $default_type . '.csv' );
543 547 $source->fetch();
544 548 $chart_id = wp_insert_post(
545 549 array(
@@ -948,9 +952,9 @@
948 952 // process post request
949 953 if ( $_SERVER['REQUEST_METHOD'] === 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ) ) ) {
950 954 $type = filter_input( INPUT_POST, 'type' );
951 955 $library = filter_input( INPUT_POST, 'chart-library' );
952 - if ( in_array( $type, Visualizer_Plugin::getChartTypes(), true ) ) {
956 + if ( Visualizer_Module_Admin::checkChartStatus( $type ) ) {
953 957 if ( empty( $library ) ) {
954 958 // library cannot be empty.
955 959 do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, 'Chart library empty while creating the chart! Aborting...', 'error', __FILE__, __LINE__ );
956 960 return;