Marketplace
1 month ago
PluginSuggestions
2 months ago
TrackingSettings
1 month ago
views
1 month ago
AccessSettings.php
4 years ago
AdBlockDetector.php
6 months ago
Admin.php
1 month ago
AdminSettings.php
2 months ago
AdminSettingsInterface.php
6 years ago
AdvancedSettings.php
10 months ago
Chart.php
1 month ago
CookieConsent.php
4 years ago
Dashboard.php
2 months ago
ExclusionSettings.php
6 months ago
GeolocationSettings.php
2 years ago
GetStarted.php
2 months ago
ImportWpStatistics.php
2 months ago
Info.php
2 months ago
InvalidIpException.php
4 years ago
Marketplace.php
1 month ago
MarketplaceSetupWizard.php
1 month ago
MarketplaceSetupWizardBody.php
1 month ago
MatomoPage.php
2 months ago
MatomoPageContent.php
2 months ago
Menu.php
1 month ago
PluginMeasurableSettings.php
2 years ago
PrivacySettings.php
1 year ago
SafeModeMenu.php
2 months ago
Summary.php
2 months ago
SystemReport.php
1 month ago
TrackingSettings.php
1 month ago
WhatsNewNotifications.php
2 months ago
AdBlockDetector.php
30 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * @package matomo |
| 8 | */ |
| 9 | |
| 10 | namespace WpMatomo\Admin; |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; // if accessed directly |
| 14 | } |
| 15 | |
| 16 | class AdBlockDetector { |
| 17 | |
| 18 | public function register_hooks() { |
| 19 | if ( ! Admin::is_matomo_admin() ) { |
| 20 | return; |
| 21 | } |
| 22 | |
| 23 | add_action( 'admin_head', [ $this, 'display_adblocker_notice' ] ); |
| 24 | } |
| 25 | |
| 26 | public function display_adblocker_notice() { |
| 27 | include __DIR__ . '/views/adblocker-notice.php'; |
| 28 | } |
| 29 | } |
| 30 |