PluginProbe
WebTotem Security / 3.0.2
WebTotem Security v3.0.2
3.0.2 3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 All 110 releases
← All changes | src/Common.php +7 -37 3.0.13.0.2 View file →
@@ -9,36 +9,16 @@
9 9
10 10 add_action('upgrader_process_complete', 'wt_security_upgrade_complete', 10, 2);
11 11 function wt_security_upgrade_complete($upgrader, $options)
12 12 {
13 - /**
14 - * Creating a marker file after updating the plugin.
15 - */
16 - if ($options['type'] === 'plugin' && $options['action'] === 'update' && $upgrader->result['destination_name'] == 'wt-security') {
17 - WebTotemAgentManager::generateMarkerFile();
18 - }
19 -
20 - /**
21 - * Check CVE list after install or update plugin.
22 - */
23 -// if ($options['type'] === 'plugin' && ($options['action'] === 'update' || $options['action'] === 'install')){
24 -// WebTotem::updateCveDataByPluginName($upgrader->new_plugin_data);
25 -// }
13 + /**
14 + * Creating a marker file after updating the plugin.
15 + */
16 + if ($options['type'] === 'plugin' && $options['action'] === 'update' && $upgrader->result['destination_name'] == 'wt-security') {
17 + WebTotemAgentManager::generateMarkerFile();
18 + }
26 19 }
27 20
28 -/**
29 - * Remove CVE from list after plugin delete.
30 - */
31 -//add_action( 'deleted_plugin', 'wt_security_deleted_plugin_action', 10, 2 );
32 -//function wt_security_deleted_plugin_action( $plugin_file, $deleted ){
33 -// if($deleted){
34 -// $slug = str_replace('.php', '', basename($plugin_file));
35 -// if($slug != 'wt-security'){
36 -// WebTotemDB::deleteData(['slug' => $slug], 'plugins_cve_list');
37 -// }
38 -// }
39 -//}
40 -
41 21 // WAF Include.
42 22 WebTotemAgentManager::wafInclude();
43 23
44 24 if (defined('WEBTOTEM')) {
@@ -108,9 +88,8 @@
108 88
109 89 function WtotemDailyCron()
110 90 {
111 91 WebTotemOption::setOptions(['scan_init' => 1]);
112 -// WebTotem::updateCveData();
113 92 }
114 93
115 94 /** Launch of the minute cron. */
116 95 if (WebTotemOption::getOption('scan_init')) {
@@ -145,25 +124,16 @@
145 124 * @return array List of sub-pages of this plugin.
146 125 */
147 126 function wtotemPages()
148 127 {
149 -// if (WebTotem::isMultiSite()) {
150 -// $pages['wtotem_all_sites'] = ['title' => __('All sites', 'wtotem'), 'slug' => 'wtotem'];
151 -// }
152 -// $slug = WebTotem::isMultiSite() ? 'wtotem_' : 'wtotem';
128 +
153 129 $slug = 'wtotem';
154 130
155 131 $pages['wtotem_dashboard'] = ['title' => __('Dashboard', 'wtotem'), 'slug' => $slug];
156 132 $pages['wtotem_open_paths'] = ['title' => __('Open paths', 'wtotem'), 'slug' => $slug];
157 133 $pages['wtotem_firewall'] = ['title' => __('Firewall', 'wtotem'), 'slug' => $slug];
158 -
159 -// if (!WebTotem::isMultiSite() or is_super_admin()) {
160 -// $pages['wtotem_antivirus'] = ['title' => __('Antivirus', 'wtotem'), 'slug' => $slug];
161 -// $pages['wtotem_settings'] = ['title' => __('Settings', 'wtotem'), 'slug' => $slug];
162 -// }
163 134 $pages['wtotem_antivirus'] = ['title' => __('Antivirus', 'wtotem'), 'slug' => $slug];
164 135 $pages['wtotem_settings'] = ['title' => __('Settings', 'wtotem'), 'slug' => $slug];
165 -// $pages['wtotem_reports'] = ['title' => __('Reports', 'wtotem'), 'slug' => $slug];
166 136 $pages['wtotem_documentation'] = ['title' => __('Documentation', 'wtotem'), 'slug' => 'wtotem'];
167 137 $pages['wtotem_wpscan'] = ['title' => __('WP scan', 'wtotem'), 'slug' => 'wtotem'];
168 138
169 139 return $pages;