vc-line-chart.php 824 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. /**
  6. * Class WPBakeryShortCode_Vc_Line_Chart
  7. */
  8. class WPBakeryShortCode_Vc_Line_Chart extends WPBakeryShortCode {
  9. /**
  10. * WPBakeryShortCode_Vc_Line_Chart constructor.
  11. * @param $settings
  12. */
  13. public function __construct( $settings ) {
  14. parent::__construct( $settings );
  15. $this->jsScripts();
  16. }
  17. public function jsScripts() {
  18. wp_register_script( 'vc_waypoints', vc_asset_url( 'lib/vc_waypoints/vc-waypoints.min.js' ), array( 'jquery' ), WPB_VC_VERSION, true );
  19. wp_register_script( 'ChartJS', vc_asset_url( 'lib/bower/chartjs/Chart.min.js' ), array(), WPB_VC_VERSION, true );
  20. wp_register_script( 'vc_line_chart', vc_asset_url( 'lib/vc_line_chart/vc_line_chart.min.js' ), array(
  21. 'jquery',
  22. 'vc_waypoints',
  23. 'ChartJS',
  24. ), WPB_VC_VERSION, true );
  25. }
  26. }