PluginProbe
Simple Analytics / trunk
Simple Analytics vtrunk
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
← All changes | src/Actions/AddInactiveComment.php +17 -1 1.74trunk View file →
@@ -10,9 +10,25 @@
10 10 * @var string
11 11 */
12 12 protected $hook = 'wp_footer';
13 13
14 + /** @var string */
15 + protected $triggeredRule;
16 +
17 + /**
18 + * @param string $triggeredRule
19 + */
20 + public function __construct(string $triggeredRule = '')
21 + {
22 + $this->triggeredRule = trim($triggeredRule);
23 + }
24 +
14 25 public function handle(): void
15 26 {
16 - echo "<!-- Simple Analytics: Not logging requests from admins -->\n";
27 + $reason = $this->triggeredRule !== '' ? $this->triggeredRule : 'Unknown Rule';
28 +
29 + echo sprintf(
30 + "<!-- Simple Analytics: Script not included because this visitor is excluded by tracking rule: %s -->\n",
31 + \esc_html($reason)
32 + );
17 33 }
18 34 }