diff --git a/CHANGELOG.md b/CHANGELOG.md index c3627f04f..c344c7cce 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +##### [Version 3.9.2](https://github.com/Codeinwp/visualizer/compare/v3.9.1...v3.9.2) (2022-12-21) + +- Fixed Geo chart [PRO] flickering issue +- Added disable legend option for ChartJS chart +- Enhanced security + ##### [Version 3.9.1](https://github.com/Codeinwp/visualizer/compare/v3.9.0...v3.9.1) (2022-11-17) - Fixed PHP error when Polylang plugin is activated [#960](https://github.com/Codeinwp/visualizer/issues/960) diff --git a/classes/Visualizer/Module/Chart.php b/classes/Visualizer/Module/Chart.php index 0dbf49aba..949c19cb1 100644 --- a/classes/Visualizer/Module/Chart.php +++ b/classes/Visualizer/Module/Chart.php @@ -532,6 +532,9 @@ public function renderChartPages() { set_current_screen( 'visualizer_render_chart' ); // check chart, if chart not exists, will create new one and redirects to the same page with proper chart id $chart_id = isset( $_GET['chart'] ) ? filter_var( $_GET['chart'], FILTER_VALIDATE_INT ) : ''; + if ( ! empty( $_POST ) ) { + $_POST = map_deep( $_POST, 'wp_strip_all_tags' ); + } if ( ! $chart_id || ! ( $chart = get_post( $chart_id ) ) || $chart->post_type !== Visualizer_Plugin::CPT_VISUALIZER ) { if ( empty( $_GET['lang'] ) || empty( $_GET['parent_chart_id'] ) ) { $this->deleteOldCharts(); diff --git a/classes/Visualizer/Plugin.php b/classes/Visualizer/Plugin.php index d3d5c1bb4..832644136 100644 --- a/classes/Visualizer/Plugin.php +++ b/classes/Visualizer/Plugin.php @@ -28,7 +28,7 @@ class Visualizer_Plugin { const NAME = 'visualizer'; - const VERSION = '3.9.1'; + const VERSION = '3.9.2'; // custom post types const CPT_VISUALIZER = 'visualizer'; diff --git a/classes/Visualizer/Render/Sidebar/ChartJS.php b/classes/Visualizer/Render/Sidebar/ChartJS.php index 8790c433c..b472c8f0a 100644 --- a/classes/Visualizer/Render/Sidebar/ChartJS.php +++ b/classes/Visualizer/Render/Sidebar/ChartJS.php @@ -35,6 +35,8 @@ public function __construct( $data = array() ) { 'right' => esc_html__( 'Right of the chart', 'visualizer' ), 'top' => esc_html__( 'Above the chart', 'visualizer' ), 'bottom' => esc_html__( 'Below the chart', 'visualizer' ), + 'bottom' => esc_html__( 'Below the chart', 'visualizer' ), + 'none' => esc_html__( 'Omit the legend', 'visualizer' ), ); } diff --git a/css/media.css b/css/media.css index c5dfa9822..7328759b4 100644 --- a/css/media.css +++ b/css/media.css @@ -1,5 +1,5 @@ /* - Version: 3.9.1 + Version: 3.9.2 */ #visualizer-library-view { padding: 30px 10px 10px 30px; diff --git a/cypress.json b/cypress.json index e80eb48a6..5d01e314f 100755 --- a/cypress.json +++ b/cypress.json @@ -5,7 +5,7 @@ "pass": "wordpress", "urls": { "library": "/wp-admin/admin.php?page=visualizer", - "samples": "https://s3.amazonaws.com/downloads.themeisle.com/samples-visualizer/" + "samples": "https://s3.amazonaws.com/verti-utils/samples-visualizer/" }, "chart_types": { "free": 4, diff --git a/index.php b/index.php index 8e292f221..87e46b3c2 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ Plugin Name: Visualizer: Tables and Charts for WordPress Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs/ Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases. - Version: 3.9.1 + Version: 3.9.2 Author: Themeisle Author URI: http://themeisle.com Requires at least: 3.5 diff --git a/js/preview.js b/js/preview.js index 43a631f1b..6e9ede887 100644 --- a/js/preview.js +++ b/js/preview.js @@ -61,7 +61,8 @@ clearTimeout(timeout); timeout = setTimeout(function() { var settings = $('#settings-form').serializeObject(); - + settings = JSON.stringify( settings ).replace( /<\/?[^>]+(>|$)/g, '' ); + settings = JSON.parse( settings ); delete settings['width']; delete settings['height']; diff --git a/js/render-chartjs.js b/js/render-chartjs.js index f626aef69..d9d7ad951 100644 --- a/js/render-chartjs.js +++ b/js/render-chartjs.js @@ -197,6 +197,10 @@ } } + settings.plugins = { + legend: settings.legend, + }; + handleAxes(settings, chart); override(settings, chart); diff --git a/js/render-google.js b/js/render-google.js index 5e5d06b6e..207f54667 100644 --- a/js/render-google.js +++ b/js/render-google.js @@ -40,7 +40,7 @@ var chartWrapperError = []; function renderSpecificChart(id, chart) { var render, container, series, data, table, settings, i, j, row, date, axis, property, format, formatter; - if ( $('#' + id).hasClass('visualizer-chart-loaded') ) { + if ( $('#' + id).hasClass('visualizer-chart-loaded') || $('#' + id).children( ':not(.loader)' ).length > 0 ) { return; } diff --git a/package.json b/package.json index b09461228..0c91d366c 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "visualizer", - "version": "3.9.1", + "version": "3.9.2", "description": "Visualizer Lite", "repository": { "type": "git", diff --git a/readme.txt b/readme.txt index 1bf1d42c2..60a29168f 100755 --- a/readme.txt +++ b/readme.txt @@ -163,6 +163,15 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have ` == Changelog == +##### [Version 3.9.2](https://github.com/Codeinwp/visualizer/compare/v3.9.1...v3.9.2) (2022-12-21) + +- Fixed Geo chart [PRO] flickering issue +- Added disable legend option for ChartJS chart +- Enhanced security + + + + ##### [Version 3.9.1](https://github.com/Codeinwp/visualizer/compare/v3.9.0...v3.9.1) (2022-11-17) - Fixed PHP error when Polylang plugin is activated [#960](https://github.com/Codeinwp/visualizer/issues/960)