/
home
/
assocoweys
/
comgk
/
wp-content
/
plugins
/
defender-security
/
src
/
model
/
notification
/
Upload File
HOME
<?php /** * Malware Scanning report notification stub for free version. * * @package WP_Defender\Model\Notification */ namespace WP_Defender\Model\Notification; /** * Malware Scanning – Reporting. */ class Malware_Report extends Free_Report { /** * Table name. * * @var string */ protected $table = 'wd_malware_scanning_report'; /** * Slug identifier for the malware report. * * @var string */ public const SLUG = 'malware-report'; /** * Sets default values. */ protected function before_load(): void { $this->import( array_merge( $this->base_defaults(), array( 'slug' => self::SLUG, 'title' => esc_html__( 'Malware Scanning - Reporting', 'defender-security' ), 'description' => esc_html__( 'Automatically run regular scans of your website and email you reports.', 'defender-security' ), 'configs' => array( 'always_send' => false, 'error_send' => false, 'template' => array(), ), ) ) ); } /** * Define settings labels. * * @return array */ public function labels(): array { return array( 'report' => esc_html__( 'Malware Scanning - Reporting', 'defender-security' ), 'always_send' => esc_html__( 'Send notifications when no issues are detected', 'defender-security' ), 'report_subscribers' => esc_html__( 'Recipients', 'defender-security' ), 'day' => esc_html__( 'Day of', 'defender-security' ), 'day_n' => esc_html__( 'Day of', 'defender-security' ), 'time' => esc_html__( 'Time of day', 'defender-security' ), 'frequency' => esc_html__( 'Frequency', 'defender-security' ), ); } /** * Returns 'Never' — report cannot run in the free version. * * @return string */ public function get_next_run_for_hub(): string { return esc_html__( 'Never', 'defender-security' ); } /** * Additional converting rules. * * @param array $configs The configuration data. * * @return array The type-casted configuration data. */ public function type_casting( $configs ): array { $configs['always_send'] = (bool) ( $configs['always_send'] ?? false ); $configs['error_send'] = (bool) ( $configs['error_send'] ?? false ); return $configs; } }