PluginProbe
Simple Analytics / 1.91
Simple Analytics v1.91
1.109 1.108 1.107 1.106 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.8 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.90 1.91 All 98 releases
simpleanalytics / src / Actions / AddNoScriptTag.php

AddNoScriptTag.php in Simple Analytics 1.91, at src/Actions/AddNoScriptTag.php

27 lines 600 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SimpleAnalytics\Actions;
4
5 use SimpleAnalytics\Setting;
6 use SimpleAnalytics\SettingName;
7
8 class AddNoScriptTag
9 {
10 use Action;
11
12 /**
13 * @var string
14 */
15 protected $hook = 'wp_footer';
16
17 public function handle(): void
18 {
19 echo sprintf("<noscript><img src=\"%s\" alt=\"\" referrerpolicy=\"no-referrer-when-downgrade\"></noscript>\n", $this->getCustomDomain());
20 }
21
22 public function getCustomDomain(): string
23 {
24 return esc_url('https://' . Setting::get(SettingName::CUSTOM_DOMAIN, 'queue.simpleanalyticscdn.com') . '/noscript.gif');
25 }
26 }
27