PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.0
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/Admin.php +6 -23 3.10.03.9.0 View file →
@@ -722,11 +722,8 @@
722 722 }
723 723 #toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li > a:hover {
724 724 box-shadow: inherit;
725 725 }
726 - #toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li + li {
727 - display: none;
728 - }
729 726 </style>
730 727 <script type="text/javascript">
731 728 jQuery( document ).ready( function() {
732 729 jQuery( '#toplevel_page_visualizer' ).on( 'click', 'li:not(.wp-submenu-head, .wp-first-item):eq(2)', function( e ) {
@@ -770,10 +767,10 @@
770 767 * Adds the display filters to be used in the meta_query while displaying the charts.
771 768 */
772 769 private function getDisplayFilters( &$query_args ) {
773 770 $query = array();
774 - global $sitepress;
775 - if ( Visualizer_Module::is_pro() && ( function_exists( 'icl_get_languages' ) && $sitepress instanceof \SitePress ) ) {
771 +
772 + if ( Visualizer_Module::is_pro() && function_exists( 'icl_get_languages' ) ) {
776 773 $current_lang = icl_get_current_language();
777 774 if ( in_array( $current_lang, array( 'all', icl_get_default_language() ), true ) ) {
778 775 $query[] = array(
779 776 'key' => 'chart_lang',
@@ -885,9 +882,9 @@
885 882
886 883 $this->getDisplayFilters( $query_args );
887 884
888 885 // Added by Ash/Upwork
889 - $filterByMeta = ! empty( $_GET['s'] ) ? sanitize_text_field( wp_unslash( $_GET['s'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
886 + $filterByMeta = filter_input( INPUT_GET, 's', FILTER_SANITIZE_STRING );
890 887 if ( $filterByMeta ) {
891 888 $query = array(
892 889 'key' => Visualizer_Plugin::CF_SETTINGS,
893 890 'value' => $filterByMeta,
@@ -1140,17 +1137,18 @@
1140 1137 * @param int $chart_id Chart ID.
1141 1138 * @return bool Default false
1142 1139 */
1143 1140 public function addMultilingualSupport( $chart_id ) {
1144 - global $sitepress;
1145 1141 if ( Visualizer_Module::is_pro() ) {
1146 1142 return;
1147 1143 }
1148 - if ( function_exists( 'icl_get_languages' ) && $sitepress instanceof \SitePress ) {
1144 + if ( function_exists( 'icl_get_languages' ) ) {
1149 1145 $language = icl_get_languages();
1150 1146 $current_lang = icl_get_current_language();
1151 1147 $default_lang = icl_get_default_language();
1152 1148 $post_info = wpml_get_language_information( null, $chart_id );
1149 +
1150 + global $sitepress;
1153 1151 $translations = array();
1154 1152 if ( ! empty( $post_info ) && ( $default_lang === $post_info['language_code'] ) ) {
1155 1153 $trid = $sitepress->get_element_trid( $chart_id, 'post_' . Visualizer_Plugin::CPT_VISUALIZER );
1156 1154 $translations = $sitepress->get_element_translations( $trid );
@@ -1175,21 +1173,6 @@
1175 1173 <a href="<?php echo tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'wpml-support', 'visualizer_render_char' ); ?>"target="_blank"><?php esc_html_e( 'Upgrade to PRO to active this translation for charts', 'visualizer' ); ?></a>
1176 1174 </div>
1177 1175 <?php
1178 1176 }
1179 - }
1180 -
1181 - /**
1182 - * Check chart is enabled or not.
1183 - *
1184 - * @param string $type Chart ID.
1185 - *
1186 - * @return bool Default false
1187 - */
1188 - public static function checkChartStatus( $type ) {
1189 - $types = self::_getChartTypesLocalized( false, false, false, true );
1190 - if ( isset( $types[ $type ] ) ) {
1191 - return ! empty( $types[ $type ]['enabled'] );
1192 - }
1193 - return false;
1194 1177 }
1195 1178 }