PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.7.0
Defender Security – Malware Scanner, Login Security & Firewall v5.7.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / controller / class-expert-services.php

class-expert-services.php in Defender Security – Malware Scanner, Login Security & Firewall 5.7.0, at src/controller/class-expert-services.php

118 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Handles all service related actions.
4 *
5 * @package WP_Defender\Controller
6 */
7
8 namespace WP_Defender\Controller;
9
10 use WP_Defender\Controller;
11 use WP_Defender\Behavior\WPMUDEV;
12
13 /**
14 * Contains methods for handling scans.
15 */
16 class Expert_Services extends Controller {
17
18 /**
19 * The slug identifier for this controller.
20 *
21 * @var string
22 */
23 public $slug = 'wdf-expert-services';
24
25 /**
26 * Initializes the model and service, registers routes.
27 */
28 public function __construct() {
29 $wpmudev = new WPMUDEV();
30 if ( $wpmudev->is_pro() && ! $wpmudev->is_whitelabel_enabled() ) {
31 $this->register_page(
32 esc_html__( 'Expert Services', 'defender-security' ),
33 $this->slug,
34 array( $this, 'main_view' ),
35 $this->parent_slug
36 );
37 $this->register_routes();
38 add_action( 'defender_enqueue_assets', array( $this, 'enqueue_assets' ) );
39 }
40 }
41
42 /**
43 * Enqueues scripts and styles for this page.
44 * Only enqueues assets if the page is active.
45 */
46 public function enqueue_assets(): void {
47 if ( $this->is_page_active() ) {
48 wp_enqueue_script( 'def-expert-services' );
49 $this->enqueue_main_assets();
50 }
51 }
52
53 /**
54 * All the variables that we will show on frontend, both in the main page, or dashboard widget.
55 *
56 * @return array
57 */
58 public function data_frontend() {
59 return array();
60 }
61
62 /**
63 * Export the data of this module, we will use this for export to HUB, create a preset etc.
64 *
65 * @return array
66 */
67 public function to_array() {
68 return array();
69 }
70
71 /**
72 * Import the data of other source into this, it can be when HUB trigger the import, or user apply a preset.
73 *
74 * @param array $data Data from other source.
75 *
76 * @return null|void
77 */
78 public function import_data( array $data ) {
79 // TODO: Implement import_data() method.
80 }
81
82 /**
83 * Remove all settings, configs generated in this container runtime.
84 *
85 * @return mixed
86 */
87 public function remove_settings() {
88 // TODO: Implement remove_settings() method.
89 }
90
91 /**
92 * Remove all data.
93 *
94 * @return mixed
95 */
96 public function remove_data() {
97 // TODO: Implement remove_data() method.
98 }
99
100 /**
101 * Export strings.
102 *
103 * @return array
104 */
105 public function export_strings(): array {
106 return array();
107 }
108
109 /**
110 * Render the page.
111 *
112 * @return void
113 */
114 public function main_view(): void {
115 $this->render( 'main' );
116 }
117 }
118