HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/foar/wp-content/plugins/defender-security/src/model/setting/class-audit-logging.php
<?php
/**
 * Handles audit logging settings.
 *
 * @package WP_Defender\Model\Setting
 */

namespace WP_Defender\Model\Setting;

use Calotes\Model\Setting;

/**
 * Model for audit logging settings.
 */
class Audit_Logging extends Setting {

	/**
	 * Option name.
	 *
	 * @var string
	 */
	protected $table = 'wd_audit_settings';
	/**
	 * Is module enabled?
	 *
	 * @defender_property
	 * @var bool
	 */
	public $enabled = false;
	/**
	 * Table column for storage days.
	 *
	 * @defender_property
	 * @var string
	 */
	public $storage_days = '6 months';

	/**
	 * Define settings labels.
	 *
	 * @return array
	 */
	public function labels(): array {
		return array(
			'enabled'      => self::get_module_name(),
			'storage_days' => esc_html__( 'Storage for', 'defender-security' ),
		);
	}

	/**
	 * Checks if the audit logging is active.
	 *
	 * @return bool Returns true if the audit logging is active, false otherwise.
	 * @since 2.6.5
	 */
	public function is_active(): bool {
		return (bool) apply_filters( 'wd_audit_enable', $this->enabled );
	}

	/**
	 * Retrieves the module name for audit logging.
	 *
	 * @return string The module name for audit logging.
	 */
	public static function get_module_name(): string {
		return esc_html__( 'Audit Logging', 'defender-security' );
	}
}