Skip to content

Commit 1135fed

Browse files
authored
release: fixes
- Fix PHP 8.0 or above compatibility issue - Fix the space missing between the id and class attributes of the charts - Fix compatibility issue with Ultimate Coupons for WooCommerce Free plugin - Fix charts placed in accordion (tabs) that do not load properly - Fix conflict with translation plugins
2 parents 73778f5 + 1d1dc87 commit 1135fed

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

classes/Visualizer/Module/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct( Visualizer_Plugin $plugin ) {
5454
$this->_addAction( 'load-post.php', 'enqueueMediaScripts' );
5555
$this->_addAction( 'load-post-new.php', 'enqueueMediaScripts' );
5656
$this->_addAction( 'admin_footer', 'renderTemplates' );
57-
$this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts', null, 8 );
57+
$this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts', null, 0 );
5858
$this->_addAction( 'admin_menu', 'registerAdminMenu' );
5959
$this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
6060
$this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );

classes/Visualizer/Module/Chart.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,9 @@ private function deleteOldCharts() {
490490
*/
491491
public function renderChartPages() {
492492
defined( 'IFRAME_REQUEST' ) || define( 'IFRAME_REQUEST', 1 );
493+
if ( ! defined( 'ET_BUILDER_PRODUCT_VERSION' ) && function_exists( 'et_get_theme_version' ) ) {
494+
define( 'ET_BUILDER_PRODUCT_VERSION', et_get_theme_version() );
495+
}
493496
// Set current screen for the render chart.
494497
set_current_screen( 'visualizer_render_chart' );
495498
// check chart, if chart not exists, will create new one and redirects to the same page with proper chart id
@@ -524,7 +527,11 @@ public function renderChartPages() {
524527
do_action( 'visualizer_pro_new_chart_defaults', $chart_id );
525528
}
526529
wp_redirect( add_query_arg( 'chart', (int) $chart_id ) );
527-
defined( 'WP_TESTS_DOMAIN' ) ? wp_die() : exit();
530+
531+
if ( defined( 'WP_TESTS_DOMAIN' ) ) {
532+
wp_die();
533+
}
534+
exit();
528535
}
529536

530537
$_POST['save_chart_image'] = isset( $_POST['save_chart_image'] ) && 'yes' === $_POST['save_chart_image'] ? true : false;

classes/Visualizer/Module/Frontend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ private function getHtmlAttributes( $attributes ) {
491491
}
492492

493493
foreach ( $attributes as $name => $value ) {
494-
$string .= sprintf( '%s="%s"', esc_attr( $name ), esc_attr( $value ) );
494+
$string .= sprintf( ' %s="%s"', esc_attr( $name ), esc_attr( $value ) );
495495
}
496496
return $string;
497497
}

classes/Visualizer/Render/Library.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ private function _renderSidebar() {
359359
echo '<div class="visualizer-sidebar-box">';
360360
echo '<h3>' . __( 'Discover the power of PRO!', 'visualizer' ) . '</h3><ul>';
361361
if ( Visualizer_Module_Admin::proFeaturesLocked() ) {
362-
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '6 more chart types', 'visualizer' ) . '</ul>';
362+
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '6 more chart types', 'visualizer' );
363363
} else {
364364
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '11 more chart types', 'visualizer' ) . '</li>';
365365
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Manual Data Editor', 'visualizer' ) . '</li>';

js/render-facade.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@
137137
// display all charts that are NOT to be lazy-loaded.
138138
$( 'div.viz-facade-loaded:not(.visualizer-lazy):empty' ).removeClass( 'viz-facade-loaded' );
139139
$('div.visualizer-front:not(.visualizer-lazy):not(.viz-facade-loaded)').each(function(index, element){
140-
var id = $(element).addClass('viz-facade-loaded').attr('id');
141-
showChart(id);
140+
if ( $(element).is(':visible') ) {
141+
var id = $(element).addClass('viz-facade-loaded').attr('id');
142+
showChart(id);
143+
}
142144
refreshEachCharts();
143145
});
144146

js/render-google.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ var __visualizer_chart_images = [];
229229
}
230230

231231
if(settings.hAxis && settings.hAxis.format == ''){
232-
settings.hAxis.format = 'YYYY-MM-dd';
232+
settings.hAxis.format = 'yyyy-MM-dd';
233233
}
234234
}
235235

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: codeinwp,themeisle,marius2012,marius_codeinwp,hardeepasrani,rozroz,Madalin_ThemeIsle
33
Tags: tables, charts, pie, visualization, graphs
44
Requires at least: 3.5
5-
Tested up to: 5.9
5+
Tested up to: 6.0
66
Requires PHP: 5.6
77
Stable tag: trunk
88
License: GPL v2.0 or later

0 commit comments

Comments
 (0)