TrackingSettings
4 years ago
views
3 years ago
AccessSettings.php
4 years ago
Admin.php
4 years ago
AdminSettings.php
4 years ago
AdminSettingsInterface.php
6 years ago
AdvancedSettings.php
4 years ago
Chart.php
4 years ago
CookieConsent.php
4 years ago
Dashboard.php
4 years ago
ExclusionSettings.php
4 years ago
GeolocationSettings.php
4 years ago
GetStarted.php
4 years ago
ImportWpStatistics.php
4 years ago
Info.php
4 years ago
InvalidIpException.php
4 years ago
Marketplace.php
4 years ago
Menu.php
3 years ago
PrivacySettings.php
4 years ago
SafeModeMenu.php
4 years ago
Summary.php
4 years ago
SystemReport.php
3 years ago
TrackingSettings.php
4 years ago
Chart.php
21 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package matomo |
| 4 | */ |
| 5 | namespace WpMatomo\Admin; |
| 6 | |
| 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | exit; // if accessed directly |
| 9 | } |
| 10 | |
| 11 | class Chart { |
| 12 | public function register_hooks() { |
| 13 | add_action( 'matomo_load_chartjs', [ $this, 'load_chartjs' ] ); |
| 14 | } |
| 15 | |
| 16 | public function load_chartjs() { |
| 17 | wp_enqueue_script( 'chart.js', plugins_url( 'node_modules/chart.js/dist/chart.min.js', MATOMO_ANALYTICS_FILE ), [], '1.0.0', true ); |
| 18 | wp_enqueue_script( 'matomo_chart.js', plugins_url( 'assets/chart.js', MATOMO_ANALYTICS_FILE ), [], '1.0.0', true ); |
| 19 | } |
| 20 | } |
| 21 |