import( array_merge( $this->base_defaults(), array( 'slug' => self::SLUG, 'title' => esc_html__( 'Issue - 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__( 'Issue - Reporting', 'defender-security' ), 'always_send' => esc_html__( 'Send alerts 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; } }