| 1 |
<?php |
| 2 |
/** |
| 3 |
* Handle common Scan notification and reporting template. |
| 4 |
* |
| 5 |
* @since 3.8.0 |
| 6 |
* @package WP_Defender\Traits |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace WP_Defender\Traits; |
| 10 |
|
| 11 |
trait Scan_Email_Template { |
| 12 |
|
| 13 |
/** |
| 14 |
* Get email template. |
| 15 |
* |
| 16 |
* @return array |
| 17 |
*/ |
| 18 |
public function get_email_template(): array { |
| 19 |
return array( |
| 20 |
'found' => array( |
| 21 |
'subject' => esc_html__( |
| 22 |
'Issues Report for {SITE_URL}: {ISSUES_COUNT} issue(s) found.', |
| 23 |
'defender-security' |
| 24 |
), |
| 25 |
'body' => esc_html__( |
| 26 |
'Hi {USER_NAME}, |
| 27 |
|
| 28 |
A scan of {SITE_URL} identified {ISSUES_COUNT} issue(s). The issue(s) found is/are listed below. |
| 29 |
|
| 30 |
{ISSUES_LIST}', |
| 31 |
'defender-security' |
| 32 |
), |
| 33 |
), |
| 34 |
'not_found' => array( |
| 35 |
'subject' => esc_html__( 'Issues Report for {SITE_URL}: {ISSUES_COUNT} issues found.', 'defender-security' ), |
| 36 |
'body' => esc_html__( |
| 37 |
'Hi {USER_NAME}, |
| 38 |
|
| 39 |
No vulnerabilities have been found for {SITE_URL}.', |
| 40 |
'defender-security' |
| 41 |
), |
| 42 |
), |
| 43 |
'error' => array( |
| 44 |
'subject' => esc_html__( 'Issues Report for {SITE_URL}: scan failed.', 'defender-security' ), |
| 45 |
'body' => esc_html__( |
| 46 |
'Hi {USER_NAME}, |
| 47 |
|
| 48 |
We couldn\'t scan {SITE_URL} for vulnerabilities. Please visit your site and run a manual scan.', |
| 49 |
'defender-security' |
| 50 |
), |
| 51 |
), |
| 52 |
); |
| 53 |
} |
| 54 |
} |
| 55 |
|