# defender-security/3.0.1/src/model/setting/audit-logging.php

Defender Security – Malware Scanner, Login Security &amp; Firewall, version 3.0.1. 53 lines.

- Page: https://pluginprobe.com/plugins/defender-security/3.0.1/code/src/model/setting/audit-logging.php
- Raw: https://pluginprobe.com/plugins/defender-security/3.0.1/raw/src/model/setting/audit-logging.php
- Modified: 2022-06-16T08:36:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/defender-security/3.0.1/code/src/model/setting/audit-logging.php#L10-L20`.

```php
<?php

namespace WP_Defender\Model\Setting;

use Calotes\Model\Setting;

class Audit_Logging extends Setting {
	/**
	 * Option name.
	 * @var string
	 */
	protected $table = 'wd_audit_settings';
	/**
	 * @defender_property
	 * @var bool
	 */
	public $enabled = false;
	/**
	 * @defender_property
	 * @var string
	 */
	public $storage_days = '6 months';

	/**
	 * Define labels for settings key.
	 *
	 * @param  string|null $key
	 *
	 * @return string|array|null
	 */
	public function labels( $key = null ) {
		$labels = array(
			'enabled'      => __( 'Audit Logging', 'wpdef' ),
			'storage_days' => __( 'Storage for', 'wpdef' ),
		);

		if ( ! is_null( $key ) ) {
			return $labels[ $key ] ?? null;
		}

		return $labels;
	}

	/**
	 * @since 2.6.5
	 * @return bool
	 */
	public function is_active() {

		return (bool) apply_filters( 'wd_audit_enable', $this->enabled );
	}
}

```
