File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,17 @@ public function boot(): void
4646
4747 public function onInit (): void
4848 {
49- $ tracking = ! $ this ->trackingRules ->hasExcludedIp ();
50- $ excludedRole = $ this ->trackingRules ->hasExcludedUserRole ();
49+ $ tracking = $ this ->trackingRules ->hasExcludedIp () && $ this ->trackingRules ->hasExcludedUserRole ();
5150
5251 if ($ tracking && $ this ->settings ->get (SettingName::NOSCRIPT )) {
5352 AddNoScriptTag::register ();
5453 }
5554
56- if (! $ excludedRole ) {
55+ if (! $ tracking ) {
5756 AddInactiveComment::register ();
5857 }
5958
60- if ($ tracking && ! $ excludedRole ) {
59+ if ($ tracking ) {
6160 $ this ->scripts ->push (new AnalyticsScript );
6261 } else {
6362 $ this ->scripts ->push (new InactiveScript );
Original file line number Diff line number Diff line change 66
77const SA_ADMIN_NOTICE = '<!-- Simple Analytics: Not logging requests from admins --> ' ;
88const SA_DEFAULT_SCRIPT = 'src="https://scripts.simpleanalyticscdn.com/latest.js"></script> ' ;
9- const SA_INACTIVE_ADMIN_SCRIPT = 'resources/js/inactive.js"></script> ' ;
9+ const SA_INACTIVE_ADMIN_SCRIPT = 'src="http://localhost:8100/wp-content/plugins/simpleanalytics/ resources/js/inactive.js"></script> ' ;
1010
1111const WP_PLUGIN_ROW_SELECTOR = 'tr[data-slug="simpleanalytics"] ' ;
1212const WP_ACTIVATE_PLUGIN_SELECTOR = '#activate-simpleanalytics ' ;
You can’t perform that action at this time.
0 commit comments