Skip to content

Commit b5d458b

Browse files
new lite, old pro
1 parent 9cd10fd commit b5d458b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

classes/Visualizer/Module.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,15 @@ protected function load_chart_type( $chart_id ) {
452452
$type = get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true );
453453
$name = 'Visualizer_Render_Sidebar_Type_' . ucwords( $type );
454454
$class = null;
455-
if ( class_exists( $name ) ) {
455+
if ( class_exists( $name ) || true === apply_filters( 'visualizer_load_chart', false, $name ) ) {
456456
$class = new $name;
457-
} elseif ( true === apply_filters( 'visualizer_load_chart', false, $name ) ) {
458-
$class = new $name;
459457
}
458+
459+
if ( is_null( $class ) && VISUALIZER_PRO ) {
460+
// lets see if this type exists in pro. New Lite(3.1.0+) & old Pro(1.8.0-).
461+
$class = apply_filters( 'visualizer_pro_chart_type_sidebar', null, array( 'type' => $type, 'settings' => get_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS, true ) ) );
462+
}
463+
460464
return is_null( $class ) ? null : $class->getLibrary();
461465
}
462466

0 commit comments

Comments
 (0)