From 73aa2aa1f8301cea846493944f01941c1c5c602a Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 1 Sep 2022 15:25:02 +0530 Subject: [PATCH 1/2] Fix compatible with TFRN plugin #933 --- classes/Visualizer/Module.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/classes/Visualizer/Module.php b/classes/Visualizer/Module.php index 77fd5af5c..c9ad1f2d7 100644 --- a/classes/Visualizer/Module.php +++ b/classes/Visualizer/Module.php @@ -67,7 +67,7 @@ public function __construct( Visualizer_Plugin $plugin ) { $this->_addFilter( Visualizer_Plugin::FILTER_UNDO_REVISIONS, 'undoRevisions', 10, 2 ); $this->_addFilter( Visualizer_Plugin::FILTER_HANDLE_REVISIONS, 'handleExistingRevisions', 10, 2 ); $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA_AS, 'getDataAs', 10, 3 ); - $this->_addFilter( Visualizer_Plugin::FILTER_CHART_TITLE, 'filterChartTitle', 10, 2 ); + $this->_addAction( 'pre_get_posts', 'PreGetPosts' ); register_shutdown_function( array($this, 'onShutdown') ); } @@ -793,6 +793,21 @@ public function _getImage( $chart = null ) { ); } + /** + * Filter chart title if visualizer post type. + * + * @param object $query WP Query object. + * @return void + */ + public function PreGetPosts( $query ) { + if ( ! $query->is_main_query() ) { + $post_type = $query->get( 'post_type' ); + if ( 'visualizer' === $post_type ) { + $this->_addFilter( Visualizer_Plugin::FILTER_CHART_TITLE, 'filterChartTitle', 10, 2 ); + } + } + } + /** * Filter chart title. * From 1818a65d7c53849b5c3670bcd16966d7e09b9809 Mon Sep 17 00:00:00 2001 From: "themeisle[bot]" <> Date: Wed, 7 Sep 2022 19:57:43 +0000 Subject: [PATCH 2/2] chore(release): 3.7.12 ##### [Version 3.7.12](https://github.com/Codeinwp/visualizer/compare/v3.7.11...v3.7.12) (2022-09-07) - Fixed compatibility issue with some themes and plugins [#933](https://github.com/Codeinwp/visualizer/issues/933) --- CHANGELOG.md | 4 ++++ classes/Visualizer/Plugin.php | 2 +- css/media.css | 2 +- index.php | 2 +- package.json | 2 +- readme.txt | 7 +++++++ 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0237e63f9..4bc171bde 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +##### [Version 3.7.12](https://github.com/Codeinwp/visualizer/compare/v3.7.11...v3.7.12) (2022-09-07) + +- Fixed compatibility issue with some themes and plugins [#933](https://github.com/Codeinwp/visualizer/issues/933) + ##### [Version 3.7.11](https://github.com/Codeinwp/visualizer/compare/v3.7.10...v3.7.11) (2022-08-30) - Fix update axis baseline color [#925](https://github.com/Codeinwp/visualizer/issues/925) diff --git a/classes/Visualizer/Plugin.php b/classes/Visualizer/Plugin.php index 35f76149d..7eee98915 100644 --- a/classes/Visualizer/Plugin.php +++ b/classes/Visualizer/Plugin.php @@ -28,7 +28,7 @@ class Visualizer_Plugin { const NAME = 'visualizer'; - const VERSION = '3.7.11'; + const VERSION = '3.7.12'; // custom post types const CPT_VISUALIZER = 'visualizer'; diff --git a/css/media.css b/css/media.css index f409052b6..8ce265d2a 100644 --- a/css/media.css +++ b/css/media.css @@ -1,5 +1,5 @@ /* - Version: 3.7.11 + Version: 3.7.12 */ #visualizer-library-view { padding: 30px 10px 10px 30px; diff --git a/index.php b/index.php index c9a16ffce..8761eae2a 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-lite/ 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.7.11 + Version: 3.7.12 Author: Themeisle Author URI: http://themeisle.com Requires at least: 3.5 diff --git a/package.json b/package.json index 24fdea8c4..9f174103b 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "visualizer", - "version": "3.7.11", + "version": "3.7.12", "description": "Visualizer Lite", "repository": { "type": "git", diff --git a/readme.txt b/readme.txt index 2bff3c134..ad0fb25fc 100755 --- a/readme.txt +++ b/readme.txt @@ -163,6 +163,13 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have ` == Changelog == +##### [Version 3.7.12](https://github.com/Codeinwp/visualizer/compare/v3.7.11...v3.7.12) (2022-09-07) + +- Fixed compatibility issue with some themes and plugins [#933](https://github.com/Codeinwp/visualizer/issues/933) + + + + ##### [Version 3.7.11](https://github.com/Codeinwp/visualizer/compare/v3.7.10...v3.7.11) (2022-08-30) - Fix update axis baseline color [#925](https://github.com/Codeinwp/visualizer/issues/925)