Skip to content

Commit 0c696f3

Browse files
test new version #54
support for new free, old pro
1 parent f840222 commit 0c696f3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

classes/Visualizer/Module/Admin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ public static function _getChartTypesLocalized( $enabledOnly = false, $get2Darra
212212
if ( $enabledOnly ) {
213213
$filtered = array();
214214
foreach ( $types as $type => $array ) {
215+
if ( ! is_array( $array ) ) {
216+
// support for old pro
217+
$array = array( 'enabled' => true, 'name' => $array );
218+
}
215219
if ( ! $array['enabled'] ) {
216220
continue;
217221
}
@@ -222,6 +226,10 @@ public static function _getChartTypesLocalized( $enabledOnly = false, $get2Darra
222226
if ( $get2Darray ) {
223227
$doubleD = array();
224228
foreach ( $types as $type => $array ) {
229+
if ( ! is_array( $array ) ) {
230+
// support for old pro
231+
$array = array( 'enabled' => true, 'name' => $array );
232+
}
225233
$doubleD[ $type ] = $array['name'];
226234
}
227235
$types = $doubleD;

classes/Visualizer/Render/Library.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ private function _renderLibrary() {
8181
echo '<div id="visualizer-types" class="visualizer-clearfix">';
8282
echo '<ul class="subsubsub">';
8383
foreach ( $this->types as $type => $array ) {
84+
if ( ! is_array( $array ) ) {
85+
// support for old pro
86+
$array = array( 'enabled' => true, 'name' => $array );
87+
}
8488
$label = $array['name'];
8589
$link = '<a class=" " href="' . esc_url( add_query_arg( array(
8690
'type' => $type,

0 commit comments

Comments
 (0)