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
simpleanalytics / src / Actions / AddInactiveComment.php

AddInactiveComment.php in Simple Analytics trunk, at src/Actions/AddInactiveComment.php

35 lines 709 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 class AddInactiveComment
6 {
7 use Action;
8
9 /**
10 * @var string
11 */
12 protected $hook = 'wp_footer';
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
25 public function handle(): void
26 {
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 );
33 }
34 }
35