PluginProbe
SureCookie – GDPR Cookie Consent Banner, Cookie Scanner & Script Blocking / trunk
SureCookie – GDPR Cookie Consent Banner, Cookie Scanner & Script Blocking vtrunk
1.5.0 1.4.0 1.3.0 1.3.1 trunk 0.0.0-alpha.1 0.0.0-alpha.2 0.0.0-alpha.3 0.0.1-beta.1 0.0.1-beta.2 0.0.1-beta.3 0.0.1-beta.4 1.0.0 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4
surecookie / inc / modules / script-blocking / init.php

init.php in SureCookie – GDPR Cookie Consent Banner, Cookie Scanner & Script Blocking trunk, at inc/modules/script-blocking/init.php

50 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Initialize Script Blocking.
4 *
5 * @package SureCookie\Inc\Modules\ScriptBlocking
6 * @since 0.0.1
7 */
8
9 namespace SureCookie\Inc\Modules\ScriptBlocking;
10
11 use SureCookie\Inc\Traits\GetInstance;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit; // Exit if accessed directly.
15 }
16
17 /**
18 * Init
19 *
20 * @since 0.0.1
21 */
22 class Init {
23 use GetInstance;
24
25 /**
26 * Constructor.
27 *
28 * @since 0.0.1
29 */
30 private function __construct() {
31 // The blocker's should_process() handles all conditions including settings check.
32 Blocker::get_instance();
33 Scan_Scripts::get_instance();
34
35 // Nothing else reads the catalog, so a resource gated only by a catalog
36 // pattern has no row on any admin screen. Record what the blocker matches
37 // and surface those as rows.
38 Matched_Resources::get_instance();
39
40 // The catalog domain (Services_Source, Known_Scripts blocking view, the
41 // refresh Cron, declared cookies) now lives in the Services module and is
42 // consumed here purely through the `surecookie_known_scripts` filter.
43
44 // Custom block rules (custom_blocked_scripts) contribute their own
45 // entries to that same filter at priority 25 (after the catalog view and
46 // scan-detected merge), so this stays a pure consumer of the shared view.
47 Custom_Scripts::get_instance();
48 }
49 }
50