AeliaCurrencySwitcher.php
4 years ago
BeaverBuilder.php
4 years ago
CF_Helper.php
4 years ago
Cloudflare.php
4 years ago
CookieNotice.php
4 years ago
DownloadManager.php
4 years ago
Ezoic.php
4 years ago
FusionBuilder.php
4 years ago
NginxHelper.php
4 years ago
RC.php
4 years ago
RocketNet_Helper.php
4 years ago
ShortPixel.php
4 years ago
ThriveTheme.php
4 years ago
WPCacheHelper.php
4 years ago
WPRocket.php
4 years ago
Woocommerce.php
4 years ago
WoocommerceCacheHandler.php
4 years ago
CookieNotice.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | namespace NitroPack\Integration\Plugin; |
| 4 | |
| 5 | class CookieNotice { |
| 6 | const STAGE = "late"; |
| 7 | |
| 8 | public function init($stage) { |
| 9 | # Cookie Notice plugin hack |
| 10 | add_action( 'init', function() { |
| 11 | if (function_exists("Cookie_Notice")) { |
| 12 | $agent = Cookie_Notice()->bot_detect->get_user_agent(); |
| 13 | if ($agent) { |
| 14 | $replaced = str_replace('Nitro-Optimizer-Agent', '', $agent); |
| 15 | Cookie_Notice()->bot_detect->set_user_agent($replaced); |
| 16 | } |
| 17 | } |
| 18 | }, 5); |
| 19 | } |
| 20 | } |
| 21 |