PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.2.0
Defender Security – Malware Scanner, Login Security & Firewall v6.2.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 / view / email / scan-issue-list.php

scan-issue-list.php in Defender Security – Malware Scanner, Login Security & Firewall 6.2.0, at src/view/email/scan-issue-list.php

145 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template is used to display list of scan issues in email.
4 *
5 * @package WP_Defender
6 */
7
8 $abandoned_plugins_html = '';
9 $other_issues_html = '';
10 $abandoned_types = \WP_Defender\Model\Scan::get_abandoned_types();
11 $abs_path = untrailingslashit( ABSPATH );
12
13 foreach ( $issues as $item ) {
14 $detail = $item->to_array();
15 $full_path = '';
16 if ( isset( $detail['full_path'] ) && is_string( $detail['full_path'] ) && '' !== trim( $detail['full_path'] ) ) {
17 $full_path = esc_html( $detail['full_path'] );
18 if ( 0 === strpos( $full_path, $abs_path ) ) {
19 $full_path = $abs_path . '<span>' . substr( $full_path, strlen( $abs_path ) ) . '</span>';
20 }
21 }
22
23 $item_type = isset( $item->type ) ? $item->type : ( $detail['type'] ?? '' );
24 $file_name = $detail['file_name'] ?? '';
25 $short_desc = $detail['short_desc'] ?? '';
26
27 if ( in_array( $item_type, $abandoned_types, true ) ) {
28 $abandoned_plugins_html .= '<tr class="report-list-item" style="border: 1px solid #F2F2F2;padding: 0;text-align: left;vertical-align: top">
29 <td class="report-list-item-info" style="border-collapse: collapse !important;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;line-height: 22px;font-weight: 500;letter-spacing: -0.23px;margin: 0;padding: 18px 0;text-align: left;vertical-align: top">
30 <span style="color: inherit;display: inline-block;font-size: inherit;font-weight: inherit;font-family: inherit;line-height: inherit;vertical-align: middle;letter-spacing: -0.25px;padding-left: 20px;">
31 ' . esc_html( $file_name ) . '
32 </span>
33 </td>
34 <td class="report-list-item-info" style="border-collapse: collapse !important;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;line-height: 22px;font-weight: 500;letter-spacing: -0.25px;margin: 0;padding: 18px 0;vertical-align: top">
35 <span style="color: inherit;display: inline-block;font-size: inherit;font-weight: inherit;font-family: inherit;line-height: inherit;vertical-align: middle;letter-spacing: -0.25px;padding-right: 20px;">
36 ' . esc_html( $short_desc ) . '
37 </span>
38 </td>
39 </tr>';
40 } else {
41 $other_issues_html .= '<tr class="report-list-item" style="border: 1px solid #F2F2F2;padding: 0;text-align: left;vertical-align: top">
42 <td class="report-list-item-info" style="border-collapse: collapse !important;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;line-height: 22px;font-weight: 500;letter-spacing: -0.23px;margin: 0;padding: 18px 0;text-align: left;vertical-align: top">
43 <span style="color: inherit;display: inline-block;font-size: inherit;font-weight: inherit;font-family: inherit;line-height: inherit;vertical-align: middle;letter-spacing: -0.25px;padding-left: 20px;">
44 ' . esc_html( $file_name ) . '
45 <span class="report-list-item-path" style="display: inline-block; width: 100%;">' . wp_kses( $full_path, array( 'span' => array() ) ) . '</span>
46 </span>
47 </td>
48 <td class="report-list-item-info" style="border-collapse: collapse !important;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;line-height: 22px;font-weight: 500;letter-spacing: -0.23px;margin: 0;padding: 18px 0;text-align: left;vertical-align: top">
49 <span style="color: inherit;display: inline-block;font-size: inherit;font-weight: inherit;font-family: inherit;line-height: inherit;vertical-align: middle;letter-spacing: -0.25px;padding-right: 20px;">' . esc_html( $short_desc ) . '</span>
50 </td>
51 </tr>';
52 }
53 }
54
55 if ( '' !== $other_issues_html ) : ?>
56 <table class="reports-list" align="center"
57 style="border-collapse: collapse;border-spacing: 0;margin: 0 0 30px;padding: 0;text-align: left;vertical-align: top;width: 100%">
58 <thead>
59 <tr>
60 <th style="padding-left: 20px;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;font-weight: 500;line-height: 27px; letter-spacing: -0.23px; text-align: left; background-color: #F2F2F2; border-radius: 4px 0 0 0; overflow:hidden;">
61 <?php esc_html_e( 'File', 'defender-security' ); ?>
62 </th>
63 <th style="padding-right: 20px;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;font-weight: 500;line-height: 27px; letter-spacing: -0.23px; text-align: right; width:180px; background-color: #F2F2F2; border-radius: 0 4px 0 0; overflow:hidden;">
64 <?php esc_html_e( 'Issue', 'defender-security' ); ?>
65 </th>
66 </tr>
67 </thead>
68 <tbody>
69 <?php
70 echo wp_kses(
71 $other_issues_html,
72 array(
73 'tr' => array(
74 'class' => array(),
75 'style' => array(),
76 ),
77 'td' => array(
78 'class' => array(),
79 'style' => array(),
80 ),
81 'span' => array(
82 'class' => array(),
83 'style' => array(),
84 ),
85 )
86 );
87 ?>
88 </tbody>
89 </table>
90 <?php endif; if ( '' !== $abandoned_plugins_html ) : ?>
91 <div style="margin-top: 30px;">
92 <table class="abandoned-plugins-list" align="center"
93 style="border-collapse: collapse;border-spacing: 0;margin: 0 0 20px;padding: 0;text-align: left;vertical-align: top;width: 100%">
94 <thead>
95 <tr>
96 <th style="padding-left: 20px;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;font-weight: 500;line-height: 27px; letter-spacing: -0.23px; text-align: left; background-color: #F2F2F2; border-radius: 4px 0 0 0; overflow:hidden;">
97 <?php esc_html_e( 'Plugin', 'defender-security' ); ?>
98 </th>
99 <th style="padding-right: 20px;color: #1A1A1A;font-family: Roboto, Arial, sans-serif;font-size: 12px;font-weight: 500;line-height: 27px; letter-spacing: -0.23px; text-align: right; width:180px; background-color: #F2F2F2; border-radius: 0 4px 0 0; overflow:hidden;">
100 <?php esc_html_e( 'Issue', 'defender-security' ); ?>
101 </th>
102 </tr>
103 </thead>
104 <tbody>
105 <?php
106 echo wp_kses(
107 $abandoned_plugins_html,
108 array(
109 'tr' => array(
110 'class' => array(),
111 'style' => array(),
112 ),
113 'td' => array(
114 'class' => array(),
115 'style' => array(),
116 ),
117 'span' => array(
118 'class' => array(),
119 'style' => array(),
120 ),
121 )
122 );
123 ?>
124 </tbody>
125 </table>
126 </div>
127 <?php endif; ?>
128 <p style="font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight: normal;line-height: 10px;margin: 0;padding: 0;text-align: center">
129 <a href="
130 <?php
131 echo esc_url(
132 apply_filters(
133 'report_email_logs_link',
134 network_admin_url( 'admin.php?page=wdf-scan' ),
135 $email
136 )
137 );
138 ?>
139 "
140 class="button view-full"
141 style="font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight: normal;line-height: 20px;text-align: center; margin-bottom:0;">
142 <?php esc_html_e( 'View Full Report', 'defender-security' ); ?>
143 </a>
144 </p>
145