Skip to content

Commit 57f3cb1

Browse files
committed
added websites toggle in list
Toggle off/on websites with no vulnerabilities. Updated translation NL.
1 parent a241759 commit 57f3cb1

File tree

5 files changed

+119
-92
lines changed

5 files changed

+119
-92
lines changed

hhdev-mwp-check-plugins-vulnerability.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Check Plugins Vulnerability
44
* Plugin URI: https://haha.nl
55
* Description: Check the installed website plugins for vulnerability use the wordfence vulnerability data feed api.
6-
* Version: 1.0.7
6+
* Version: 1.0.8
77
* Author: herbert hoekstra - haha!
88
* Author URI: https://haha.nl
99
* Documentation URI: https://haha.nl/wordpress-plug-in-op-maat/
@@ -377,6 +377,7 @@ public function hhdev_make_adapted_file() {
377377

378378
/*
379379
change log:
380+
- 1.0.8 added: Dashboard: option to show hide no vulnerability results
380381
- 1.0.7 added: version syntaxt check
381382
- 1.0.7 fix: Dashboard: No vulnerabilties repaeting on vulnerable notice.
382383
- 1.0.6 fix: using to_inclusive to adjust version compare, fix: add all vulnerable versions in the clean data file, added: jellix version compare

hhdev-mwpcpv-dashboard.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
// mwpcpv dashboard
3-
// version: 1.0.7
3+
// version: 1.0.8
44
// ---------------------
55
class MainWPCheckPluginVulnerability extends MainWPCheckPluginVulnerabilityActivator {
66

@@ -94,6 +94,16 @@ public static function hhdev_mwpcpv_render_page() {
9494
// end segment
9595

9696
?>
97+
<script>
98+
jQuery(function($) {
99+
$('.ui.segment.website').find('span').parent().addClass('novuln');
100+
$( "#toggle-novuln" ).on( "click", function() {
101+
$( ".ui.segment.website.novuln" ).toggle( "slow", function() {
102+
// Animation complete.
103+
});
104+
});
105+
});
106+
</script>
97107
<div class='ui segment'>
98108
<p><?php _e('Please make sure you do a "sync dashboard with sites" before you run a scan!','hhdev-mwpcpv'); ?></p>
99109
<form id="run-scan" name="run-scan" action="<?php echo str_replace('%7E', '~', $_SERVER['REQUEST_URI']); ?>" method="post">
@@ -106,6 +116,8 @@ public static function hhdev_mwpcpv_render_page() {
106116
<?php } // end if file exist ?>
107117

108118
</form>
119+
<p>&nbsp;</p>
120+
<p id="toggle-novuln" style="cursor:pointer;"><?php if (isset($_POST['mwpcpv-run-scan'])) _e('Hide/show websites with no vulnerabilities.','hhdev-mwpcpv'); ?></p>
109121
</div>
110122

111123
<?php
@@ -140,7 +152,7 @@ public static function hhdev_mwpcpv_render_page() {
140152

141153
if ( is_array( $plugins ) && count( $plugins ) != 0 ) {
142154

143-
echo "<div class='ui segment'>";
155+
echo "<div class='ui segment website'>";
144156

145157
echo '<h2>'.$website->name.'</h2>';
146158

@@ -197,7 +209,7 @@ public static function hhdev_mwpcpv_render_page() {
197209

198210
} // end foreach
199211

200-
if($vuln_notice == false) echo wp_sprintf( __('No vulnerabilities found!','hhdev-mwpcpv'));
212+
if($vuln_notice == false) echo '<span>'.wp_sprintf( __('No vulnerabilities found!','hhdev-mwpcpv').'</span>');
201213

202214
echo '</div>'; // close the segment
203215

languages/hhdev-mwpcpv-nl_NL.mo

-67 Bytes
Binary file not shown.

languages/hhdev-mwpcpv-nl_NL.po

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: undefined\n"
6-
"POT-Creation-Date: 2023-10-09 10:55+0200\n"
6+
"POT-Creation-Date: 2024-03-22 10:27+0100\n"
77
"PO-Revision-Date: \n"
88
"Last-Translator: \n"
99
"Language-Team: haha.nl\n"
@@ -21,120 +21,122 @@ msgstr ""
2121
"X-Poedit-SearchPath-0: .\n"
2222
"X-Poedit-SearchPathExcluded-0: *.js\n"
2323

24-
#: hhdev-mwp-check-plugins-vulnerability.php:62
24+
#: hhdev-mwp-check-plugins-vulnerability.php:94
25+
msgid "The Extension has to be enabled to change the settings."
26+
msgstr "De extensie moet worden geactiveerd om instellingen te wijzigen."
27+
28+
#: hhdev-mwp-check-plugins-vulnerability.php:124
29+
msgid "requires "
30+
msgstr "noodzakelijk"
31+
32+
#: hhdev-mwp-check-plugins-vulnerability.php:124
33+
msgid " Plugin to be activated in order to work. Please install and activate"
34+
msgstr "Plugin is nodig om te werken. Activeer de plugin"
35+
36+
#: hhdev-mwp-check-plugins-vulnerability.php:124
37+
msgid "first."
38+
msgstr "eerst."
39+
40+
#: hhdev-mwpcpv-dashboard.php:48
2541
msgid "Check Plugins Vulnerability"
2642
msgstr ""
2743

28-
#: hhdev-mwp-check-plugins-vulnerability.php:64
44+
#: hhdev-mwpcpv-dashboard.php:50
2945
msgid ""
3046
"Here you can check if there are plugins that need updating for security "
3147
"reasons."
3248
msgstr ""
3349
"Hier kun je de controleren of er plugins zijn die, om veiligheids "
3450
"overwegingen, geupdated moeten worden. "
3551

36-
#: hhdev-mwp-check-plugins-vulnerability.php:67
52+
#: hhdev-mwpcpv-dashboard.php:53
3753
#, php-format
3854
msgid "Data from %s is used to check plugins for each childsite."
3955
msgstr ""
4056
"Data van %s wordt gebruikt om voor elke website de plugins te controleren. "
4157

42-
#: hhdev-mwp-check-plugins-vulnerability.php:71
58+
#: hhdev-mwpcpv-dashboard.php:57
4359
msgid "The scan only shows plugins that need to be updated per site."
4460
msgstr "De scan toont alleen plugins die een update nodig hebben."
4561

46-
#: hhdev-mwp-check-plugins-vulnerability.php:73
62+
#: hhdev-mwpcpv-dashboard.php:59
4763
msgid ""
4864
"An adapted data file is created for scanning with vulnarability data only 24 "
4965
"month in the past based on when it was updated."
5066
msgstr ""
5167
"Een aangepast bestand wordt aangemaakt met veiligheidsdata tot 24 maanden "
5268
"terug in de tijd, gebasseeerd op de aanpassings datum."
5369

54-
#: hhdev-mwp-check-plugins-vulnerability.php:83
70+
#: hhdev-mwpcpv-dashboard.php:69
5571
msgid "File updated!"
5672
msgstr "Bestand aangepast!"
5773

58-
#: hhdev-mwp-check-plugins-vulnerability.php:84
74+
#: hhdev-mwpcpv-dashboard.php:70
5975
msgid "Not updated!"
6076
msgstr "Niet aangepast!"
6177

62-
#: hhdev-mwp-check-plugins-vulnerability.php:85
78+
#: hhdev-mwpcpv-dashboard.php:71
6379
msgid "Adapted file created!!"
6480
msgstr "Aangepast bestand gemaakt!"
6581

66-
#: hhdev-mwp-check-plugins-vulnerability.php:89
82+
#: hhdev-mwpcpv-dashboard.php:75
6783
msgid "No base file found. Please click the \"Update data file\" button."
6884
msgstr ""
6985
"Geen basis bestand gevonden. Klik op de \"Pas data bestand aan\" knop. "
7086

71-
#: hhdev-mwp-check-plugins-vulnerability.php:93
87+
#: hhdev-mwpcpv-dashboard.php:79
7288
msgid "Local WordFence api data file: "
7389
msgstr "Lokaal WordFence api data bestand:"
7490

75-
#: hhdev-mwp-check-plugins-vulnerability.php:98
91+
#: hhdev-mwpcpv-dashboard.php:84
7692
msgid "Update data file"
7793
msgstr "Pas data bestand aan"
7894

79-
#: hhdev-mwp-check-plugins-vulnerability.php:112
95+
#: hhdev-mwpcpv-dashboard.php:108
8096
msgid ""
8197
"Please make sure you do a \"sync dashboard with sites\" before you run a "
8298
"scan!"
8399
msgstr ""
84100
"Zorg dat je altijd eerst een \"sync dashboard with sites\" doet voordat je "
85101
"een scan draait!"
86102

87-
#: hhdev-mwp-check-plugins-vulnerability.php:119
103+
#: hhdev-mwpcpv-dashboard.php:115
88104
msgid "Run the scan!"
89105
msgstr "Doe een scan!"
90106

91-
#: hhdev-mwp-check-plugins-vulnerability.php:176
107+
#: hhdev-mwpcpv-dashboard.php:120
108+
msgid "Hide/show websites with no vulnerabilities."
109+
msgstr "Verberg/toon websites zonder kwetsbaarheden."
110+
111+
#: hhdev-mwpcpv-dashboard.php:172
92112
msgid "No"
93113
msgstr "Nee"
94114

95-
#: hhdev-mwp-check-plugins-vulnerability.php:177
115+
#: hhdev-mwpcpv-dashboard.php:173
96116
msgid "Yes"
97117
msgstr "Ja"
98118

99-
#: hhdev-mwp-check-plugins-vulnerability.php:185
119+
#: hhdev-mwpcpv-dashboard.php:190
100120
#, php-format
101121
msgid "Website plugin version: %s"
102122
msgstr "Website plugin versie: %s"
103123

104-
#: hhdev-mwp-check-plugins-vulnerability.php:189
124+
#: hhdev-mwpcpv-dashboard.php:194
105125
#, php-format
106126
msgid "Has patch: %s"
107127
msgstr "Heeft een oplossing: %s"
108128

109-
#: hhdev-mwp-check-plugins-vulnerability.php:193
129+
#: hhdev-mwpcpv-dashboard.php:198
110130
msgid "Reference:"
111131
msgstr "Referentie:"
112132

113-
#: hhdev-mwp-check-plugins-vulnerability.php:208
133+
#: hhdev-mwpcpv-dashboard.php:212
114134
msgid "No vulnerabilities found!"
115135
msgstr "Geen kwetsbaarheden gevonden!"
116136

117-
#: hhdev-mwp-check-plugins-vulnerability.php:317
118-
msgid "You will be redirected to the page immediately."
119-
msgstr "Je wordt direct doorgestuurd naar de juiste pagina."
120-
121-
#: hhdev-mwp-check-plugins-vulnerability.php:342
122-
msgid "The Extension has to be enabled to change the settings."
123-
msgstr "De extensie moet worden geactiveerd om instellingen te wijzigen."
124-
125-
#: hhdev-mwp-check-plugins-vulnerability.php:369
126-
msgid "requires "
127-
msgstr "noodzakelijk"
128-
129-
#: hhdev-mwp-check-plugins-vulnerability.php:369
130-
msgid " Plugin to be activated in order to work. Please install and activate"
131-
msgstr "Plugin is nodig om te werken. Activeer de plugin"
132-
133-
#: hhdev-mwp-check-plugins-vulnerability.php:369
134-
msgid "first."
135-
msgstr "eerst."
137+
#~ msgid "You will be redirected to the page immediately."
138+
#~ msgstr "Je wordt direct doorgestuurd naar de juiste pagina."
136139

137-
#: hhdev-mwp-check-plugins-vulnerability.php:493
138140
#, php-format
139-
msgid "Records saved: %s"
140-
msgstr "Rapporten bewaard: %s"
141+
#~ msgid "Records saved: %s"
142+
#~ msgstr "Rapporten bewaard: %s"

0 commit comments

Comments
 (0)