PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.3
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 +28 -15 3.7.23.7.3 View file →
@@ -388,8 +388,10 @@
388 388 'enabled' => true,
389 389 );
390 390 }
391 391
392 + $enabled = self::proFeaturesLocked();
393 +
392 394 $types = array_merge(
393 395 $additional,
394 396 array(
395 397 'tabular' => array(
@@ -394,60 +396,60 @@
394 396 array(
395 397 'tabular' => array(
396 398 'name' => esc_html__( 'Table', 'visualizer' ),
397 399 'enabled' => true,
398 - 'supports' => array( 'Google Charts', 'DataTable' ),
400 + 'supports' => $enabled ? array( 'Google Charts', 'DataTable' ) : array( 'DataTable' ),
399 401 ),
400 402 'pie' => array(
401 403 'name' => esc_html__( 'Pie/Donut', 'visualizer' ),
402 404 'enabled' => true,
403 - 'supports' => array( 'Google Charts', 'ChartJS' ),
405 + 'supports' => $enabled ? array( 'Google Charts', 'ChartJS' ) : array( 'Google Charts' ),
404 406 ),
405 407 'line' => array(
406 408 'name' => esc_html__( 'Line', 'visualizer' ),
407 409 'enabled' => true,
408 - 'supports' => array( 'Google Charts', 'ChartJS' ),
410 + 'supports' => $enabled ? array( 'Google Charts', 'ChartJS' ) : array( 'Google Charts' ),
409 411 ),
412 + 'bar' => array(
413 + 'name' => esc_html__( 'Bar', 'visualizer' ),
414 + 'enabled' => true,
415 + 'supports' => $enabled ? array( 'Google Charts', 'ChartJS' ) : array( 'Google Charts' ),
416 + ),
410 417 'area' => array(
411 418 'name' => esc_html__( 'Area', 'visualizer' ),
412 - 'enabled' => true,
419 + 'enabled' => $enabled,
413 420 // in ChartJS, the fill option is used to make Line chart an area: https://www.chartjs.org/docs/latest/charts/area.html
414 421 'supports' => array( 'Google Charts' ),
415 422 ),
416 423 'geo' => array(
417 424 'name' => esc_html__( 'Geo', 'visualizer' ),
418 - 'enabled' => true,
425 + 'enabled' => $enabled,
419 426 'supports' => array( 'Google Charts' ),
420 427 ),
421 - 'bar' => array(
422 - 'name' => esc_html__( 'Bar', 'visualizer' ),
423 - 'enabled' => true,
424 - 'supports' => array( 'Google Charts', 'ChartJS' ),
425 - ),
426 428 'column' => array(
427 429 'name' => esc_html__( 'Column', 'visualizer' ),
428 - 'enabled' => true,
430 + 'enabled' => $enabled,
429 431 'supports' => array( 'Google Charts', 'ChartJS' ),
430 432 ),
431 433 'bubble' => array(
432 434 'name' => esc_html__( 'Bubble', 'visualizer' ),
433 - 'enabled' => true,
435 + 'enabled' => $enabled,
434 436 // chartjs' bubble is ugly looking (and it won't work off the default bubble.csv) so it is being excluded for the time being.
435 437 'supports' => array( 'Google Charts' ),
436 438 ),
437 439 'scatter' => array(
438 440 'name' => esc_html__( 'Scatter', 'visualizer' ),
439 - 'enabled' => true,
441 + 'enabled' => $enabled,
440 442 'supports' => array( 'Google Charts' ),
441 443 ),
442 444 'gauge' => array(
443 445 'name' => esc_html__( 'Gauge', 'visualizer' ),
444 - 'enabled' => true,
446 + 'enabled' => $enabled,
445 447 'supports' => array( 'Google Charts' ),
446 448 ),
447 449 'candlestick' => array(
448 450 'name' => esc_html__( 'Candlestick', 'visualizer' ),
449 - 'enabled' => true,
451 + 'enabled' => $enabled,
450 452 'supports' => array( 'Google Charts' ),
451 453 ),
452 454 // pro types
453 455 'timeline' => array(
@@ -1045,5 +1047,16 @@
1045 1047
1046 1048 return $plugin_meta;
1047 1049 }
1048 1050
1051 + /**
1052 + * If check is existing user.
1053 + *
1054 + * @return bool Default false
1055 + */
1056 + public static function proFeaturesLocked() {
1057 + if ( Visualizer_Module::is_pro() ) {
1058 + return true;
1059 + }
1060 + return 'yes' === get_option( 'visualizer-new-user', 'yes' ) ? false : true;
1061 + }
1049 1062 }