settings_service = $settings_service; } /** * @throws Exception */ public function load_active_addons() { if ( ! cookiebot_active() ) { return; } /** * Add notice for the user if any addons is enabled and cookie * blocking mode is set to auto. */ if ( count( $this->settings_service->get_active_addons() ) > 0 && Cookiebot_WP::get_cookie_blocking_mode() === 'auto' && // phpcs:ignore WordPress.Security.NonceVerification.Recommended isset( $_GET['page'] ) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended in_array( $_GET['page'], array( 'cookiebot', 'cookiebot-addons' ), true ) ) { add_action( 'admin_notices', function () { echo '
' .
esc_html__(
'You enabled Cookiebotâ„¢ auto blocking mode but still using addons',
'cookiebot'
) .
'
' .
esc_html__(
'In some occasions this may cause client side errors. If you notice any errors please try to disable Cookiebotâ„¢ addons or contact Cookiebotâ„¢ support.',
'cookiebot'
) .
'