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 / automatic-scanning / init.php

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

58 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 Automatic Scanning.
4 *
5 * Free base of the Automatic Scanning feature: schedules recurring scans
6 * (Monthly on Free; Weekly unlocked by Pro), reuses the existing scan engine,
7 * and powers change detection + scan history. Pro extends this module with
8 * Weekly frequency, email digests, auto-apply and the compliance guard.
9 *
10 * @package SureCookie\Inc\Modules\AutomaticScanning
11 * @since 1.2.0
12 */
13
14 namespace SureCookie\Inc\Modules\AutomaticScanning;
15
16 use SureCookie\Inc\Traits\GetInstance;
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly.
20 }
21
22 /**
23 * Init
24 *
25 * @since 1.2.0
26 */
27 class Init {
28 use GetInstance;
29
30 /**
31 * Constructor.
32 *
33 * @since 1.2.0
34 */
35 private function __construct() {
36 Scheduler::get_instance();
37 Runner::get_instance();
38 History::get_instance();
39
40 add_filter( 'surecookie_api_controllers', [ $this, 'register_api_controller' ] );
41 }
42
43 /**
44 * Register the module's REST controller with the core API router.
45 *
46 * @param array<int, string> $controllers Registered controller class names.
47 * @since 1.2.0
48 * @return array<int, string>
49 */
50 public function register_api_controller( $controllers = [] ) {
51 if ( is_array( $controllers ) ) {
52 $controllers[] = Api::class;
53 }
54
55 return $controllers;
56 }
57 }
58